linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: spi: xilinx: convert to yaml
@ 2021-05-31  5:21 Nobuhiro Iwamatsu
  2021-06-04 21:33 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2021-05-31  5:21 UTC (permalink / raw)
  To: Michal Simek, Rob Herring, Mark Brown
  Cc: linux-spi, devicetree, linux-arm-kernel, linux-kernel, Nobuhiro Iwamatsu

Convert SPI for Xilinx bindings documentation to YAML schemas.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 .../devicetree/bindings/spi/spi-xilinx.txt    | 23 ---------
 .../devicetree/bindings/spi/spi-xilinx.yaml   | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.txt
 create mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.yaml

diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.txt b/Documentation/devicetree/bindings/spi/spi-xilinx.txt
deleted file mode 100644
index 5f4ed3e5c9942c..00000000000000
--- a/Documentation/devicetree/bindings/spi/spi-xilinx.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Xilinx SPI controller Device Tree Bindings
--------------------------------------------------
-
-Required properties:
-- compatible		: Should be "xlnx,xps-spi-2.00.a", "xlnx,xps-spi-2.00.b" or "xlnx,axi-quad-spi-1.00.a"
-- reg			: Physical base address and size of SPI registers map.
-- interrupts		: Property with a value describing the interrupt
-			  number.
-
-Optional properties:
-- xlnx,num-ss-bits	 : Number of chip selects used.
-- xlnx,num-transfer-bits : Number of bits per transfer. This will be 8 if not specified
-
-Example:
-	axi_quad_spi@41e00000 {
-			compatible = "xlnx,xps-spi-2.00.a";
-			interrupt-parent = <&intc>;
-			interrupts = <0 31 1>;
-			reg = <0x41e00000 0x10000>;
-			xlnx,num-ss-bits = <0x1>;
-			xlnx,num-transfer-bits = <32>;
-	};
-
diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.yaml b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
new file mode 100644
index 00000000000000..17463151b36a02
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/spi-xilinx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx SPI controller Device Tree Bindings
+
+maintainers:
+  - Michal Simek <michal.simek@xilinx.com>
+
+allOf:
+  - $ref: "spi-controller.yaml#"
+
+properties:
+  compatible:
+    oneOf:
+      - const: xlnx,xps-spi-2.00.a
+      - const: xlnx,xps-spi-2.00.b
+      - const: xlnx,axi-quad-spi-1.00.a
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  xlnx,num-ss-bits:
+    description: Number of chip selects used.
+
+  xlnx,num-transfer-bits:
+    description: Number of bits per transfer. This will be 8 if not specified.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi0: spi@41e00000 {
+      compatible = "xlnx,xps-spi-2.00.a";
+      interrupt-parent = <&intc>;
+      interrupts = <0 31 1>;
+      reg = <0x41e00000 0x10000>;
+      xlnx,num-ss-bits = <0x1>;
+      xlnx,num-transfer-bits = <32>;
+    };
+...
-- 
2.30.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: spi: xilinx: convert to yaml
  2021-05-31  5:21 [PATCH] dt-bindings: spi: xilinx: convert to yaml Nobuhiro Iwamatsu
@ 2021-06-04 21:33 ` Rob Herring
  2021-06-05  0:18   ` Nobuhiro Iwamatsu
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2021-06-04 21:33 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu
  Cc: Michal Simek, Mark Brown, linux-spi, devicetree,
	linux-arm-kernel, linux-kernel

On Mon, May 31, 2021 at 02:21:42PM +0900, Nobuhiro Iwamatsu wrote:
> Convert SPI for Xilinx bindings documentation to YAML schemas.
> 
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> ---
>  .../devicetree/bindings/spi/spi-xilinx.txt    | 23 ---------
>  .../devicetree/bindings/spi/spi-xilinx.yaml   | 51 +++++++++++++++++++
>  2 files changed, 51 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.txt
>  create mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.txt b/Documentation/devicetree/bindings/spi/spi-xilinx.txt
> deleted file mode 100644
> index 5f4ed3e5c9942c..00000000000000
> --- a/Documentation/devicetree/bindings/spi/spi-xilinx.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -Xilinx SPI controller Device Tree Bindings
> --------------------------------------------------
> -
> -Required properties:
> -- compatible		: Should be "xlnx,xps-spi-2.00.a", "xlnx,xps-spi-2.00.b" or "xlnx,axi-quad-spi-1.00.a"
> -- reg			: Physical base address and size of SPI registers map.
> -- interrupts		: Property with a value describing the interrupt
> -			  number.
> -
> -Optional properties:
> -- xlnx,num-ss-bits	 : Number of chip selects used.
> -- xlnx,num-transfer-bits : Number of bits per transfer. This will be 8 if not specified
> -
> -Example:
> -	axi_quad_spi@41e00000 {
> -			compatible = "xlnx,xps-spi-2.00.a";
> -			interrupt-parent = <&intc>;
> -			interrupts = <0 31 1>;
> -			reg = <0x41e00000 0x10000>;
> -			xlnx,num-ss-bits = <0x1>;
> -			xlnx,num-transfer-bits = <32>;
> -	};
> -
> diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.yaml b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> new file mode 100644
> index 00000000000000..17463151b36a02
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/spi-xilinx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx SPI controller Device Tree Bindings
> +
> +maintainers:
> +  - Michal Simek <michal.simek@xilinx.com>
> +
> +allOf:
> +  - $ref: "spi-controller.yaml#"
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: xlnx,xps-spi-2.00.a
> +      - const: xlnx,xps-spi-2.00.b
> +      - const: xlnx,axi-quad-spi-1.00.a

