Re: [PATCH v2 1/4] dt-bindings: power: reset: add PSCRR NVMEM recorder binding
From: Faruque Ansari
Date: Wed Sep 02 2026 - 08:57:56 EST
Hi Krzysztof,
On 27-Aug-26 3:15 PM, Krzysztof Kozlowski wrote:
On Wed, Aug 19, 2026 at 10:50:43PM +0530, Faruque Ansari wrote:Thanks for the review.
Add binding for the PSCRR NVMEM recorder. Records the power state
change reason into a small NVMEM cell, such as a PMIC SDAM byte or
RTC scratch register — so the cause survives a power cycle and can be
read back on the next boot.
A nit, subject: drop second/last, redundant "binding". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23
I'll fix this in V3.
Signed-off-by: Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>
---
.../bindings/power/reset/pscrr-nvmem.yaml | 59 ++++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 60 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml b/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml
new file mode 100644
index 000000000000..5334c923d644
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/pscrr-nvmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVMEM Power State Change Reason recorder
+
+maintainers:
+ - Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>
+ - Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
+
+description:
+ An NVMEM-backed recorder for Power State Change Reasons (PSCRR). Persists
+ the reboot or shutdown cause into a small NVMEM cell, such as an RTC
+ scratch register, a PMIC SDAM (Scratch Data Access Memory) byte, or an
+ EEPROM — so the reason survives a power cycle and can be read back on the
+ next boot. The cell is referenced via the standard nvmem-cells consumer
+ binding.
I do not see how this should be a separate device. This should be rather part
of PSCRR, reboot handler or just the nvmem. Otherwise it is just device
node for instantiating driver.
There's already precedent in-tree for exactly this shape of binding: Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml defines a standalone "nvmem-reboot-mode" compatible whose sole purpose is to bind an nvmem-cell and instantiate a driver that writes a reboot-mode value into it before reset, for the bootloader to read.
pscrr-nvmem follows the same pattern: instead of a reboot-mode value for the bootloader, it records the PSCRR reason into an NVMEM cell before reset and reads it back on the next boot for PSCRR to report. Like nvmem-reboot-mode, it works with any NVMEM backend (RTC scratch register, PMIC SDAM, EEPROM, etc.).
It doesn't fit cleanly into PSCRR core (hardware-agnostic, no NVMEM dependency today) or a specific reset handler (it only records the reason, it doesn't initiate the reset).
Thanks,
Faruque Ansari