OSDN Git Service

dt-bindings: PCI: Convert Arm Versatile binding to DT schema
authorRob Herring <robh@kernel.org>
Fri, 8 Nov 2019 19:18:29 +0000 (13:18 -0600)
committerRob Herring <robh@kernel.org>
Thu, 23 Jan 2020 21:03:55 +0000 (15:03 -0600)
Convert the Arm Versatile PCI host binding to a DT schema.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Andrew Murray <andrew.murray@arm.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/pci/versatile.txt [deleted file]
Documentation/devicetree/bindings/pci/versatile.yaml [new file with mode: 0644]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/pci/versatile.txt b/Documentation/devicetree/bindings/pci/versatile.txt
deleted file mode 100644 (file)
index 0a702b1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-* ARM Versatile Platform Baseboard PCI interface
-
-PCI host controller found on the ARM Versatile PB board's FPGA.
-
-Required properties:
-- compatible: should contain "arm,versatile-pci" to identify the Versatile PCI
-  controller.
-- reg: base addresses and lengths of the PCI controller. There must be 3
-  entries:
-       - Versatile-specific registers
-       - Self Config space
-       - Config space
-- #address-cells: set to <3>
-- #size-cells: set to <2>
-- device_type: set to "pci"
-- bus-range: set to <0 0xff>
-- ranges: ranges for the PCI memory and I/O regions
-- #interrupt-cells: set to <1>
-- interrupt-map-mask and interrupt-map: standard PCI properties to define
-       the mapping of the PCI interface to interrupt numbers.
-
-Example:
-
-pci-controller@10001000 {
-       compatible = "arm,versatile-pci";
-       device_type = "pci";
-       reg = <0x10001000 0x1000
-              0x41000000 0x10000
-              0x42000000 0x100000>;
-       bus-range = <0 0xff>;
-       #address-cells = <3>;
-       #size-cells = <2>;
-       #interrupt-cells = <1>;
-
-       ranges = <0x01000000 0 0x00000000 0x43000000 0 0x00010000   /* downstream I/O */
-                 0x02000000 0 0x50000000 0x50000000 0 0x10000000   /* non-prefetchable memory */
-                 0x42000000 0 0x60000000 0x60000000 0 0x10000000>; /* prefetchable memory */
-
-       interrupt-map-mask = <0x1800 0 0 7>;
-       interrupt-map = <0x1800 0 0 1 &sic 28
-                        0x1800 0 0 2 &sic 29
-                        0x1800 0 0 3 &sic 30
-                        0x1800 0 0 4 &sic 27
-
-                        0x1000 0 0 1 &sic 27
-                        0x1000 0 0 2 &sic 28
-                        0x1000 0 0 3 &sic 29
-                        0x1000 0 0 4 &sic 30
-
-                        0x0800 0 0 1 &sic 30
-                        0x0800 0 0 2 &sic 27
-                        0x0800 0 0 3 &sic 28
-                        0x0800 0 0 4 &sic 29
-
-                        0x0000 0 0 1 &sic 29
-                        0x0000 0 0 2 &sic 30
-                        0x0000 0 0 3 &sic 27
-                        0x0000 0 0 4 &sic 28>;
-};
diff --git a/Documentation/devicetree/bindings/pci/versatile.yaml b/Documentation/devicetree/bindings/pci/versatile.yaml
new file mode 100644 (file)
index 0000000..07a48c2
--- /dev/null
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/versatile.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM Versatile Platform Baseboard PCI interface
+
+maintainers:
+  - Rob Herring <robh@kernel.org>
+
+description: |+
+  PCI host controller found on the ARM Versatile PB board's FPGA.
+
+allOf:
+  - $ref: /schemas/pci/pci-bus.yaml#
+
+properties:
+  compatible:
+    const: arm,versatile-pci
+
+  reg:
+    items:
+      - description: Versatile-specific registers
+      - description: Self Config space
+      - description: Config space
+
+  ranges:
+    maxItems: 3
+
+  "#interrupt-cells": true
+
+  interrupt-map:
+    maxItems: 16
+
+  interrupt-map-mask:
+    items:
+      - const: 0x1800
+      - const: 0
+      - const: 0
+      - const: 7
+
+required:
+  - compatible
+  - reg
+  - ranges
+  - "#interrupt-cells"
+  - interrupt-map
+  - interrupt-map-mask
+
+examples:
+  - |
+    pci@10001000 {
+      compatible = "arm,versatile-pci";
+      device_type = "pci";
+      reg = <0x10001000 0x1000>,
+            <0x41000000 0x10000>,
+            <0x42000000 0x100000>;
+      bus-range = <0 0xff>;
+      #address-cells = <3>;
+      #size-cells = <2>;
+      #interrupt-cells = <1>;
+
+      ranges =
+          <0x01000000 0 0x00000000 0x43000000 0 0x00010000>,  /* downstream I/O */
+          <0x02000000 0 0x50000000 0x50000000 0 0x10000000>,  /* non-prefetchable memory */
+          <0x42000000 0 0x60000000 0x60000000 0 0x10000000>;  /* prefetchable memory */
+
+      interrupt-map-mask = <0x1800 0 0 7>;
+      interrupt-map = <0x1800 0 0 1 &sic 28>,
+          <0x1800 0 0 2 &sic 29>,
+          <0x1800 0 0 3 &sic 30>,
+          <0x1800 0 0 4 &sic 27>,
+
+          <0x1000 0 0 1 &sic 27>,
+          <0x1000 0 0 2 &sic 28>,
+          <0x1000 0 0 3 &sic 29>,
+          <0x1000 0 0 4 &sic 30>,
+
+          <0x0800 0 0 1 &sic 30>,
+          <0x0800 0 0 2 &sic 27>,
+          <0x0800 0 0 3 &sic 28>,
+          <0x0800 0 0 4 &sic 29>,
+
+          <0x0000 0 0 1 &sic 29>,
+          <0x0000 0 0 2 &sic 30>,
+          <0x0000 0 0 3 &sic 27>,
+          <0x0000 0 0 4 &sic 28>;
+    };
+
+
+...
index f8d6e7e..69c9294 100644 (file)
@@ -12580,7 +12580,7 @@ M:      Rob Herring <robh@kernel.org>
 L:     linux-pci@vger.kernel.org
 L:     linux-arm-kernel@lists.infradead.org
 S:     Maintained
-F:     Documentation/devicetree/bindings/pci/versatile.txt
+F:     Documentation/devicetree/bindings/pci/versatile.yaml
 F:     drivers/pci/controller/pci-versatile.c
 
 PCI DRIVER FOR ARMADA 8K