From: John Madieu <john.madieu.xa@bp.renesas.com>
To: Cosmin-Gabriel Tanislav <cosmin-gabriel.tanislav.xa@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>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Cosmin-Gabriel Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Subject: RE: [PATCH v3 5/9] thermal: renesas: rzg3e: add support for RZ/T2H and RZ/N2H
Date: Wed, 7 Jan 2026 17:12:24 +0000 [thread overview]
Message-ID: <TY6PR01MB17377A111B9CF808AB27C0259FF84A@TY6PR01MB17377.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20251126130356.2768625-6-cosmin-gabriel.tanislav.xa@renesas.com>
Hi Cosmin,
Thanks for your patch.
> -----Original Message-----
> From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Sent: Wednesday, November 26, 2025 2:04 PM
> To: 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>; Philipp Zabel
> <p.zabel@pengutronix.de>
> Cc: linux-pm@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-renesas-soc@vger.kernel.org; Cosmin-Gabriel
> Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Subject: [PATCH v3 5/9] thermal: renesas: rzg3e: add support for RZ/T2H
> and RZ/N2H
>
> 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>
> ---
> V3:
> * no changes
>
> V2:
> * no changes
>
> 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.52.0
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
next prev parent reply other threads:[~2026-01-07 17:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 13:03 [PATCH v3 0/9] Add TSU " Cosmin Tanislav
2025-11-26 13:03 ` [PATCH v3 1/9] thermal: renesas: rzg3e: make reset optional Cosmin Tanislav
2026-01-07 17:04 ` John Madieu
2026-01-08 15:17 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 2/9] thermal: renesas: rzg3e: make min and max temperature per-chip Cosmin Tanislav
2026-01-07 17:06 ` John Madieu
2026-01-08 15:20 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 3/9] thermal: renesas: rzg3e: make calibration value retrieval per-chip Cosmin Tanislav
2026-01-07 17:10 ` John Madieu
2026-01-08 15:26 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 4/9] dt-bindings: thermal: r9a09g047-tsu: document RZ/T2H and RZ/N2H Cosmin Tanislav
2025-11-26 18:58 ` Conor Dooley
2026-01-08 15:29 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 5/9] thermal: renesas: rzg3e: add support for " Cosmin Tanislav
2026-01-07 17:12 ` John Madieu [this message]
2026-01-08 15:40 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 6/9] arm64: dts: renesas: r9a09g077: add OPP table Cosmin Tanislav
2026-01-08 15:41 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 7/9] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
2026-01-08 15:41 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 8/9] arm64: dts: renesas: r9a09g077: add TSU and thermal zones support Cosmin Tanislav
2026-01-08 15:43 ` Geert Uytterhoeven
2025-11-26 13:03 ` [PATCH v3 9/9] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
2026-01-08 15:44 ` Geert Uytterhoeven
2026-01-05 9:09 ` [PATCH v3 0/9] Add TSU support for RZ/T2H and RZ/N2H Cosmin-Gabriel Tanislav
2026-01-07 16:38 ` Daniel Lezcano
2026-01-07 17:16 ` John Madieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=TY6PR01MB17377A111B9CF808AB27C0259FF84A@TY6PR01MB17377.jpnprd01.prod.outlook.com \
--to=john.madieu.xa@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=cosmin-gabriel.tanislav.xa@renesas.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=magnus.damm@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®