Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/4] thermal/drivers/mediatek: Sampling mode, mobile calibration & MT6797 support
@ 2026-12-03 12:03 Ben Grisdale via B4 Relay
  2026-12-03 12:03 ` [PATCH 1/4] thermal/drivers/mediatek: Add efuse calibration support for mobile SoCs Ben Grisdale via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ben Grisdale via B4 Relay @ 2026-12-03 12:03 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sascha Hauer
  Cc: Roman Vivchar, linux-pm, linux-kernel, linux-arm-kernel,
	linux-mediatek, devicetree, Ben Grisdale

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@protonmail.ch>
---
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@protonmail.ch>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-03 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 12:03 [PATCH 0/4] thermal/drivers/mediatek: Sampling mode, mobile calibration & MT6797 support Ben Grisdale via B4 Relay
2026-12-03 12:03 ` [PATCH 1/4] thermal/drivers/mediatek: Add efuse calibration support for mobile SoCs Ben Grisdale via B4 Relay
2026-12-03 12:28   ` sashiko-bot
2026-12-03 12:03 ` [PATCH 2/4] thermal/drivers/mediatek: Add support for setting sampling mode per SoC Ben Grisdale via B4 Relay
2026-12-03 12:03 ` [PATCH 3/4] dt-bindings: thermal: mediatek,thermal: Add MT6797 Ben Grisdale via B4 Relay
2026-12-03 12:03 ` [PATCH 4/4] thermal/drivers/mediatek: Add MT6797 support Ben Grisdale via B4 Relay
2026-12-03 12:53   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox