diff mbox series

[10/11] DT: timer: Convert marvell,orion-timer.txt to YAML

Message ID 20220820194804.3352415-11-andrew@lunn.ch
State New
Headers show
Series Start converting MVEBU bindings to YAML | expand

Commit Message

Andrew Lunn Aug. 20, 2022, 7:48 p.m. UTC
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 .../bindings/timer/marvell,orion-timer.txt    | 16 ------
 .../bindings/timer/marvell,orion-timer.yaml   | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/marvell,orion-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/marvell,orion-timer.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/timer/marvell,orion-timer.txt b/Documentation/devicetree/bindings/timer/marvell,orion-timer.txt
deleted file mode 100644
index cd1a0c256f94..000000000000
--- a/Documentation/devicetree/bindings/timer/marvell,orion-timer.txt
+++ /dev/null
@@ -1,16 +0,0 @@ 
-Marvell Orion SoC timer
-
-Required properties:
-- compatible: shall be "marvell,orion-timer"
-- reg: base address of the timer register starting with TIMERS CONTROL register
-- interrupts: should contain the interrupts for Timer0 and Timer1
-- clocks: phandle of timer reference clock (tclk)
-
-Example:
-	timer: timer {
-		compatible = "marvell,orion-timer";
-		reg = <0x20300 0x20>;
-		interrupt-parent = <&bridge_intc>;
-		interrupts = <1>, <2>;
-		clocks = <&core_clk 0>;
-	};
diff --git a/Documentation/devicetree/bindings/timer/marvell,orion-timer.yaml b/Documentation/devicetree/bindings/timer/marvell,orion-timer.yaml
new file mode 100644
index 000000000000..330bb3cd9c26
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/marvell,orion-timer.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/marvell,orion-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Orion Timer bindings
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+
+properties:
+  $nodename:
+    pattern: '^timer@[a-f0-9]+$'
+
+  compatible:
+    const: marvell,orion-timer
+
+  reg:
+    description:
+      Base address of the timer register starting with TIMERS CONTROL register
+    maxItems: 1
+
+  interrupts:
+    description:
+      Should contain the interrupts for Timer0 and Timer1
+    minItems: 2
+    maxItems: 2
+
+  clocks:
+    description:
+      phandle of timer reference clock (tclk)
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    timer: timer@20300 {
+        compatible = "marvell,orion-timer";
+        reg = <0x20300 0x20>;
+        interrupt-parent = <&bridge_intc>;
+        interrupts = <1>, <2>;
+        clocks = <&core_clk 0>;
+    };
+...