[PATCH 0/2] arm64: dts: rockchip: Fix fan speed control on LubanCat 4
Pufan Jin <[email protected]> Sat, 1 Aug 2026 12:50:22 +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 EmbedFire LubanCat 4 drives a 2-wire fan by chopping its 5V supply
through a MOSFET with pwm0. Two problems prevent the thermal framework
from controlling the fan speed:
1) The PWM period of 5000 ns (200 kHz) is far too fast for the fan's
internal bulk capacitance to discharge during the off-time, so the
fan sees effectively continuous 5V and runs at full speed for any
non-zero duty cycle.
2) No cooling maps bind the fan to a thermal zone, so the pwm-fan
driver falls back to the highest cooling level at probe time.
Patch 1 fixes the period: measurements on hardware show that 10 ms
(100 Hz) is the lowest frequency that gives proportional control
without audible coil whine. At this period the rotor inertia averages
the switched supply into smooth speed regulation.
Patch 2 adds four active trips at the vendor kernel's original
temperature thresholds (42/55/60/65 °C) and binds them to the fan's
cooling levels.
Tested on rev 20241026 hardware:
- idle 36 °C → cur_state=0, fan stopped (PWM disabled)
- stress-ng --cpu 8 → temp reaches 48 °C within seconds,
cur_state jumps to 1, PWM duty = 3921569/10000000 ns (39%),
fan audibly slower than the previous constant full speed
- all four cooling levels distinguishable by ear when driven
manually through the sysfs interface
Based on Heiko's rockchip tree (v7.3-armsoc/dts64), on top of commit
6d9430d58714 ("arm64: dts: rockchip: Add EmbedFire LubanCat 4 board").
Pufan Jin (2):
arm64: dts: rockchip: Fix fan PWM period on LubanCat 4
arm64: dts: rockchip: Add fan cooling maps for LubanCat 4
.../boot/dts/rockchip/rk3588s-lubancat-4.dts | 55 ++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
--
2.55.0
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip