Skip to content

Commit 54c16b5

Browse files
krzkUlf Hansson
authored andcommitted
dt-bindings: mmc: sdhci-msm: constrain reg-names per variants
The entries in arrays must have fixed order, so the bindings and Linux driver expecting various combinations of 'reg' addresses was never actually conforming to guidelines. The 'core' reg entry is valid only for SDCC v4 and lower, so disallow it in SDCC v5. SDCC v4 supports CQE and ICE, so allow them, even though the qcom,sdhci-msm-v4 compatible is used also for earlier SoCs with SDCC v2 or v3, so it is not entirely accurate. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20220712144245.17417-3-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 331ad82 commit 54c16b5

1 file changed

Lines changed: 38 additions & 23 deletions

File tree

Documentation/devicetree/bindings/mmc/sdhci-msm.yaml

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,11 @@ properties:
4848

4949
reg:
5050
minItems: 1
51-
items:
52-
- description: Host controller register map
53-
- description: SD Core register map
54-
- description: CQE register map
55-
- description: Inline Crypto Engine register map
51+
maxItems: 4
5652

5753
reg-names:
5854
minItems: 1
5955
maxItems: 4
60-
oneOf:
61-
- items:
62-
- const: hc
63-
- items:
64-
- const: hc
65-
- const: core
66-
- items:
67-
- const: hc
68-
- const: cqhci
69-
- items:
70-
- const: hc
71-
- const: cqhci
72-
- const: ice
73-
- items:
74-
- const: hc
75-
- const: core
76-
- const: cqhci
77-
- const: ice
7856

7957
clocks:
8058
minItems: 3
@@ -179,6 +157,43 @@ required:
179157
allOf:
180158
- $ref: mmc-controller.yaml#
181159

160+
- if:
161+
properties:
162+
compatible:
163+
contains:
164+
enum:
165+
- qcom,sdhci-msm-v4
166+
then:
167+
properties:
168+
reg:
169+
minItems: 2
170+
items:
171+
- description: Host controller register map
172+
- description: SD Core register map
173+
- description: CQE register map
174+
- description: Inline Crypto Engine register map
175+
reg-names:
176+
minItems: 2
177+
items:
178+
- const: hc
179+
- const: core
180+
- const: cqhci
181+
- const: ice
182+
else:
183+
properties:
184+
reg:
185+
minItems: 1
186+
items:
187+
- description: Host controller register map
188+
- description: CQE register map
189+
- description: Inline Crypto Engine register map
190+
reg-names:
191+
minItems: 1
192+
items:
193+
- const: hc
194+
- const: cqhci
195+
- const: ice
196+
182197
unevaluatedProperties: false
183198

184199
examples:

0 commit comments

Comments
 (0)