dt-bindings: power: reset: Convert mode-.* properties to array

PSCI reboot mode will map a mode name to multiple magic values instead
of just one. Convert the mode-.* property to an array. Users of the
reboot-mode schema will need to specify the maxItems of the mode-.*
properties. Existing users will all be 1.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20241107-arm-psci-system_reset2-vendor-reboots-v8-1-e8715fa65cb5@quicinc.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Elliot Berman 2024-11-07 15:38:25 -08:00 committed by Sebastian Reichel
parent f29cc6d9a3
commit 05d9044177
4 changed files with 17 additions and 2 deletions

View File

@ -31,6 +31,10 @@ properties:
allOf:
- $ref: reboot-mode.yaml#
patternProperties:
"^mode-.*$":
maxItems: 1
required:
- compatible
- nvmem-cells

View File

@ -54,6 +54,10 @@ required:
- compatible
- reg
patternProperties:
"^mode-.*$":
maxItems: 1
unevaluatedProperties: false
allOf:
@ -75,6 +79,9 @@ allOf:
reg-names:
items:
- const: pon
else:
patternProperties:
"^mode-.*$": false
# Special case for pm8941, which doesn't store reset mode
- if:

View File

@ -28,13 +28,13 @@ description: |
properties:
mode-normal:
$ref: /schemas/types.yaml#/definitions/uint32
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
Default value to set on a reboot if no command was provided.
patternProperties:
"^mode-.*$":
$ref: /schemas/types.yaml#/definitions/uint32
$ref: /schemas/types.yaml#/definitions/uint32-array
additionalProperties: true

View File

@ -32,6 +32,10 @@ properties:
allOf:
- $ref: reboot-mode.yaml#
patternProperties:
"^mode-.*$":
maxItems: 1
unevaluatedProperties: false
required: