diff mbox

[1/2] arm64: dts: r8a7795: add thermal cooling management

Message ID 20170913105909.13230-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Accepted
Delegated to: Eduardo Valentin
Headers show

Commit Message

Niklas Söderlund Sept. 13, 2017, 10:59 a.m. UTC
Add nodes and properties for thermal cooling management support.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

Comments

Eduardo Valentin Jan. 1, 2018, 6:12 p.m. UTC | #1
On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> Add nodes and properties for thermal cooling management support.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 ++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index 0ccac86bccc6b6f0..1818fd20660d0315 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -53,6 +53,7 @@
>  				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
>  				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
>  				<&cluster0_opp_tb7>;
> +			#cooling-cells = <2>;
>  		};
>  
>  		a57_1: cpu@1 {
> @@ -67,6 +68,7 @@
>  				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
>  				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
>  				<&cluster0_opp_tb7>;
> +			#cooling-cells = <2>;
>  		};
>  
>  		a57_2: cpu@2 {
> @@ -81,6 +83,7 @@
>  				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
>  				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
>  				<&cluster0_opp_tb7>;
> +			#cooling-cells = <2>;
>  		};
>  
>  		a57_3: cpu@3 {
> @@ -95,6 +98,7 @@
>  				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
>  				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
>  				<&cluster0_opp_tb7>;
> +			#cooling-cells = <2>;
>  		};
>  
>  		a53_0: cpu@100 {
> @@ -2821,12 +2825,24 @@
>  				thermal-sensors = <&tsc 0>;
>  
>  				trips {
> +					sensor1_passive: sensor1-passive {
> +						temperature = <95000>;
> +						hysteresis = <2000>;
> +						type = "passive";
> +					};
>  					sensor1_crit: sensor1-crit {
>  						temperature = <120000>;
>  						hysteresis = <2000>;
>  						type = "critical";
>  					};
>  				};
> +
> +				cooling-maps {
> +					map0 {
> +						trip = <&sensor1_passive>;
> +						cooling-device = <&a57_0 4 4>;
> +					};
> +				};
>  			};
>  
>  			sensor_thermal2: sensor-thermal2 {
> @@ -2835,12 +2851,24 @@
>  				thermal-sensors = <&tsc 1>;
>  
>  				trips {
> +					sensor2_passive: sensor2-passive {
> +						temperature = <95000>;
> +						hysteresis = <2000>;
> +						type = "passive";
> +					};
>  					sensor2_crit: sensor2-crit {
>  						temperature = <120000>;
>  						hysteresis = <2000>;
>  						type = "critical";
>  					};
>  				};
> +
> +				cooling-maps {
> +					map0 {
> +						trip = <&sensor2_passive>;
> +						cooling-device = <&a57_0 4 4>;
> +					};
> +				};
>  			};
>  
>  			sensor_thermal3: sensor-thermal3 {
> @@ -2849,12 +2877,24 @@
>  				thermal-sensors = <&tsc 2>;
>  
>  				trips {
> +					sensor3_passive: sensor3-passive {
> +						temperature = <95000>;
> +						hysteresis = <2000>;
> +						type = "passive";
> +					};
>  					sensor3_crit: sensor3-crit {
>  						temperature = <120000>;
>  						hysteresis = <2000>;
>  						type = "critical";
>  					};
>  				};
> +
> +				cooling-maps {
> +					map0 {
> +						trip = <&sensor3_passive>;
> +						cooling-device = <&a57_0 4 4>;
> +					};
> +				};
>  			};
>  		};
>  	};
Eduardo Valentin Jan. 1, 2018, 6:13 p.m. UTC | #2
On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> Add nodes and properties for thermal cooling management support.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---

Just a reminder, this series should go via your arch tree. You may add
my acks.
Simon Horman Jan. 2, 2018, 9:19 a.m. UTC | #3
On Mon, Jan 01, 2018 at 10:13:35AM -0800, Eduardo Valentin wrote:
> On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> > Add nodes and properties for thermal cooling management support.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> 
> Just a reminder, this series should go via your arch tree. You may add
> my acks.

Ack.

Niklas, could you comment on the readiness of these patches
for the renesas tree?
Niklas Söderlund Jan. 3, 2018, 12:03 a.m. UTC | #4
Hi Simon,

