Skip to content

Conversation

@olerem
Copy link

@olerem olerem commented Oct 21, 2025

Hi all,

I'm proposing a new generic property for the /chosen node to identify
an NVMEM cell containing the last system shutdown/reboot reason. Many
embedded systems record this (e.g., "over-temperature", "brown-out"),
but there's no standard way to pass this location to the OS.

I'm sending this as an RFC patch because I'm uncertain about a few points:

  1. Is the /chosen node the right conceptual place for
    this? It feels correct for a global, firmware-provided property,
    much like 'stdout-path', but I'd
    like to be sure.

  2. Is this the right file to patch (chosen.yaml)? Or should this
    be defined in a more central NVMEM binding?

  3. Are the '$ref's correct? I'm referencing the existing meta-schema
    nvmem.yaml from schema (feels wrong). Is this the standard way to re-use
    properties from another schema?

Any feedback on the approach or the implementation would be greatly appreciated.

Thanks,
Oleksij

A lot of systems (especially embedded) store the last shutdown/reboot
reason in NVMEM. This could be anything from "over temperature" or
"brown-out" to an "EC panic" or watchdog reset.

There's currently no standard way for firmware to tell the kernel where
to find this information.

The /chosen node is already used for passing global, firmware-provided
data like 'bootargs' and 'stdout-path'. Let's use it for this, too.

This patch adds a binding for a new generic NVMEM cell name in /chosen:
"power-state-change-reason".

Example from the binding:
    chosen {
        nvmem-cells = <&pscr_cell>;
        nvmem-cell-names = "power-state-change-reason";
    };

Signed-off-by: Oleksij Rempel <[email protected]>
@olerem olerem changed the title [RFC] dt-bindings: chosen: Add "power-state-change-reason" nvmem property dt-bindings: chosen: Add "power-state-change-reason" nvmem property Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant