mediatek: fix PWM fan on BPi-R4
authorDaniel Golle <daniel@makrotopia.org>
Thu, 9 May 2024 21:35:47 +0000 (22:35 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 10 May 2024 23:52:34 +0000 (00:52 +0100)
Add additional PWM fan cooling step and enable fan on BPi-R4.

Suggested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi

index c4c05fd419f254f03c191630c4a33324fb7f67fc..14c615b67c14b719237abdb7a351b95b6b613a91 100644 (file)
        status = "okay";
 };
 
+&pwm {
+       status = "okay";
+};
+
+&fan {
+       pwms = <&pwm 0 50000>;
+       status = "okay";
+};
+
 &ssusb1 {
        status = "okay";
 };
index af4dcb358135e01c8dfc8e4721ae12f720a7cba9..9ad068fe05fc52bf1edc28d7dba4e162f30a0eb8 100644 (file)
 
        fan: pwm-fan {
                compatible = "pwm-fan";
-               /* cooling level (0, 1, 2) : (0% duty, 50% duty, 100% duty) */
-               cooling-levels = <0 128 255>;
+               /* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */
+               cooling-levels = <0 80 128 255>;
                #cooling-cells = <2>;
                #thermal-sensor-cells = <1>;
                status = "disabled";