[PATCH v2 0/4] power: reset: add NVMEM recorder provider for PSCRR

From: Faruque Ansari

Date: Wed Aug 19 2026 - 13:36:00 EST


The PSCRR framework[1] currently does not provide a recorder provider
capable of persisting power state change reasons across power cycles.

This series extends the PSCRR framework[1] with support for an
NVMEM-cell recorder provider, integrating PSCRR-recorded power state
change reasons with the NVMEM subsystem.

The recorder writes the power state change reason into a small NVMEM cell
(e.g. a PMIC SDAM byte or RTC scratch register) before shutdown or reset,
so the cause survives a power cycle and is available via
/sys/kernel/pscrr/ on the next boot.

Only the NVMEM-cell provider is included here. The PMIC hardware-register
provider will be submitted as a separate series.

Change in v2:
- Add reviewers to To/Cc list.
- Update patch 1/4:
* Rename DT node from pscr-reason to reboot-reason.
* Update DT binding example to use fixed-layout NVMEM layout.
* Add reboot_reason_persist NVMEM cell under fixed-layout.
* Update Qualcomm DTS example accordingly.
- update patch 2/4 based on Uwe Kleine-König feedback:
* Remove unnecessary #include <linux/mod_devicetable.h>
-v1-link: [2]

[1] https://lore.kernel.org/lkml/20260731095959.296056-1-o.rempel@xxxxxxxxxxxxxx/
[2] https://lore.kernel.org/all/20260817-pscrr-provider-v1-0-88a318c13d41@xxxxxxxxxxxxxxxx/

Signed-off-by: Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>
---
Faruque Ansari (4):
dt-bindings: power: reset: add PSCRR NVMEM recorder binding
power: reset: add PSCRR NVMEM recorder
nvmem: provide consumer access to cell size metrics
arm64: dts: qcom: lemans: Add PSCRR NVMEM recorder node

.../bindings/power/reset/pscrr-nvmem.yaml | 59 ++++++++
MAINTAINERS | 1 +
arch/arm64/boot/dts/qcom/lemans-pmics.dtsi | 16 +++
drivers/nvmem/core.c | 29 ++++
drivers/power/reset/pscrr/Kconfig | 14 ++
drivers/power/reset/pscrr/Makefile | 1 +
drivers/power/reset/pscrr/pscrr-nvmem.c | 154 +++++++++++++++++++++
include/linux/nvmem-consumer.h | 7 +
8 files changed, 281 insertions(+)
---
base-commit: be461b2185ea3ff6d9c92deedcee0a62a57e1332
change-id: 20260806-pscrr-provider-b9f8f451701e

Best regards,
--
Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>