[PATCH v1] thermal: qoriq: add Layerscape on-die TMU

Vincent Jardin vjardin at free.fr
Thu May 28 14:55:27 CEST 2026


Hi Tom, Peng,

Le 28/05/26 09:36, Peng Fan a écrit :
> On Wed, May 27, 2026 at 09:04:59AM -0600, Tom Rini wrote:
> >On Wed, May 27, 2026 at 03:46:45PM +0200, Vincent Jardin wrote:
> >> Add the support for lx2160 and other layerscape for:
> >>   => temperature list
> >>      | cluster67-thermal   | qoriq_thermal | tmu at 1f80000
> >>      | ddr1-cluster5-...   | qoriq_thermal | tmu at 1f80000
> >>      ...
> >> 
> >>   => temperature get cluster67-thermal
> >>      cluster67-thermal: 56000 mC
> >> 
> >> It is designed as a generic UCLASS_THERMAL driver for the
> >> QorIQ/Layerscape on-die Thermal Monitoring Unit (TMU).
> >> 
> >> It is similar to the "regs_v1" variant already implemented in
> >> drivers/thermal/imx_tmu.c, but the i.MX driver depends
> >> on <asm/arch/clock.h>, is_imx8m*() arch helpers, and OCOTP fuse
> >> reads that do not exist on Layerscape.
> >> 
> >> Rather than #ifdef the QorIQ bits, this driver is a clean Layerscape
> >> counterpart binding the standard "fsl,qoriq-tmu" compatible used by
> >> the Linux qoriq_thermal driver and by the existing fsl-ls10{28,88}a
> >> DTSIs too!
> >
> >Are there parts of the other driver that could be split out to a new
> >file/header and shared? Or are the i.MX portions too deeply embedded and
> >cannot be easily abstracted? Thanks!
> 
> QorIQ TMU and i.MX8MQ TMU shares same IP, with only minor differences.
> As I recall, the differences are in calibration part.
> 
> Current imx_thermal driver is too deeply embedded, not in a good shape.
> Need to give a look to clean it up.

I'll try my surgery. I'll send within few minutes a rework I had tried, gave up
and now trying again based on Tom's comments and your ack't Peng and IP are
more shared than what I thought.

See my next v2 on it. I did try to maximize the code reuse for both
Layerscape and iMX.

best regards,
  Vincent


More information about the U-Boot mailing list