1*0262fa16SBartosz Golaszewski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0262fa16SBartosz Golaszewski%YAML 1.2
3*0262fa16SBartosz Golaszewski---
4*0262fa16SBartosz Golaszewski$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
5*0262fa16SBartosz Golaszewski$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0262fa16SBartosz Golaszewski
7*0262fa16SBartosz Golaszewskititle: Generic NVMEM reboot mode
8*0262fa16SBartosz Golaszewski
9*0262fa16SBartosz Golaszewskimaintainers:
10*0262fa16SBartosz Golaszewski  - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
11*0262fa16SBartosz Golaszewski
12*0262fa16SBartosz Golaszewskidescription:
13*0262fa16SBartosz Golaszewski  This driver gets the reboot mode magic value from the reboot-mode driver
14*0262fa16SBartosz Golaszewski  and stores it in the NVMEM cell named "reboot-mode". The bootloader can
15*0262fa16SBartosz Golaszewski  then read it and take different action according to the value.
16*0262fa16SBartosz Golaszewski
17*0262fa16SBartosz Golaszewskiproperties:
18*0262fa16SBartosz Golaszewski  compatible:
19*0262fa16SBartosz Golaszewski    const: nvmem-reboot-mode
20*0262fa16SBartosz Golaszewski
21*0262fa16SBartosz Golaszewski  nvmem-cells:
22*0262fa16SBartosz Golaszewski    description:
23*0262fa16SBartosz Golaszewski      A phandle pointing to the nvmem-cells node where the vendor-specific
24*0262fa16SBartosz Golaszewski      magic value representing the reboot mode is stored.
25*0262fa16SBartosz Golaszewski    maxItems: 1
26*0262fa16SBartosz Golaszewski
27*0262fa16SBartosz Golaszewski  nvmem-cell-names:
28*0262fa16SBartosz Golaszewski    items:
29*0262fa16SBartosz Golaszewski      - const: reboot-mode
30*0262fa16SBartosz Golaszewski
31*0262fa16SBartosz GolaszewskipatternProperties:
32*0262fa16SBartosz Golaszewski  "^mode-.+":
33*0262fa16SBartosz Golaszewski    $ref: /schemas/types.yaml#/definitions/uint32
34*0262fa16SBartosz Golaszewski    description: Vendor-specific mode value written to the mode register
35*0262fa16SBartosz Golaszewski
36*0262fa16SBartosz Golaszewskirequired:
37*0262fa16SBartosz Golaszewski  - compatible
38*0262fa16SBartosz Golaszewski  - nvmem-cells
39*0262fa16SBartosz Golaszewski  - nvmem-cell-names
40*0262fa16SBartosz Golaszewski
41*0262fa16SBartosz GolaszewskiadditionalProperties: false
42*0262fa16SBartosz Golaszewski
43*0262fa16SBartosz Golaszewskiexamples:
44*0262fa16SBartosz Golaszewski  - |
45*0262fa16SBartosz Golaszewski    reboot-mode {
46*0262fa16SBartosz Golaszewski        compatible = "nvmem-reboot-mode";
47*0262fa16SBartosz Golaszewski        nvmem-cells = <&reboot_reason>;
48*0262fa16SBartosz Golaszewski        nvmem-cell-names = "reboot-mode";
49*0262fa16SBartosz Golaszewski        mode-recovery = <0x01>;
50*0262fa16SBartosz Golaszewski        mode-bootloader = <0x02>;
51*0262fa16SBartosz Golaszewski    };
52*0262fa16SBartosz Golaszewski...
53