devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema
@ 2024-11-13 22:56 Rob Herring (Arm)
  2024-11-14 20:02 ` Conor Dooley
  2024-12-02 15:23 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2024-11-13 22:56 UTC (permalink / raw)
  To: Hu Ziji, Ulf Hansson, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-mmc, devicetree, linux-kernel

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) <robh@kernel.org>
---
 .../bindings/mmc/marvell,xenon-sdhci.yaml     | 48 +++++++++----------
 1 file changed, 22 insertions(+), 26 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
index cfe6237716f4..3f48d8292d5b 100644
--- a/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
@@ -38,15 +38,9 @@ properties:
 
   reg:
     minItems: 1
-    maxItems: 2
-    description: |
-      For "marvell,armada-3700-sdhci", two register areas.  The first one
-      for Xenon IP register. The second one for the Armada 3700 SoC PHY PAD
-      Voltage Control register.  Please follow the examples with compatible
-      "marvell,armada-3700-sdhci" in below.
-      Please also check property marvell,pad-type in below.
-
-      For other compatible strings, one register area for Xenon IP.
+    items:
+      - description: Xenon IP registers
+      - description: Armada 3700 SoC PHY PAD Voltage Control register
 
   clocks:
     minItems: 1
@@ -61,6 +55,17 @@ properties:
   interrupts:
     maxItems: 1
 
+  marvell,pad-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    enum:
+      - sd
+      - fixed-1-8v
+    description:
+      Type of Armada 3700 SoC PHY PAD Voltage Controller register. If "sd" is
+      selected, SoC PHY PAD is set as 3.3V at the beginning and is switched to
+      1.8V when later in higher speed mode. If "fixed-1-8v" is selected, SoC PHY
+      PAD is fixed 1.8V, such as for eMMC.
+
   marvell,xenon-sdhc-id:
     $ref: /schemas/types.yaml#/definitions/uint32
     minimum: 0
@@ -147,27 +152,18 @@ allOf:
     then:
       properties:
         reg:
-          items:
-            - description: Xenon IP registers
-            - description: Armada 3700 SoC PHY PAD Voltage Control register
-
-        marvell,pad-type:
-          $ref: /schemas/types.yaml#/definitions/string
-          enum:
-            - sd
-            - fixed-1-8v
-          description: |
-            Type of Armada 3700 SoC PHY PAD Voltage Controller register.
-            If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning
-            and is switched to 1.8V when later in higher speed mode.
-            If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for
-            eMMC.
-            Please follow the examples with compatible
-            "marvell,armada-3700-sdhci" in below.
+          minItems: 2
 
       required:
         - marvell,pad-type
 
+    else:
+      properties:
+        reg:
+          maxItems: 1
+
+        marvell,pad-type: false
+
   - if:
       properties:
         compatible:
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema
  2024-11-13 22:56 [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema Rob Herring (Arm)
@ 2024-11-14 20:02 ` Conor Dooley
  2024-12-02 15:23 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2024-11-14 20:02 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Hu Ziji, Ulf Hansson, Krzysztof Kozlowski, Conor Dooley,
	linux-mmc, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

On Wed, Nov 13, 2024 at 04:56:01PM -0600, Rob Herring (Arm) wrote:
> 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) <robh@kernel.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema
  2024-11-13 22:56 [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema Rob Herring (Arm)
  2024-11-14 20:02 ` Conor Dooley
@ 2024-12-02 15:23 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2024-12-02 15:23 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Hu Ziji, Krzysztof Kozlowski, Conor Dooley, linux-mmc, devicetree,
	linux-kernel

On Wed, 13 Nov 2024 at 23:56, Rob Herring (Arm) <robh@kernel.org> wrote:
>
> 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) <robh@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  .../bindings/mmc/marvell,xenon-sdhci.yaml     | 48 +++++++++----------
>  1 file changed, 22 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
> index cfe6237716f4..3f48d8292d5b 100644
> --- a/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml
> @@ -38,15 +38,9 @@ properties:
>
>    reg:
>      minItems: 1
> -    maxItems: 2
> -    description: |
> -      For "marvell,armada-3700-sdhci", two register areas.  The first one
> -      for Xenon IP register. The second one for the Armada 3700 SoC PHY PAD
> -      Voltage Control register.  Please follow the examples with compatible
> -      "marvell,armada-3700-sdhci" in below.
> -      Please also check property marvell,pad-type in below.
> -
> -      For other compatible strings, one register area for Xenon IP.
> +    items:
> +      - description: Xenon IP registers
> +      - description: Armada 3700 SoC PHY PAD Voltage Control register
>
>    clocks:
>      minItems: 1
> @@ -61,6 +55,17 @@ properties:
>    interrupts:
>      maxItems: 1
>
> +  marvell,pad-type:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    enum:
> +      - sd
> +      - fixed-1-8v
> +    description:
> +      Type of Armada 3700 SoC PHY PAD Voltage Controller register. If "sd" is
> +      selected, SoC PHY PAD is set as 3.3V at the beginning and is switched to
> +      1.8V when later in higher speed mode. If "fixed-1-8v" is selected, SoC PHY
> +      PAD is fixed 1.8V, such as for eMMC.
> +
>    marvell,xenon-sdhc-id:
>      $ref: /schemas/types.yaml#/definitions/uint32
>      minimum: 0
> @@ -147,27 +152,18 @@ allOf:
>      then:
>        properties:
>          reg:
> -          items:
> -            - description: Xenon IP registers
> -            - description: Armada 3700 SoC PHY PAD Voltage Control register
> -
> -        marvell,pad-type:
> -          $ref: /schemas/types.yaml#/definitions/string
> -          enum:
> -            - sd
> -            - fixed-1-8v
> -          description: |
> -            Type of Armada 3700 SoC PHY PAD Voltage Controller register.
> -            If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning
> -            and is switched to 1.8V when later in higher speed mode.
> -            If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for
> -            eMMC.
> -            Please follow the examples with compatible
> -            "marvell,armada-3700-sdhci" in below.
> +          minItems: 2
>
>        required:
>          - marvell,pad-type
>
> +    else:
> +      properties:
> +        reg:
> +          maxItems: 1
> +
> +        marvell,pad-type: false
> +
>    - if:
>        properties:
>          compatible:
> --
> 2.45.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-02 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13 22:56 [PATCH] dt-bindings: mmc: marvell,xenon-sdhci: Simplify Armada 3700 if/then schema Rob Herring (Arm)
2024-11-14 20:02 ` Conor Dooley
2024-12-02 15:23 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).