]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dt-bindings: timer: via,vt8500-timer: Convert to YAML
authorAlexey Charkov <alchark@gmail.com>
Wed, 21 May 2025 13:00:09 +0000 (17:00 +0400)
committerRob Herring (Arm) <robh@kernel.org>
Wed, 23 Jul 2025 03:45:01 +0000 (22:45 -0500)
Rewrite the textual description for the VIA/WonderMedia timer
as YAML schema.

The IP can generate up to four interrupts from four respective match
registers, so reflect that in the schema.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20250521-vt8500-timer-updates-v5-1-7e4bd11df72e@gmail.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Documentation/devicetree/bindings/timer/via,vt8500-timer.txt [deleted file]
Documentation/devicetree/bindings/timer/via,vt8500-timer.yaml [new file with mode: 0644]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/timer/via,vt8500-timer.txt b/Documentation/devicetree/bindings/timer/via,vt8500-timer.txt
deleted file mode 100644 (file)
index 901c73f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-VIA/Wondermedia VT8500 Timer
------------------------------------------------------
-
-Required properties:
-- compatible : "via,vt8500-timer"
-- reg : Should contain 1 register ranges(address and length)
-- interrupts : interrupt for the timer
-
-Example:
-
-       timer@d8130100 {
-               compatible = "via,vt8500-timer";
-               reg = <0xd8130100 0x28>;
-               interrupts = <36>;
-       };
diff --git a/Documentation/devicetree/bindings/timer/via,vt8500-timer.yaml b/Documentation/devicetree/bindings/timer/via,vt8500-timer.yaml
new file mode 100644 (file)
index 0000000..e748149
--- /dev/null
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/via,vt8500-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VIA/Wondermedia VT8500 Timer
+
+description:
+  This is the timer block that is a standalone part of the system power
+  management controller on VIA/WonderMedia SoCs (VIA VT8500 and alike).
+  The hardware has a single 32-bit counter running at 3 MHz and four match
+  registers, each of which is associated with a dedicated match interrupt,
+  and the first of which can also serve as the system watchdog (if the
+  watchdog function is enabled, it will reset the system upon match instead
+  of triggering its respective interrupt)
+
+maintainers:
+  - Alexey Charkov <alchark@gmail.com>
+
+properties:
+  compatible:
+    const: via,vt8500-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 1
+    items:
+      - description: Channel 0 match. Note that if the watchdog function
+          is enabled, this interrupt will not fire and the system will
+          reboot instead once the counter reaches match register 0 value
+      - description: Channel 1 match
+      - description: Channel 2 match
+      - description: Channel 3 match
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@d8130100 {
+        compatible = "via,vt8500-timer";
+        reg = <0xd8130100 0x28>;
+        interrupts = <36>;
+    };
index a0d5bc02c7fc16803087b584dbad0ed628735a51..98229b793161e1cb384e3eb05351804f2fc3aa89 100644 (file)
@@ -3508,6 +3508,7 @@ F:        Documentation/devicetree/bindings/hwinfo/via,vt8500-scc-id.yaml
 F:     Documentation/devicetree/bindings/i2c/wm,wm8505-i2c.yaml
 F:     Documentation/devicetree/bindings/interrupt-controller/via,vt8500-intc.yaml
 F:     Documentation/devicetree/bindings/pwm/via,vt8500-pwm.yaml
+F:     Documentation/devicetree/bindings/timer/via,vt8500-timer.yaml
 F:     arch/arm/boot/dts/vt8500/
 F:     arch/arm/mach-vt8500/
 F:     drivers/clocksource/timer-vt8500.c