mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/3] power: reset: Add NVMEM recorder provider for PSCRR
@ 2026-10-23  9:17 Faruque Ansari
  2026-10-23  9:17 ` [PATCH v4 1/3] dt-bindings: nvmem: layouts: Add PSCRR NVMEM layout Faruque Ansari
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Faruque Ansari @ 2026-10-23  9:17 UTC (permalink / raw)
  To: Oleksij Rempel, Pengutronix Kernel Team, Sebastian Reichel,
	Rob Herring, Krzysztof Kozlowski, Wim Van Sebroeck,
	Guenter Roeck, Benson Leung, Tzung-Bi Shih, Srinivas Kandagatla,
	Daniel Lezcano
  Cc: linux-arm-msm, linux-kernel, linux-pm, devicetree,
	linux-watchdog, kernel, Liam Girdwood, Mark Brown,
	Rafael J. Wysocki, Zhang Rui, Lukasz Luba, Søren Andersen,
	Guenter Roeck, Matti Vaittinen, Ahmad Fatoum, Andrew Morton,
	avaneesh.dwivedi, Umang Chheda, Faruque Ansari, Abel Vesa

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/all/20261019-pscrr-framework-v17-0-69ea6cdf4731@oss.qualcomm.com/

---
Changes in v4:
- Move the PSCRR NVMEM provider recorder from drivers/power/reset/pscrr/
  to drivers/nvmem/layouts/ and relocate its Kconfig/Makefile/MAINTAINERS
  entries accordingly, as suggested by Srinivas Kandagatla.
- Reject a layout that declares more than one reason cell with -EINVAL
  instead of silently using the first one - Srinivas Kandagatla.
- Consolidate the probe error paths onto a single of_node_put() unwind
  label instead of repeating the put on every failure - Srinivas Kandagatla.
- add Reviewed-by tags from Abel Vesa and Rob Herring.
- Link to v3: https://lore.kernel.org/r/20260914-pscrr-provider-v3-0-c45cb16542e8@oss.qualcomm.com

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/

---
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                                        |   2 +
 arch/arm64/boot/dts/qcom/lemans-pmics.dtsi         |  11 +
 drivers/nvmem/layouts/Kconfig                      |  10 +
 drivers/nvmem/layouts/Makefile                     |   1 +
 drivers/nvmem/layouts/pscrr-nvmem.c                | 270 +++++++++++++++++++++
 7 files changed, 382 insertions(+)
---
base-commit: be461b2185ea3ff6d9c92deedcee0a62a57e1332
change-id: 20260806-pscrr-provider-b9f8f451701e

Best regards,
-- 
Faruque Ansari <faruque.ansari@oss.qualcomm.com>


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

end of thread, other threads:[~2026-10-23  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23  9:17 [PATCH v4 0/3] power: reset: Add NVMEM recorder provider for PSCRR Faruque Ansari
2026-10-23  9:17 ` [PATCH v4 1/3] dt-bindings: nvmem: layouts: Add PSCRR NVMEM layout Faruque Ansari
2026-10-23  9:17 ` [PATCH v4 2/3] power: reset: Add PSCRR NVMEM recorder Faruque Ansari
2026-10-23  9:17 ` [PATCH v4 3/3] arm64: dts: qcom: lemans: Add PSCRR NVMEM recorder node Faruque Ansari

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

all inboxes | Powered by JetHome®