[RFC PATCH 0/1] soc: qcom: rpmh-rsc: Register s2idle_ops to indicate s2ram behavior in s2idle
From: Manivannan Sadhasivam
Date: Thu Jan 01 2026 - 11:52:25 EST
Hi,
This is just an attempt to let the device drivers know of the quirky platform
behavior of mimicking s2ram in s2idle for older Qcom SoCs (pre-Hamoa and
non-chromebooks) using RPMh. This information is important for the device
drivers as they need to prepare for the possible power loss during system
suspend by shutting down or resetting the devices.
For implementation, s2idle_ops is registered during the boot of the rpmh-rsc
driver based on the machine compatible limited to Makena (SC8280XP) as a
proof-of-concept. If this approach gets consensus, I plan to have a helper
that lists the compatibles of all SoCs exhibiting this behavior. Since there is
no reliable way to find out whether s2idle is the only low power state supported
or not during boot, I resorted to compatible based matching.
One could argue that this s2idle_ops should be registered in the PSCI driver
similar to s2ram [1]. But I didn't prefer that since from PSCI point of view,
only CPUs should be parked in low power states during s2idle (CPU_SUSPEND) and
the peripherals should not be affected. Though in the past, an argument [2] was
raised citing the PSCI spec wording that allows the vendors to implement system
level low power states during CPU_SUSPEND. But that argument was not well
received by the PSCI maintainers.
Moreover, RPMh is the entity that implements the s2ram like deeper low power
state during system suspend. So it made sense to add the ops in this driver.
Note: This series is compile tested only. If one tests this series on Makena
platform, NVMe should get shutdown during suspend as confirmed by the dmesg log
similar to below after resume:
nvme nvme0: 12/0/0 default/read/poll queues
This series, together with the upcoming PCIe D3Cold support should allow Makena
(and other similar SoCs once added) to enter the deep low power mode a.k.a CXPC.
[1] https://lore.kernel.org/all/20251231162126.7728-1-manivannan.sadhasivam@xxxxxxxxxxxxxxxx
[2] https://lore.kernel.org/all/54cc4221-ba5f-4741-9033-20874265ca01@xxxxxxxxxxxxxxxx
Manivannan Sadhasivam (1):
soc: qcom: rpmh-rsc: Register s2idle_ops to indicate s2ram behavior in
s2idle
drivers/soc/qcom/rpmh-rsc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
--
2.48.1