]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dt-bindings: rtc: sprd,sc2731-rtc: convert to YAML
authorStanislav Jakubek <stano.jakubek@gmail.com>
Sat, 6 Jul 2024 16:11:52 +0000 (18:11 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 11 Sep 2024 22:07:50 +0000 (00:07 +0200)
Convert the Spreadtrum SC2731 RTC bindings to DT schema.
Rename file to match compatible.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/ZolsyEC8eeJWNIb6@standask-GA-A55M-S2HP
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml b/Documentation/devicetree/bindings/rtc/sprd,sc2731-rtc.yaml
new file mode 100644 (file)
index 0000000..f3d20e9
--- /dev/null
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/sprd,sc2731-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum SC2731 Real Time Clock
+
+maintainers:
+  - Orson Zhai <orsonzhai@gmail.com>
+  - Baolin Wang <baolin.wang7@gmail.com>
+  - Chunyan Zhang <zhang.lyra@gmail.com>
+
+properties:
+  compatible:
+    const: sprd,sc2731-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - $ref: rtc.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    pmic {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      rtc@280 {
+        compatible = "sprd,sc2731-rtc";
+        reg = <0x280>;
+        interrupt-parent = <&sc2731_pmic>;
+        interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+      };
+    };
+...
diff --git a/Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt b/Documentation/devicetree/bindings/rtc/sprd,sc27xx-rtc.txt
deleted file mode 100644 (file)
index 1f57542..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-Spreadtrum SC27xx Real Time Clock
-
-Required properties:
-- compatible: should be "sprd,sc2731-rtc".
-- reg: address offset of rtc register.
-- interrupts: rtc alarm interrupt.
-
-Example:
-
-       sc2731_pmic: pmic@0 {
-               compatible = "sprd,sc2731";
-               reg = <0>;
-               spi-max-frequency = <26000000>;
-               interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-               interrupt-controller;
-               #interrupt-cells = <2>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               rtc@280 {
-                       compatible = "sprd,sc2731-rtc";
-                       reg = <0x280>;
-                       interrupt-parent = <&sc2731_pmic>;
-                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
-               };
-       };