linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Add idle cooling devices
@ 2021-10-01 16:17 Daniel Lezcano
  2021-10-17 10:13 ` Heiko Stuebner
  2021-10-20  8:01 ` Heiko Stuebner
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2021-10-01 16:17 UTC (permalink / raw)
  To: heiko; +Cc: robh+dt, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel

The thermal framework accepts now the cpu idle cooling device as an
alternative when the cpufreq cooling device fails.

Add the node in the DT so the cooling devices will be present and the
platforms can extend the thermal zone definition to add them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 3871c7fd83b0..9ac232ffd284 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -124,6 +124,11 @@ cpu_b0: cpu@100 {
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			thermal-idle {
+				#cooling-cells = <2>;
+				duration-us = <10000>;
+				exit-latency-us = <500>;
+			};
 		};
 
 		cpu_b1: cpu@101 {
@@ -136,6 +141,11 @@ cpu_b1: cpu@101 {
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			thermal-idle {
+				#cooling-cells = <2>;
+				duration-us = <10000>;
+				exit-latency-us = <500>;
+			};
 		};
 
 		idle-states {
-- 
2.25.1


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

* Re: [PATCH] arm64: dts: rockchip: Add idle cooling devices
  2021-10-01 16:17 [PATCH] arm64: dts: rockchip: Add idle cooling devices Daniel Lezcano
@ 2021-10-17 10:13 ` Heiko Stuebner
  2021-10-17 19:51   ` Daniel Lezcano
  2021-10-20  8:01 ` Heiko Stuebner
  1 sibling, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2021-10-17 10:13 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: robh+dt, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel

Hi Daniel,

Am Freitag, 1. Oktober 2021, 18:17:28 CEST schrieb Daniel Lezcano:
> The thermal framework accepts now the cpu idle cooling device as an
> alternative when the cpufreq cooling device fails.
> 
> Add the node in the DT so the cooling devices will be present and the
> platforms can extend the thermal zone definition to add them.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 3871c7fd83b0..9ac232ffd284 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -124,6 +124,11 @@ cpu_b0: cpu@100 {
>  			#cooling-cells = <2>; /* min followed by max */
>  			dynamic-power-coefficient = <436>;
>  			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
> +			thermal-idle {
> +				#cooling-cells = <2>;
> +				duration-us = <10000>;
> +				exit-latency-us = <500>;
> +			};

I guess the basic question would be where do the duration
and exit-latency values come from. And also what happened
to cpu_l0-l3 (aka the little cores)?

Heiko

>  		};
>  
>  		cpu_b1: cpu@101 {
> @@ -136,6 +141,11 @@ cpu_b1: cpu@101 {
>  			#cooling-cells = <2>; /* min followed by max */
>  			dynamic-power-coefficient = <436>;
>  			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
> +			thermal-idle {
> +				#cooling-cells = <2>;
> +				duration-us = <10000>;
> +				exit-latency-us = <500>;
> +			};
>  		};
>  
>  		idle-states {
> 





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

* Re: [PATCH] arm64: dts: rockchip: Add idle cooling devices
  2021-10-17 10:13 ` Heiko Stuebner
@ 2021-10-17 19:51   ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2021-10-17 19:51 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: robh+dt, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel


Hi Heiko,


On 17/10/2021 12:13, Heiko Stuebner wrote:
> Hi Daniel,
> 
> Am Freitag, 1. Oktober 2021, 18:17:28 CEST schrieb Daniel Lezcano:
>> The thermal framework accepts now the cpu idle cooling device as an
>> alternative when the cpufreq cooling device fails.
>>
>> Add the node in the DT so the cooling devices will be present and the
>> platforms can extend the thermal zone definition to add them.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> index 3871c7fd83b0..9ac232ffd284 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
>> @@ -124,6 +124,11 @@ cpu_b0: cpu@100 {
>>  			#cooling-cells = <2>; /* min followed by max */
>>  			dynamic-power-coefficient = <436>;
>>  			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
>> +			thermal-idle {
>> +				#cooling-cells = <2>;
>> +				duration-us = <10000>;
>> +				exit-latency-us = <500>;
>> +			};
> 
> I guess the basic question would be where do the duration
> and exit-latency values come from. And also what happened
> to cpu_l0-l3 (aka the little cores)?

The duration is an arbitrary value, I've done some testing [1] to cool
down the CPU.

The exit-latency is a value to ignore idle states with greater exit
latency. In our case, it discards the cluster power down state.

My experiments on this platform showed the little cluster does not
contribute significantly to the heat, so having idle injection is not
really useful.

Just to clarify that idle injection is not better than dvfs, it can be
used in addition or as a backup solution if the dvfs fails. That is the
reason why there is no setup for the thermal zones.

[1] https://www.linaro.org/blog/force-idle-when-a-cpu-is-overheating/

>>  		};
>>  
>>  		cpu_b1: cpu@101 {
>> @@ -136,6 +141,11 @@ cpu_b1: cpu@101 {
>>  			#cooling-cells = <2>; /* min followed by max */
>>  			dynamic-power-coefficient = <436>;
>>  			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
>> +			thermal-idle {
>> +				#cooling-cells = <2>;
>> +				duration-us = <10000>;
>> +				exit-latency-us = <500>;
>> +			};
>>  		};
>>  
>>  		idle-states {
>>
> 
> 
> 
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH] arm64: dts: rockchip: Add idle cooling devices
  2021-10-01 16:17 [PATCH] arm64: dts: rockchip: Add idle cooling devices Daniel Lezcano
  2021-10-17 10:13 ` Heiko Stuebner
@ 2021-10-20  8:01 ` Heiko Stuebner
  1 sibling, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-10-20  8:01 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Heiko Stuebner, robh+dt, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

On Fri, 1 Oct 2021 18:17:28 +0200, Daniel Lezcano wrote:
> The thermal framework accepts now the cpu idle cooling device as an
> alternative when the cpufreq cooling device fails.
> 
> Add the node in the DT so the cooling devices will be present and the
> platforms can extend the thermal zone definition to add them.

Applied, thanks!

[1/1] arm64: dts: rockchip: Add idle cooling devices
      commit: 43f9699b0c12d4e50b66723213cef456c52254f3

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

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

end of thread, other threads:[~2021-10-20  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 16:17 [PATCH] arm64: dts: rockchip: Add idle cooling devices Daniel Lezcano
2021-10-17 10:13 ` Heiko Stuebner
2021-10-17 19:51   ` Daniel Lezcano
2021-10-20  8:01 ` 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).