| 1 |
# SPDX-License-Identifier: GPL-2.0-only |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/power/reset/syscon-reboot-mode.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Generic SYSCON reboot mode driver |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Sebastian Reichel <[email protected]> |
| 11 |
|
| 12 |
description: | |
| 13 |
This driver gets reboot mode magic value from reboot-mode driver |
| 14 |
and stores it in a SYSCON mapped register. Then the bootloader |
| 15 |
can read it and take different action according to the magic |
| 16 |
value stored. The SYSCON mapped register is retrieved from the |
| 17 |
parental dt-node plus the offset. So the SYSCON reboot-mode node |
| 18 |
should be represented as a sub-node of a "syscon", "simple-mfd" node. |
| 19 |
|
| 20 |
properties: |
| 21 |
compatible: |
| 22 |
const: syscon-reboot-mode |
| 23 |
|
| 24 |
mask: |
| 25 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 26 |
description: Update only the register bits defined by the mask (32 bit) |
| 27 |
|
| 28 |
offset: |
| 29 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 30 |
description: Offset in the register map for the mode register (in bytes) |
| 31 |
|
| 32 |
allOf: |
| 33 |
- $ref: reboot-mode.yaml# |
| 34 |
|
| 35 |
patternProperties: |
| 36 |
"^mode-.*$": |
| 37 |
maxItems: 1 |
| 38 |
|
| 39 |
unevaluatedProperties: false |
| 40 |
|
| 41 |
required: |
| 42 |
- compatible |
| 43 |
- offset |
| 44 |
|
| 45 |
examples: |
| 46 |
- | |
| 47 |
#include <dt-bindings/soc/rockchip,boot-mode.h> |
| 48 |
|
| 49 |
reboot-mode { |
| 50 |
compatible = "syscon-reboot-mode"; |
| 51 |
offset = <0x40>; |
| 52 |
mode-normal = <BOOT_NORMAL>; |
| 53 |
mode-recovery = <BOOT_RECOVERY>; |
| 54 |
mode-bootloader = <BOOT_FASTBOOT>; |
| 55 |
mode-loader = <BOOT_BL_DOWNLOAD>; |
| 56 |
}; |
| 57 |
... |