[PATCH v1 2/4] thermal: qoriq: add i.MX93 TMU support

Daniel Lezcano daniel.lezcano at linaro.org
Fri Feb 10 05:48:38 PST 2023


On 05/01/2023 11:17, Alice Guo (OSS) wrote:
> From: Alice Guo <alice.guo at nxp.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 at nxp.com>
> Reviewed-by: Jacky Bai <ping.bai at nxp.com>
> Reviewed-by: Ye Li <ye.li at nxp.com>
> Acked-by: Jason Liu <jason.hui.liu at nxp.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




More information about the linux-arm-kernel mailing list