Skip to content

Commit 5feebfb

Browse files
robherringstorulf
authored andcommitted
dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema
Properties are supposed to be defined in the top-level schema and then disallowed in an if/then schema if necessary. Move the "marvell,pad-type" property to follow this. "reg" can also be similarly described at the top-level with only the number of entries restricted in the if/then schema. Signed-off-by: Rob Herring (Arm) <[email protected]> Acked-by: Conor Dooley <[email protected]> Message-ID: <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent a2a44f8 commit 5feebfb

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,9 @@ properties:
3838

3939
reg:
4040
minItems: 1
41-
maxItems: 2
42-
description: |
43-
For "marvell,armada-3700-sdhci", two register areas. The first one
44-
for Xenon IP register. The second one for the Armada 3700 SoC PHY PAD
45-
Voltage Control register. Please follow the examples with compatible
46-
"marvell,armada-3700-sdhci" in below.
47-
Please also check property marvell,pad-type in below.
48-
49-
For other compatible strings, one register area for Xenon IP.
41+
items:
42+
- description: Xenon IP registers
43+
- description: Armada 3700 SoC PHY PAD Voltage Control register
5044

5145
clocks:
5246
minItems: 1
@@ -61,6 +55,17 @@ properties:
6155
interrupts:
6256
maxItems: 1
6357

58+
marvell,pad-type:
59+
$ref: /schemas/types.yaml#/definitions/string
60+
enum:
61+
- sd
62+
- fixed-1-8v
63+
description:
64+
Type of Armada 3700 SoC PHY PAD Voltage Controller register. If "sd" is
65+
selected, SoC PHY PAD is set as 3.3V at the beginning and is switched to
66+
1.8V when later in higher speed mode. If "fixed-1-8v" is selected, SoC PHY
67+
PAD is fixed 1.8V, such as for eMMC.
68+
6469
marvell,xenon-sdhc-id:
6570
$ref: /schemas/types.yaml#/definitions/uint32
6671
minimum: 0
@@ -147,27 +152,18 @@ allOf:
147152
then:
148153
properties:
149154
reg:
150-
items:
151-
- description: Xenon IP registers
152-
- description: Armada 3700 SoC PHY PAD Voltage Control register
153-
154-
marvell,pad-type:
155-
$ref: /schemas/types.yaml#/definitions/string
156-
enum:
157-
- sd
158-
- fixed-1-8v
159-
description: |
160-
Type of Armada 3700 SoC PHY PAD Voltage Controller register.
161-
If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning
162-
and is switched to 1.8V when later in higher speed mode.
163-
If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for
164-
eMMC.
165-
Please follow the examples with compatible
166-
"marvell,armada-3700-sdhci" in below.
155+
minItems: 2
167156

168157
required:
169158
- marvell,pad-type
170159

160+
else:
161+
properties:
162+
reg:
163+
maxItems: 1
164+
165+
marvell,pad-type: false
166+
171167
- if:
172168
properties:
173169
compatible:

0 commit comments

Comments
 (0)