Skip to content

Commit 0f63e96

Browse files
frank-wAngeloGioacchino Del Regno
authored andcommitted
arm64: dts: mediatek: mt7988a-bpi-r4: Add fan and coolingmaps
Add Fan and cooling maps for Bananapi-R4 board. Signed-off-by: Frank Wunderlich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
1 parent e4950b0 commit 0f63e96

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
stdout-path = "serial0:115200n8";
1313
};
1414

15+
fan: pwm-fan {
16+
compatible = "pwm-fan";
17+
/* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */
18+
cooling-levels = <0 80 128 255>;
19+
#cooling-cells = <2>;
20+
pwms = <&pwm 0 50000>;
21+
status = "okay";
22+
};
23+
1524
reg_1p8v: regulator-1p8v {
1625
compatible = "regulator-fixed";
1726
regulator-name = "fixed-1.8V";
@@ -73,6 +82,26 @@
7382
type = "active";
7483
};
7584
};
85+
86+
cooling-maps {
87+
map-cpu-active-high {
88+
/* active: set fan to cooling level 2 */
89+
cooling-device = <&fan 3 3>;
90+
trip = <&cpu_trip_active_high>;
91+
};
92+
93+
map-cpu-active-med {
94+
/* active: set fan to cooling level 1 */
95+
cooling-device = <&fan 2 2>;
96+
trip = <&cpu_trip_active_med>;
97+
};
98+
99+
map-cpu-active-low {
100+
/* active: set fan to cooling level 0 */
101+
cooling-device = <&fan 1 1>;
102+
trip = <&cpu_trip_active_low>;
103+
};
104+
};
76105
};
77106

78107
&i2c0 {

0 commit comments

Comments
 (0)