]> www.infradead.org Git - users/hch/misc.git/commitdiff
dt-bindings: rtc: Convert apm,xgene-rtc to DT schema
authorRob Herring (Arm) <robh@kernel.org>
Wed, 24 Sep 2025 22:28:46 +0000 (17:28 -0500)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 5 Oct 2025 18:50:29 +0000 (20:50 +0200)
Convert the APM XGene RTC binding to DT schema format. It's a
straight-forward conversion.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250924222848.2949235-1-robh@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Documentation/devicetree/bindings/rtc/apm,xgene-rtc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/rtc/xgene-rtc.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/rtc/apm,xgene-rtc.yaml b/Documentation/devicetree/bindings/rtc/apm,xgene-rtc.yaml
new file mode 100644 (file)
index 0000000..b8f4653
--- /dev/null
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/apm,xgene-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: APM X-Gene Real Time Clock
+
+maintainers:
+  - Khuong Dinh <khuong@os.amperecomputing.com>
+
+properties:
+  compatible:
+    const: apm,xgene-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - '#clock-cells'
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@10510000 {
+        compatible = "apm,xgene-rtc";
+        reg = <0x10510000 0x400>;
+        interrupts = <0x0 0x46 0x4>;
+        #clock-cells = <1>;
+        clocks = <&rtcclk 0>;
+    };
diff --git a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
deleted file mode 100644 (file)
index fd195c3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-* APM X-Gene Real Time Clock
-
-RTC controller for the APM X-Gene Real Time Clock
-
-Required properties:
-- compatible : Should be "apm,xgene-rtc"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: IRQ line for the RTC.
-- #clock-cells: Should be 1.
-- clocks: Reference to the clock entry.
-
-Example:
-
-rtcclk: rtcclk {
-       compatible = "fixed-clock";
-       #clock-cells = <1>;
-       clock-frequency = <100000000>;
-       clock-output-names = "rtcclk";
-};
-
-rtc: rtc@10510000 {
-       compatible = "apm,xgene-rtc";
-       reg = <0x0 0x10510000 0x0 0x400>;
-       interrupts = <0x0 0x46 0x4>;
-       #clock-cells = <1>;
-       clocks = <&rtcclk 0>;
-};