1 From 4a152231b050590af771fa3cc8462ed08b691a24 Mon Sep 17 00:00:00 2001
2 From: Alexey Charkov <alchark@gmail.com>
3 Date: Mon, 17 Jun 2024 22:28:54 +0400
4 Subject: [PATCH] arm64: dts: rockchip: enable automatic fan control on Rock 5B
6 This links the PWM fan on Radxa Rock 5B as an active cooling device
7 managed automatically by the thermal subsystem, with a target SoC
8 temperature of 65C and a minimum-spin interval from 55C to 65C to
9 ensure airflow when the system gets warm
11 Helped-by: Dragan Simic <dsimic@manjaro.org>
12 Reviewed-by: Dragan Simic <dsimic@manjaro.org>
13 Signed-off-by: Alexey Charkov <alchark@gmail.com>
14 Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-4-c1f5f3267f1e@gmail.com
15 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
17 .../boot/dts/rockchip/rk3588-rock-5b.dts | 32 ++++++++++++++++++-
18 1 file changed, 31 insertions(+), 1 deletion(-)
20 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
21 +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
25 compatible = "pwm-fan";
26 - cooling-levels = <0 95 145 195 255>;
27 + cooling-levels = <0 120 150 180 210 240 255>;
28 fan-supply = <&vcc5v0_sys>;
29 pwms = <&pwm1 0 50000 0>;
37 + polling-delay = <1000>;
40 + package_fan0: package-fan0 {
41 + temperature = <55000>;
42 + hysteresis = <2000>;
46 + package_fan1: package-fan1 {
47 + temperature = <65000>;
48 + hysteresis = <2000>;
55 + trip = <&package_fan0>;
56 + cooling-device = <&fan THERMAL_NO_LIMIT 1>;
60 + trip = <&package_fan1>;
61 + cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
67 pinctrl-names = "default";