[PATCH v2 0/2] cpufreq: mediatek: Suspend at the opp-suspend OPP, and mark one on MT8173
Ryan Brue
ryanbrue.dev at gmail.com
Fri Oct 9 12:44:42 PDT 2026
mediatek-cpufreq has no .suspend callback, so each cluster enters system
sleep at whatever OPP the governor last chose. On the Amazon Fire HD 10
(2017), an MT8173 tablet that is not upstream yet, entering
suspend-to-RAM with both clusters at their highest OPP (2106 and
1703 MHz) measured 63.5 and 63.6 mA, against 52.0 and 52.0 mA with this
series. Those are 15-minute windows of the PMIC's coulomb counter,
alternating with and without the change; one count is about 2.9 mA.
Earlier, on the board's previous firmware path, s2idle drew 210-232 mA
against 158 mA.
Patch 1 takes the suspend frequency from the OPP table's opp-suspend
entry, as cpufreq-dt does, rather than always using the lowest OPP. That
keeps it opt-in per SoC: this driver also runs mt2701, mt7622, mt8183,
mt8186 and others I cannot test, and no MediaTek table has opp-suspend
today, so they are unchanged. Patch 2 marks the lowest OPP of both MT8173
clusters.
Patch 2 also reaches elm, hana and the EVB, which I cannot test either.
What they get is a switch to 507 MHz in cpufreq_suspend(), which runs
before any device is suspended, so the regulators it needs should still
be up. cpufreq_suspend() also runs from device_shutdown(), so reboot and
power-off switch first as well; on the tablet, reboot -f still resets in
1.4 s.
Patch 2 does nothing without patch 1 and is harmless on its own, so the
two can go through the cpufreq and MediaTek trees independently.
To: Rafael J. Wysocki <rafael at kernel.org>
To: Viresh Kumar <viresh.kumar at linaro.org>
To: Matthias Brugger <matthias.bgg at gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
To: Rob Herring <robh at kernel.org>
To: Krzysztof Kozlowski <krzk+dt at kernel.org>
To: Conor Dooley <conor+dt at kernel.org>
Cc: Roman Vivchar <rva333 at protonmail.com>
Cc: linux-pm at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-mediatek at lists.infradead.org
Cc: devicetree at vger.kernel.org
Signed-off-by: Ryan Brue <ryanbrue.dev at gmail.com>
---
Changes in v2:
- Add the Signed-off-by missing from v1. No other change.
- Link to v1: https://patch.msgid.link/20261009-rbrue-suez-upstreaming-mtk-cpufreq-suspend-opp-v1-0-9100f79b4080@gmail.com
---
Ryan Brue (2):
cpufreq: mediatek: Enter system sleep at the suspend OPP
arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 ++
drivers/cpufreq/mediatek-cpufreq.c | 2 ++
2 files changed, 4 insertions(+)
---
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
change-id: 20260929-rbrue-suez-upstreaming-mtk-cpufreq-suspend-opp-81d12d60671b
Best regards,
--
Ryan Brue <ryanbrue.dev at gmail.com>
More information about the Linux-mediatek
mailing list