Re: [PATCH v2 1/4] dt-bindings: power: reset: add PSCRR NVMEM recorder binding

Krzysztof Kozlowski <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-watchdog
Message-ID <20260827-spiffy-effective-hare-c05f53@quoll>
On Wed, Aug 19, 2026 at 10:50:43PM +0530, Faruque Ansari wrote:
> 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

> 
> Signed-off-by: Faruque Ansari <[email protected]>
> ---
>  .../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 <[email protected]>
> +  - Oleksij Rempel <[email protected]>
> +
> +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.

Best regards,
Krzysztof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.