[PATCH 1/2] arm64: dts: rockchip: Fix fan PWM period on LubanCat 4

Pufan Jin <[email protected]> Sat, 1 Aug 2026 12:50:23 +0800
Newsgroups org.infradead.lists.linux-rockchip,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
The LubanCat 4 fan header drives a 2-wire fan by chopping its supply with
a MOSFET, so the fan sees a switched 5V rail rather than a PWM control
input. With the 5000 ns (200 kHz) period the off-time is far shorter than
the discharge time of the fan's internal bulk capacitance, so the rail
never drops and the fan runs at full speed for any non-zero duty cycle.

Measured on a rev 20241026 board by driving pwm0 directly over the sysfs
interface, comparing 30% against 100% duty:

  period       frequency   result
  50000 ns      20 kHz     full speed at both duties
  100000 ns     10 kHz     slightly reduced, audible coil whine
  1000000 ns     1 kHz     reduced, loudest coil whine
  10000000 ns  100 Hz      all four cooling levels distinguishable

At 100 Hz the fan is switched on and off outright and the rotor inertia
averages the result, which gives proportional control without exciting
the windings in the range the ear is most sensitive to. Cold start was
verified down to 15% duty, well below the lowest cooling level, so no
fan-stop-to-start-percent handling is needed.

Fixes: 6d9430d58714 ("arm64: dts: rockchip: Add EmbedFire LubanCat 4 board")
Signed-off-by: Pufan Jin <[email protected]>
---
 arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
index 586741ae7363..bf413de979cd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-lubancat-4.dts
@@ -119,7 +119,7 @@ vcc5v0_usb30_host: regulator-vcc5v0-usb30-host {
 	fan: pwm-fan {
 		compatible = "pwm-fan";
 		cooling-levels = <0 100 150 200 255>;
-		pwms = <&pwm0 0 5000 0>;
+		pwms = <&pwm0 0 10000000 0>;
 		#cooling-cells = <2>;
 	};
 };
-- 
2.55.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip