Skip to content

Commit 0262fa1

Browse files
Bartosz Golaszewskisre
authored andcommitted
dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML
Convert the DT binding document for nvmem-reboot-mode from .txt to YAML. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 97dd69b commit 0262fa1

2 files changed

Lines changed: 52 additions & 26 deletions

File tree

Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
31+
patternProperties:
32+
"^mode-.+":
33+
$ref: /schemas/types.yaml#/definitions/uint32
34+
description: Vendor-specific mode value written to the mode register
35+
36+
required:
37+
- compatible
38+
- nvmem-cells
39+
- nvmem-cell-names
40+
41+
additionalProperties: false
42+
43+
examples:
44+
- |
45+
reboot-mode {
46+
compatible = "nvmem-reboot-mode";
47+
nvmem-cells = <&reboot_reason>;
48+
nvmem-cell-names = "reboot-mode";
49+
mode-recovery = <0x01>;
50+
mode-bootloader = <0x02>;
51+
};
52+
...

0 commit comments

Comments
 (0)