Use enum instead of oneOf+const.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  xlnx,num-ss-bits:
> +    description: Number of chip selects used.

Constraints? 0-2^32 is good?

> +
> +  xlnx,num-transfer-bits:
> +    description: Number of bits per transfer. This will be 8 if not specified.

Constraints?

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    spi0: spi@41e00000 {
> +      compatible = "xlnx,xps-spi-2.00.a";
> +      interrupt-parent = <&intc>;
> +      interrupts = <0 31 1>;
> +      reg = <0x41e00000 0x10000>;
> +      xlnx,num-ss-bits = <0x1>;
> +      xlnx,num-transfer-bits = <32>;
> +    };
> +...
> -- 
> 2.30.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: spi: xilinx: convert to yaml
  2021-06-04 21:33 ` Rob Herring
@ 2021-06-05  0:18   ` Nobuhiro Iwamatsu
  0 siblings, 0 replies; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2021-06-05  0:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Michal Simek, Mark Brown, linux-spi, devicetree, linux ARM,
	Linux Kernel Mailing List

Hi,

Thanks for your review.

2021年6月5日(土) 6:33 Rob Herring <robh@kernel.org>:
>
> On Mon, May 31, 2021 at 02:21:42PM +0900, Nobuhiro Iwamatsu wrote:
> > Convert SPI for Xilinx bindings documentation to YAML schemas.
> >
> > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> > ---
> >  .../devicetree/bindings/spi/spi-xilinx.txt    | 23 ---------
> >  .../devicetree/bindings/spi/spi-xilinx.yaml   | 51 +++++++++++++++++++
> >  2 files changed, 51 insertions(+), 23 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.txt
> >  create mode 100644 Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.txt b/Documentation/devicetree/bindings/spi/spi-xilinx.txt
> > deleted file mode 100644
> > index 5f4ed3e5c9942c..00000000000000
> > --- a/Documentation/devicetree/bindings/spi/spi-xilinx.txt
> > +++ /dev/null
> > @@ -1,23 +0,0 @@
> > -Xilinx SPI controller Device Tree Bindings
> > --------------------------------------------------
> > -
> > -Required properties:
> > -- compatible         : Should be "xlnx,xps-spi-2.00.a", "xlnx,xps-spi-2.00.b" or "xlnx,axi-quad-spi-1.00.a"
> > -- reg                        : Physical base address and size of SPI registers map.
> > -- interrupts         : Property with a value describing the interrupt
> > -                       number.
> > -
> > -Optional properties:
> > -- xlnx,num-ss-bits    : Number of chip selects used.
> > -- xlnx,num-transfer-bits : Number of bits per transfer. This will be 8 if not specified
> > -
> > -Example:
> > -     axi_quad_spi@41e00000 {
> > -                     compatible = "xlnx,xps-spi-2.00.a";
> > -                     interrupt-parent = <&intc>;
> > -                     interrupts = <0 31 1>;
> > -                     reg = <0x41e00000 0x10000>;
> > -                     xlnx,num-ss-bits = <0x1>;
> > -                     xlnx,num-transfer-bits = <32>;
> > -     };
> > -
> > diff --git a/Documentation/devicetree/bindings/spi/spi-xilinx.yaml b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> > new file mode 100644
> > index 00000000000000..17463151b36a02
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/spi/spi-xilinx.yaml
> > @@ -0,0 +1,51 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/spi/spi-xilinx.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Xilinx SPI controller Device Tree Bindings
> > +
> > +maintainers:
> > +  - Michal Simek <michal.simek@xilinx.com>
> > +
> > +allOf:
> > +  - $ref: "spi-controller.yaml#"
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - const: xlnx,xps-spi-2.00.a
> > +      - const: xlnx,xps-spi-2.00.b
> > +      - const: xlnx,axi-quad-spi-1.00.a
>
> Use enum instead of oneOf+const.

OK, I will change using enum.

>
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  xlnx,num-ss-bits:
> > +    description: Number of chip selects used.
>
> Constraints? 0-2^32 is good?

I will add constraints.

>
> > +
> > +  xlnx,num-transfer-bits:
> > +    description: Number of bits per transfer. This will be 8 if not specified.
>
> Constraints?

Same above.

Best regards,
  Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-06-05  0:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  5:21 [PATCH] dt-bindings: spi: xilinx: convert to yaml Nobuhiro Iwamatsu
2021-06-04 21:33 ` Rob Herring
2021-06-05  0:18   ` Nobuhiro Iwamatsu

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).