[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b215d83-9b8e-d881-44c4-ee1301bb9044@linaro.org>
Date: Fri, 10 Feb 2023 14:48:38 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: "Alice Guo (OSS)" <alice.guo@....nxp.com>, rafael@...nel.org,
amitk@...nel.org, rui.zhang@...el.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, shawnguo@...nel.org,
s.hauer@...gutronix.de, festevam@...il.com
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-imx@....com
Subject: Re: [PATCH v1 2/4] thermal: qoriq: add i.MX93 TMU support
On 05/01/2023 11:17, Alice Guo (OSS) wrote:
> From: Alice Guo <alice.guo@....com>
>
> The procedure to program the calibration table of i.MX93 TMU:
> 1. disable monitoring mode
> 2. configure TCMCFG
> 3. write TTCFGR with TTCFGR[CAL_PT] = n
> 4. write TSCFGR with the sensor value of the calibration point n
> 5. write TTRCRn associated with the calibration point n
> Need to repeat steps 3—5 for all calibration points from the calibration
> table provided by the TMU device node.
>
> When TRITSR[V] = 1 and TRITSR[TP5] = 1, need to add 0.5K to
> TRITSR[TEMP].
>
> IPBRR0s of lx2160ardb, lx2162aqds and i.MX93 have the same value
> 0x01900201 so that use the compatible to determine whether the current
> TMU belongs to i.MX93 or not.
>
> Signed-off-by: Alice Guo <alice.guo@....com>
> Reviewed-by: Jacky Bai <ping.bai@....com>
> Reviewed-by: Ye Li <ye.li@....com>
> Acked-by: Jason Liu <jason.hui.liu@....com>
> ---
[ ... ]
> @@ -369,6 +416,7 @@ static 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", },
> {},
Now that you have more than 2, I suggest the pass a ops structure to
.data, so you can call them directly instead of checking the TMU version
in the calibration, the initialization and get the temperature.
> };
> MODULE_DEVICE_TABLE(of, qoriq_tmu_match);
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists