diff mbox

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

Message ID 1513162673-31531-3-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Superseded, archived
Delegated to: Eduardo Valentin
Headers show

Commit Message

Biju Das Dec. 13, 2017, 10:57 a.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>
---
 arch/arm/boot/dts/r8a7743.dtsi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Geert Uytterhoeven Dec. 19, 2017, 11:44 a.m. UTC | #1
On Wed, Dec 13, 2017 at 11:57 AM, Biju Das <biju.das@bp.renesas.com> 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>

Minor nit below...

> --- 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 0x14>, <0 0xe61f0100 0 0x38>;

<0 0xe61f0000 0 0x10>?

The register at offset 0x10 seems to exist on R-Mobile APE6 only, but
all R-Car Gen2 .dtsis include it in the range...

Not that it matters much, mapping granularity is PAGE_SIZE anyway...

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
Biju Das Dec. 19, 2017, 12:11 p.m. UTC | #2
Hi Geert,

Thanks, I will send v2.

Regards,
Biju

> -----Original Message-----

> From: geert.uytterhoeven@gmail.com [mailto:geert.uytterhoeven@gmail.com]

> On Behalf Of Geert Uytterhoeven

> Sent: 19 December 2017 11:45

> To: Biju Das <biju.das@bp.renesas.com>

> Cc: Rob Herring <robh+dt@kernel.org>; Mark Rutland

> <mark.rutland@arm.com>; Zhang Rui <rui.zhang@intel.com>; Eduardo

> Valentin <edubezval@gmail.com>; Simon Horman <horms@verge.net.au>;

> Magnus Damm <magnus.damm@gmail.com>; Chris Paterson

> <Chris.Paterson2@renesas.com>; devicetree@vger.kernel.org; Linux-Renesas

> <linux-renesas-soc@vger.kernel.org>; Linux PM list <linux-

> pm@vger.kernel.org>

> Subject: Re: [PATCH 2/2] ARM: dts: r8a7743: Add thermal device to DT

>

> On Wed, Dec 13, 2017 at 11:57 AM, Biju Das <biju.das@bp.renesas.com>

> 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>

>

> Minor nit below...

>

> > --- 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 0x14>, <0 0xe61f0100 0

> > + 0x38>;

>

> <0 0xe61f0000 0 0x10>?

>

> The register at offset 0x10 seems to exist on R-Mobile APE6 only, but all R-Car

> Gen2 .dtsis include it in the range...

>

> Not that it matters much, mapping granularity is PAGE_SIZE anyway...

>

> 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



[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.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 0e2834a..e056bc5 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 0x14>, <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) |