[PATCH 0/4] thermal/drivers/mediatek: Sampling mode, mobile calibration & MT6797 support

From: Ben Grisdale via B4 Relay

Date: Thu Dec 03 2026 - 07:03:48 EST


This patch series adds support to the MediaTek auxadc thermal driver
for adjusting the sampling mode of sensors, mobile (MT67xx) efuse
calibration support and support for the auxadc thermal sensors
of the MT6797 SoC.

Currently, the auxadc thermal driver classifies "versions" of
thermal sensors as V1 - V3. For MT67xx, a new "V1.5" version is
added with the mobile specific efuse calibration handling. Aside
from the differences in efuse layout, the hardware seems closer
to V1 than V2 / V3.

Though, I myself am not at all sure if "V1.5" is a real version
that is formally defined by MediaTek. I only named it V1.5
since it is mostly V1 with a close to V2 efuse layout.

In the future it may be worth getting rid of the whole "versions"
classification altogether. Instead, move each existing version's
behaviour into an explicit field in platform data, i.e.

if (mt->conf->version != MTK_THERMAL_V1 &&
mt->conf->version != MTK_THERMAL_V1_5)
mtk_thermal_release_periodic_ts(mt, auxadc_base);

Would become

if (mt->conf->release_periodic_ts)
mtk_thermal_release_periodic_ts(mt, auxadc_base);

And the same would be done for efuse value extraction / raw_to_mcelsius,
that way, there would be no debate over which versions actually exist
and the driver would be able to support an arbitrary combination of
thermal characteristics for any platforms which are outliers from the
rest.

The associated device tree updates (adding the thermal controller
node) will be submitted in a later series that includes many fixups
for the existing MT6797 device tree.

This series has been tested on a 96boards Helio X20 development board.

Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
---
Ben Grisdale (2):
thermal/drivers/mediatek: Add efuse calibration support for mobile SoCs
thermal/drivers/mediatek: Add support for setting sampling mode per SoC

Roman Vivchar (2):
dt-bindings: thermal: mediatek,thermal: Add MT6797
thermal/drivers/mediatek: Add MT6797 support

.../bindings/thermal/mediatek,thermal.yaml | 1 +
drivers/thermal/mediatek/auxadc_thermal.c | 205 ++++++++++++++++++++-
2 files changed, 202 insertions(+), 4 deletions(-)
---
base-commit: 799dd936553182df5770dde7f38d94c8337df75a
change-id: 20261203-mt6797-thermal-support-b5dde780a7f8

Best regards,
--
Ben Grisdale <bengris32@xxxxxxxxxxxxx>