File tree 11 files changed +590
-0
lines changed
devicetree/bindings/hwmon
11 files changed +590
-0
lines changed Original file line number Diff line number Diff line change
1
+ Bindings for the Raspberry Pi PoE HAT fan
2
+
3
+ Required properties:
4
+ - compatible : "raspberrypi,rpi-poe-fan"
5
+ - firmware : Reference to the RPi firmware device node
6
+ - pwms : the PWM that is used to control the PWM fan
7
+ - cooling-levels : PWM duty cycle values in a range from 0 to 255
8
+ which correspond to thermal cooling states
9
+
10
+ Example:
11
+ fan0: rpi-poe-fan@0 {
12
+ compatible = "raspberrypi,rpi-poe-fan";
13
+ firmware = <&firmware>;
14
+ cooling-min-state = <0>;
15
+ cooling-max-state = <3>;
16
+ #cooling-cells = <2>;
17
+ cooling-levels = <0 50 150 255>;
18
+ status = "okay";
19
+ };
20
+
21
+ thermal-zones {
22
+ cpu_thermal: cpu-thermal {
23
+ trips {
24
+ threshold: trip-point@0 {
25
+ temperature = <45000>;
26
+ hysteresis = <5000>;
27
+ type = "active";
28
+ };
29
+ target: trip-point@1 {
30
+ temperature = <50000>;
31
+ hysteresis = <2000>;
32
+ type = "active";
33
+ };
34
+ cpu_hot: cpu_hot@0 {
35
+ temperature = <55000>;
36
+ hysteresis = <2000>;
37
+ type = "active";
38
+ };
39
+ };
40
+ cooling-maps {
41
+ map0 {
42
+ trip = <&threshold>;
43
+ cooling-device = <&fan0 0 1>;
44
+ };
45
+ map1 {
46
+ trip = <&target>;
47
+ cooling-device = <&fan0 1 2>;
48
+ };
49
+ map2 {
50
+ trip = <&cpu_hot>;
51
+ cooling-device = <&fan0 2 3>;
52
+ };
53
+ };
54
+ };
55
+ };
Original file line number Diff line number Diff line change
1
+ Kernel driver rpi-poe-fan
2
+ =====================
3
+
4
+ This driver enables the use of the Raspberry Pi PoE HAT fan.
5
+
6
+ Author: Serge Schneider <
[email protected] >
7
+
8
+ Description
9
+ -----------
10
+
11
+ The driver implements a simple interface for driving the Raspberry Pi PoE
12
+ (Power over Ethernet) HAT fan. The driver passes commands to the Raspberry Pi
13
+ firmware through the mailbox property interface. The firmware then forwards
14
+ the commands to the board over I2C on the ID_EEPROM pins. The driver exposes
15
+ the fan to the user space through the hwmon sysfs interface.
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
100
100
rpi-dac.dtbo \
101
101
rpi-display.dtbo \
102
102
rpi-ft5406.dtbo \
103
+ rpi-poe.dtbo \
103
104
rpi-proto.dtbo \
104
105
rpi-sense.dtbo \
105
106
rpi-tv.dtbo \
Original file line number Diff line number Diff line change @@ -1515,6 +1515,12 @@ Params: touchscreen-size-x Touchscreen X resolution (default 800)
1515
1515
touchscreen-swapped-x-y Swap X and Y cordinates (default 0);
1516
1516
1517
1517
1518
+ Name: rpi-poe
1519
+ Info: Raspberry Pi POE HAT
1520
+ Load: dtoverlay=rpi-poe
1521
+ Params: <None>
1522
+
1523
+
1518
1524
Name: rpi-proto
1519
1525
Info: Configures the RPi Proto audio card
1520
1526
Load: dtoverlay=rpi-proto
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Overlay for the Raspberry Pi POE HAT.
3
+ */
4
+ /dts-v1/;
5
+ /plugin/;
6
+
7
+ / {
8
+ compatible = "brcm,bcm2708";
9
+
10
+ fragment@0 {
11
+ target-path = "/";
12
+ __overlay__ {
13
+ fan0: rpi-poe-fan@0 {
14
+ compatible = "raspberrypi,rpi-poe-fan";
15
+ firmware = <&firmware>;
16
+ cooling-min-state = <0>;
17
+ cooling-max-state = <3>;
18
+ #cooling-cells = <2>;
19
+ cooling-levels = <0 50 150 255>;
20
+ status = "okay";
21
+ };
22
+ };
23
+ };
24
+
25
+ fragment@1 {
26
+ target = <&cpu_thermal>;
27
+ __overlay__ {
28
+ trips {
29
+ threshold: trip-point@0 {
30
+ temperature = <45000>;
31
+ hysteresis = <5000>;
32
+ type = "active";
33
+ };
34
+ target: trip-point@1 {
35
+ temperature = <50000>;
36
+ hysteresis = <2000>;
37
+ type = "active";
38
+ };
39
+ cpu_hot: cpu_hot@0 {
40
+ temperature = <55000>;
41
+ hysteresis = <2000>;
42
+ type = "active";
43
+ };
44
+ };
45
+ cooling-maps {
46
+ map0 {
47
+ trip = <&threshold>;
48
+ cooling-device = <&fan0 0 1>;
49
+ };
50
+ map1 {
51
+ trip = <&target>;
52
+ cooling-device = <&fan0 1 2>;
53
+ };
54
+ map2 {
55
+ trip = <&cpu_hot>;
56
+ cooling-device = <&fan0 2 3>;
57
+ };
58
+ };
59
+ };
60
+ };
61
+ };
Original file line number Diff line number Diff line change @@ -657,6 +657,7 @@ CONFIG_HWMON=m
657
657
CONFIG_SENSORS_DS1621=m
658
658
CONFIG_SENSORS_JC42=m
659
659
CONFIG_SENSORS_LM75=m
660
+ CONFIG_SENSORS_RPI_POE_FAN=m
660
661
CONFIG_SENSORS_SHT21=m
661
662
CONFIG_SENSORS_SHT3x=m
662
663
CONFIG_SENSORS_SHTC1=m
Original file line number Diff line number Diff line change @@ -651,6 +651,7 @@ CONFIG_HWMON=m
651
651
CONFIG_SENSORS_DS1621=m
652
652
CONFIG_SENSORS_JC42=m
653
653
CONFIG_SENSORS_LM75=m
654
+ CONFIG_SENSORS_RPI_POE_FAN=m
654
655
CONFIG_SENSORS_SHT21=m
655
656
CONFIG_SENSORS_SHT3x=m
656
657
CONFIG_SENSORS_SHTC1=m
Original file line number Diff line number Diff line change @@ -1298,6 +1298,17 @@ config SENSORS_PWM_FAN
1298
1298
This driver can also be built as a module. If so, the module
1299
1299
will be called pwm-fan.
1300
1300
1301
+ config SENSORS_RPI_POE_FAN
1302
+ tristate "Raspberry Pi PoE HAT fan"
1303
+ depends on RASPBERRYPI_FIRMWARE
1304
+ depends on THERMAL || THERMAL=n
1305
+ help
1306
+ If you say yes here you get support for Raspberry Pi PoE (Power over
1307
+ Ethernet) HAT fan.
1308
+
1309
+ This driver can also be built as a module. If so, the module
1310
+ will be called rpi-poe-fan.
1311
+
1301
1312
config SENSORS_SHT15
1302
1313
tristate "Sensiron humidity and temperature sensors. SHT15 and compat."
1303
1314
depends on GPIOLIB || COMPILE_TEST
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ obj-$(CONFIG_SENSORS_PC87427) += pc87427.o
141
141
obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
142
142
obj-$(CONFIG_SENSORS_POWR1220) += powr1220.o
143
143
obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o
144
+ obj-$(CONFIG_SENSORS_RPI_POE_FAN) += rpi-poe-fan.o
144
145
obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o
145
146
obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+ = sch56xx-common.o
146
147
obj-$(CONFIG_SENSORS_SCH5627) += sch5627.o
You can’t perform that action at this time.
0 commit comments