diff mbox

[v2,2/2] ARM: dts: r8a7743: Add thermal device to DT

Message ID 1513689449-2700-3-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Accepted
Delegated to: Eduardo Valentin
Headers show

Commit Message

Biju Das Dec. 19, 2017, 1:17 p.m. UTC
This patch instantiates the thermal sensor module with thermal-zone
support.

This patch is based on the commit cac68a56e34b
("ARM: dts: r8a7791: enable to use thermal-zone") by Kuninori Morimoto.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v2
 * Fixed the size.

 arch/arm/boot/dts/r8a7743.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Simon Horman Dec. 20, 2017, 8:50 a.m. UTC | #1
On Tue, Dec 19, 2017 at 01:17:29PM +0000, Biju Das wrote:
> This patch instantiates the thermal sensor module with thermal-zone
> support.
> 
> This patch is based on the commit cac68a56e34b
> ("ARM: dts: r8a7791: enable to use thermal-zone") by Kuninori Morimoto.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v1->v2
>  * Fixed the size.

Thanks, applied.
Biju Das Dec. 20, 2017, 11:36 a.m. UTC | #2
Hi Simon,

Just noticed that

# make dtbs W=1 is giving below warning message.

arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property

Do you prefer a fix patch or a v2 ?

Regards,
Biju


> -----Original Message-----
> From: Simon Horman [mailto:horms@verge.net.au]
> Sent: 20 December 2017 08:51
> To: Biju Das <biju.das@bp.renesas.com>
> Cc: Zhang Rui <rui.zhang@intel.com>; Eduardo Valentin
> <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland
> <mark.rutland@arm.com>; Magnus Damm <magnus.damm@gmail.com>;
> Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro@bp.renesas.com>; devicetree@vger.kernel.org; linux-renesas-
> soc@vger.kernel.org; linux-pm@vger.kernel.org
> Subject: Re: [PATCH v2 2/2] ARM: dts: r8a7743: Add thermal device to DT
>
> On Tue, Dec 19, 2017 at 01:17:29PM +0000, Biju Das wrote:
> > This patch instantiates the thermal sensor module with thermal-zone
> > support.
> >
> > This patch is based on the commit cac68a56e34b
> > ("ARM: dts: r8a7791: enable to use thermal-zone") by Kuninori Morimoto.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > v1->v2
> >  * Fixed the size.
>
> Thanks, applied.


[https://www2.renesas.eu/media/email/unicef_2017.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world.
We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
Simon Horman Dec. 20, 2017, 11:48 a.m. UTC | #3
On Wed, Dec 20, 2017 at 11:36:51AM +0000, Biju Das wrote:
> Hi Simon,
> 
> Just noticed that
> 
> # make dtbs W=1 is giving below warning message.
> 
> arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dtb: Warning (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges property
> 
> Do you prefer a fix patch or a v2 ?

I believe I have fixed that by applying
"ARM: dts: r8a7743: move timer and thermal-zones nodes out of bus"

Could you check the devel branch when I push it a little later today?
Biju Das Dec. 20, 2017, 11:53 a.m. UTC | #4
Thanks, I will check and provide feedback if any.

Regards,
Biju

> -----Original Message-----
> From: Simon Horman [mailto:horms@verge.net.au]
> Sent: 20 December 2017 11:49
> To: Biju Das <biju.das@bp.renesas.com>
> Cc: Zhang Rui <rui.zhang@intel.com>; Eduardo Valentin
> <edubezval@gmail.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland
> <mark.rutland@arm.com>; Magnus Damm <magnus.damm@gmail.com>;
> Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro@bp.renesas.com>; devicetree@vger.kernel.org; linux-renesas-
> soc@vger.kernel.org; linux-pm@vger.kernel.org
> Subject: Re: [PATCH v2 2/2] ARM: dts: r8a7743: Add thermal device to DT
>
> On Wed, Dec 20, 2017 at 11:36:51AM +0000, Biju Das wrote:
> > Hi Simon,
> >
> > Just noticed that
> >
> > # make dtbs W=1 is giving below warning message.
> >
> > arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dtb: Warning
> (simple_bus_reg): Node /soc/thermal-zones missing or empty reg/ranges
> property
> >
> > Do you prefer a fix patch or a v2 ?
>
> I believe I have fixed that by applying
> "ARM: dts: r8a7743: move timer and thermal-zones nodes out of bus"
>
> Could you check the devel branch when I push it a little later today?


[https://www2.renesas.eu/media/email/unicef_2017.jpg]

This Christmas, instead of sending out cards, Renesas Electronics Europe have decided to support Unicef with a donation. For further details click here<https://www.unicef.org/> to find out about the valuable work they do, helping children all over the world.
We would like to take this opportunity to wish you a Merry Christmas and a prosperous New Year.



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
Simon Horman Dec. 20, 2017, 12:09 p.m. UTC | #5
On Wed, Dec 20, 2017 at 11:53:44AM +0000, Biju Das wrote:
> Thanks, I will check and provide feedback if any.

Thanks, you should be able to check renesas-devel-20171220-v4.15-rc4,
which I pushed a few minutes ago.
Eduardo Valentin Jan. 1, 2018, 8:11 p.m. UTC | #6
On Tue, Dec 19, 2017 at 01:17:29PM +0000, Biju Das wrote:
> This patch instantiates the thermal sensor module with thermal-zone
> support.
> 
> This patch is based on the commit cac68a56e34b
> ("ARM: dts: r8a7791: enable to use thermal-zone") by Kuninori Morimoto.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

As for the thermal composition of this patch:
Acked-by: Eduardo Valentin <edubezval@gmail.com>

Also taking care of patch 1.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index f250147..6a6c40c 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -250,6 +250,38 @@ 
 			resets = <&cpg 407>;
 		};
 
+		thermal: thermal@e61f0000 {
+			compatible = "renesas,thermal-r8a7743",
+				     "renesas,rcar-gen2-thermal",
+				     "renesas,rcar-thermal";
+			reg = <0 0xe61f0000 0 0x10>, <0 0xe61f0100 0 0x38>;
+			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 522>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 522>;
+			#thermal-sensor-cells = <0>;
+		};
+
+		thermal-zones {
+			cpu_thermal: cpu-thermal {
+				polling-delay-passive = <0>;
+				polling-delay = <0>;
+
+				thermal-sensors = <&thermal>;
+
+				trips {
+					cpu-crit {
+						temperature = <95000>;
+						hysteresis = <0>;
+						type = "critical";
+					};
+				};
+
+				cooling-maps {
+				};
+			};
+		};
+
 		timer {
 			compatible = "arm,armv7-timer";
 			interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |