Re: [PATCH 0/3] Add the MT8196 GPU temperature sensor
From: Alexandre Mergnat
Date: Fri Dec 04 2026 - 06:24:51 EST
On Tuesday, 1 December 2026 14:10:25 CET, Nicolas Frattaroli wrote:
[...]
> > On the test board, the value that the firmware
> > reported stayed within one degree of the average of these sensors.
>
> Is any sensor compensation already done as part of the GPUEB firmware?
> Usually hardware has some factory calibration fused into OTP registers,
> though I don't know whether that's the case specifically for MT8196.
The efuse holds calibration data for the GPU sensors: lvts_thermal.c
documents the GPU bytes, and the ChromeOS LVTS driver reads them. On
the test board, the calibration registers of the GPU LVTS controller
are already set with no Linux LVTS driver loaded, and the value that
the GPUEB reports stays within one degree of the average of the two
GPU sensors, converted with the efuse reference temperature. Which
firmware programs that calibration, and whether the GPUEB applies more
on top, is not documented in what I have.
[...]
> ACK from me for the general approach, as for implementation I haven't
> looked too closely at it but am wondering whether this also means I messed
> up when making the mtk-mfg-pmdomain.c driver a clock provider, instead of
> having a clock provider driver suckling on an auxiliary bus there. Any
> thoughts on whether that should be refactored, i.e. if there's a benefit?
A split would not change the DT: an auxiliary device created with
devm_auxiliary_device_create() shares the node of the gpufreq device,
so the clock provider would stay on that node. The two clocks only
report the rate that the GPUEB gives, and the DVFS goes through the
performance states of the power domain, so the clock driver would only
hold that read. The benefit would be mostly organisational: the clock
code would live in drivers/clk and reach the clk maintainers, the same
way the thermal sensor reaches the thermal ones in this series. If you
and the maintainers find it worth the churn, I can look at it in a
separate series after this one.