diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-07-12 16:42:42 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-07-13 12:37:28 +0200 |
commit | 54c16b522e00583ba1151501286b0cf4c91e08c3 (patch) | |
tree | 66b6bf0533b3f6e7c611eab927d4475a83c07b52 | |
parent | 331ad8247b46eeaf3b5c66e5ef5986630fe0f043 (diff) | |
download | linux-54c16b522e00583ba1151501286b0cf4c91e08c3.tar.gz |
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>
-rw-r--r-- | Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml index c67e17792fd3..edd370d1043d 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml @@ -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 @@ -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: |