Skip to content

Commit

Permalink
dt-bindings: mmc: sdhci-msm: constrain reg-names per variants
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Kozlowski authored and Ulf Hansson committed Jul 13, 2022
1 parent 331ad82 commit 54c16b5
Showing 1 changed file with 38 additions and 23 deletions.
61 changes: 38 additions & 23 deletions Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,11 @@ properties:

reg:
minItems: 1
items:
- description: Host controller register map
- description: SD Core register map
- description: CQE register map
- description: Inline Crypto Engine register map
maxItems: 4

reg-names:
minItems: 1
maxItems: 4
oneOf:
- items:
- const: hc
- items:
- const: hc
- const: core
- items:
- const: hc
- const: cqhci
- items:
- const: hc
- const: cqhci
- const: ice
- items:
- const: hc
- const: core
- const: cqhci
- const: ice

clocks:
minItems: 3
Expand Down Expand Up @@ -179,6 +157,43 @@ required:
allOf:
- $ref: mmc-controller.yaml#

- if:
properties:
compatible:
contains:
enum:
- qcom,sdhci-msm-v4
then:
properties:
reg:
minItems: 2
items:
- description: Host controller register map
- description: SD Core register map
- description: CQE register map
- description: Inline Crypto Engine register map
reg-names:
minItems: 2
items:
- const: hc
- const: core
- const: cqhci
- const: ice
else:
properties:
reg:
minItems: 1
items:
- description: Host controller register map
- description: CQE register map
- description: Inline Crypto Engine register map
reg-names:
minItems: 1
items:
- const: hc
- const: cqhci
- const: ice

unevaluatedProperties: false

examples:
Expand Down

0 comments on commit 54c16b5

Please sign in to comment.