Skip to contentSkip to conversation

thermal: Add support for R-Car V4H

PATCH In review Geert Uytterhoeven 4 participants 7 messages Feb 9, 2023 – Feb 13, 2023

Subsystems (4)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover thermal: Add support for R-Car V4H

Hi all,

This patch series adds support for the Thermal Sensor in the Renesas R-Car V4H SoC.

Unfortunately early revisions of R-Car V4H may suffer from a hardware issue with the thermal sensor, causing the values in /sys/devices/virtual/thermal/thermal_zone*/temp to be off.

Thanks for your comments!

Geert Uytterhoeven (2):
dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support thermal/drivers/rcar_gen3: Add support for R-Car V4H

 .../devicetree/bindings/thermal/rcar-gen3-thermal.yaml        | 3 +++
 drivers/thermal/rcar_gen3_thermal.c                           | 4 ++++
 2 files changed, 7 insertions(+)
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
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
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support

Document support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

Unlike most other R-Car Gen3 and Gen4 SoCs, it has 4 instead of 3 sensors, so increase the maximum number of reg tuples. Just like other R-Car Gen4 SoCs, interrupts are not routed to the INTC-AP but to the ECM.

---
 .../devicetree/bindings/thermal/rcar-gen3-thermal.yaml         | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml +3 -0
index 0f05f5c886c5fe1d..ecf276fd155cfb27 100644
@@ -28,6 +28,7 @@ properties:
       - renesas,r8a77980-thermal # R-Car V3H
       - renesas,r8a779a0-thermal # R-Car V3U
       - renesas,r8a779f0-thermal # R-Car S4-8
+      - renesas,r8a779g0-thermal # R-Car V4H
 
   reg: true
 
@@ -80,6 +81,7 @@ else:
         - description: TSC1 registers
         - description: TSC2 registers
         - description: TSC3 registers
+        - description: TSC4 registers
   if:
     not:
       properties:
@@ -87,6 +89,7 @@ else:
           contains:
             enum:
               - renesas,r8a779f0-thermal
+              - renesas,r8a779g0-thermal
   then:
     required:
       - interrupts
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support

Quoted 6 lines · Geert Uytterhoeven

Document support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

Unlike most other R-Car Gen3 and Gen4 SoCs, it has 4 instead of 3 sensors, so increase the maximum number of reg tuples.

Yep, no docs saying that it belongs to control domain this time (so far).

Quoted 4 lines

Just like other R-Car Gen4 SoCs, interrupts are not routed to the INTC-AP but to the ECM.

maintainer Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your work.

Quoted 10 lines · Geert Uytterhoeven

Document support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

Unlike most other R-Car Gen3 and Gen4 SoCs, it has 4 instead of 3 sensors, so increase the maximum number of reg tuples. Just like other R-Car Gen4 SoCs, interrupts are not routed to the INTC-AP but to the ECM.

Quoted 35 lines
---
 .../devicetree/bindings/thermal/rcar-gen3-thermal.yaml         | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml +3 -0
index 0f05f5c886c5fe1d..ecf276fd155cfb27 100644
@@ -28,6 +28,7 @@ properties:
       - renesas,r8a77980-thermal # R-Car V3H
       - renesas,r8a779a0-thermal # R-Car V3U
       - renesas,r8a779f0-thermal # R-Car S4-8
+      - renesas,r8a779g0-thermal # R-Car V4H
 
   reg: true
 
@@ -80,6 +81,7 @@ else:
         - description: TSC1 registers
         - description: TSC2 registers
         - description: TSC3 registers
+        - description: TSC4 registers
   if:
     not:
       properties:
@@ -87,6 +89,7 @@ else:
           contains:
             enum:
               - renesas,r8a779f0-thermal
+              - renesas,r8a779g0-thermal
   then:
     required:
       - interrupts
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Acked-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779g0 support

In reply to Geert Uytterhoeven
Quoted 10 lines · Geert Uytterhoeven

Document support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

Unlike most other R-Car Gen3 and Gen4 SoCs, it has 4 instead of 3 sensors, so increase the maximum number of reg tuples. Just like other R-Car Gen4 SoCs, interrupts are not routed to the INTC-AP but to the ECM.

Best regards,
Krzysztof

author maintainer
#5 lore raw

PATCH 2/2 thermal/drivers/rcar_gen3: Add support for R-Car V4H

In reply to Geert Uytterhoeven

Add support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

According to the R-Car V4H Hardware User's Manual Rev. 0.70, the (preliminary) conversion formula for the thermal sensor is the same as for most other R-Car Gen3 and Gen4 SoCs, while the (preliminary) conversion formula for the chip internal voltage monitor differs. As the driver only uses the former, no further changes are needed.

---
 drivers/thermal/rcar_gen3_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/thermal/rcar_gen3_thermal.c +4 -0
index 4ef927437842af74..04245393e78d02c5 100644
@@ -403,6 +403,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
 		.compatible = "renesas,r8a779f0-thermal",
 		.data = &rcar_gen3_ths_tj_1,
 	},
+	{
+		.compatible = "renesas,r8a779g0-thermal",
+		.data = &rcar_gen3_ths_tj_1,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] thermal/drivers/rcar_gen3: Add support for R-Car V4H

Hi Geert,

Thanks for your work.

Quoted 10 lines · Geert Uytterhoeven

Add support for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC.

According to the R-Car V4H Hardware User's Manual Rev. 0.70, the (preliminary) conversion formula for the thermal sensor is the same as for most other R-Car Gen3 and Gen4 SoCs, while the (preliminary) conversion formula for the chip internal voltage monitor differs. As the driver only uses the former, no further changes are needed.

Quoted 22 lines
---
 drivers/thermal/rcar_gen3_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/thermal/rcar_gen3_thermal.c +4 -0
index 4ef927437842af74..04245393e78d02c5 100644
@@ -403,6 +403,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
 		.compatible = "renesas,r8a779f0-thermal",
 		.data = &rcar_gen3_ths_tj_1,
 	},
+	{
+		.compatible = "renesas,r8a779g0-thermal",
+		.data = &rcar_gen3_ths_tj_1,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund