* [PATCH v2 0/3] Add TSU support for the Renesas RZ/V2H SoC
@ 2025-10-20 14:31 Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ovidiu Panait @ 2025-10-20 14:31 UTC (permalink / raw)
To: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, geert+renesas, magnus.damm, mturquette,
sboyd
Cc: linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
Hi,
This series adds TSU support for the Renesas RZ/V2H SoC.
The Renesas RZ/V2H SoC includes a Thermal Sensor Unit (TSU) block designed
to measure the junction temperature. The device provides real-time
temperature measurements for thermal management, utilizing two dedicated
channels for temperature sensing.
The Renesas RZ/V2H SoC is using the same TSU IP found on the RZ/G3E SoC,
the only difference being that it has two channels instead of one.
Best regards,
Ovidiu
v2:
- Dropped unneeded "items" from bindings compatible list.
- Added "Reviewed-by:" tag from Krzysztof for the bindings patch.
Ovidiu Panait (3):
clk: renesas: r9a09g057: Add clock and reset entries for TSU
dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU
arm64: dts: renesas: r9a09g057: Add TSU nodes
.../thermal/renesas,r9a09g047-tsu.yaml | 6 +-
arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 75 +++++++++++++++++++
drivers/clk/renesas/r9a09g057-cpg.c | 6 ++
3 files changed, 86 insertions(+), 1 deletion(-)
--
2.51.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU
2025-10-20 14:31 [PATCH v2 0/3] Add TSU support for the Renesas RZ/V2H SoC Ovidiu Panait
@ 2025-10-20 14:31 ` Ovidiu Panait
2025-10-21 13:36 ` Geert Uytterhoeven
2025-10-20 14:31 ` [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes Ovidiu Panait
2 siblings, 1 reply; 7+ messages in thread
From: Ovidiu Panait @ 2025-10-20 14:31 UTC (permalink / raw)
To: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, geert+renesas, magnus.damm, mturquette,
sboyd
Cc: linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
Add module clock and reset entries for the TSU0 and TSU1 blocks on the
Renesas RZ/V2H (R9A09G057) SoC.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
v2 changes: none
drivers/clk/renesas/r9a09g057-cpg.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/renesas/r9a09g057-cpg.c b/drivers/clk/renesas/r9a09g057-cpg.c
index 100cd56c323e..dce5755d85ec 100644
--- a/drivers/clk/renesas/r9a09g057-cpg.c
+++ b/drivers/clk/renesas/r9a09g057-cpg.c
@@ -389,6 +389,10 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
BUS_MSTOP(3, BIT(4))),
DEF_MOD("gpu_0_ace_clk", CLK_PLLDTY_ACPU_DIV2, 15, 2, 7, 18,
BUS_MSTOP(3, BIT(4))),
+ DEF_MOD("tsu_0_pclk", CLK_QEXTAL, 16, 9, 8, 9,
+ BUS_MSTOP(5, BIT(2))),
+ DEF_MOD("tsu_1_pclk", CLK_QEXTAL, 16, 10, 8, 10,
+ BUS_MSTOP(2, BIT(15))),
};
static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
@@ -463,6 +467,8 @@ static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
DEF_RST(13, 13, 6, 14), /* GPU_0_RESETN */
DEF_RST(13, 14, 6, 15), /* GPU_0_AXI_RESETN */
DEF_RST(13, 15, 6, 16), /* GPU_0_ACE_RESETN */
+ DEF_RST(15, 7, 7, 8), /* TSU_0_PRESETN */
+ DEF_RST(15, 8, 7, 9), /* TSU_1_PRESETN */
};
const struct rzv2h_cpg_info r9a09g057_cpg_info __initconst = {
--
2.51.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU
2025-10-20 14:31 [PATCH v2 0/3] Add TSU support for the Renesas RZ/V2H SoC Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
@ 2025-10-20 14:31 ` Ovidiu Panait
2025-11-10 11:56 ` Daniel Lezcano
2025-10-20 14:31 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes Ovidiu Panait
2 siblings, 1 reply; 7+ messages in thread
From: Ovidiu Panait @ 2025-10-20 14:31 UTC (permalink / raw)
To: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, geert+renesas, magnus.damm, mturquette,
sboyd
Cc: linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
The Renesas RZ/V2H SoC includes a Thermal Sensor Unit (TSU) block designed
to measure the junction temperature. The device provides real-time
temperature measurements for thermal management, utilizing two dedicated
channels for temperature sensing.
The Renesas RZ/V2H SoC is using the same TSU IP found on the RZ/G3E SoC,
the only difference being that it has two channels instead of one.
Add new compatible string "renesas,r9a09g057-tsu" for RZ/V2H and use
"renesas,r9a09g047-tsu" as a fallback compatible to indicate hardware
compatibility with the RZ/G3E implementation.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
v2 changes:
- dropped unneeded "items" from compatible list
- added "Reviewed-by:" tag from Krzysztof
.../devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
index 8d3f3c24f0f2..befdc8b7a082 100644
--- a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
+++ b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
@@ -16,7 +16,11 @@ description:
properties:
compatible:
- const: renesas,r9a09g047-tsu
+ oneOf:
+ - const: renesas,r9a09g047-tsu # RZ/G3E
+ - items:
+ - const: renesas,r9a09g057-tsu # RZ/V2H
+ - const: renesas,r9a09g047-tsu # RZ/G3E
reg:
maxItems: 1
--
2.51.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes
2025-10-20 14:31 [PATCH v2 0/3] Add TSU support for the Renesas RZ/V2H SoC Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU Ovidiu Panait
@ 2025-10-20 14:31 ` Ovidiu Panait
2025-11-13 14:28 ` Geert Uytterhoeven
2 siblings, 1 reply; 7+ messages in thread
From: Ovidiu Panait @ 2025-10-20 14:31 UTC (permalink / raw)
To: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, geert+renesas, magnus.damm, mturquette,
sboyd
Cc: linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
The Renesas RZ/V2H SoC includes a Thermal Sensor Unit (TSU) block designed
to measure the junction temperature. The device provides real-time
temperature measurements for thermal management, utilizing two dedicated
channels for temperature sensing:
- TSU0, which is located near the DRP-AI block
- TSU1, which is located near the CPU and DRP-AI block
Since TSU1 is physically closer the CPU and the highest temperature
spot, it is used for CPU throttling through a passive trip and cooling
map. TSU0 is configured only with a critical trip.
Add TSU nodes along with thermal zones and keep them enabled in the SoC
DTSI.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
v2 changes: none
arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 75 ++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
index e426b9978e22..e88cfc965415 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
@@ -65,6 +65,7 @@ cpu0: cpu@0 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G057_CA55_0_CORE_CLK0>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -75,6 +76,7 @@ cpu1: cpu@100 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G057_CA55_0_CORE_CLK1>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -85,6 +87,7 @@ cpu2: cpu@200 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G057_CA55_0_CORE_CLK2>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -95,6 +98,7 @@ cpu3: cpu@300 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G057_CA55_0_CORE_CLK3>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -285,6 +289,32 @@ sys: system-controller@10430000 {
resets = <&cpg 0x30>;
};
+ tsu0: thermal@11000000 {
+ compatible = "renesas,r9a09g057-tsu", "renesas,r9a09g047-tsu";
+ reg = <0 0x11000000 0 0x1000>;
+ interrupts = <GIC_SPI 248 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "adi", "adcmpi";
+ clocks = <&cpg CPG_MOD 0x109>;
+ resets = <&cpg 0xf7>;
+ power-domains = <&cpg>;
+ #thermal-sensor-cells = <0>;
+ renesas,tsu-trim = <&sys 0x320>;
+ };
+
+ tsu1: thermal@14002000 {
+ compatible = "renesas,r9a09g057-tsu", "renesas,r9a09g047-tsu";
+ reg = <0 0x14002000 0 0x1000>;
+ interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "adi", "adcmpi";
+ clocks = <&cpg CPG_MOD 0x10a>;
+ resets = <&cpg 0xf8>;
+ power-domains = <&cpg>;
+ #thermal-sensor-cells = <0>;
+ renesas,tsu-trim = <&sys 0x330>;
+ };
+
xspi: spi@11030000 {
compatible = "renesas,r9a09g057-xspi", "renesas,r9a09g047-xspi";
reg = <0 0x11030000 0 0x10000>,
@@ -1326,6 +1356,51 @@ stmmac_axi_setup: stmmac-axi-config {
snps,blen = <16 8 4 0 0 0 0>;
};
+ thermal-zones {
+ sensor1_thermal: sensor1-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tsu0>;
+
+ trips {
+ sensor1_crit: sensor1-crit {
+ temperature = <120000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+
+ sensor2_thermal: sensor2-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tsu1>;
+
+ cooling-maps {
+ map0 {
+ trip = <&sensor2_target>;
+ cooling-device = <&cpu0 0 3>, <&cpu1 0 3>,
+ <&cpu2 0 3>, <&cpu3 0 3>;
+ contribution = <1024>;
+ };
+ };
+
+ trips {
+ sensor2_target: trip-point {
+ temperature = <95000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ sensor2_crit: sensor2-crit {
+ temperature = <120000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
--
2.51.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU
2025-10-20 14:31 ` [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
@ 2025-10-21 13:36 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2025-10-21 13:36 UTC (permalink / raw)
To: Ovidiu Panait
Cc: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, magnus.damm, mturquette, sboyd, linux-pm,
devicetree, linux-kernel, linux-renesas-soc, linux-clk
On Mon, 20 Oct 2025 at 16:31, Ovidiu Panait
<ovidiu.panait.rb@renesas.com> wrote:
> Add module clock and reset entries for the TSU0 and TSU1 blocks on the
> Renesas RZ/V2H (R9A09G057) SoC.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk for v6.19.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU
2025-10-20 14:31 ` [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU Ovidiu Panait
@ 2025-11-10 11:56 ` Daniel Lezcano
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Lezcano @ 2025-11-10 11:56 UTC (permalink / raw)
To: Ovidiu Panait, john.madieu.xa, rafael, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, geert+renesas, magnus.damm, mturquette,
sboyd
Cc: linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
On 10/20/25 16:31, Ovidiu Panait wrote:
> The Renesas RZ/V2H SoC includes a Thermal Sensor Unit (TSU) block designed
> to measure the junction temperature. The device provides real-time
> temperature measurements for thermal management, utilizing two dedicated
> channels for temperature sensing.
>
> The Renesas RZ/V2H SoC is using the same TSU IP found on the RZ/G3E SoC,
> the only difference being that it has two channels instead of one.
>
> Add new compatible string "renesas,r9a09g057-tsu" for RZ/V2H and use
> "renesas,r9a09g047-tsu" as a fallback compatible to indicate hardware
> compatibility with the RZ/G3E implementation.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Applied patch 2/3
Thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes
2025-10-20 14:31 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes Ovidiu Panait
@ 2025-11-13 14:28 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2025-11-13 14:28 UTC (permalink / raw)
To: Ovidiu Panait
Cc: john.madieu.xa, rafael, daniel.lezcano, rui.zhang, lukasz.luba,
robh, krzk+dt, conor+dt, magnus.damm, mturquette, sboyd, linux-pm,
devicetree, linux-kernel, linux-renesas-soc, linux-clk
On Mon, 20 Oct 2025 at 16:31, Ovidiu Panait
<ovidiu.panait.rb@renesas.com> wrote:
> The Renesas RZ/V2H SoC includes a Thermal Sensor Unit (TSU) block designed
> to measure the junction temperature. The device provides real-time
> temperature measurements for thermal management, utilizing two dedicated
> channels for temperature sensing:
> - TSU0, which is located near the DRP-AI block
> - TSU1, which is located near the CPU and DRP-AI block
>
> Since TSU1 is physically closer the CPU and the highest temperature
> spot, it is used for CPU throttling through a passive trip and cooling
> map. TSU0 is configured only with a critical trip.
>
> Add TSU nodes along with thermal zones and keep them enabled in the SoC
> DTSI.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.19.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-13 14:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 14:31 [PATCH v2 0/3] Add TSU support for the Renesas RZ/V2H SoC Ovidiu Panait
2025-10-20 14:31 ` [PATCH v2 1/3] clk: renesas: r9a09g057: Add clock and reset entries for TSU Ovidiu Panait
2025-10-21 13:36 ` Geert Uytterhoeven
2025-10-20 14:31 ` [PATCH v2 2/3] dt-bindings: thermal: r9a09g047-tsu: Document RZ/V2H TSU Ovidiu Panait
2025-11-10 11:56 ` Daniel Lezcano
2025-10-20 14:31 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g057: Add TSU nodes Ovidiu Panait
2025-11-13 14:28 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).