diff mbox series

[v2,11/12] dt-bindings: timer: Convert marvell,orion-timer.txt to DT schema

Message ID 20220825013258.3459714-12-andrew@lunn.ch
State Changes Requested, archived
Headers show
Series Start converting MVEBU bindings to DT Schema | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 3 warnings, 51 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success
robh/checkpatch warning total: 0 errors, 3 warnings, 51 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success
robh/checkpatch warning total: 0 errors, 3 warnings, 51 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Andrew Lunn Aug. 25, 2022, 1:32 a.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..f9f79dbd4542
--- /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
+
+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>;
+    };
+...