From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jacky Bai <ping.bai@nxp.com>,
rafael@kernel.org, daniel.lezcano@linaro.org,
rui.zhang@intel.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, shawnguo@kernel.org
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
kernel@pengutronix.de, festevam@gmail.com
Subject: Re: [PATCH 2/4] thermal: qoriq: add i.MX93 TMU support
Date: Tue, 29 Jul 2025 08:42:41 +0200 [thread overview]
Message-ID: <21ce4f23-8aec-486f-8fbb-021c1e114908@kernel.org> (raw)
In-Reply-To: <20250729024039.1223771-2-ping.bai@nxp.com>
On 29/07/2025 04:40, Jacky Bai wrote:
> The TMU used on i.MX93 need some speccial handling and workaround to be
> done even the revision info read from the ID register is the same as
> Qoriq platform. Add i.MX93 compatible string and corresponding code for it.
>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> ---
> drivers/thermal/qoriq_thermal.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
> index 01b58be0dcc6..fc1bf102350d 100644
> --- a/drivers/thermal/qoriq_thermal.c
> +++ b/drivers/thermal/qoriq_thermal.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> //
> // Copyright 2016 Freescale Semiconductor, Inc.
> +// Copyright 2022-2025 NXP
>
> #include <linux/clk.h>
> #include <linux/err.h>
> @@ -24,9 +25,11 @@
> #define TMTMIR_DEFAULT 0x0000000f
> #define TIER_DISABLE 0x0
> #define TEUMR0_V2 0x51009c00
> +#define TEUMR0_V21 0x55010c00
> #define TMSARA_V2 0xe
> #define TMU_VER1 0x1
> #define TMU_VER2 0x2
> +#define TMU_VER93 0x3
>
> #define REGS_TMR 0x000 /* Mode Register */
> #define TMR_DISABLE 0x0
> @@ -232,6 +235,9 @@ static void qoriq_tmu_init_device(struct qoriq_tmu_data *data)
>
> if (data->ver == TMU_VER1) {
> regmap_write(data->regmap, REGS_TMTMIR, TMTMIR_DEFAULT);
> + } else if (data->ver == TMU_VER93) {
> + regmap_write(data->regmap, REGS_V2_TMTMIR, TMTMIR_DEFAULT);
> + regmap_write(data->regmap, REGS_V2_TEUMR(0), TEUMR0_V21);
> } else {
> regmap_write(data->regmap, REGS_V2_TMTMIR, TMTMIR_DEFAULT);
> regmap_write(data->regmap, REGS_V2_TEUMR(0), TEUMR0_V2);
> @@ -319,6 +325,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
>
> data->ver = (ver >> 8) & 0xff;
>
> + if (of_find_compatible_node(NULL, NULL, "fsl,imx93-tmu"))
> + data->ver = TMU_VER93;
No, you have driver match data for this.
Anyway, are you sure devices are compatible how you expressed in the
bindings?
> +
> qoriq_tmu_init_device(data); /* TMU initialization */
>
> ret = qoriq_tmu_calibration(dev, data); /* TMU calibration */
> @@ -379,6 +388,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(qoriq_tmu_pm_ops,
> static const struct of_device_id qoriq_tmu_match[] = {
> { .compatible = "fsl,qoriq-tmu", },
> { .compatible = "fsl,imx8mq-tmu", },
> + { .compatible = "fsl,imx93-tmu", },
Otherwise I claim devices are compatible and this should be dropped.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-07-29 6:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 2:40 [PATCH 1/4] dt-bindings: thermal: qoriq: Update compatible string for imx93 Jacky Bai
2025-07-29 2:40 ` [PATCH 2/4] thermal: qoriq: add i.MX93 TMU support Jacky Bai
2025-07-29 6:42 ` Krzysztof Kozlowski [this message]
2025-07-29 8:02 ` Jacky Bai
2025-07-29 8:07 ` Krzysztof Kozlowski
2025-07-29 8:21 ` Jacky Bai
2025-07-29 2:40 ` [PATCH 3/4] thermal: qoriq: workaround the tmu temp jump on imx93 Jacky Bai
2025-07-29 2:40 ` [PATCH 4/4] arm64: dts: imx93: update the tmu compatible string Jacky Bai
2025-07-29 6:41 ` [PATCH 1/4] dt-bindings: thermal: qoriq: Update compatible string for imx93 Krzysztof Kozlowski
2025-07-29 6:52 ` Jacky Bai
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=21ce4f23-8aec-486f-8fbb-021c1e114908@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=ping.bai@nxp.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=shawnguo@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.