diff mbox

arm64: dts: r8a77965: Add R-Car Gen3 thermal support

Message ID 20180417210342.16061-1-niklas.soderlund@ragnatech.se (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show

Commit Message

Niklas Söderlund April 17, 2018, 9:03 p.m. UTC
From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Based on previous work by Ryo Kataoka <ryo.kataoka.wt@renesas.com>.

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

Hi Simon,

This patch depends on '[PATCH 0/2] thermal: rcar_gen3_thermal: add 
r8a77965 support'. So it's probably best you hold back applying it to 
such time it's dependency are accepted. I post it in any case to get 
review comments and keep it ready for future integration in 
renesas-drivers branches.

It also uses numerical values for the power-doamains propery as the 
defines where not yet available for me. This shall of course be updated 
before they are accepted.

// Niklas

Comments

Simon Horman April 18, 2018, 1:52 p.m. UTC | #1
On Tue, Apr 17, 2018 at 11:03:42PM +0200, Niklas Söderlund wrote:
> From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> 
> Based on previous work by Ryo Kataoka <ryo.kataoka.wt@renesas.com>.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  arch/arm64/boot/dts/renesas/r8a77965.dtsi | 59 +++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
> 
> Hi Simon,
> 
> This patch depends on '[PATCH 0/2] thermal: rcar_gen3_thermal: add 
> r8a77965 support'. So it's probably best you hold back applying it to 
> such time it's dependency are accepted. I post it in any case to get 
> review comments and keep it ready for future integration in 
> renesas-drivers branches.
> 
> It also uses numerical values for the power-doamains propery as the 
> defines where not yet available for me. This shall of course be updated 
> before they are accepted.

Thanks,  I will mark this as deferred. Please repost or ping me once
the dependency is accepted.
Geert Uytterhoeven April 18, 2018, 1:55 p.m. UTC | #2
Hi Niklas,

On Tue, Apr 17, 2018 at 11:03 PM, Niklas Söderlund
<niklas.soderlund@ragnatech.se> wrote:
> From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> Based on previous work by Ryo Kataoka <ryo.kataoka.wt@renesas.com>.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  arch/arm64/boot/dts/renesas/r8a77965.dtsi | 59 +++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
>
> Hi Simon,
>
> This patch depends on '[PATCH 0/2] thermal: rcar_gen3_thermal: add
> r8a77965 support'. So it's probably best you hold back applying it to

Does it? Just on the (trivial) addition of a new compatible value, right?

> such time it's dependency are accepted. I post it in any case to get
> review comments and keep it ready for future integration in
> renesas-drivers branches.

So I don't think the above is a blocker, but...

> It also uses numerical values for the power-doamains propery as the
> defines where not yet available for me. This shall of course be updated
> before they are accepted.

They're in v4.17-rc1, so you can update the patch now?

Gr{oetje,eeting}s,

                        Geert
Simon Horman April 24, 2018, 9:13 a.m. UTC | #3
On Wed, Apr 18, 2018 at 03:55:34PM +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> On Tue, Apr 17, 2018 at 11:03 PM, Niklas Söderlund
> <niklas.soderlund@ragnatech.se> wrote:
> > From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> >
> > Based on previous work by Ryo Kataoka <ryo.kataoka.wt@renesas.com>.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> >  arch/arm64/boot/dts/renesas/r8a77965.dtsi | 59 +++++++++++++++++++++++
> >  1 file changed, 59 insertions(+)
> >
> > Hi Simon,
> >
> > This patch depends on '[PATCH 0/2] thermal: rcar_gen3_thermal: add
> > r8a77965 support'. So it's probably best you hold back applying it to
> 
> Does it? Just on the (trivial) addition of a new compatible value, right?
> 
> > such time it's dependency are accepted. I post it in any case to get
> > review comments and keep it ready for future integration in
> > renesas-drivers branches.
> 
> So I don't think the above is a blocker, but...
> 
> > It also uses numerical values for the power-doamains propery as the
> > defines where not yet available for me. This shall of course be updated
> > before they are accepted.
> 
> They're in v4.17-rc1, so you can update the patch now?

Hi Niklas,

could you find some time to address Geert's feedback.
It sounds like we could apply a v2 without further delay.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index a41f91653d93595b..8469453d8085ebee 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -199,6 +199,21 @@ 
 			#power-domain-cells = <1>;
 		};
 
+		tsc: thermal@e6198000 {
+			compatible = "renesas,r8a77965-thermal";
+			reg = <0 0xe6198000 0 0x100>,
+			      <0 0xe61a0000 0 0x100>,
+			      <0 0xe61a8000 0 0x100>;
+			interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 522>;
+			power-domains = <&sysc 32>;
+			resets = <&cpg 522>;
+			#thermal-sensor-cells = <1>;
+			status = "okay";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a77965",
 				     "renesas,rcar-gen3-gpio";
@@ -1073,4 +1088,48 @@ 
 			/* placeholder */
 		};
 	};
+
+	thermal-zones {
+		sensor_thermal1: sensor-thermal1 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 0>;
+
+			trips {
+				sensor1_crit: sensor1-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal2: sensor-thermal2 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 1>;
+
+			trips {
+				sensor2_crit: sensor2-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal3: sensor-thermal3 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 2>;
+
+			trips {
+				sensor3_crit: sensor3-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };