linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
@ 2025-03-29 16:50 Sam Edwards
  2025-04-07  7:17 ` Heiko Stuebner
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Edwards @ 2025-03-29 16:50 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel,
	Daniel Kukieła, Sven Rademakers, Joshua Riek, Sam Edwards,
	stable, Dragan Simic

The RK3588 thermal sensor driver only receives interrupts when a
higher-temperature threshold is crossed; it cannot notify when the
sensor cools back off. As a result, the driver must poll for temperature
changes to detect when the conditions for a thermal trip are no longer
met. However, it only does so if the DT enables polling.

Before this patch, the RK1 DT did not enable polling, causing the fan to
continue running at the speed corresponding to the highest temperature
reached.

Follow suit with similar RK3588 boards by setting a polling-delay of
1000ms, enabling the driver to detect when the sensor cools back off,
allowing the fan speed to decrease as appropriate.

Fixes: 7c8ec5e6b9d6 ("arm64: dts: rockchip: Enable automatic fan control on Turing RK1")
Cc: <stable@kernel.org> # v6.13+
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
---

Changes v1->v2:
- Added `Cc: stable` per Dragan's suggestion
- Applied Dragan's Reviewed-by tag
- No changes to patch content or main body of commit message

---
 arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index 6bc46734cc14..0270bffce195 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -214,6 +214,8 @@ rgmii_phy: ethernet-phy@1 {
 };
 
 &package_thermal {
+	polling-delay = <1000>;
+
 	trips {
 		package_active1: trip-active1 {
 			temperature = <45000>;
-- 
2.45.3


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
  2025-03-29 16:50 [PATCH v2] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down Sam Edwards
@ 2025-04-07  7:17 ` Heiko Stuebner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2025-04-07  7:17 UTC (permalink / raw)
  To: Sam Edwards
  Cc: Heiko Stuebner, linux-rockchip, linux-arm-kernel, linux-kernel,
	Daniel Kukieła, Sven Rademakers, Joshua Riek, Sam Edwards,
	stable, Dragan Simic


On Sat, 29 Mar 2025 09:50:17 -0700, Sam Edwards wrote:
> The RK3588 thermal sensor driver only receives interrupts when a
> higher-temperature threshold is crossed; it cannot notify when the
> sensor cools back off. As a result, the driver must poll for temperature
> changes to detect when the conditions for a thermal trip are no longer
> met. However, it only does so if the DT enables polling.
> 
> Before this patch, the RK1 DT did not enable polling, causing the fan to
> continue running at the speed corresponding to the highest temperature
> reached.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down
      commit: fdc7bd909a5f38793468e9cf9b6a9063d96c6234

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-07  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 16:50 [PATCH v2] arm64: dts: rockchip: Allow Turing RK1 cooling fan to spin down Sam Edwards
2025-04-07  7:17 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).