]> git.itanic.dy.fi Git - linux-stable/commitdiff
dt-bindings: watchdog: migrate rt2880 text bindings to YAML
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Thu, 2 Mar 2023 08:59:14 +0000 (09:59 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 22 Apr 2023 10:53:58 +0000 (12:53 +0200)
Ralink RT2880 Watchdog bindings used text format, so migrate them to YAML.
There are some additions to the binding that were not in the original
txt file. This binding is used in RT2880, RT3050, RT3352, RT3883, RT5350,
and MT7620 SoCs. To properly align binding with driver code we need to add
to the schema 'clocks' and 'resets' properties.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230302085914.2858645-1-sergio.paracuellos@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Documentation/devicetree/bindings/watchdog/ralink,rt2880-wdt.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/watchdog/rt2880-wdt.txt [deleted file]

diff --git a/Documentation/devicetree/bindings/watchdog/ralink,rt2880-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ralink,rt2880-wdt.yaml
new file mode 100644 (file)
index 0000000..51e00de
--- /dev/null
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/ralink,rt2880-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ralink Watchdog Timers
+
+maintainers:
+  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    const: ralink,rt2880-wdt
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@100 {
+      compatible = "ralink,rt2880-wdt";
+      reg = <0x120 0x10>;
+      clocks = <&clkref>;
+      resets = <&rstctrl 8>;
+      interrupt-parent = <&intc>;
+      interrupts = <1>;
+    };
diff --git a/Documentation/devicetree/bindings/watchdog/rt2880-wdt.txt b/Documentation/devicetree/bindings/watchdog/rt2880-wdt.txt
deleted file mode 100644 (file)
index 05b95bf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Ralink Watchdog Timers
-
-Required properties:
-- compatible: must be "ralink,rt2880-wdt"
-- reg: physical base address of the controller and length of the register range
-
-Optional properties:
-- interrupts: Specify the INTC interrupt number
-
-Example:
-
-       watchdog@120 {
-               compatible = "ralink,rt2880-wdt";
-               reg = <0x120 0x10>;
-
-               interrupt-parent = <&intc>;
-               interrupts = <1>;
-       };