[PATCH 3/3] arm64: dts: rockchip: Add PWM fan to Radxa ROCK 3B
Adam Wermuth
adam at wermuth.pl
Thu Sep 24 00:14:45 PDT 2026
The ROCK 3B has a 2-pin fan header powered from vcc5v0_sys and
switched by a MOSFET driven from PWM8 (pwm8m0 pins). Enable the PWM
controller, describe the fan as a pwm-fan cooling device and add
active trip points to the CPU thermal zone:
- 50 C: fan at 25%
- 60 C: fan at 50-75%
- 70 C: fan at 100%
each with 5 C hysteresis. The existing passive and critical trip
points are left unchanged.
Signed-off-by: Adam Wermuth <adam at wermuth.pl>
---
.../boot/dts/rockchip/rk3568-rock-3b.dts | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
index 908bb4425e81..815f67988ab7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
@@ -24,6 +24,14 @@ chosen {
stdout-path = "serial2:1500000n8";
};
+ fan: fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 64 128 192 255>;
+ fan-supply = <&vcc5v0_sys>;
+ pwms = <&pwm8 0 10000 0>;
+ #cooling-cells = <2>;
+ };
+
hdmi-con {
compatible = "hdmi-connector";
type = "a";
@@ -200,6 +208,45 @@ &cpu3 {
cpu-supply = <&vdd_cpu>;
};
+&cpu_thermal {
+ trips {
+ cpu_fan0: cpu-fan0 {
+ hysteresis = <5000>;
+ temperature = <50000>;
+ type = "active";
+ };
+
+ cpu_fan1: cpu-fan1 {
+ hysteresis = <5000>;
+ temperature = <60000>;
+ type = "active";
+ };
+
+ cpu_fan2: cpu-fan2 {
+ hysteresis = <5000>;
+ temperature = <70000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map1 {
+ trip = <&cpu_fan0>;
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+ };
+
+ map2 {
+ trip = <&cpu_fan1>;
+ cooling-device = <&fan 2 3>;
+ };
+
+ map3 {
+ trip = <&cpu_fan2>;
+ cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&gmac0 {
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
@@ -708,6 +755,10 @@ &pmu_io_domains {
status = "okay";
};
+&pwm8 {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
--
2.43.0
More information about the linux-arm-kernel
mailing list