Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/4] power: sys-off: fix Pixel C shutdown via MAX77620
@ 2026-05-14 14:47 Diogo Ivo
  2026-05-14 14:47 ` [PATCH 1/4] firmware: psci: switch SYSTEM_OFF to sys-off handler API Diogo Ivo
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Diogo Ivo @ 2026-05-14 14:47 UTC (permalink / raw)
  To: Mark Rutland, Lorenzo Pieralisi, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter
  Cc: linux-arm-kernel, linux-kernel, devicetree, linux-tegra,
	Diogo Ivo

This series migrates PSCI and MAX77620 poweroff handling to the
sys-off framework and fixes shutdown on the Pixel C (Smaug).

The first two patches replace legacy pm_power_off usage in the PSCI
and MAX77620 drivers with sys-off handlers. Besides aligning both
drivers with the modern poweroff infrastructure, this removes the
global callback dependency and allows multiple handlers to coexist
with explicit priorities.

The remaining patches address shutdown on the Pixel C. Although the
platform exposes PSCI firmware, its SYSTEM_OFF implementation is not
functional:

    __dead2 void tegra_system_off(void)
    {
            ERROR("Tegra System Off: operation not handled.\n");
            panic();
    }

Downstream kernels instead rely on the MAX77620 PMIC to perform the
shutdown sequence. To mirror that behavior upstream, register the
MAX77620 handler with higher priority than PSCI on Smaug systems and
mark the PMIC as the system power controller in device tree.

Patch overview:
  1. firmware: psci: switch SYSTEM_OFF to sys-off handler API
  2. mfd: max77620: convert poweroff support to sys-off API
  3. mfd: max77620: override PSCI poweroff handler on Smaug
  4. arm64: dts: tegra: smaug: mark MAX77620 as system power controller

Tested on a Pixel C, where poweroff now completes successfully
instead of hanging in PSCI firmware.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
---
Diogo Ivo (4):
      firmware: psci: switch SYSTEM_OFF to sys-off handler API
      mfd: max77620: convert poweroff support to sys-off API
      mfd: max77620: override PSCI poweroff handler on Pixel C
      arm64: tegra: smaug: mark MAX77620 as system power controller

 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts |  2 ++
 drivers/firmware/psci/psci.c                  |  8 +++---
 drivers/mfd/max77620.c                        | 36 ++++++++++++++++++++-------
 3 files changed, 34 insertions(+), 12 deletions(-)
---
base-commit: f327c8ef8a6905ee97b62e42d808603c5b759418
change-id: 20260514-smaug-poweroff-9626c5501bbc

Best regards,
--  
Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>


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

end of thread, other threads:[~2026-05-14 20:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 14:47 [PATCH 0/4] power: sys-off: fix Pixel C shutdown via MAX77620 Diogo Ivo
2026-05-14 14:47 ` [PATCH 1/4] firmware: psci: switch SYSTEM_OFF to sys-off handler API Diogo Ivo
2026-05-14 19:48   ` sashiko-bot
2026-05-14 14:47 ` [PATCH 2/4] mfd: max77620: convert poweroff support to sys-off API Diogo Ivo
2026-05-14 20:05   ` sashiko-bot
2026-05-14 14:47 ` [PATCH 3/4] mfd: max77620: override PSCI poweroff handler on Pixel C Diogo Ivo
2026-05-14 14:47 ` [PATCH 4/4] arm64: tegra: smaug: mark MAX77620 as system power controller Diogo Ivo

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