On 2018-01-02 10:19:44 +0100, Simon Horman wrote:
> On Mon, Jan 01, 2018 at 10:13:35AM -0800, Eduardo Valentin wrote:
> > On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> > > Add nodes and properties for thermal cooling management support.
> > > 
> > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > > ---
> > 
> > Just a reminder, this series should go via your arch tree. You may add
> > my acks.
> 
> Ack.
> 
> Niklas, could you comment on the readiness of these patches
> for the renesas tree?

I think maybe the patches might have became a bit outdated since they 
where posted due to all reg property fixup patches. The blocker for me 
reposting this series is that the patches this depends 
'topic/rcar-gen3-cpufreq' on are not yet in the renesas tree next or 
devel branches. Do you think it would be valuable for me to refresh 
these patches before the dependencies are picked up?
Simon Horman Jan. 3, 2018, 10:14 a.m. UTC | #5
On Wed, Jan 03, 2018 at 01:03:52AM +0100, Niklas Söderlund wrote:
> Hi Simon,
> 
> On 2018-01-02 10:19:44 +0100, Simon Horman wrote:
> > On Mon, Jan 01, 2018 at 10:13:35AM -0800, Eduardo Valentin wrote:
> > > On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> > > > Add nodes and properties for thermal cooling management support.
> > > > 
> > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > > > ---
> > > 
> > > Just a reminder, this series should go via your arch tree. You may add
> > > my acks.
> > 
> > Ack.
> > 
> > Niklas, could you comment on the readiness of these patches
> > for the renesas tree?
> 
> I think maybe the patches might have became a bit outdated since they 
> where posted due to all reg property fixup patches. The blocker for me 
> reposting this series is that the patches this depends 
> 'topic/rcar-gen3-cpufreq' on are not yet in the renesas tree next or 
> devel branches. Do you think it would be valuable for me to refresh 
> these patches before the dependencies are picked up?

Probably not. I'll try to work on getting cpufreq upstream :)
Geert Uytterhoeven Jan. 3, 2018, 10:25 a.m. UTC | #6
Hi Simon,

On Wed, Jan 3, 2018 at 11:14 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jan 03, 2018 at 01:03:52AM +0100, Niklas Söderlund wrote:
>> On 2018-01-02 10:19:44 +0100, Simon Horman wrote:
>> > On Mon, Jan 01, 2018 at 10:13:35AM -0800, Eduardo Valentin wrote:
>> > > On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
>> > > > Add nodes and properties for thermal cooling management support.
>> > > >
>> > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>> > > > ---
>> > >
>> > > Just a reminder, this series should go via your arch tree. You may add
>> > > my acks.
>> >
>> > Ack.
>> >
>> > Niklas, could you comment on the readiness of these patches
>> > for the renesas tree?
>>
>> I think maybe the patches might have became a bit outdated since they
>> where posted due to all reg property fixup patches. The blocker for me
>> reposting this series is that the patches this depends
>> 'topic/rcar-gen3-cpufreq' on are not yet in the renesas tree next or
>> devel branches. Do you think it would be valuable for me to refresh
>> these patches before the dependencies are picked up?
>
> Probably not. I'll try to work on getting cpufreq upstream :)

I think it's working fine in renesas-drivers, isn't it?

As in the mean time the R-Car Gen3 CPG/MSSR drivers gained suspend/resume
support, the only missing part is support for restoring the Z* clocks during
system resume.  Unless that is handled automatically by the cpufreq core.
For secondary CPU cores, this may be handled by the CPU hotplug code.
For the primary CPU core, I don't know.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Simon Horman Jan. 4, 2018, 4:53 p.m. UTC | #7
On Wed, Jan 03, 2018 at 11:25:37AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Wed, Jan 3, 2018 at 11:14 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Jan 03, 2018 at 01:03:52AM +0100, Niklas Söderlund wrote:
> >> On 2018-01-02 10:19:44 +0100, Simon Horman wrote:
> >> > On Mon, Jan 01, 2018 at 10:13:35AM -0800, Eduardo Valentin wrote:
> >> > > On Wed, Sep 13, 2017 at 12:59:08PM +0200, Niklas Söderlund wrote:
> >> > > > Add nodes and properties for thermal cooling management support.
> >> > > >
> >> > > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> >> > > > ---
> >> > >
> >> > > Just a reminder, this series should go via your arch tree. You may add
> >> > > my acks.
> >> >
> >> > Ack.
> >> >
> >> > Niklas, could you comment on the readiness of these patches
> >> > for the renesas tree?
> >>
> >> I think maybe the patches might have became a bit outdated since they
> >> where posted due to all reg property fixup patches. The blocker for me
> >> reposting this series is that the patches this depends
> >> 'topic/rcar-gen3-cpufreq' on are not yet in the renesas tree next or
> >> devel branches. Do you think it would be valuable for me to refresh
> >> these patches before the dependencies are picked up?
> >
> > Probably not. I'll try to work on getting cpufreq upstream :)
> 
> I think it's working fine in renesas-drivers, isn't it?

