mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-09 03:20:05 +00:00
Update gpio-fan-overlay.dts (#2711)
Add references, links, clear details, some typo correction.
This commit is contained in:
@@ -1,29 +1,37 @@
|
|||||||
/*
|
/*
|
||||||
* Overlay for the Raspberry Pi GPIO Fan @ BCM GPIO12.
|
* Overlay for the Raspberry Pi GPIO Fan @ BCM GPIO12.
|
||||||
|
* References:
|
||||||
|
* - https://www.raspberrypi.org/forums/viewtopic.php?f=107&p=1367135#p1365084
|
||||||
|
*
|
||||||
* Optional parameters:
|
* Optional parameters:
|
||||||
* - "gpiopin" - default GPIO12
|
* - "gpiopin" - BCM number of the pin driving the fan, default 12 (GPIO12);
|
||||||
* - "temp" - default 55000
|
* - "temp" - CPU temperature at which fan is started in millicelsius, default 55000;
|
||||||
|
*
|
||||||
* Requires:
|
* Requires:
|
||||||
* - kernel configurations: CONFIG_SENSORS_GPIO_FAN=m and CONFIG_SENSORS_PWM_FAN=m;
|
* - kernel configurations: CONFIG_SENSORS_GPIO_FAN=m;
|
||||||
* - kernel rebuid;
|
* - kernel rebuild;
|
||||||
* - DC Fan connected to GPIO via a N-MOSFET (2N7002)
|
* - N-MOSFET connected to gpiopin, 2N7002-[https://en.wikipedia.org/wiki/2N7000];
|
||||||
|
* - DC Fan connected to N-MOSFET Drain terminal, a 12V fan is working fine and quite silently;
|
||||||
|
* [https://www.tme.eu/en/details/ee40101s1-999-a/dc12v-fans/sunon/ee40101s1-1000u-999/]
|
||||||
*
|
*
|
||||||
* ┌─────────────────────┐
|
* ┌─────────────────────┐
|
||||||
* │Fan negative terminal│
|
* │Fan negative terminal│
|
||||||
* └┬────────────────────┘
|
* └┬────────────────────┘
|
||||||
* │
|
* │D
|
||||||
* │──┘
|
* G │──┘
|
||||||
* [GPIO12]──────┤ │<─┐ 2N7002
|
* [GPIO12]──────┤ │<─┐ 2N7002
|
||||||
* │──┤
|
* │──┤
|
||||||
* │
|
* │S
|
||||||
* ─┴─
|
* ─┴─
|
||||||
* GND
|
* GND
|
||||||
*
|
*
|
||||||
* sudo dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o /boot/overlays/gpio-fan.dtbo gpio-fan.dts
|
* Build:
|
||||||
* sudo nano /boot/config.txt add "dtoverlay=gpio-fan" or "dtoverlay=gpio-fan,gpiopin=12,temp=45000"
|
* - `sudo dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o /boot/overlays/gpio-fan.dtbo gpio-fan-overlay.dts`
|
||||||
* or
|
* Activate:
|
||||||
* sudo sh -c "echo '\n# Enable PI GPIO-Fan\ndtoverlay=gpio-fan\n' >> /boot/config.txt"
|
* - sudo nano /boot/config.txt add "dtoverlay=gpio-fan" or "dtoverlay=gpio-fan,gpiopin=12,temp=45000"
|
||||||
* sudo sh -c "echo '\n# Enable PI GPIO-Fan\ndtoverlay=gpio-fan,gpiopin=12\n' >> /boot/config.txt"
|
* or
|
||||||
|
* - sudo sh -c 'printf "\n# Enable PI GPIO-Fan Default\ndtoverlay=gpio-fan\n" >> /boot/config.txt'
|
||||||
|
* - sudo sh -c 'printf "\n# Enable PI GPIO-Fan Custom\ntoverlay=gpio-fan,gpiopin=12,temp=45000\n" >> /boot/config.txt'
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
@@ -52,7 +60,7 @@
|
|||||||
trips {
|
trips {
|
||||||
cpu_hot: trip-point@0 {
|
cpu_hot: trip-point@0 {
|
||||||
temperature = <55000>; /* (millicelsius) Fan started at 55°C */
|
temperature = <55000>; /* (millicelsius) Fan started at 55°C */
|
||||||
hysteresis = <5000>; /* (millicelsius) Fan stopped at 50°C */
|
hysteresis = <10000>; /* (millicelsius) Fan stopped at 45°C */
|
||||||
type = "active";
|
type = "active";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user