diff mbox series

[01/11] DT: RTC: orion-rtc: Convert to YAML

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

Commit Message

Andrew Lunn Aug. 20, 2022, 7:47 p.m. UTC
Covert 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@lunn.ch>
---
 .../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

Comments

Rob Herring Aug. 22, 2022, 8:49 p.m. UTC | #1
On Sat, Aug 20, 2022 at 09:47:54PM +0200, Andrew Lunn wrote:
> Covert 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@lunn.ch>
> ---
>  .../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..d240e67a4555
> --- /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 Device Tree Bindings

Drop 'Device Tree Bindings'

Same on the rest.

> +
> +allOf:
> +  - $ref: "rtc.yaml#"
> +
> +maintainers:
> +  - Andrew Lunn <andrew@lunn.ch>
> +
> +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
> 
>
diff mbox series

Patch

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..d240e67a4555
--- /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 Device Tree Bindings
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+
+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>;
-};