* [PATCH 6.12.y-cip 01/11] clk: renesas: r9a09g077: Add TSU module clock
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 02/11] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
` (10 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 79276fb06d2f7769613abeeed65d69013137cefb upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a TSU
peripheral which is controlled by a module clock.
The TSU module clock is enabled in register MSTPCRD (0x30c), at bit 7,
resulting in a (0x30c - 0x300) / 4 * 100 + 7 = 307 index.
Add it to the list of module clocks.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251023081925.2412325-2-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[cosmin.tanislav: resolve merge conflict]
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/clk/renesas/r9a09g077-cpg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/renesas/r9a09g077-cpg.c b/drivers/clk/renesas/r9a09g077-cpg.c
index 3d2a67f570220..af54dadb32331 100644
--- a/drivers/clk/renesas/r9a09g077-cpg.c
+++ b/drivers/clk/renesas/r9a09g077-cpg.c
@@ -220,6 +220,7 @@ static const struct mssr_mod_clk r9a09g077_mod_clks[] __initconst = {
DEF_MOD("adc0", 206, R9A09G077_CLK_PCLKH),
DEF_MOD("adc1", 207, R9A09G077_CLK_PCLKH),
DEF_MOD("adc2", 225, R9A09G077_CLK_PCLKM),
+ DEF_MOD("tsu", 307, R9A09G077_CLK_PCLKL),
DEF_MOD("canfd", 310, R9A09G077_CLK_PCLKM),
DEF_MOD("gmac0", 400, R9A09G077_CLK_PCLKM),
DEF_MOD("ethsw", 401, R9A09G077_CLK_PCLKM),
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 02/11] thermal: renesas: rzg3e: make reset optional
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 01/11] clk: renesas: r9a09g077: Add TSU module clock Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 03/11] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
` (9 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 671d315c1c86a43128c0c30c82fe1eccc7af9901 upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs do not have a
reset line.
Prepare for them by making it optional.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260108195223.193531-2-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index e66d73ca67527..86c10810e5bf5 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -412,7 +412,7 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
"Clock rate %lu Hz too low (min %u Hz)\n",
clk_get_rate(clk), TSU_MIN_CLOCK_RATE);
- priv->rstc = devm_reset_control_get_exclusive_deasserted(dev, NULL);
+ priv->rstc = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL);
if (IS_ERR(priv->rstc))
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"Failed to get/deassert reset control\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 03/11] thermal: renesas: rzg3e: make min and max temperature per-chip
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 01/11] clk: renesas: r9a09g077: Add TSU module clock Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 02/11] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 04/11] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
` (8 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 6c7f87f517d3704a3fcc3b1c7f4220c2fcf75322 upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have
different minimum and maximum temperatures compared to the already
supported RZ/G3E.
Prepare for them by moving these into a chip-specific struct.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260108195223.193531-3-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 35 ++++++++++++++++---------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 86c10810e5bf5..3c9ff5e43d7eb 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -62,8 +62,6 @@
#define TSU_SICR_CMPCLR BIT(1)
/* Temperature calculation constants from datasheet */
-#define TSU_TEMP_D (-41)
-#define TSU_TEMP_E 126
#define TSU_CODE_MAX 0xFFF
/* Timing specifications from datasheet */
@@ -72,6 +70,11 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+struct rzg3e_thermal_info {
+ int temp_d_mc;
+ int temp_e_mc;
+};
+
/**
* struct rzg3e_thermal_priv - RZ/G3E TSU private data
* @base: TSU register base
@@ -79,6 +82,7 @@
* @syscon: regmap for calibration values
* @zone: thermal zone device
* @rstc: reset control
+ * @info: chip type specific information
* @trmval0: calibration value 0 (b)
* @trmval1: calibration value 1 (c)
* @trim_offset: offset for trim registers in syscon
@@ -90,6 +94,7 @@ struct rzg3e_thermal_priv {
struct regmap *syscon;
struct thermal_zone_device *zone;
struct reset_control *rstc;
+ const struct rzg3e_thermal_info *info;
u16 trmval0;
u16 trmval1;
u32 trim_offset;
@@ -161,17 +166,17 @@ static void rzg3e_thermal_power_off(struct rzg3e_thermal_priv *priv)
*/
static int rzg3e_thermal_code_to_temp(struct rzg3e_thermal_priv *priv, u16 code)
{
- int temp_e_mc = TSU_TEMP_E * MILLIDEGREE_PER_DEGREE;
- int temp_d_mc = TSU_TEMP_D * MILLIDEGREE_PER_DEGREE;
+ const struct rzg3e_thermal_info *info = priv->info;
s64 numerator, denominator;
int temp_mc;
- numerator = (temp_e_mc - temp_d_mc) * (s64)(code - priv->trmval0);
+ numerator = (info->temp_e_mc - info->temp_d_mc) *
+ (s64)(code - priv->trmval0);
denominator = priv->trmval1 - priv->trmval0;
- temp_mc = div64_s64(numerator, denominator) + temp_d_mc;
+ temp_mc = div64_s64(numerator, denominator) + info->temp_d_mc;
- return clamp(temp_mc, temp_d_mc, temp_e_mc);
+ return clamp(temp_mc, info->temp_d_mc, info->temp_e_mc);
}
/*
@@ -180,13 +185,12 @@ static int rzg3e_thermal_code_to_temp(struct rzg3e_thermal_priv *priv, u16 code)
*/
static u16 rzg3e_thermal_temp_to_code(struct rzg3e_thermal_priv *priv, int temp_mc)
{
- int temp_e_mc = TSU_TEMP_E * MILLIDEGREE_PER_DEGREE;
- int temp_d_mc = TSU_TEMP_D * MILLIDEGREE_PER_DEGREE;
+ const struct rzg3e_thermal_info *info = priv->info;
s64 numerator, denominator;
s64 code;
- numerator = (temp_mc - temp_d_mc) * (priv->trmval1 - priv->trmval0);
- denominator = temp_e_mc - temp_d_mc;
+ numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0);
+ denominator = info->temp_e_mc - info->temp_d_mc;
code = div64_s64(numerator, denominator) + priv->trmval0;
@@ -392,6 +396,8 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
return ret;
platform_set_drvdata(pdev, priv);
+ priv->info = device_get_match_data(dev);
+
priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
@@ -526,8 +532,13 @@ static const struct dev_pm_ops rzg3e_thermal_pm_ops = {
SYSTEM_SLEEP_PM_OPS(rzg3e_thermal_suspend, rzg3e_thermal_resume)
};
+static const struct rzg3e_thermal_info rzg3e_thermal_info = {
+ .temp_d_mc = -41000,
+ .temp_e_mc = 126000,
+};
+
static const struct of_device_id rzg3e_thermal_dt_ids[] = {
- { .compatible = "renesas,r9a09g047-tsu" },
+ { .compatible = "renesas,r9a09g047-tsu", .data = &rzg3e_thermal_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzg3e_thermal_dt_ids);
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 04/11] thermal: renesas: rzg3e: make calibration value retrieval per-chip
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (2 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 03/11] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 05/11] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
` (7 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit c33edd8f936ccf2e47eb1883f6b6944643d325c7 upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
temperature calibration data via SMC SIP calls.
To prepare for supporting these SoCs, do the following changes.
Rename rzg3e_thermal_parse_dt() to rzg3e_thermal_get_syscon_trim().
Move the syscon usage out of rzg3e_thermal_get_calibration() and into
rzg3e_thermal_get_syscon_trim() and remove single-use variables from the
private state.
Place a pointer to rzg3e_thermal_get_syscon_trim() into the
chip-specific struct, and use it in the probe function to retrieve the
calibration values.
Now that syscon usage has been moved out of
rzg3e_thermal_get_calibration(), remove it and inline the calibration
validation into the probe function.
Also, reuse the TSU_CODE_MAX macro to mask the calibration values, as
GEMASK(11, 0) and 0xFFF are equivalent, and replace the hardcoded 0xFFF
with TSU_CODE_MAX in the calibration validation.
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260108195223.193531-4-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 79 +++++++++++--------------
1 file changed, 33 insertions(+), 46 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 3c9ff5e43d7eb..97c4053303e03 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -70,7 +70,10 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+struct rzg3e_thermal_priv;
+
struct rzg3e_thermal_info {
+ int (*get_trim)(struct rzg3e_thermal_priv *priv);
int temp_d_mc;
int temp_e_mc;
};
@@ -91,13 +94,11 @@ struct rzg3e_thermal_info {
struct rzg3e_thermal_priv {
void __iomem *base;
struct device *dev;
- struct regmap *syscon;
struct thermal_zone_device *zone;
struct reset_control *rstc;
const struct rzg3e_thermal_info *info;
u16 trmval0;
u16 trmval1;
- u32 trim_offset;
struct mutex lock;
};
@@ -334,48 +335,30 @@ static const struct thermal_zone_device_ops rzg3e_tz_ops = {
.set_trips = rzg3e_thermal_set_trips,
};
-static int rzg3e_thermal_get_calibration(struct rzg3e_thermal_priv *priv)
-{
- u32 val;
- int ret;
-
- /* Read calibration values from syscon */
- ret = regmap_read(priv->syscon, priv->trim_offset, &val);
- if (ret)
- return ret;
- priv->trmval0 = val & GENMASK(11, 0);
-
- ret = regmap_read(priv->syscon, priv->trim_offset + 4, &val);
- if (ret)
- return ret;
- priv->trmval1 = val & GENMASK(11, 0);
-
- /* Validate calibration data */
- if (!priv->trmval0 || !priv->trmval1 ||
- priv->trmval0 == priv->trmval1 ||
- priv->trmval0 == 0xFFF || priv->trmval1 == 0xFFF) {
- dev_err(priv->dev, "Invalid calibration: b=0x%03x, c=0x%03x\n",
- priv->trmval0, priv->trmval1);
- return -EINVAL;
- }
-
- dev_dbg(priv->dev, "Calibration: b=0x%03x (%u), c=0x%03x (%u)\n",
- priv->trmval0, priv->trmval0, priv->trmval1, priv->trmval1);
-
- return 0;
-}
-
-static int rzg3e_thermal_parse_dt(struct rzg3e_thermal_priv *priv)
+static int rzg3e_thermal_get_syscon_trim(struct rzg3e_thermal_priv *priv)
{
struct device_node *np = priv->dev->of_node;
+ struct regmap *syscon;
u32 offset;
+ int ret;
+ u32 val;
- priv->syscon = syscon_regmap_lookup_by_phandle_args(np, "renesas,tsu-trim", 1, &offset);
- if (IS_ERR(priv->syscon))
- return dev_err_probe(priv->dev, PTR_ERR(priv->syscon),
+ syscon = syscon_regmap_lookup_by_phandle_args(np, "renesas,tsu-trim", 1, &offset);
+ if (IS_ERR(syscon))
+ return dev_err_probe(priv->dev, PTR_ERR(syscon),
"Failed to parse renesas,tsu-trim\n");
- priv->trim_offset = offset;
+ /* Read calibration values from syscon */
+ ret = regmap_read(syscon, offset, &val);
+ if (ret)
+ return ret;
+ priv->trmval0 = val & TSU_CODE_MAX;
+
+ ret = regmap_read(syscon, offset + 4, &val);
+ if (ret)
+ return ret;
+ priv->trmval1 = val & TSU_CODE_MAX;
+
return 0;
}
@@ -402,11 +385,20 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- /* Parse device tree for trim register info */
- ret = rzg3e_thermal_parse_dt(priv);
+ ret = priv->info->get_trim(priv);
if (ret)
return ret;
+ if (!priv->trmval0 || !priv->trmval1 ||
+ priv->trmval0 == priv->trmval1 ||
+ priv->trmval0 == TSU_CODE_MAX || priv->trmval1 == TSU_CODE_MAX)
+ return dev_err_probe(priv->dev, -EINVAL,
+ "Invalid calibration: b=0x%03x, c=0x%03x\n",
+ priv->trmval0, priv->trmval1);
+
+ dev_dbg(priv->dev, "Calibration: b=0x%03x (%u), c=0x%03x (%u)\n",
+ priv->trmval0, priv->trmval0, priv->trmval1, priv->trmval1);
+
/* Get clock to verify frequency - clock is managed by power domain */
clk = devm_clk_get(dev, NULL);
if (IS_ERR(clk))
@@ -423,12 +415,6 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"Failed to get/deassert reset control\n");
- /* Get calibration data */
- ret = rzg3e_thermal_get_calibration(priv);
- if (ret)
- return dev_err_probe(dev, ret,
- "Failed to get valid calibration data\n");
-
/* Get comparison interrupt */
irq = platform_get_irq_byname(pdev, "adcmpi");
if (irq < 0)
@@ -533,6 +519,7 @@ static const struct dev_pm_ops rzg3e_thermal_pm_ops = {
};
static const struct rzg3e_thermal_info rzg3e_thermal_info = {
+ .get_trim = rzg3e_thermal_get_syscon_trim,
.temp_d_mc = -41000,
.temp_e_mc = 126000,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 05/11] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (3 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 04/11] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 06/11] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
` (6 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit f41eaaa5f2c9fb4fc816e45e2061d80c0b927d39 upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs include a
Temperature Sensor Unit (TSU). The device provides real-time temperature
measurements for thermal management, utilizing a single dedicated
channel for temperature sensing.
Compared to the previously supported RZ/G3E, the RZ/T2H and RZ/N2H SoCs
do not have a reset for the TSU peripheral, and the OTP data is exposed
via ARM SMC, as opposed to a system register.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260108195223.193531-5-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
[cosmin.tanislav: resolve merge conflict]
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
.../thermal/renesas,r9a09g047-tsu.yaml | 30 +++++++++++++++++--
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
index c959b9834620c..d560c58be4d6e 100644
--- a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
+++ b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
@@ -17,12 +17,17 @@ description:
properties:
compatible:
oneOf:
- - const: renesas,r9a09g047-tsu # RZ/G3E
+ - enum:
+ - renesas,r9a09g047-tsu # RZ/G3E
+ - renesas,r9a09g077-tsu # RZ/T2H
- items:
- enum:
- renesas,r9a09g056-tsu # RZ/V2N
- renesas,r9a09g057-tsu # RZ/V2H
- const: renesas,r9a09g047-tsu # RZ/G3E
+ - items:
+ - const: renesas,r9a09g087-tsu # RZ/N2H
+ - const: renesas,r9a09g077-tsu # RZ/T2H
reg:
maxItems: 1
@@ -65,12 +70,31 @@ required:
- compatible
- reg
- clocks
- - resets
- power-domains
- interrupts
- interrupt-names
- "#thermal-sensor-cells"
- - renesas,tsu-trim
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g047-tsu
+ then:
+ required:
+ - resets
+ - renesas,tsu-trim
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g077-tsu
+ then:
+ properties:
+ resets: false
+ renesas,tsu-trim: false
additionalProperties: false
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 06/11] thermal: renesas: rzg3e: add support for RZ/T2H and RZ/N2H
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (4 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 05/11] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 07/11] PM: domains: Add RZ/T2H and RZ/N2H compatibles to PM domain detach list Cosmin Tanislav
` (5 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 0061030929e2d09398ade9fae320528bdcba2bed upstream.
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
temperature calibration via SMC SIP and do not have a reset for the
TSU peripheral, and use different minimum and maximum temperature values
compared to the already supported RZ/G3E.
Although the calibration data is stored in an OTP memory, the OTP itself
is not memory-mapped, access to it is done through an OTP controller.
The OTP controller is only accessible from the secure world,
but the temperature calibration data stored in the OTP is exposed via
SMC.
Add support for retrieving the calibration data using arm_smcc_smc().
Add a compatible for RZ/T2H, RZ/N2H can use it as a fallback.
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20260108195223.193531-6-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 27 +++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 97c4053303e03..dde021e283b7f 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -4,6 +4,7 @@
*
* Copyright (C) 2025 Renesas Electronics Corporation
*/
+#include <linux/arm-smccc.h>
#include <linux/clk.h>
#include <linux/cleanup.h>
#include <linux/delay.h>
@@ -70,6 +71,10 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+#define RZ_SIP_SVC_GET_SYSTSU 0x82000022
+#define OTP_TSU_REG_ADR_TEMPHI 0x01DC
+#define OTP_TSU_REG_ADR_TEMPLO 0x01DD
+
struct rzg3e_thermal_priv;
struct rzg3e_thermal_info {
@@ -362,6 +367,21 @@ static int rzg3e_thermal_get_syscon_trim(struct rzg3e_thermal_priv *priv)
return 0;
}
+static int rzg3e_thermal_get_smc_trim(struct rzg3e_thermal_priv *priv)
+{
+ struct arm_smccc_res local_res;
+
+ arm_smccc_smc(RZ_SIP_SVC_GET_SYSTSU, OTP_TSU_REG_ADR_TEMPLO,
+ 0, 0, 0, 0, 0, 0, &local_res);
+ priv->trmval0 = local_res.a0 & TSU_CODE_MAX;
+
+ arm_smccc_smc(RZ_SIP_SVC_GET_SYSTSU, OTP_TSU_REG_ADR_TEMPHI,
+ 0, 0, 0, 0, 0, 0, &local_res);
+ priv->trmval1 = local_res.a0 & TSU_CODE_MAX;
+
+ return 0;
+}
+
static int rzg3e_thermal_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -524,8 +544,15 @@ static const struct rzg3e_thermal_info rzg3e_thermal_info = {
.temp_e_mc = 126000,
};
+static const struct rzg3e_thermal_info rzt2h_thermal_info = {
+ .get_trim = rzg3e_thermal_get_smc_trim,
+ .temp_d_mc = -40000,
+ .temp_e_mc = 125000,
+};
+
static const struct of_device_id rzg3e_thermal_dt_ids[] = {
{ .compatible = "renesas,r9a09g047-tsu", .data = &rzg3e_thermal_info },
+ { .compatible = "renesas,r9a09g077-tsu", .data = &rzt2h_thermal_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzg3e_thermal_dt_ids);
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 07/11] PM: domains: Add RZ/T2H and RZ/N2H compatibles to PM domain detach list
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (5 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 06/11] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 08/11] arm64: dts: renesas: r9a09g077: Add OPP table Cosmin Tanislav
` (4 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
Add Renesas RZ/T2H and RZ/N2H compatibles to the PM domain detach list
in dev_pm_domain_allow_detach_on_unbind_cleanup(). This fixes
asynchronous aborts when unbinding the TSU devices.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/base/power/common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index b1fb615af2929..2871d27dcbda0 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -453,6 +453,8 @@ bool dev_pm_domain_allow_detach_on_unbind_cleanup(void)
"renesas,r9a09g047", /* Renesas RZ/G3E */
"renesas,r9a09g056", /* Renesas RZ/V2N */
"renesas,r9a09g057", /* Renesas RZ/V2H */
+ "renesas,r9a09g077", /* Renesas RZ/T2H */
+ "renesas,r9a09g087", /* Renesas RZ/N2H */
NULL
};
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 08/11] arm64: dts: renesas: r9a09g077: Add OPP table
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (6 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 07/11] PM: domains: Add RZ/T2H and RZ/N2H compatibles to PM domain detach list Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 09/11] arm64: dts: renesas: r9a09g077: Add TSU and thermal zones support Cosmin Tanislav
` (3 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 98aa86525051bbb974818cd27f9a6fbaf255975b upstream.
Add OPP table for RZ/T2H SoC.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251126130356.2768625-7-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
index cb85b745b2cfd..61b6cfaac5553 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -13,6 +13,17 @@ / {
#address-cells = <2>;
#size-cells = <2>;
+ cluster0_opp: opp-table-0 {
+ compatible = "operating-points-v2";
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -23,6 +34,8 @@ cpu0: cpu@0 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C0>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu1: cpu@100 {
@@ -31,6 +44,8 @@ cpu1: cpu@100 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C1>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu2: cpu@200 {
@@ -39,6 +54,8 @@ cpu2: cpu@200 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C2>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu3: cpu@300 {
@@ -47,6 +64,8 @@ cpu3: cpu@300 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C3>;
+ operating-points-v2 = <&cluster0_opp>;
};
L3_CA55: cache-controller-0 {
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 09/11] arm64: dts: renesas: r9a09g077: Add TSU and thermal zones support
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (7 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 08/11] arm64: dts: renesas: r9a09g077: Add OPP table Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-15 21:10 ` Pavel Machek
2026-04-10 17:02 ` [PATCH 6.12.y-cip 10/11] arm64: dts: renesas: r9a09g087: Add OPP table Cosmin Tanislav
` (2 subsequent siblings)
11 siblings, 1 reply; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit aea73cb10ec5bf8e24ff688eba8aeb9c7d1b4cd0 upstream.
The Renesas RZ/T2H (R9A09G077) SoC includes a Temperature Sensor Unit
(TSU). The device provides real-time temperature measurements for
thermal management, utilizing a single dedicated channel for temperature
sensing.
The TSU loads calibration data via SMC SIP.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251126130356.2768625-9-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
index 61b6cfaac5553..3c6e6969026df 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -35,6 +35,7 @@ cpu0: cpu@0 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C0>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -45,6 +46,7 @@ cpu1: cpu@100 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C1>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -55,6 +57,7 @@ cpu2: cpu@200 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C2>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -65,6 +68,7 @@ cpu3: cpu@300 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G077_CLK_CA55C3>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -342,6 +346,17 @@ wdt5: watchdog@80083400 {
status = "disabled";
};
+ tsu: thermal@80086000 {
+ compatible = "renesas,r9a09g077-tsu";
+ reg = <0 0x80086000 0 0x1000>;
+ interrupts = <GIC_SPI 713 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 714 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "adi", "adcmpi";
+ clocks = <&cpg CPG_MOD 307>;
+ power-domains = <&cpg>;
+ #thermal-sensor-cells = <0>;
+ };
+
i2c0: i2c@80088000 {
compatible = "renesas,riic-r9a09g077";
reg = <0 0x80088000 0 0x400>;
@@ -1057,6 +1072,37 @@ stmmac_axi_setup: stmmac-axi-config {
snps,blen = <16 8 4 0 0 0 0>;
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tsu>;
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device = <&cpu0 0 1>, <&cpu1 0 1>,
+ <&cpu2 0 1>, <&cpu3 0 1>;
+ contribution = <1024>;
+ };
+ };
+
+ trips {
+ target: trip-point {
+ temperature = <95000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ sensor_crit: sensor-crit {
+ temperature = <120000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 6.12.y-cip 09/11] arm64: dts: renesas: r9a09g077: Add TSU and thermal zones support
2026-04-10 17:02 ` [PATCH 6.12.y-cip 09/11] arm64: dts: renesas: r9a09g077: Add TSU and thermal zones support Cosmin Tanislav
@ 2026-04-15 21:10 ` Pavel Machek
0 siblings, 0 replies; 16+ messages in thread
From: Pavel Machek @ 2026-04-15 21:10 UTC (permalink / raw)
To: Cosmin Tanislav; +Cc: cip-dev, pavel, nobuhiro.iwamatsu.x90
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Hi!
> The Renesas RZ/T2H (R9A09G077) SoC includes a Temperature Sensor Unit
> (TSU). The device provides real-time temperature measurements for
> thermal management, utilizing a single dedicated channel for temperature
> sensing.
Just... You have passive trip point at 95C and critical at 120C. IIRC
critical simply triggers system shutdown, and that can take time, so
temperature may rise above 120C in this configuration.
Is system tested for stable operation at 119C for extended periods?
Because that's what this configuration means AFAICT. It seems little
high to me.
> + trips {
> + target: trip-point {
> + temperature = <95000>;
> + hysteresis = <1000>;
> + type = "passive";
> + };
> +
> + sensor_crit: sensor-crit {
> + temperature = <120000>;
> + hysteresis = <1000>;
> + type = "critical";
> + };
> + };
> + };
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
Best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 6.12.y-cip 10/11] arm64: dts: renesas: r9a09g087: Add OPP table
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (8 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 09/11] arm64: dts: renesas: r9a09g077: Add TSU and thermal zones support Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-10 17:02 ` [PATCH 6.12.y-cip 11/11] arm64: dts: renesas: r9a09g087: Add TSU and thermal zones support Cosmin Tanislav
2026-04-15 3:21 ` [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H nobuhiro.iwamatsu.x90
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit ffcc240e3680e77d36c99026f5da81553d559246 upstream.
Add OPP table for RZ/N2H SoC.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251126130356.2768625-8-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
index 15fb09d963476..de9e23becb12c 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -13,6 +13,17 @@ / {
#address-cells = <2>;
#size-cells = <2>;
+ cluster0_opp: opp-table-0 {
+ compatible = "operating-points-v2";
+
+ opp-600000000 {
+ opp-hz = /bits/ 64 <600000000>;
+ };
+ opp-1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -23,6 +34,8 @@ cpu0: cpu@0 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C0>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu1: cpu@100 {
@@ -31,6 +44,8 @@ cpu1: cpu@100 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C1>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu2: cpu@200 {
@@ -39,6 +54,8 @@ cpu2: cpu@200 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C2>;
+ operating-points-v2 = <&cluster0_opp>;
};
cpu3: cpu@300 {
@@ -47,6 +64,8 @@ cpu3: cpu@300 {
device_type = "cpu";
next-level-cache = <&L3_CA55>;
enable-method = "psci";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C3>;
+ operating-points-v2 = <&cluster0_opp>;
};
L3_CA55: cache-controller-0 {
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6.12.y-cip 11/11] arm64: dts: renesas: r9a09g087: Add TSU and thermal zones support
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (9 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 10/11] arm64: dts: renesas: r9a09g087: Add OPP table Cosmin Tanislav
@ 2026-04-10 17:02 ` Cosmin Tanislav
2026-04-15 3:21 ` [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H nobuhiro.iwamatsu.x90
11 siblings, 0 replies; 16+ messages in thread
From: Cosmin Tanislav @ 2026-04-10 17:02 UTC (permalink / raw)
To: cip-dev, pavel, nobuhiro.iwamatsu.x90
commit 5c4c34ea8dc02350fad11bc5423ca065595bbd54 upstream.
The Renesas RZ/N2H (R9A09G087) SoC includes a Temperature Sensor Unit
(TSU). The device provides real-time temperature measurements for
thermal management, utilizing a single dedicated channel for temperature
sensing.
The TSU loads calibration data via SMC SIP.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251126130356.2768625-10-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
index de9e23becb12c..b1f6b997376f5 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -35,6 +35,7 @@ cpu0: cpu@0 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C0>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -45,6 +46,7 @@ cpu1: cpu@100 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C1>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -55,6 +57,7 @@ cpu2: cpu@200 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C2>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -65,6 +68,7 @@ cpu3: cpu@300 {
next-level-cache = <&L3_CA55>;
enable-method = "psci";
clocks = <&cpg CPG_CORE R9A09G087_CLK_CA55C3>;
+ #cooling-cells = <2>;
operating-points-v2 = <&cluster0_opp>;
};
@@ -342,6 +346,17 @@ wdt5: watchdog@80083400 {
status = "disabled";
};
+ tsu: thermal@80086000 {
+ compatible = "renesas,r9a09g087-tsu", "renesas,r9a09g077-tsu";
+ reg = <0 0x80086000 0 0x1000>;
+ interrupts = <GIC_SPI 713 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 714 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "adi", "adcmpi";
+ clocks = <&cpg CPG_MOD 307>;
+ power-domains = <&cpg>;
+ #thermal-sensor-cells = <0>;
+ };
+
i2c0: i2c@80088000 {
compatible = "renesas,riic-r9a09g087", "renesas,riic-r9a09g077";
reg = <0 0x80088000 0 0x400>;
@@ -1060,6 +1075,37 @@ stmmac_axi_setup: stmmac-axi-config {
snps,blen = <16 8 4 0 0 0 0>;
};
+ thermal-zones {
+ cpu-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <250>;
+ thermal-sensors = <&tsu>;
+
+ cooling-maps {
+ map0 {
+ trip = <&target>;
+ cooling-device = <&cpu0 0 1>, <&cpu1 0 1>,
+ <&cpu2 0 1>, <&cpu3 0 1>;
+ contribution = <1024>;
+ };
+ };
+
+ trips {
+ target: trip-point {
+ temperature = <95000>;
+ hysteresis = <1000>;
+ type = "passive";
+ };
+
+ sensor_crit: sensor-crit {
+ temperature = <120000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* RE: [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H
2026-04-10 17:02 [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (10 preceding siblings ...)
2026-04-10 17:02 ` [PATCH 6.12.y-cip 11/11] arm64: dts: renesas: r9a09g087: Add TSU and thermal zones support Cosmin Tanislav
@ 2026-04-15 3:21 ` nobuhiro.iwamatsu.x90
2026-04-15 9:39 ` [cip-dev] " Pavel Machek
11 siblings, 1 reply; 16+ messages in thread
From: nobuhiro.iwamatsu.x90 @ 2026-04-15 3:21 UTC (permalink / raw)
To: cosmin-gabriel.tanislav.xa, cip-dev, pavel
Hi,
> -----Original Message-----
> From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Sent: Saturday, April 11, 2026 2:02 AM
> To: cip-dev@lists.cip-project.org; pavel@nabladev.com; iwamatsu nobuhiro(岩松 信洋 □DITC○CPT)
> <nobuhiro.iwamatsu.x90@mail.toshiba>
> Subject: [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H
>
> Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the temperature calibration via SMC SIP and do
> not have a reset for the TSU peripheral, and use different minimum and maximum temperature values compared to
> RZ/G3E.
>
> Patches were cherry-picked from upstream kernel, except for patch
> 7/11 which is needed to fix asynchronous aborts during unbind.
>
> See the MSTOP series for more details:
> https://lore.kernel.org/cip-dev/20260115083451.1064048-1-claudiu.beznea.uj@bp.renesas.com/
I reviewed this series, looks good to me.
I can apply, if tests are OK and there is no comment,
https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/2453844182
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [cip-dev] [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H
2026-04-15 3:21 ` [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H nobuhiro.iwamatsu.x90
@ 2026-04-15 9:39 ` Pavel Machek
2026-04-16 4:47 ` nobuhiro.iwamatsu.x90
0 siblings, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2026-04-15 9:39 UTC (permalink / raw)
To: nobuhiro.iwamatsu.x90; +Cc: cosmin-gabriel.tanislav.xa, cip-dev, pavel
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hi!
> > Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the temperature calibration via SMC SIP and do
> > not have a reset for the TSU peripheral, and use different minimum and maximum temperature values compared to
> > RZ/G3E.
> >
> > Patches were cherry-picked from upstream kernel, except for patch
> > 7/11 which is needed to fix asynchronous aborts during unbind.
> >
> > See the MSTOP series for more details:
> > https://lore.kernel.org/cip-dev/20260115083451.1064048-1-claudiu.beznea.uj@bp.renesas.com/
>
> I reviewed this series, looks good to me.
> I can apply, if tests are OK and there is no comment,
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/2453844182
>
> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
This looks okay to me.
Reviewed-by: Pavel Machek <pavel@nabladev.com>
Best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* RE: [cip-dev] [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H
2026-04-15 9:39 ` [cip-dev] " Pavel Machek
@ 2026-04-16 4:47 ` nobuhiro.iwamatsu.x90
0 siblings, 0 replies; 16+ messages in thread
From: nobuhiro.iwamatsu.x90 @ 2026-04-16 4:47 UTC (permalink / raw)
To: pavel; +Cc: cosmin-gabriel.tanislav.xa, cip-dev
Hi,
> -----Original Message-----
> From: Pavel Machek <pavel@nabladev.com>
> Sent: Wednesday, April 15, 2026 6:39 PM
> To: iwamatsu nobuhiro(岩松 信洋 □DITC○CPT) <nobuhiro.iwamatsu.x90@mail.toshiba>
> Cc: cosmin-gabriel.tanislav.xa@renesas.com; cip-dev@lists.cip-project.org; pavel@nabladev.com
> Subject: Re: [cip-dev] [PATCH 6.12.y-cip 00/11] Add TSU support for RZ/T2H and RZ/N2H
>
> Hi!
>
> > > Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
> > > temperature calibration via SMC SIP and do not have a reset for the
> > > TSU peripheral, and use different minimum and maximum temperature values compared to RZ/G3E.
> > >
> > > Patches were cherry-picked from upstream kernel, except for patch
> > > 7/11 which is needed to fix asynchronous aborts during unbind.
> > >
> > > See the MSTOP series for more details:
> > > https://lore.kernel.org/cip-dev/20260115083451.1064048-1-claudiu.bez
> > > nea.uj@bp.renesas.com/
> >
> > I reviewed this series, looks good to me.
> > I can apply, if tests are OK and there is no comment,
> >
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/245384
> > 4182
> >
> > Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
>
> This looks okay to me.
>
> Reviewed-by: Pavel Machek <pavel@nabladev.com>
>
> Best regards,
> Pavel
Applied and pushed, thanks!
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 16+ messages in thread