[PATCH v2 01/12] dt-bindings: RTC: orion-rtc: Convert to DT schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert the text description to YAML. The clock is optional, Orion5x
based boards don't have it, but kirkwood should.

Signed-off-by: Andrew Lunn <andrew@xxxxxxx>
---
 .../bindings/rtc/marvell,orion-rtc.yaml       | 48 +++++++++++++++++++
 .../devicetree/bindings/rtc/orion-rtc.txt     | 18 -------
 2 files changed, 48 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/marvell,orion-rtc.yaml
 delete mode 100644 Documentation/devicetree/bindings/rtc/orion-rtc.txt

diff --git a/Documentation/devicetree/bindings/rtc/marvell,orion-rtc.yaml b/Documentation/devicetree/bindings/rtc/marvell,orion-rtc.yaml
new file mode 100644
index 000000000000..9e32f4a2fbc2
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/marvell,orion-rtc.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/marvell,orion-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MVEBU Orion RTC
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Andrew Lunn <andrew@xxxxxxx>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - marvell,orion-rtc
+      - items:
+          - enum:
+              - marvell,kirkwood-rtc
+          - const: marvell,orion-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@10300 {
+        compatible = "marvell,orion-rtc";
+        reg = <0xd0010300 0x20>;
+        interrupts = <50>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/rtc/orion-rtc.txt b/Documentation/devicetree/bindings/rtc/orion-rtc.txt
deleted file mode 100644
index 3bf63ffa5160..000000000000
--- a/Documentation/devicetree/bindings/rtc/orion-rtc.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-* Mvebu Real Time Clock
-
-RTC controller for the Kirkwood, the Dove, the Armada 370 and the
-Armada XP SoCs
-
-Required properties:
-- compatible : Should be "marvell,orion-rtc"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: IRQ line for the RTC.
-
-Example:
-
-rtc@10300 {
-        compatible = "marvell,orion-rtc";
-        reg = <0xd0010300 0x20>;
-        interrupts = <50>;
-};
-- 
2.37.2




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux