Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Generic NVMEM reboot mode |
| 8 | |
| 9 | maintainers: |
| 10 | - Bartosz Golaszewski <bartosz.golaszewski@linaro.org> |
| 11 | |
| 12 | description: |
| 13 | This driver gets the reboot mode magic value from the reboot-mode driver |
| 14 | and stores it in the NVMEM cell named "reboot-mode". The bootloader can |
| 15 | then read it and take different action according to the value. |
| 16 | |
| 17 | properties: |
| 18 | compatible: |
| 19 | const: nvmem-reboot-mode |
| 20 | |
| 21 | nvmem-cells: |
| 22 | description: |
| 23 | A phandle pointing to the nvmem-cells node where the vendor-specific |
| 24 | magic value representing the reboot mode is stored. |
| 25 | maxItems: 1 |
| 26 | |
| 27 | nvmem-cell-names: |
| 28 | items: |
| 29 | - const: reboot-mode |
| 30 | |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 31 | allOf: |
| 32 | - $ref: reboot-mode.yaml# |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 33 | |
| 34 | required: |
| 35 | - compatible |
| 36 | - nvmem-cells |
| 37 | - nvmem-cell-names |
| 38 | |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 39 | unevaluatedProperties: false |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 40 | |
| 41 | examples: |
| 42 | - | |
| 43 | reboot-mode { |
| 44 | compatible = "nvmem-reboot-mode"; |
| 45 | nvmem-cells = <&reboot_reason>; |
| 46 | nvmem-cell-names = "reboot-mode"; |
| 47 | mode-recovery = <0x01>; |
| 48 | mode-bootloader = <0x02>; |
| 49 | }; |
| 50 | ... |