Skip to contentSkip to conversation

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

PATCH In review Niklas Söderlund 3 participants 4 messages Apr 17, 2018 – Apr 24, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: r8a77965: Add R-Car Gen3 thermal support

From: Niklas Söderlund <[email protected]>

Based on previous work by Ryo Kataoka <[email protected]>.

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

arch/arm64/boot/dts/renesas/r8a77965.dtsi +59 -0
index a41f91653d93595b..8469453d8085ebee 100644
@@ -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";
+				};
+			};
+		};
+	};
 };
Signature · 1 line
2.17.0
#1 lore raw
Quoted 17 lines · Niklas Söderlund

From: Niklas Söderlund <[email protected]>

Based on previous work by Ryo Kataoka <[email protected]>.

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

Quoted 3 lines

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.

#2 lore raw
In reply to Niklas Söderlund

Hi Niklas,

Quoted 5 lines · Niklas Söderlund

From: Niklas Söderlund <[email protected]>

Based on previous work by Ryo Kataoka <[email protected]>.

Quoted 8 lines
---
 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?

Quoted 3 lines

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

Quoted 3 lines

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

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#3 lore raw
Quoted 24 lines · Geert Uytterhoeven

Hi Niklas,

Quoted 5 lines · Niklas Söderlund

From: Niklas Söderlund <[email protected]>

Based on previous work by Ryo Kataoka <[email protected]>.

Quoted 8 lines
---
 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?

Quoted 3 lines

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.

Quoted 7 lines

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

Quoted 3 lines

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.