There was some cleanup of the DTS patches pending.
That has now happened, been posted, reviewed and merged :)

> As in the mean time the R-Car Gen3 CPG/MSSR drivers gained suspend/resume
> support, the only missing part is support for restoring the Z* clocks during
> system resume.  Unless that is handled automatically by the cpufreq core.
> For secondary CPU cores, this may be handled by the CPU hotplug code.
> For the primary CPU core, I don't know.

Thanks, I'll look into that.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 0ccac86bccc6b6f0..1818fd20660d0315 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -53,6 +53,7 @@ 
 				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
 				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
 				<&cluster0_opp_tb7>;
+			#cooling-cells = <2>;
 		};
 
 		a57_1: cpu@1 {
@@ -67,6 +68,7 @@ 
 				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
 				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
 				<&cluster0_opp_tb7>;
+			#cooling-cells = <2>;
 		};
 
 		a57_2: cpu@2 {
@@ -81,6 +83,7 @@ 
 				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
 				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
 				<&cluster0_opp_tb7>;
+			#cooling-cells = <2>;
 		};
 
 		a57_3: cpu@3 {
@@ -95,6 +98,7 @@ 
 				<&cluster0_opp_tb3>, <&cluster0_opp_tb4>,
 				<&cluster0_opp_tb5>, <&cluster0_opp_tb6>,
 				<&cluster0_opp_tb7>;
+			#cooling-cells = <2>;
 		};
 
 		a53_0: cpu@100 {
@@ -2821,12 +2825,24 @@ 
 				thermal-sensors = <&tsc 0>;
 
 				trips {
+					sensor1_passive: sensor1-passive {
+						temperature = <95000>;
+						hysteresis = <2000>;
+						type = "passive";
+					};
 					sensor1_crit: sensor1-crit {
 						temperature = <120000>;
 						hysteresis = <2000>;
 						type = "critical";
 					};
 				};
+
+				cooling-maps {
+					map0 {
+						trip = <&sensor1_passive>;
+						cooling-device = <&a57_0 4 4>;
+					};
+				};
 			};
 
 			sensor_thermal2: sensor-thermal2 {
@@ -2835,12 +2851,24 @@ 
 				thermal-sensors = <&tsc 1>;
 
 				trips {
+					sensor2_passive: sensor2-passive {
+						temperature = <95000>;
+						hysteresis = <2000>;
+						type = "passive";
+					};
 					sensor2_crit: sensor2-crit {
 						temperature = <120000>;
 						hysteresis = <2000>;
 						type = "critical";
 					};
 				};
+
+				cooling-maps {
+					map0 {
+						trip = <&sensor2_passive>;
+						cooling-device = <&a57_0 4 4>;
+					};
+				};
 			};
 
 			sensor_thermal3: sensor-thermal3 {
@@ -2849,12 +2877,24 @@ 
 				thermal-sensors = <&tsc 2>;
 
 				trips {
+					sensor3_passive: sensor3-passive {
+						temperature = <95000>;
+						hysteresis = <2000>;
+						type = "passive";
+					};
 					sensor3_crit: sensor3-crit {
 						temperature = <120000>;
 						hysteresis = <2000>;
 						type = "critical";
 					};
 				};
+
+				cooling-maps {
+					map0 {
+						trip = <&sensor3_passive>;
+						cooling-device = <&a57_0 4 4>;
+					};
+				};
 			};
 		};
 	};