diff mbox series

[v3,5/5] dt-bindings: timer: Convert mrvl,mmp-timer to json-schema

Message ID 20200616223353.993567-6-lkundrak@v3.sk
State Accepted
Commit 89d79ed806841be990ba66326e8319e8ce1291fc
Headers show
Series DT: Improve validation for Marvell SoCs | expand

Commit Message

Lubomir Rintel June 16, 2020, 10:33 p.m. UTC
A straightforward conversion of the mrvl,mmp-timer binding to DT schema
format using json-schema.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

---
Changes since v1:
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file

 .../bindings/timer/mrvl,mmp-timer.txt         | 17 -------
 .../bindings/timer/mrvl,mmp-timer.yaml        | 46 +++++++++++++++++++
 2 files changed, 46 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml

Comments

Rob Herring July 13, 2020, 6:50 p.m. UTC | #1
On Wed, 17 Jun 2020 00:33:53 +0200, Lubomir Rintel wrote:
> A straightforward conversion of the mrvl,mmp-timer binding to DT schema

> format using json-schema.

> 

> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>

> 

> ---

> Changes since v1:

> - Add default GPL-2.0-only license tag

> - Fill in maintainers from MAINTAINERS file

> 

>  .../bindings/timer/mrvl,mmp-timer.txt         | 17 -------

>  .../bindings/timer/mrvl,mmp-timer.yaml        | 46 +++++++++++++++++++

>  2 files changed, 46 insertions(+), 17 deletions(-)

>  delete mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt

>  create mode 100644 Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml

> 


Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
deleted file mode 100644
index b8f02c6635219..0000000000000
--- a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt
+++ /dev/null
@@ -1,17 +0,0 @@ 
-* Marvell MMP Timer controller
-
-Required properties:
-- compatible : Should be "mrvl,mmp-timer".
-- reg : Address and length of the register set of timer controller.
-- interrupts : Should be the interrupt number.
-
-Optional properties:
-- clocks : Should contain a single entry describing the clock input.
-
-Example:
-	timer0: timer@d4014000 {
-		compatible = "mrvl,mmp-timer";
-		reg = <0xd4014000 0x100>;
-		interrupts = <13>;
-		clocks = <&coreclk 2>;
-	};
diff --git a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml
new file mode 100644
index 0000000000000..1fbc260a0cbdf
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/mrvl,mmp-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell MMP Timer bindings
+
+maintainers:
+  - Daniel Lezcano <daniel.lezcano@linaro.org>
+  - Thomas Gleixner <tglx@linutronix.de>
+  - Rob Herring <robh+dt@kernel.org>
+
+properties:
+  $nodename:
+    pattern: '^timer@[a-f0-9]+$'
+
+  compatible:
+    const: mrvl,mmp-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@d4014000 {
+        compatible = "mrvl,mmp-timer";
+        reg = <0xd4014000 0x100>;
+        interrupts = <13>;
+        clocks = <&coreclk 2>;
+    };
+
+...