[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200521091356.2211020-7-lkundrak@v3.sk>
Date: Thu, 21 May 2020 11:13:53 +0200
From: Lubomir Rintel <lkundrak@...sk>
To: Rob Herring <robh+dt@...nel.org>
Cc: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Jason Cooper <jason@...edaemon.net>,
Linus Walleij <linus.walleij@...aro.org>,
Marc Zyngier <maz@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ulf Hansson <ulf.hansson@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Lubomir Rintel <lkundrak@...sk>
Subject: [PATCH v2 6/9] dt-bindings: rtc: Convert sa1100-rtc to json-schema
Convert the sa1100-rtc binding to DT schema format using json-schema.
While add that, add clocks and resets that are actually used.
Signed-off-by: Lubomir Rintel <lkundrak@...sk>
---
Changes since v1:
- Remove interrupts/maxItems
- Mention clocks and resets in the patch description
- Add default GPL-2.0-only license tag
- Fill in maintainers from MAINTAINERS file
.../devicetree/bindings/rtc/sa1100-rtc.txt | 17 ------
.../devicetree/bindings/rtc/sa1100-rtc.yaml | 57 +++++++++++++++++++
2 files changed, 57 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
create mode 100644 Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt b/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
deleted file mode 100644
index 968ac820254b..000000000000
--- a/Documentation/devicetree/bindings/rtc/sa1100-rtc.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* Marvell Real Time Clock controller
-
-Required properties:
-- compatible: should be "mrvl,sa1100-rtc"
-- reg: physical base address of the controller and length of memory mapped
- region.
-- interrupts: Should be two. The first interrupt number is the rtc alarm
- interrupt and the second interrupt number is the rtc hz interrupt.
-- interrupt-names: Assign name of irq resource.
-
-Example:
- rtc: rtc@...10000 {
- compatible = "mrvl,mmp-rtc";
- reg = <0xd4010000 0x1000>;
- interrupts = <5>, <6>;
- interrupt-names = "rtc 1Hz", "rtc alarm";
- };
diff --git a/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml b/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
new file mode 100644
index 000000000000..482e5af215b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/sa1100-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Real Time Clock controller bindings
+
+allOf:
+ - $ref: rtc.yaml#
+
+maintainers:
+ - Alessandro Zummo <a.zummo@...ertech.it>
+ - Alexandre Belloni <alexandre.belloni@...tlin.com>
+ - Rob Herring <robh+dt@...nel.org>
+
+properties:
+ compatible:
+ enum:
+ - mrvl,sa1100-rtc
+ - mrvl,mmp-rtc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ interrupts:
+ minItems: 2
+
+ interrupt-names:
+ items:
+ - const: 'rtc 1Hz'
+ - const: 'rtc alarm'
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc: rtc@...10000 {
+ compatible = "mrvl,mmp-rtc";
+ reg = <0xd4010000 0x1000>;
+ interrupts = <5>, <6>;
+ interrupt-names = "rtc 1Hz", "rtc alarm";
+ };
+
+...
--
2.26.2
Powered by blists - more mailing lists