[openwrt/openwrt] mediatek: fix PWM fan on BPi-R4

LEDE Commits lede-commits at lists.infradead.org
Fri May 10 18:12:23 PDT 2024


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8113169cadce2e298a6a6b973132bd40a996f2f4

commit 8113169cadce2e298a6a6b973132bd40a996f2f4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu May 9 22:35:47 2024 +0100

    mediatek: fix PWM fan on BPi-R4
    
    Add additional PWM fan cooling step and enable fan on BPi-R4.
    
    Suggested-by: Frank Wunderlich <frank-w at public-files.de>
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi    | 9 +++++++++
 .../mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index c4c05fd419..14c615b67c 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -297,6 +297,15 @@
 	status = "okay";
 };
 
+&pwm {
+	status = "okay";
+};
+
+&fan {
+	pwms = <&pwm 0 50000>;
+	status = "okay";
+};
+
 &ssusb1 {
 	status = "okay";
 };
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index af4dcb3581..9ad068fe05 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -149,8 +149,8 @@
 
 	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";




More information about the lede-commits mailing list