diff mbox series

[1/1] dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindings

Message ID 20220514220116.1008254-1-bhupesh.sharma@linaro.org (mailing list archive)
State Not Applicable
Headers show
Series [1/1] dt-bindings: mmc: sdhci-msm: Fix issues in yaml bindings | expand

Commit Message

Bhupesh Sharma May 14, 2022, 10:01 p.m. UTC
Rob pointed some remaining issues in the sdhci-msm yaml
bindings (via [1]).

Fix the same by first using the 'mmc-controller.yaml' as
'ref' and thereafter also fix the issues reported by
'make dtbs_check' check.

[1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/

Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
-> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
-> This patch is rebased on 'linux-next/master'

 .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
 1 file changed, 44 insertions(+), 8 deletions(-)

Comments

Ulf Hansson May 31, 2022, 1:38 p.m. UTC | #1
On Sun, 15 May 2022 at 00:01, Bhupesh Sharma <bhupesh.sharma@linaro.org> wrote:
>
> Rob pointed some remaining issues in the sdhci-msm yaml
> bindings (via [1]).
>
> Fix the same by first using the 'mmc-controller.yaml' as
> 'ref' and thereafter also fix the issues reported by
> 'make dtbs_check' check.
>
> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
>
> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>

Queued for v5.20 on the devel branch, thanks!

Kind regards
Uffe


> ---
> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
> -> This patch is rebased on 'linux-next/master'
>
>  .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
>  1 file changed, 44 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
> index e4236334e748..31a3ce208e1a 100644
> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
> @@ -17,6 +17,9 @@ description:
>  properties:
>    compatible:
>      oneOf:
> +      - enum:
> +          - qcom,sdhci-msm-v4
> +        deprecated: true
>        - items:
>            - enum:
>                - qcom,apq8084-sdhci
> @@ -27,6 +30,9 @@ properties:
>                - qcom,msm8992-sdhci
>                - qcom,msm8994-sdhci
>                - qcom,msm8996-sdhci
> +          - const: qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
> +      - items:
> +          - enum:
>                - qcom,qcs404-sdhci
>                - qcom,sc7180-sdhci
>                - qcom,sc7280-sdhci
> @@ -38,12 +44,7 @@ properties:
>                - qcom,sm6350-sdhci
>                - qcom,sm8150-sdhci
>                - qcom,sm8250-sdhci
> -          - enum:
> -              - qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
> -              - qcom,sdhci-msm-v5 # for sdcc version 5.0
> -      - items:
> -          - const: qcom,sdhci-msm-v4 # Deprecated (only for backward compatibility)
> -                                     # for sdcc versions less than 5.0
> +          - const: qcom,sdhci-msm-v5 # for sdcc version 5.0
>
>    reg:
>      minItems: 1
> @@ -53,6 +54,28 @@ properties:
>        - description: CQE register map
>        - description: Inline Crypto Engine register map
>
> +  reg-names:
> +    minItems: 1
> +    maxItems: 4
> +    oneOf:
> +      - items:
> +          - const: hc_mem
> +      - items:
> +          - const: hc_mem
> +          - const: core_mem
> +      - items:
> +          - const: hc_mem
> +          - const: cqe_mem
> +      - items:
> +          - const: hc_mem
> +          - const: cqe_mem
> +          - const: ice_mem
> +      - items:
> +          - const: hc_mem
> +          - const: core_mem
> +          - const: cqe_mem
> +          - const: ice_mem
> +
>    clocks:
>      minItems: 3
>      items:
> @@ -121,6 +144,16 @@ properties:
>      description: A phandle to sdhci power domain node
>      maxItems: 1
>
> +  mmc-ddr-1_8v: true
> +
> +  mmc-hs200-1_8v: true
> +
> +  mmc-hs400-1_8v: true
> +
> +  bus-width: true
> +
> +  max-frequency: true
> +
>  patternProperties:
>    '^opp-table(-[a-z0-9]+)?$':
>      if:
> @@ -140,7 +173,10 @@ required:
>    - clock-names
>    - interrupts
>
> -additionalProperties: true
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +
> +unevaluatedProperties: false
>
>  examples:
>    - |
> @@ -149,7 +185,7 @@ examples:
>      #include <dt-bindings/clock/qcom,rpmh.h>
>      #include <dt-bindings/power/qcom-rpmpd.h>
>
> -    sdhc_2: sdhci@8804000 {
> +    sdhc_2: mmc@8804000 {
>        compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5";
>        reg = <0 0x08804000 0 0x1000>;
>
> --
> 2.35.3
>
Rob Herring (Arm) July 1, 2022, 10:06 p.m. UTC | #2
On Sat, May 14, 2022 at 4:01 PM Bhupesh Sharma
<bhupesh.sharma@linaro.org> wrote:
>
> Rob pointed some remaining issues in the sdhci-msm yaml
> bindings (via [1]).
>
> Fix the same by first using the 'mmc-controller.yaml' as
> 'ref' and thereafter also fix the issues reported by
> 'make dtbs_check' check.
>
> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
>
> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
> -> This patch is rebased on 'linux-next/master'
>
>  .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
>  1 file changed, 44 insertions(+), 8 deletions(-)

There's another issue with this applied:

Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb:
mmc@8804000: Unevaluated properties are not allowed
('operating-points-v2' was unexpected)

Should just need a 'operating-points-v2: true' line.

This won't show up until a fix for 'unevaluatedProperties' handling is
applied. But first I need all the issues fixed.

Rob
Dmitry Baryshkov July 2, 2022, 9:14 a.m. UTC | #3
On 2 July 2022 01:06:48 GMT+03:00, Rob Herring <robh@kernel.org> wrote:
>On Sat, May 14, 2022 at 4:01 PM Bhupesh Sharma
><bhupesh.sharma@linaro.org> wrote:
>>
>> Rob pointed some remaining issues in the sdhci-msm yaml
>> bindings (via [1]).
>>
>> Fix the same by first using the 'mmc-controller.yaml' as
>> 'ref' and thereafter also fix the issues reported by
>> 'make dtbs_check' check.
>>
>> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
>>
>> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
>> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>> ---
>> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
>> -> This patch is rebased on 'linux-next/master'
>>
>>  .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
>>  1 file changed, 44 insertions(+), 8 deletions(-)
>
>There's another issue with this applied:
>
>Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb:
>mmc@8804000: Unevaluated properties are not allowed
>('operating-points-v2' was unexpected)
>
>Should just need a 'operating-points-v2: true' line.
>
>This won't show up until a fix for 'unevaluatedProperties' handling is
>applied. But first I need all the issues fixed.

Could you please add a dt-validate (?) argument so that we can validate new schemas with unevaluatedProperties working as expected, while keeping default behaviour intact (while it gets sorted out)?


>
>Rob
Rob Herring (Arm) July 2, 2022, 3:22 p.m. UTC | #4
On Sat, Jul 2, 2022 at 3:14 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
>
>
> On 2 July 2022 01:06:48 GMT+03:00, Rob Herring <robh@kernel.org> wrote:
> >On Sat, May 14, 2022 at 4:01 PM Bhupesh Sharma
> ><bhupesh.sharma@linaro.org> wrote:
> >>
> >> Rob pointed some remaining issues in the sdhci-msm yaml
> >> bindings (via [1]).
> >>
> >> Fix the same by first using the 'mmc-controller.yaml' as
> >> 'ref' and thereafter also fix the issues reported by
> >> 'make dtbs_check' check.
> >>
> >> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
> >>
> >> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
> >> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> >> Cc: Rob Herring <robh@kernel.org>
> >> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> >> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> >> ---
> >> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
> >> -> This patch is rebased on 'linux-next/master'
> >>
> >>  .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
> >>  1 file changed, 44 insertions(+), 8 deletions(-)
> >
> >There's another issue with this applied:
> >
> >Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb:
> >mmc@8804000: Unevaluated properties are not allowed
> >('operating-points-v2' was unexpected)
> >
> >Should just need a 'operating-points-v2: true' line.
> >
> >This won't show up until a fix for 'unevaluatedProperties' handling is
> >applied. But first I need all the issues fixed.
>
> Could you please add a dt-validate (?) argument so that we can validate new schemas with unevaluatedProperties working as expected, while keeping default behaviour intact (while it gets sorted out)?
>

I think that wouldn't work well because the schemas have to be
reprocessed when such an option changes. Though kbuild does look for
command line changes...

In any case, I'm going to commit this to the main branch in a few
days. There aren't many warnings left.

Rob
Dmitry Baryshkov July 2, 2022, 3:59 p.m. UTC | #5
On 2 July 2022 18:22:19 GMT+03:00, Rob Herring <robh@kernel.org> wrote:
>On Sat, Jul 2, 2022 at 3:14 AM Dmitry Baryshkov
><dmitry.baryshkov@linaro.org> wrote:
>>
>>
>>
>> On 2 July 2022 01:06:48 GMT+03:00, Rob Herring <robh@kernel.org> wrote:
>> >On Sat, May 14, 2022 at 4:01 PM Bhupesh Sharma
>> ><bhupesh.sharma@linaro.org> wrote:
>> >>
>> >> Rob pointed some remaining issues in the sdhci-msm yaml
>> >> bindings (via [1]).
>> >>
>> >> Fix the same by first using the 'mmc-controller.yaml' as
>> >> 'ref' and thereafter also fix the issues reported by
>> >> 'make dtbs_check' check.
>> >>
>> >> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
>> >>
>> >> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
>> >> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> >> Cc: Rob Herring <robh@kernel.org>
>> >> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> >> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>> >> ---
>> >> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
>> >> -> This patch is rebased on 'linux-next/master'
>> >>
>> >>  .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
>> >>  1 file changed, 44 insertions(+), 8 deletions(-)
>> >
>> >There's another issue with this applied:
>> >
>> >Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb:
>> >mmc@8804000: Unevaluated properties are not allowed
>> >('operating-points-v2' was unexpected)
>> >
>> >Should just need a 'operating-points-v2: true' line.
>> >
>> >This won't show up until a fix for 'unevaluatedProperties' handling is
>> >applied. But first I need all the issues fixed.
>>
>> Could you please add a dt-validate (?) argument so that we can validate new schemas with unevaluatedProperties working as expected, while keeping default behaviour intact (while it gets sorted out)?
>>
>
>I think that wouldn't work well because the schemas have to be
>reprocessed when such an option changes. Though kbuild does look for
>command line changes...
>
>In any case, I'm going to commit this to the main branch in a few
>days. There aren't many warnings left.

Ack, thanks for the explanation.
Bhupesh Sharma July 25, 2022, 8:32 p.m. UTC | #6
Hi Rob,

On 7/2/22 3:36 AM, Rob Herring wrote:
> On Sat, May 14, 2022 at 4:01 PM Bhupesh Sharma
> <bhupesh.sharma@linaro.org> wrote:
>>
>> Rob pointed some remaining issues in the sdhci-msm yaml
>> bindings (via [1]).
>>
>> Fix the same by first using the 'mmc-controller.yaml' as
>> 'ref' and thereafter also fix the issues reported by
>> 'make dtbs_check' check.
>>
>> [1]. https://lore.kernel.org/linux-arm-msm/YnLmNCwNfoqZln12@robh.at.kernel.org/
>>
>> Fixes: a45537723f4b ("dt-bindings: mmc: sdhci-msm: Convert bindings to yaml")
>> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
>> ---
>> -> This patch uses the dts changes sent (here: https://lore.kernel.org/linux-arm-msm/20220514215424.1007718-1-bhupesh.sharma@linaro.org/), for fixing the dtbs_check errors.
>> -> This patch is rebased on 'linux-next/master'
>>
>>   .../devicetree/bindings/mmc/sdhci-msm.yaml    | 52 ++++++++++++++++---
>>   1 file changed, 44 insertions(+), 8 deletions(-)
> 
> There's another issue with this applied:
> 
> Documentation/devicetree/bindings/mmc/sdhci-msm.example.dtb:
> mmc@8804000: Unevaluated properties are not allowed
> ('operating-points-v2' was unexpected)
> 
> Should just need a 'operating-points-v2: true' line.
> 
> This won't show up until a fix for 'unevaluatedProperties' handling is
> applied. But first I need all the issues fixed.

Sorry, I totally missed this comment. I have sent a fix for the same via 
[1]. Please help review the same.

Thanks

[1]. 
https://lore.kernel.org/linux-arm-msm/20220725202709.2861789-1-bhupesh.sharma@linaro.org/
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
index e4236334e748..31a3ce208e1a 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
+++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
@@ -17,6 +17,9 @@  description:
 properties:
   compatible:
     oneOf:
+      - enum:
+          - qcom,sdhci-msm-v4
+        deprecated: true
       - items:
           - enum:
               - qcom,apq8084-sdhci
@@ -27,6 +30,9 @@  properties:
               - qcom,msm8992-sdhci
               - qcom,msm8994-sdhci
               - qcom,msm8996-sdhci
+          - const: qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
+      - items:
+          - enum:
               - qcom,qcs404-sdhci
               - qcom,sc7180-sdhci
               - qcom,sc7280-sdhci
@@ -38,12 +44,7 @@  properties:
               - qcom,sm6350-sdhci
               - qcom,sm8150-sdhci
               - qcom,sm8250-sdhci
-          - enum:
-              - qcom,sdhci-msm-v4 # for sdcc versions less than 5.0
-              - qcom,sdhci-msm-v5 # for sdcc version 5.0
-      - items:
-          - const: qcom,sdhci-msm-v4 # Deprecated (only for backward compatibility)
-                                     # for sdcc versions less than 5.0
+          - const: qcom,sdhci-msm-v5 # for sdcc version 5.0
 
   reg:
     minItems: 1
@@ -53,6 +54,28 @@  properties:
       - description: CQE register map
       - description: Inline Crypto Engine register map
 
+  reg-names:
+    minItems: 1
+    maxItems: 4
+    oneOf:
+      - items:
+          - const: hc_mem
+      - items:
+          - const: hc_mem
+          - const: core_mem
+      - items:
+          - const: hc_mem
+          - const: cqe_mem
+      - items:
+          - const: hc_mem
+          - const: cqe_mem
+          - const: ice_mem
+      - items:
+          - const: hc_mem
+          - const: core_mem
+          - const: cqe_mem
+          - const: ice_mem
+
   clocks:
     minItems: 3
     items:
@@ -121,6 +144,16 @@  properties:
     description: A phandle to sdhci power domain node
     maxItems: 1
 
+  mmc-ddr-1_8v: true
+
+  mmc-hs200-1_8v: true
+
+  mmc-hs400-1_8v: true
+
+  bus-width: true
+
+  max-frequency: true
+
 patternProperties:
   '^opp-table(-[a-z0-9]+)?$':
     if:
@@ -140,7 +173,10 @@  required:
   - clock-names
   - interrupts
 
-additionalProperties: true
+allOf:
+  - $ref: mmc-controller.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
@@ -149,7 +185,7 @@  examples:
     #include <dt-bindings/clock/qcom,rpmh.h>
     #include <dt-bindings/power/qcom-rpmpd.h>
 
-    sdhc_2: sdhci@8804000 {
+    sdhc_2: mmc@8804000 {
       compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5";
       reg = <0 0x08804000 0 0x1000>;