arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
Subsystems (2)
PATCH 1/1 arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
This links the PWM fan on Orange Pi 5+ as an active cooling device managed automatically by the thermal subsystem, with a target SoC temperature of 65C and a minimum-spin interval from 55C to 65C to ensure airflow when the system gets warm.
This is pretty much the same as '4a152231b050 ("arm64: dts: rockchip:
enable automatic fan control on Rock 5B")', except for the Orange Pi 5+ board.
--- .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +30 -0
@@ -351,6 +351,36 @@ &i2s2m0_sdi status = "okay"; }; +&package_thermal { + polling-delay = <1000>; + + trips { + package_fan0: package-fan0 { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + package_fan1: package-fan1 { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <&package_fan0>; + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + }; + + map2 { + trip = <&package_fan1>; + cooling-device = <&fan 2 THERMAL_NO_LIMIT>; + }; + }; +}; + /* phy1 - M.KEY socket */ &pcie2x1l0 { reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
Signature · 7 lines
2.46.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hello Florian,
Thanks for the patch. Please, see a comment below.
Quoted 40 lines · Florian Klink
This links the PWM fan on Orange Pi 5+ as an active cooling device managed automatically by the thermal subsystem, with a target SoC temperature of 65C and a minimum-spin interval from 55C to 65C to ensure airflow when the system gets warm.
This is pretty much the same as '
4a152231b050("arm64: dts: rockchip:
enable automatic fan control on Rock 5B")', except for the Orange Pi 5+ board.Signed-off-by Florian Klink <[email protected]>--- .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +17
-0@@ -351,6 +351,36 @@ &i2s2m0_sdi status = "okay"; }; +&package_thermal { + polling-delay = <1000>; + + trips { + package_fan0: package-fan0 { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + package_fan1: package-fan1 { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; +
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts &i2s2m0_sdi · line 380
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +10
-0+ cooling-maps { + map1 { + trip = <&package_fan0>; + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + }; + + map2 { + trip = <&package_fan1>; + cooling-device = <&fan 2 THERMAL_NO_LIMIT>; + };
These two cooling maps should be named map0 and map1 instead, i.e. their numbering shoud start from zero, because there are no package cooling maps in the parent dtsi file(s).
Having them named map1 and map2 in rk3588-rock-5b.dts was a small mistake that slipped by somehow, and I've already submitted a small patch [1] that fixes that mistake.
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +3
-0+ }; +}; + /* phy1 - M.KEY socket */ &pcie2x1l0 { reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
Thanks, addressed that in the v2.
Quoted 72 lines · Dragan Simic
Hello Florian,
Thanks for the patch. Please, see a comment below.
Quoted 40 lines · Florian Klink
This links the PWM fan on Orange Pi 5+ as an active cooling device managed automatically by the thermal subsystem, with a target SoC temperature of 65C and a minimum-spin interval from 55C to 65C to ensure airflow when the system gets warm.
This is pretty much the same as '
4a152231b050("arm64: dts: rockchip:
enable automatic fan control on Rock 5B")', except for the Orange Pi 5+ board.Signed-off-by Florian Klink <[email protected]>---
.../dts/rockchip/rk3588-orangepi-5-plus.dts| 30 +++++++++++++++++++1 file changed, 30 insertions(+)arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +17
-0@@ -351,6 +351,36 @@ &i2s2m0_sdi status = "okay"; }; +&package_thermal { + polling-delay = <1000>; + + trips { + package_fan0: package-fan0 { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + package_fan1: package-fan1 { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; +arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts &i2s2m0_sdi · line 380
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +10
-0+ cooling-maps { + map1 { + trip = <&package_fan0>; + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + }; + + map2 { + trip = <&package_fan1>; + cooling-device = <&fan 2 THERMAL_NO_LIMIT>; + };These two cooling maps should be named map0 and map1 instead, i.e. their numbering shoud start from zero, because there are no package cooling maps in the parent dtsi file(s).
Having them named map1 and map2 in
rk3588-rock-5b.dtswas a small mistake that slipped by somehow, and I've already submitted a small patch [1] that fixes that mistake.Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +3
-0+ }; +}; + /* phy1 - M.KEY socket */ &pcie2x1l0 { reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
Signature · 1 line
Florian Klink