spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Sun, 13 Jun 2021 21:43:17 +0000 (06:43 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 25 Jun 2021 11:26:48 +0000 (12:26 +0100)
Convert spi for Xilinx Zynq UltraScale+ MPSoC GQSPI bindings
documentation to YAML.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210613214317.296667-1-iwamatsu@nigauri.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt [deleted file]
Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt b/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt
deleted file mode 100644 (file)
index 0f6d37f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Xilinx Zynq UltraScale+ MPSoC GQSPI controller Device Tree Bindings
--------------------------------------------------------------------
-
-Required properties:
-- compatible           : Should be "xlnx,zynqmp-qspi-1.0".
-- reg                  : Physical base address and size of GQSPI registers map.
-- interrupts           : Property with a value describing the interrupt
-                         number.
-- clock-names          : List of input clock names - "ref_clk", "pclk"
-                         (See clock bindings for details).
-- clocks               : Clock phandles (see clock bindings for details).
-
-Optional properties:
-- num-cs               : Number of chip selects used.
-
-Example:
-       qspi: spi@ff0f0000 {
-               compatible = "xlnx,zynqmp-qspi-1.0";
-               clock-names = "ref_clk", "pclk";
-               clocks = <&misc_clk &misc_clk>;
-               interrupts = <0 15 4>;
-               interrupt-parent = <&gic>;
-               num-cs = <1>;
-               reg = <0x0 0xff0f0000 0x1000>,<0x0 0xc0000000 0x8000000>;
-       };
diff --git a/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.yaml b/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.yaml
new file mode 100644 (file)
index 0000000..ea72c80
--- /dev/null
@@ -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-zynqmp-qspi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx Zynq UltraScale+ MPSoC GQSPI controller Device Tree Bindings
+
+maintainers:
+  - Michal Simek <michal.simek@xilinx.com>
+
+allOf:
+  - $ref: "spi-controller.yaml#"
+
+properties:
+  compatible:
+    const: xlnx,zynqmp-qspi-1.0
+
+  reg:
+    maxItems: 2
+
+  interrupts:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ref_clk
+      - const: pclk
+
+  clocks:
+    maxItems: 2
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/xlnx-zynqmp-clk.h>
+    soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      qspi: spi@ff0f0000 {
+        compatible = "xlnx,zynqmp-qspi-1.0";
+        clocks = <&zynqmp_clk QSPI_REF>, <&zynqmp_clk LPD_LSBUS>;
+        clock-names = "ref_clk", "pclk";
+        interrupts = <0 15 4>;
+        interrupt-parent = <&gic>;
+        reg = <0x0 0xff0f0000 0x0 0x1000>,
+              <0x0 0xc0000000 0x0 0x8000000>;
+      };
+    };