* [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
@ 2024-09-22 11:21 Florian Klink
2024-09-22 12:05 ` Dragan Simic
0 siblings, 1 reply; 5+ messages in thread
From: Florian Klink @ 2024-09-22 11:21 UTC (permalink / raw)
Cc: Florian Klink, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner, Sebastian Reichel, Dragan Simic,
Tamás Szűcs, Ondrej Jirman, Muhammed Efe Cetin,
FUKAUMI Naoki, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel
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 <flokli@flokli.de>
---
.../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
index e74871491ef5..d91438752006 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
@@ -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 {
+ map0 {
+ trip = <&package_fan0>;
+ cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+ };
+
+ map1 {
+ trip = <&package_fan1>;
+ cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
/* phy1 - M.KEY socket */
&pcie2x1l0 {
reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
--
2.46.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
2024-09-22 11:21 [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+ Florian Klink
@ 2024-09-22 12:05 ` Dragan Simic
0 siblings, 0 replies; 5+ messages in thread
From: Dragan Simic @ 2024-09-22 12:05 UTC (permalink / raw)
To: Florian Klink
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Sebastian Reichel, Tamás Szűcs, Ondrej Jirman,
Muhammed Efe Cetin, FUKAUMI Naoki, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hello Florian,
Please, see a comment below.
On 2024-09-22 13:21, Florian Klink wrote:
> 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 <flokli@flokli.de>
> ---
> .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> index e74871491ef5..d91438752006 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> @@ -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 {
> + map0 {
> + trip = <&package_fan0>;
> + cooling-device = <&fan THERMAL_NO_LIMIT 1>;
> + };
> +
> + map1 {
> + trip = <&package_fan1>;
> + cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
> + };
Thanks for renumbering these cooling maps. It's just that you
missed to label this patch as the v2, i.e. you should have used
"[PATCH v2]" in the patch subject.
Please, resend this patch with the v2 label, and please provide
a change log in the patch notes, i.e. below the "---" line.
Here's an example of an earlier v2 patch submission [1] that you
may find helpful.
In the v2 submission, please feel free to also include my
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
[1]
https://lore.kernel.org/linux-rockchip/bdb60f1f793166cd65f58ab7aea025347076019c.1719679068.git.dsimic@manjaro.org/T/#u
> + };
> +};
> +
> /* phy1 - M.KEY socket */
> &pcie2x1l0 {
> reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
2024-09-21 21:42 ` Dragan Simic
@ 2024-09-22 11:24 ` Florian Klink
0 siblings, 0 replies; 5+ messages in thread
From: Florian Klink @ 2024-09-22 11:24 UTC (permalink / raw)
To: Dragan Simic
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Sebastian Reichel, Kever Yang, Tamás Szűcs,
FUKAUMI Naoki, Muhammed Efe Cetin, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Thanks, addressed that in the v2.
On Sat, Sep 21, 2024 at 11:42:43PM GMT, Dragan Simic wrote:
>Hello Florian,
>
>Thanks for the patch. Please, see a comment below.
>
>On 2024-09-21 20:38, Florian Klink wrote:
>>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 <flokli@flokli.de>
>>---
>> .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>>
>>diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
>>b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
>>index e74871491ef5..8569e862b6ee 100644
>>--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
>>+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
>>@@ -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>;
>>+ };
>
>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.
>
>[1] https://lore.kernel.org/linux-rockchip/335ecd5841ab55f333e17bb391d0e1264fac257b.1726954592.git.dsimic@manjaro.org/T/#u
>
>>+ };
>>+};
>>+
>> /* phy1 - M.KEY socket */
>> &pcie2x1l0 {
>> reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
--
Florian Klink
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
2024-09-21 18:38 Florian Klink
@ 2024-09-21 21:42 ` Dragan Simic
2024-09-22 11:24 ` Florian Klink
0 siblings, 1 reply; 5+ messages in thread
From: Dragan Simic @ 2024-09-21 21:42 UTC (permalink / raw)
To: Florian Klink
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Sebastian Reichel, Kever Yang, Tamás Szűcs,
FUKAUMI Naoki, Muhammed Efe Cetin, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hello Florian,
Thanks for the patch. Please, see a comment below.
On 2024-09-21 20:38, Florian Klink wrote:
> 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 <flokli@flokli.de>
> ---
> .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> index e74871491ef5..8569e862b6ee 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
> @@ -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>;
> + };
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.
[1]
https://lore.kernel.org/linux-rockchip/335ecd5841ab55f333e17bb391d0e1264fac257b.1726954592.git.dsimic@manjaro.org/T/#u
> + };
> +};
> +
> /* phy1 - M.KEY socket */
> &pcie2x1l0 {
> reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+
@ 2024-09-21 18:38 Florian Klink
2024-09-21 21:42 ` Dragan Simic
0 siblings, 1 reply; 5+ messages in thread
From: Florian Klink @ 2024-09-21 18:38 UTC (permalink / raw)
Cc: Florian Klink, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner, Sebastian Reichel, Dragan Simic, Kever Yang,
Tamás Szűcs, FUKAUMI Naoki, Muhammed Efe Cetin,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
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 <flokli@flokli.de>
---
.../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
index e74871491ef5..8569e862b6ee 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
@@ -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>;
--
2.46.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-22 12:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-22 11:21 [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+ Florian Klink
2024-09-22 12:05 ` Dragan Simic
-- strict thread matches above, loose matches on Subject: below --
2024-09-21 18:38 Florian Klink
2024-09-21 21:42 ` Dragan Simic
2024-09-22 11:24 ` Florian Klink
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®