Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mediatek: Make SVS work on MT8183
@ 2026-10-06  2:54 Nils Büchner
  2026-10-06  2:54 ` [PATCH 1/2] thermal/drivers/mediatek/auxadc: Register per-sensor thermal zones Nils Büchner
  2026-10-06  2:54 ` [PATCH 2/2] soc: mediatek: mtk-svs: Don't fail init01 on a bank whose buck is not at vboot yet Nils Büchner
  0 siblings, 2 replies; 5+ messages in thread
From: Nils Büchner @ 2026-10-06  2:54 UTC (permalink / raw)
  To: Daniel Lezcano, Rafael J . Wysocki, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Zhang Rui, Lukasz Luba, linux-pm, linux-kernel, linux-arm-kernel,
	linux-mediatek, Nils Büchner

On MT8183 mtk-svs does not probe with mainline, so the SoC never gets
its calibrated voltages and runs at the default OPP voltages. Two
independent problems stand in the way:

1. auxadc_thermal registers only thermal zone 0 (the hottest sensor),
   while mtk-svs looks up the "gpu-thermal" zone that the MT8183
   devicetree describes:

     SVSB_GPU: cannot get "gpu-thermal" thermal zone
     mtk-svs 1100bc00.svs: error -ENODEV: svs bank resource setup fail

   Patch 1 registers every sensor that has a devicetree zone.

2. With that zone available, init01 requires each bank's buck to read
   back vboot immediately after the bank was moved to its vboot OPP.
   The GPU buck follows devfreq, which has not acted yet when the GPU
   is idle, so the whole probe fails with -EPERM:

     SVSB_GPU: buck voltage: 700000uV, expected vboot: 800000uV
     mtk-svs 1100bc00.svs: error -EPERM: svs start fail

   Patch 2 polls for up to 500ms and, failing that, skips only the
   affected bank instead of all of them.

With both applied, all four banks (CPU little, CPU big, CCI, GPU)
calibrate at boot on an Acer Chromebook Spin 311 (juniper), e.g. CPU
little at 1.99 GHz goes from 1050 to 1000 mV and the GPU runs 800 MHz at
775 mV, stable under sustained full load.

Testing: runtime-tested on the device with a 7.0-based kernel (the
hardware is not set up to boot mainline); build-tested on mainline with
W=1. Only MT8183 was available for testing.

The patches touch different subsystems (thermal, MediaTek SoC) and do
not depend on each other to build; patch 2 only matters on MT8183 once
patch 1 provides the zone.

Both patches were developed with an AI coding assistant while debugging
on the hardware (see the Assisted-by tags); I reviewed and tested them.

Nils Büchner (2):
  thermal/drivers/mediatek/auxadc: Register per-sensor thermal zones
  soc: mediatek: mtk-svs: Don't fail init01 on a bank whose buck is not
    at vboot yet

 drivers/soc/mediatek/mtk-svs.c            | 34 ++++++++--
 drivers/thermal/mediatek/auxadc_thermal.c | 80 ++++++++++++++++++++++-
 2 files changed, 106 insertions(+), 8 deletions(-)

-- 
2.53.0



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

end of thread, other threads:[~2026-10-07 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  2:54 [PATCH 0/2] mediatek: Make SVS work on MT8183 Nils Büchner
2026-10-06  2:54 ` [PATCH 1/2] thermal/drivers/mediatek/auxadc: Register per-sensor thermal zones Nils Büchner
2026-10-07 11:51   ` Daniel Lezcano
2026-10-06  2:54 ` [PATCH 2/2] soc: mediatek: mtk-svs: Don't fail init01 on a bank whose buck is not at vboot yet Nils Büchner
2026-10-06  8:32   ` Chen-Yu Tsai

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