* [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H
@ 2025-10-23 8:19 Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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.
Although the calibration data is stored in an OTP memory, the OTP itself
is not memory-mapped, and instead, 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.
Cosmin Tanislav (10):
clk: renesas: r9a09g077: add TSU module clock
thermal: renesas: rzg3e: make reset optional
thermal: renesas: rzg3e: make min and max temperature per-chip
thermal: renesas: rzg3e: make calibration value retrieval per-chip
dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H
thermal: renesas: rzg3e: add support for RZ/T2H and RZ/N2H
arm64: dts: renesas: r9a09g077: add OPP table
arm64: dts: renesas: r9a09g087: add OPP table
arm64: dts: renesas: r9a09g077: add TSU and thermal zones support
arm64: dts: renesas: r9a09g087: add TSU and thermal zones support
.../thermal/renesas,r9a09g047-tsu.yaml | 22 ++-
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 65 +++++++++
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 65 +++++++++
drivers/clk/renesas/r9a09g077-cpg.c | 1 +
drivers/thermal/renesas/rzg3e_thermal.c | 125 ++++++++++++------
5 files changed, 232 insertions(+), 46 deletions(-)
--
2.51.1.dirty
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-24 10:16 ` Geert Uytterhoeven
2025-10-27 10:45 ` Geert Uytterhoeven
2025-10-23 8:19 ` [PATCH 02/10] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
` (8 subsequent siblings)
9 siblings, 2 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a TSU
peripheral with controlled by a module clock.
The TSU module clock is enabled in register MSTPCRG (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>
---
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 5dca5c44043e..79083165537c 100644
--- a/drivers/clk/renesas/r9a09g077-cpg.c
+++ b/drivers/clk/renesas/r9a09g077-cpg.c
@@ -195,6 +195,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("gmac0", 400, R9A09G077_CLK_PCLKM),
DEF_MOD("ethsw", 401, R9A09G077_CLK_PCLKM),
DEF_MOD("ethss", 403, R9A09G077_CLK_PCLKM),
--
2.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/10] thermal: renesas: rzg3e: make reset optional
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 03/10] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs do not have a
reset line.
Prepare for them by making it optional.
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 e66d73ca6752..86c10810e5bf 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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/10] thermal: renesas: rzg3e: make min and max temperature per-chip
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 02/10] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 04/10] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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.
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 86c10810e5bf..3c9ff5e43d7e 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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/10] thermal: renesas: rzg3e: make calibration value retrieval per-chip
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (2 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 03/10] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
temperature calibration data via SMC SIP calls.
Prepare for them by moving the syscon usage into a single function, and
placing it in the chip-specific struct.
Rename the functions to match their functionality, and remove single-use
variables from the private state.
Also, move the calibration value mask into a macro.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 62 +++++++++++++------------
1 file changed, 32 insertions(+), 30 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 3c9ff5e43d7e..d2525ad3ffcc 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -70,7 +70,12 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+#define TSU_TEMP_MASK GENMASK(11, 0)
+
+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 +96,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,22 +337,8 @@ 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)
+static int rzg3e_validate_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 ||
@@ -365,17 +354,30 @@ static int rzg3e_thermal_get_calibration(struct rzg3e_thermal_priv *priv)
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_TEMP_MASK;
+
+ ret = regmap_read(syscon, offset + 4, &val);
+ if (ret)
+ return ret;
+ priv->trmval1 = val & TSU_TEMP_MASK;
+
return 0;
}
@@ -402,11 +404,16 @@ 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;
+ /* Validate calibration data */
+ ret = rzg3e_validate_calibration(priv);
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "Failed to get valid calibration data\n");
+
/* Get clock to verify frequency - clock is managed by power domain */
clk = devm_clk_get(dev, NULL);
if (IS_ERR(clk))
@@ -423,12 +430,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 +534,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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (3 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 04/10] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 18:28 ` Conor Dooley
2025-10-23 8:19 ` [PATCH 06/10] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
` (4 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
.../thermal/renesas,r9a09g047-tsu.yaml | 22 ++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
index 8d3f3c24f0f2..3cb66b51831d 100644
--- a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
+++ b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
@@ -16,7 +16,14 @@ description:
properties:
compatible:
- const: renesas,r9a09g047-tsu
+ oneOf:
+ - items:
+ - const: renesas,r9a09g047-tsu # RZ/G3E
+ - items:
+ - const: renesas,r9a09g077-tsu # RZ/T2H
+ - items:
+ - const: renesas,r9a09g087-tsu # RZ/N2H
+ - const: renesas,r9a09g077-tsu # RZ/T2H
reg:
maxItems: 1
@@ -59,12 +66,21 @@ 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
additionalProperties: false
--
2.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/10] thermal: renesas: rzg3e: add support for RZ/T2H and RZ/N2H
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (4 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 07/10] arm64: dts: renesas: r9a09g077: add OPP table Cosmin Tanislav
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/thermal/renesas/rzg3e_thermal.c | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index d2525ad3ffcc..efd09c35b216 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -72,6 +72,10 @@
#define TSU_TEMP_MASK GENMASK(11, 0)
+#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 {
@@ -381,6 +385,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_TEMP_MASK;
+
+ 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_TEMP_MASK;
+
+ return 0;
+}
+
static int rzg3e_thermal_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -539,8 +558,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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/10] arm64: dts: renesas: r9a09g077: add OPP table
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (5 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 06/10] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 08/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
Add OPP table for RZ/T2H SoC.
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 33925f13ee86..bb030bfed090 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -14,6 +14,17 @@ / {
#size-cells = <2>;
interrupt-parent = <&gic>;
+ 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>;
@@ -24,6 +35,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 {
@@ -32,6 +45,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 {
@@ -40,6 +55,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 {
@@ -48,6 +65,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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/10] arm64: dts: renesas: r9a09g087: add OPP table
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (6 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 07/10] arm64: dts: renesas: r9a09g077: add OPP table Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 09/10] arm64: dts: renesas: r9a09g077: add TSU and thermal zones support Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 10/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
Add OPP table for RZ/N2H SoC.
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 b7685449a7d7..5eef8c18037e 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -14,6 +14,17 @@ / {
#size-cells = <2>;
interrupt-parent = <&gic>;
+ 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>;
@@ -24,6 +35,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 {
@@ -32,6 +45,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 {
@@ -40,6 +55,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 {
@@ -48,6 +65,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.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/10] arm64: dts: renesas: r9a09g077: add TSU and thermal zones support
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (7 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 08/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 10/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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>
---
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 bb030bfed090..42ee9f299837 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -36,6 +36,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>;
};
@@ -46,6 +47,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>;
};
@@ -56,6 +58,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>;
};
@@ -66,6 +69,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>;
};
@@ -244,6 +248,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>;
@@ -844,6 +859,37 @@ sdhi1_vqmmc: vqmmc-regulator {
};
};
+ 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";
+ };
+ };
+ };
+ };
+
stmmac_axi_setup: stmmac-axi-config {
snps,lpi_en;
snps,wr_osr_lmt = <0xf>;
--
2.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/10] arm64: dts: renesas: r9a09g087: add TSU and thermal zones support
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (8 preceding siblings ...)
2025-10-23 8:19 ` [PATCH 09/10] arm64: dts: renesas: r9a09g077: add TSU and thermal zones support Cosmin Tanislav
@ 2025-10-23 8:19 ` Cosmin Tanislav
9 siblings, 0 replies; 15+ messages in thread
From: Cosmin Tanislav @ 2025-10-23 8:19 UTC (permalink / raw)
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk, Cosmin Tanislav
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>
---
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 5eef8c18037e..db117b6f75a1 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -36,6 +36,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>;
};
@@ -46,6 +47,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>;
};
@@ -56,6 +58,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>;
};
@@ -66,6 +69,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>;
};
@@ -244,6 +248,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>;
@@ -844,6 +859,37 @@ sdhi1_vqmmc: vqmmc-regulator {
};
};
+ 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";
+ };
+ };
+ };
+ };
+
stmmac_axi_setup: stmmac-axi-config {
snps,lpi_en;
snps,wr_osr_lmt = <0xf>;
--
2.51.1.dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H
2025-10-23 8:19 ` [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2025-10-23 18:28 ` Conor Dooley
0 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2025-10-23 18:28 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk
[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]
On Thu, Oct 23, 2025 at 11:19:19AM +0300, Cosmin Tanislav wrote:
> 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.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> ---
> .../thermal/renesas,r9a09g047-tsu.yaml | 22 ++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
> index 8d3f3c24f0f2..3cb66b51831d 100644
> --- a/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
> +++ b/Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
> @@ -16,7 +16,14 @@ description:
>
> properties:
> compatible:
> - const: renesas,r9a09g047-tsu
> + oneOf:
> + - items:
> + - const: renesas,r9a09g047-tsu # RZ/G3E
> + - items:
> + - const: renesas,r9a09g077-tsu # RZ/T2H
These two should just go together in an enum, no need to overcomplicate
things with items like this. Items is only needed when you have more
than one.
pw-bot: changes-requested
Cheers,
Conor.
> + - items:
> + - const: renesas,r9a09g087-tsu # RZ/N2H
> + - const: renesas,r9a09g077-tsu # RZ/T2H
>
> reg:
> maxItems: 1
> @@ -59,12 +66,21 @@ 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
>
> additionalProperties: false
>
> --
> 2.51.1.dirty
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
@ 2025-10-24 10:16 ` Geert Uytterhoeven
2025-10-27 10:45 ` Geert Uytterhoeven
1 sibling, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2025-10-24 10:16 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Magnus Damm, Michael Turquette, Stephen Boyd, Philipp Zabel,
linux-pm, devicetree, linux-kernel, linux-renesas-soc, linux-clk
On Thu, 23 Oct 2025 at 10:20, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a TSU
> peripheral with controlled by a module clock.
>
> The TSU module clock is enabled in register MSTPCRG (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>
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] 15+ messages in thread
* Re: [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
2025-10-24 10:16 ` Geert Uytterhoeven
@ 2025-10-27 10:45 ` Geert Uytterhoeven
2025-10-27 10:54 ` Cosmin-Gabriel Tanislav
1 sibling, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2025-10-27 10:45 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm, devicetree, linux-kernel,
linux-renesas-soc, linux-clk
On Thu, 23 Oct 2025 at 10:20, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a TSU
> peripheral with controlled by a module clock.
>
> The TSU module clock is enabled in register MSTPCRG (0x30c), at bit 7,
MSTPCRD
I will fix that while applying.
> resulting in a (0x30c - 0x300) / 4 * 100 + 7 = 307 index.
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] 15+ messages in thread
* RE: [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock
2025-10-27 10:45 ` Geert Uytterhoeven
@ 2025-10-27 10:54 ` Cosmin-Gabriel Tanislav
0 siblings, 0 replies; 15+ messages in thread
From: Cosmin-Gabriel Tanislav @ 2025-10-27 10:54 UTC (permalink / raw)
To: geert
Cc: John Madieu, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, magnus.damm, Michael Turquette, Stephen Boyd,
Philipp Zabel, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org
> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Monday, October 27, 2025 12:45 PM
> To: Cosmin-Gabriel Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Cc: John Madieu <john.madieu.xa@bp.renesas.com>; Rafael J . Wysocki <rafael@kernel.org>; Daniel Lezcano
> <daniel.lezcano@linaro.org>; Zhang Rui <rui.zhang@intel.com>; Lukasz Luba <lukasz.luba@arm.com>; Rob
> Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley
> <conor+dt@kernel.org>; Geert Uytterhoeven <geert+renesas@glider.be>; magnus.damm
> <magnus.damm@gmail.com>; Michael Turquette <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>;
> Philipp Zabel <p.zabel@pengutronix.de>; linux-pm@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-renesas-soc@vger.kernel.org; linux-clk@vger.kernel.org
> Subject: Re: [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock
>
> On Thu, 23 Oct 2025 at 10:20, Cosmin Tanislav
> <cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> > The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a TSU
> > peripheral with controlled by a module clock.
> >
> > The TSU module clock is enabled in register MSTPCRG (0x30c), at bit 7,
>
> MSTPCRD
>
> I will fix that while applying.
>
Thank you for spotting this, I double checked and indeed it's
MSTPCRD not MSTPCRG.
> > resulting in a (0x30c - 0x300) / 4 * 100 + 7 = 307 index.
>
> 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] 15+ messages in thread
end of thread, other threads:[~2025-10-27 10:54 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 8:19 [PATCH 00/10] Add TSU support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 01/10] clk: renesas: r9a09g077: add TSU module clock Cosmin Tanislav
2025-10-24 10:16 ` Geert Uytterhoeven
2025-10-27 10:45 ` Geert Uytterhoeven
2025-10-27 10:54 ` Cosmin-Gabriel Tanislav
2025-10-23 8:19 ` [PATCH 02/10] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 03/10] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 04/10] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 05/10] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-23 18:28 ` Conor Dooley
2025-10-23 8:19 ` [PATCH 06/10] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 07/10] arm64: dts: renesas: r9a09g077: add OPP table Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 08/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 09/10] arm64: dts: renesas: r9a09g077: add TSU and thermal zones support Cosmin Tanislav
2025-10-23 8:19 ` [PATCH 10/10] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox