All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml
@ 2022-02-10  9:44 Corentin Labbe
  2022-02-10  9:58 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Corentin Labbe @ 2022-02-10  9:44 UTC (permalink / raw)
  To: damien.lemoal, krzysztof.kozlowski, robh+dt
  Cc: devicetree, linux-ide, linux-kernel, Corentin Labbe, Linus Walleij

This patch converts ata/cortina,gemini-sata-bridge binding to yaml

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
Change since v1:
- fixed cosmetic nits reported by Damien Le Moal
Changes since v2:
- Added blank lines between properties
- Removed useless quotes and label
- Re-indented description

 .../ata/cortina,gemini-sata-bridge.txt        |  55 ---------
 .../ata/cortina,gemini-sata-bridge.yaml       | 107 ++++++++++++++++++
 2 files changed, 107 insertions(+), 55 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
 create mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml

diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
deleted file mode 100644
index 1c3d3cc70051..000000000000
--- a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-* Cortina Systems Gemini SATA Bridge
-
-The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
-takes two Faraday Technology FTIDE010 PATA controllers and bridges
-them in different configurations to two SATA ports.
-
-Required properties:
-- compatible: should be
-  "cortina,gemini-sata-bridge"
-- reg: registers and size for the block
-- resets: phandles to the reset lines for both SATA bridges
-- reset-names: must be "sata0", "sata1"
-- clocks: phandles to the compulsory peripheral clocks
-- clock-names: must be "SATA0_PCLK", "SATA1_PCLK"
-- syscon: a phandle to the global Gemini system controller
-- cortina,gemini-ata-muxmode: tell the desired multiplexing mode for
-  the ATA controller and SATA bridges. Values 0..3:
-  Mode 0: ata0 master <-> sata0
-          ata1 master <-> sata1
-          ata0 slave interface brought out on IDE pads
-  Mode 1: ata0 master <-> sata0
-          ata1 master <-> sata1
-          ata1 slave interface brought out on IDE pads
-  Mode 2: ata1 master <-> sata1
-          ata1 slave  <-> sata0
-          ata0 master and slave interfaces brought out
-               on IDE pads
-  Mode 3: ata0 master <-> sata0
-          ata0 slave  <-> sata1
-          ata1 master and slave interfaces brought out
-               on IDE pads
-
-Optional boolean properties:
-- cortina,gemini-enable-ide-pins: enables the PATA to IDE connection.
-  The muxmode setting decides whether ATA0 or ATA1 is brought out,
-  and whether master, slave or both interfaces get brought out.
-- cortina,gemini-enable-sata-bridge: enables the PATA to SATA bridge
-  inside the Gemnini SoC. The Muxmode decides what PATA blocks will
-  be muxed out and how.
-
-Example:
-
-sata: sata@46000000 {
-	compatible = "cortina,gemini-sata-bridge";
-	reg = <0x46000000 0x100>;
-	resets = <&rcon 26>, <&rcon 27>;
-	reset-names = "sata0", "sata1";
-	clocks = <&gcc GEMINI_CLK_GATE_SATA0>,
-		 <&gcc GEMINI_CLK_GATE_SATA1>;
-	clock-names = "SATA0_PCLK", "SATA1_PCLK";
-	syscon = <&syscon>;
-	cortina,gemini-ata-muxmode = <3>;
-	cortina,gemini-enable-ide-pins;
-	cortina,gemini-enable-sata-bridge;
-};
diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
new file mode 100644
index 000000000000..f0fad63bb1af
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cortina Systems Gemini SATA Bridge
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+description: |
+    The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
+    takes two Faraday Technology FTIDE010 PATA controllers and bridges
+    them in different configurations to two SATA ports.
+
+properties:
+  compatible:
+    const: cortina,gemini-sata-bridge
+
+  reg:
+    minItems: 1
+
+  resets:
+    minItems: 2
+    description: phandles to the reset lines for both SATA bridges
+
+  reset-names:
+    items:
+      - const: sata0
+      - const: sata1
+
+  clocks:
+    minItems: 2
+    description: phandles to the compulsory peripheral clocks
+
+  clock-names:
+    items:
+      - const: SATA0_PCLK
+      - const: SATA1_PCLK
+
+  syscon:
+    minItems: 1
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: a phandle to the global Gemini system controller
+
+  cortina,gemini-ata-muxmode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum:
+      - 0
+      - 1
+      - 2
+      - 3
+    description: |
+      Tell the desired multiplexing mode for the ATA controller and SATA bridges. Values 0..3:
+      Mode 0: ata0 master <-> sata0
+              ata1 master <-> sata1
+              ata0 slave interface brought out on IDE pads
+      Mode 1: ata0 master <-> sata0
+              ata1 master <-> sata1
+              ata1 slave interface brought out on IDE pads
+      Mode 2: ata1 master <-> sata1
+              ata1 slave  <-> sata0
+              ata0 master and slave interfaces brought out on IDE pads
+      Mode 3: ata0 master <-> sata0
+              ata0 slave  <-> sata1
+              ata1 master and slave interfaces brought out on IDE pads
+
+  cortina,gemini-enable-ide-pins:
+    type: boolean
+    description: Enables the PATA to IDE connection.
+      The muxmode setting decides whether ATA0 or ATA1 is brought out,
+      and whether master, slave or both interfaces get brought out.
+
+  cortina,gemini-enable-sata-bridge:
+    type: boolean
+    description: Enables the PATA to SATA bridge inside the Gemnini SoC.
+      The Muxmode decides what PATA blocks will be muxed out and how.
+
+required:
+  - clocks
+  - clock-names
+  - cortina,gemini-ata-muxmode
+  - resets
+  - reset-names
+  - compatible
+  - reg
+  - syscon
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/cortina,gemini-clock.h>
+    sata@46000000 {
+      compatible = "cortina,gemini-sata-bridge";
+      reg = <0x46000000 0x100>;
+      resets = <&rcon 26>, <&rcon 27>;
+      reset-names = "sata0", "sata1";
+      clocks = <&gcc GEMINI_CLK_GATE_SATA0>,
+               <&gcc GEMINI_CLK_GATE_SATA1>;
+      clock-names = "SATA0_PCLK", "SATA1_PCLK";
+      syscon = <&syscon>;
+      cortina,gemini-ata-muxmode = <3>;
+      cortina,gemini-enable-ide-pins;
+      cortina,gemini-enable-sata-bridge;
+    };
-- 
2.34.1


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

* Re: [PATCH v3] dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml
  2022-02-10  9:44 [PATCH v3] dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml Corentin Labbe
@ 2022-02-10  9:58 ` Krzysztof Kozlowski
  2022-02-10 13:22   ` LABBE Corentin
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-10  9:58 UTC (permalink / raw)
  To: Corentin Labbe, damien.lemoal, robh+dt
  Cc: devicetree, linux-ide, linux-kernel, Linus Walleij

On 10/02/2022 10:44, Corentin Labbe wrote:
> This patch converts ata/cortina,gemini-sata-bridge binding to yaml
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> Change since v1:
> - fixed cosmetic nits reported by Damien Le Moal
> Changes since v2:
> - Added blank lines between properties
> - Removed useless quotes and label
> - Re-indented description
> 
>  .../ata/cortina,gemini-sata-bridge.txt        |  55 ---------
>  .../ata/cortina,gemini-sata-bridge.yaml       | 107 ++++++++++++++++++
>  2 files changed, 107 insertions(+), 55 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
>  create mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> 
> diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
> deleted file mode 100644
> index 1c3d3cc70051..000000000000
> --- a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -* Cortina Systems Gemini SATA Bridge
> -
> -The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
> -takes two Faraday Technology FTIDE010 PATA controllers and bridges
> -them in different configurations to two SATA ports.
> -
> -Required properties:
> -- compatible: should be
> -  "cortina,gemini-sata-bridge"
> -- reg: registers and size for the block
> -- resets: phandles to the reset lines for both SATA bridges
> -- reset-names: must be "sata0", "sata1"
> -- clocks: phandles to the compulsory peripheral clocks
> -- clock-names: must be "SATA0_PCLK", "SATA1_PCLK"
> -- syscon: a phandle to the global Gemini system controller
> -- cortina,gemini-ata-muxmode: tell the desired multiplexing mode for
> -  the ATA controller and SATA bridges. Values 0..3:
> -  Mode 0: ata0 master <-> sata0
> -          ata1 master <-> sata1
> -          ata0 slave interface brought out on IDE pads
> -  Mode 1: ata0 master <-> sata0
> -          ata1 master <-> sata1
> -          ata1 slave interface brought out on IDE pads
> -  Mode 2: ata1 master <-> sata1
> -          ata1 slave  <-> sata0
> -          ata0 master and slave interfaces brought out
> -               on IDE pads
> -  Mode 3: ata0 master <-> sata0
> -          ata0 slave  <-> sata1
> -          ata1 master and slave interfaces brought out
> -               on IDE pads
> -
> -Optional boolean properties:
> -- cortina,gemini-enable-ide-pins: enables the PATA to IDE connection.
> -  The muxmode setting decides whether ATA0 or ATA1 is brought out,
> -  and whether master, slave or both interfaces get brought out.
> -- cortina,gemini-enable-sata-bridge: enables the PATA to SATA bridge
> -  inside the Gemnini SoC. The Muxmode decides what PATA blocks will
> -  be muxed out and how.
> -
> -Example:
> -
> -sata: sata@46000000 {
> -	compatible = "cortina,gemini-sata-bridge";
> -	reg = <0x46000000 0x100>;
> -	resets = <&rcon 26>, <&rcon 27>;
> -	reset-names = "sata0", "sata1";
> -	clocks = <&gcc GEMINI_CLK_GATE_SATA0>,
> -		 <&gcc GEMINI_CLK_GATE_SATA1>;
> -	clock-names = "SATA0_PCLK", "SATA1_PCLK";
> -	syscon = <&syscon>;
> -	cortina,gemini-ata-muxmode = <3>;
> -	cortina,gemini-enable-ide-pins;
> -	cortina,gemini-enable-sata-bridge;
> -};
> diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> new file mode 100644
> index 000000000000..f0fad63bb1af
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> @@ -0,0 +1,107 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cortina Systems Gemini SATA Bridge
> +
> +maintainers:
> +  - Linus Walleij <linus.walleij@linaro.org>
> +
> +description: |
> +    The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
> +    takes two Faraday Technology FTIDE010 PATA controllers and bridges
> +    them in different configurations to two SATA ports.
> +
> +properties:
> +  compatible:
> +    const: cortina,gemini-sata-bridge
> +
> +  reg:
> +    minItems: 1

maxItems? Why min?

> +
> +  resets:
> +    minItems: 2
> +    description: phandles to the reset lines for both SATA bridges

min+maxItems

> +
> +  reset-names:
> +    items:
> +      - const: sata0
> +      - const: sata1
> +
> +  clocks:
> +    minItems: 2
> +    description: phandles to the compulsory peripheral clocks

min+maxItems

> +
> +  clock-names:
> +    items:
> +      - const: SATA0_PCLK
> +      - const: SATA1_PCLK
> +
> +  syscon:
> +    minItems: 1

maxItems


Best regards,
Krzysztof

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

* Re: [PATCH v3] dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml
  2022-02-10  9:58 ` Krzysztof Kozlowski
@ 2022-02-10 13:22   ` LABBE Corentin
  0 siblings, 0 replies; 3+ messages in thread
From: LABBE Corentin @ 2022-02-10 13:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: damien.lemoal, robh+dt, devicetree, linux-ide, linux-kernel,
	Linus Walleij

Le Thu, Feb 10, 2022 at 10:58:39AM +0100, Krzysztof Kozlowski a écrit :
> On 10/02/2022 10:44, Corentin Labbe wrote:
> > This patch converts ata/cortina,gemini-sata-bridge binding to yaml
> > 
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> > Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> > Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> > ---
> > Change since v1:
> > - fixed cosmetic nits reported by Damien Le Moal
> > Changes since v2:
> > - Added blank lines between properties
> > - Removed useless quotes and label
> > - Re-indented description
> > 
> >  .../ata/cortina,gemini-sata-bridge.txt        |  55 ---------
> >  .../ata/cortina,gemini-sata-bridge.yaml       | 107 ++++++++++++++++++
> >  2 files changed, 107 insertions(+), 55 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
> >  create mode 100644 Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
> > deleted file mode 100644
> > index 1c3d3cc70051..000000000000
> > --- a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
> > +++ /dev/null
> > @@ -1,55 +0,0 @@
> > -* Cortina Systems Gemini SATA Bridge
> > -
> > -The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
> > -takes two Faraday Technology FTIDE010 PATA controllers and bridges
> > -them in different configurations to two SATA ports.
> > -
> > -Required properties:
> > -- compatible: should be
> > -  "cortina,gemini-sata-bridge"
> > -- reg: registers and size for the block
> > -- resets: phandles to the reset lines for both SATA bridges
> > -- reset-names: must be "sata0", "sata1"
> > -- clocks: phandles to the compulsory peripheral clocks
> > -- clock-names: must be "SATA0_PCLK", "SATA1_PCLK"
> > -- syscon: a phandle to the global Gemini system controller
> > -- cortina,gemini-ata-muxmode: tell the desired multiplexing mode for
> > -  the ATA controller and SATA bridges. Values 0..3:
> > -  Mode 0: ata0 master <-> sata0
> > -          ata1 master <-> sata1
> > -          ata0 slave interface brought out on IDE pads
> > -  Mode 1: ata0 master <-> sata0
> > -          ata1 master <-> sata1
> > -          ata1 slave interface brought out on IDE pads
> > -  Mode 2: ata1 master <-> sata1
> > -          ata1 slave  <-> sata0
> > -          ata0 master and slave interfaces brought out
> > -               on IDE pads
> > -  Mode 3: ata0 master <-> sata0
> > -          ata0 slave  <-> sata1
> > -          ata1 master and slave interfaces brought out
> > -               on IDE pads
> > -
> > -Optional boolean properties:
> > -- cortina,gemini-enable-ide-pins: enables the PATA to IDE connection.
> > -  The muxmode setting decides whether ATA0 or ATA1 is brought out,
> > -  and whether master, slave or both interfaces get brought out.
> > -- cortina,gemini-enable-sata-bridge: enables the PATA to SATA bridge
> > -  inside the Gemnini SoC. The Muxmode decides what PATA blocks will
> > -  be muxed out and how.
> > -
> > -Example:
> > -
> > -sata: sata@46000000 {
> > -	compatible = "cortina,gemini-sata-bridge";
> > -	reg = <0x46000000 0x100>;
> > -	resets = <&rcon 26>, <&rcon 27>;
> > -	reset-names = "sata0", "sata1";
> > -	clocks = <&gcc GEMINI_CLK_GATE_SATA0>,
> > -		 <&gcc GEMINI_CLK_GATE_SATA1>;
> > -	clock-names = "SATA0_PCLK", "SATA1_PCLK";
> > -	syscon = <&syscon>;
> > -	cortina,gemini-ata-muxmode = <3>;
> > -	cortina,gemini-enable-ide-pins;
> > -	cortina,gemini-enable-sata-bridge;
> > -};
> > diff --git a/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> > new file mode 100644
> > index 000000000000..f0fad63bb1af
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
> > @@ -0,0 +1,107 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Cortina Systems Gemini SATA Bridge
> > +
> > +maintainers:
> > +  - Linus Walleij <linus.walleij@linaro.org>
> > +
> > +description: |
> > +    The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
> > +    takes two Faraday Technology FTIDE010 PATA controllers and bridges
> > +    them in different configurations to two SATA ports.
> > +
> > +properties:
> > +  compatible:
> > +    const: cortina,gemini-sata-bridge
> > +
> > +  reg:
> > +    minItems: 1
> 
> maxItems? Why min?
> 
> > +
> > +  resets:
> > +    minItems: 2
> > +    description: phandles to the reset lines for both SATA bridges
> 
> min+maxItems
> 
> > +
> > +  reset-names:
> > +    items:
> > +      - const: sata0
> > +      - const: sata1
> > +
> > +  clocks:
> > +    minItems: 2
> > +    description: phandles to the compulsory peripheral clocks
> 
> min+maxItems
> 
> > +
> > +  clock-names:
> > +    items:
> > +      - const: SATA0_PCLK
> > +      - const: SATA1_PCLK
> > +
> > +  syscon:
> > +    minItems: 1
> 
> maxItems
> 

Hello

I will fix them in v4.

Thanks
Regards

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

end of thread, other threads:[~2022-02-10 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  9:44 [PATCH v3] dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml Corentin Labbe
2022-02-10  9:58 ` Krzysztof Kozlowski
2022-02-10 13:22   ` LABBE Corentin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.