Thread (4 messages) flat view 4 messages, 1 author, 4d ago
COOLING4d

Revision v3 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH v3 0/3] power: reset: Add NVMEM recorder provider for PSCRR

From: Faruque Ansari <hidden>
Date: 2026-09-14 04:39:20
Also in: linux-arm-msm, linux-devicetree, linux-watchdog, lkml

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.

[1] https://lore.kernel.org/lkml/20260731095959.296056-1-o.rempel@pengutronix.de/ (local)

---
Changes in v3:
- Drop unnecessary nvmem_cell_get_size() and core compatibility
  detection changes because the layout now owns the compatible.
- Patch 1/3 (dt-bindings): Move compatible from the cell to the
  nvmem-layout node, relocate binding to nvmem/layouts/, and
  simplify the cell to a plain reg/bits child.
- Drop the trailing "binding" from the subject, as suggested by
  Krzysztof.
- Patch 2/3 (driver): Convert pscrr-nvmem from a consumer-based
  platform driver to an nvmem_layout_driver that directly manages
  its cell.
- Patch 3/3 (dts): Update DTS to place compatible on the layout
  node, add bits to reboot_reason_persist, and remove the separate
  reboot-reason consumer node.
- Link to v2: https://patch.msgid.link/20260819-pscrr-provider-v2-0-9072383e0f4d@oss.qualcomm.com

Changes 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>
- Link to v1: https://lore.kernel.org/all/20260817-pscrr-provider-v1-0-88a318c13d41@oss.qualcomm.com/ (local)

---
Faruque Ansari (3):
      dt-bindings: nvmem: layouts: Add PSCRR NVMEM layout
      power: reset: Add PSCRR NVMEM recorder
      arm64: dts: qcom: lemans: Add PSCRR NVMEM recorder node

 .../bindings/nvmem/layouts/nvmem-layout.yaml       |   1 +
 .../bindings/nvmem/layouts/pscrr-nvmem.yaml        |  87 +++++++
 MAINTAINERS                                        |   1 +
 arch/arm64/boot/dts/qcom/lemans-pmics.dtsi         |  11 +
 drivers/power/reset/pscrr/Kconfig                  |  14 ++
 drivers/power/reset/pscrr/Makefile                 |   1 +
 drivers/power/reset/pscrr/pscrr-nvmem.c            | 269 +++++++++++++++++++++
 7 files changed, 384 insertions(+)
---
base-commit: be461b2185ea3ff6d9c92deedcee0a62a57e1332
change-id: 20260806-pscrr-provider-b9f8f451701e

Best regards,
-- 
Faruque Ansari [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help