Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] cpufreq: mediatek: Suspend at the opp-suspend OPP, and mark one on MT8173
@ 2026-10-09 18:31 Ryan Brue
  2026-10-09 18:31 ` [PATCH 1/2] cpufreq: mediatek: Enter system sleep at the suspend OPP Ryan Brue
  2026-10-09 18:31 ` [PATCH 2/2] arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend Ryan Brue
  0 siblings, 2 replies; 5+ messages in thread
From: Ryan Brue @ 2026-10-09 18:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Matthias Brugger,
	AngeloGioacchino Del Regno, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Roman Vivchar, linux-pm, linux-kernel, linux-arm-kernel,
	linux-mediatek, devicetree

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.

---
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@gmail.com>


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

end of thread, other threads:[~2026-10-09 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 18:31 [PATCH 0/2] cpufreq: mediatek: Suspend at the opp-suspend OPP, and mark one on MT8173 Ryan Brue
2026-10-09 18:31 ` [PATCH 1/2] cpufreq: mediatek: Enter system sleep at the suspend OPP Ryan Brue
2026-10-09 18:43   ` sashiko-bot
2026-10-09 19:42     ` Ryan Brue
2026-10-09 18:31 ` [PATCH 2/2] arm64: dts: mediatek: mt8173: Mark the lowest CPU OPPs for suspend Ryan Brue

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