Skip to content

Commit c26f779

Browse files
dangowrtmbgg
authored andcommitted
arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts
Add pwm-fan and cooling-maps to BananaPi-R3 devicetree. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230530201235.22330-5-linux@fw-web.de Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
1 parent 1f5be05 commit c26f779

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
regulator-always-on;
3939
};
4040

41+
fan: pwm-fan {
42+
compatible = "pwm-fan";
43+
#cooling-cells = <2>;
44+
/* cooling level (0, 1, 2) - pwm inverted */
45+
cooling-levels = <255 96 0>;
46+
pwms = <&pwm 0 10000 0>;
47+
status = "okay";
48+
};
49+
4150
gpio-keys {
4251
compatible = "gpio-keys";
4352

@@ -133,6 +142,28 @@
133142
};
134143
};
135144

145+
&cpu_thermal {
146+
cooling-maps {
147+
cpu-active-high {
148+
/* active: set fan to cooling level 2 */
149+
cooling-device = <&fan 2 2>;
150+
trip = <&cpu_trip_active_high>;
151+
};
152+
153+
cpu-active-low {
154+
/* active: set fan to cooling level 1 */
155+
cooling-device = <&fan 1 1>;
156+
trip = <&cpu_trip_active_low>;
157+
};
158+
159+
cpu-passive {
160+
/* passive: set fan to cooling level 0 */
161+
cooling-device = <&fan 0 0>;
162+
trip = <&cpu_trip_passive>;
163+
};
164+
};
165+
};
166+
136167
&crypto {
137168
status = "okay";
138169
};

0 commit comments

Comments
 (0)