xref: /freebsd/sys/contrib/device-tree/Bindings/power/reset/nvmem-reboot-mode.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2f126890aSEmmanuel Vadot%YAML 1.2
3f126890aSEmmanuel Vadot---
4f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
5f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6f126890aSEmmanuel Vadot
7f126890aSEmmanuel Vadottitle: Generic NVMEM reboot mode
8f126890aSEmmanuel Vadot
9f126890aSEmmanuel Vadotmaintainers:
10f126890aSEmmanuel Vadot  - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
11f126890aSEmmanuel Vadot
12f126890aSEmmanuel Vadotdescription:
13f126890aSEmmanuel Vadot  This driver gets the reboot mode magic value from the reboot-mode driver
14f126890aSEmmanuel Vadot  and stores it in the NVMEM cell named "reboot-mode". The bootloader can
15f126890aSEmmanuel Vadot  then read it and take different action according to the value.
16f126890aSEmmanuel Vadot
17f126890aSEmmanuel Vadotproperties:
18f126890aSEmmanuel Vadot  compatible:
19f126890aSEmmanuel Vadot    const: nvmem-reboot-mode
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot  nvmem-cells:
22f126890aSEmmanuel Vadot    description:
23f126890aSEmmanuel Vadot      A phandle pointing to the nvmem-cells node where the vendor-specific
24f126890aSEmmanuel Vadot      magic value representing the reboot mode is stored.
25f126890aSEmmanuel Vadot    maxItems: 1
26f126890aSEmmanuel Vadot
27f126890aSEmmanuel Vadot  nvmem-cell-names:
28f126890aSEmmanuel Vadot    items:
29f126890aSEmmanuel Vadot      - const: reboot-mode
30f126890aSEmmanuel Vadot
31*8d13bc63SEmmanuel VadotallOf:
32*8d13bc63SEmmanuel Vadot  - $ref: reboot-mode.yaml#
33f126890aSEmmanuel Vadot
34f126890aSEmmanuel Vadotrequired:
35f126890aSEmmanuel Vadot  - compatible
36f126890aSEmmanuel Vadot  - nvmem-cells
37f126890aSEmmanuel Vadot  - nvmem-cell-names
38f126890aSEmmanuel Vadot
39*8d13bc63SEmmanuel VadotunevaluatedProperties: false
40f126890aSEmmanuel Vadot
41f126890aSEmmanuel Vadotexamples:
42f126890aSEmmanuel Vadot  - |
43f126890aSEmmanuel Vadot    reboot-mode {
44f126890aSEmmanuel Vadot        compatible = "nvmem-reboot-mode";
45f126890aSEmmanuel Vadot        nvmem-cells = <&reboot_reason>;
46f126890aSEmmanuel Vadot        nvmem-cell-names = "reboot-mode";
47f126890aSEmmanuel Vadot        mode-recovery = <0x01>;
48f126890aSEmmanuel Vadot        mode-bootloader = <0x02>;
49f126890aSEmmanuel Vadot    };
50f126890aSEmmanuel Vadot...
51