Skip to contentSkip to conversation

dt-bindings: watchdog: Convert marvell,orion-wdt to DT schema

PATCH Superseded Rob Herring (Arm) 4 participants 7 messages Oct 13, 2025 – Oct 14, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: watchdog: Convert marvell,orion-wdt to DT schema

Convert the Marvell Orion and Armada watchdog binding to DT schema format. It's a straight-forward conversion.

---
 .../devicetree/bindings/watchdog/marvel.txt   | 45 ---------
 .../bindings/watchdog/marvell,orion-wdt.yaml  | 97 +++++++++++++++++++
 2 files changed, 97 insertions(+), 45 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/marvel.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml
Documentation/devicetree/bindings/watchdog/marvel.txt deleted +0 -45
deleted file mode 100644
index c1b67a78f00c..000000000000
@@ -1,45 +0,0 @@
-* Marvell Orion Watchdog Time
-
-Required Properties:
-
-- Compatibility : "marvell,orion-wdt"
-		  "marvell,armada-370-wdt"
-		  "marvell,armada-xp-wdt"
-		  "marvell,armada-375-wdt"
-		  "marvell,armada-380-wdt"
-
-- reg		: Should contain two entries: first one with the
-		  timer control address, second one with the
-		  rstout enable address.
-
-For "marvell,armada-375-wdt" and "marvell,armada-380-wdt":
-
-- reg		: A third entry is mandatory and should contain the
-                  shared mask/unmask RSTOUT address.
-
-Clocks required for compatibles = "marvell,orion-wdt",
-				  "marvell,armada-370-wdt":
-- clocks : Must contain a single entry describing the clock input
-
-Clocks required for compatibles = "marvell,armada-xp-wdt"
-				  "marvell,armada-375-wdt"
-				  "marvell,armada-380-wdt":
-- clocks : Must contain an entry for each entry in clock-names.
-- clock-names : Must include the following entries:
-  "nbclk" (L2/coherency fabric clock),
-  "fixed" (Reference 25 MHz fixed-clock).
-
-Optional properties:
-
-- interrupts	: Contains the IRQ for watchdog expiration
-- timeout-sec	: Contains the watchdog timeout in seconds
-
-Example:
-
-	wdt@20300 {
-		compatible = "marvell,orion-wdt";
-		reg = <0x20300 0x28>, <0x20108 0x4>;
-		interrupts = <3>;
-		timeout-sec = <10>;
-		clocks = <&gate_clk 7>;
-	};
Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml new file +97 -0

97 lines not on this page · raw message

Signature · 1 line
2.51.0
#1 lore raw

Hello Rob,

Thank you for your work. I have one question:

Review

Quoted 2 lines
(quoted diff) +2 -0
+  reg:
+    minItems: 2

Should we also include this constraint here?

maxItems: 3

This would further restrict the binding.

Gregory

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml new file +5 -0
+    items:
+      - description: Timer control register address.
+      - description: RSTOUT enable register address.
+      - description: Shared mask/unmask RSTOUT register address.
+

[...]

Quoted 17 lines
Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml new file +17 -0
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - marvell,armada-375-wdt
+              - marvell,armada-380-wdt
+    then:
+      properties:
+        reg:
+          minItems: 3
+    else:
+      properties:
+        reg:
+          maxItems: 2
+
Signature · 3 lines
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author maintainer
#2 lore raw
Quoted 11 lines · Gregory CLEMENT

Hello Rob,

Thank you for your work. I have one question:

Review

Quoted 2 lines
(quoted diff) +2 -0
+  reg:
+    minItems: 2

Should we also include this constraint here?

maxItems: 3

No, that is implicit with the length of 'items'. (For json-schema, it's not though. The tools add it automatically.)

Quoted 10 lines

This would further restrict the binding.

Gregory

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml new file +5 -0
+    items:
+      - description: Timer control register address.
+      - description: RSTOUT enable register address.
+      - description: Shared mask/unmask RSTOUT register address.
+
#3 lore raw
Quoted 10 lines · Rob Herring
Quoted 8 lines · Gregory CLEMENT

Hello Rob,

Thank you for your work. I have one question:

Quoted 2 lines
(quoted diff) +2 -0
+  reg:
+    minItems: 2
Quoted 6 lines
Quoted 3 lines

Should we also include this constraint here?

maxItems: 3

No, that is implicit with the length of 'items'. (For json-schema, it's not though. The tools add it automatically.)

Thanks for the explanation!

then for this patch:

Gregory

Quoted 11 lines
Quoted 11 lines

This would further restrict the binding.

Gregory

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml new file +5 -0
+    items:
+      - description: Timer control register address.
+      - description: RSTOUT enable register address.
+      - description: Shared mask/unmask RSTOUT register address.
+
Signature · 3 lines
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw
In reply to Rob Herring (Arm)

Hi Rob,

Quoted 13 lines · Rob Herring (Arm)
(quoted diff) +1 -11
-Clocks required for compatibles = "marvell,orion-wdt",
-				  "marvell,armada-370-wdt":
-- clocks : Must contain a single entry describing the clock input
-
-Clocks required for compatibles = "marvell,armada-xp-wdt"
-				  "marvell,armada-375-wdt"
-				  "marvell,armada-380-wdt":
-- clocks : Must contain an entry for each entry in clock-names.
-- clock-names : Must include the following entries:
-  "nbclk" (L2/coherency fabric clock),
-  "fixed" (Reference 25 MHz fixed-clock).
 
+  clocks:

Review

Quoted 10 lines
(quoted diff) +10 -0
+    minItems: 1
+    items:
+      - description: Reference 25 MHz fixed-clock supply.
+      - description: L2/coherency fabric clock input ("nbclk").
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: nbclk
+      - const: fixed

Shouldn't the "clock-names" items be in the same order as the "clocks" items? (With nbclk first)

Best,
Sander

author maintainer
#6 lore raw
Quoted 28 lines · Sander Vanheule

Hi Rob,

Quoted 13 lines · Rob Herring (Arm)
(quoted diff) +1 -11
-Clocks required for compatibles = "marvell,orion-wdt",
-                               "marvell,armada-370-wdt":
-- clocks : Must contain a single entry describing the clock input
-
-Clocks required for compatibles = "marvell,armada-xp-wdt"
-                               "marvell,armada-375-wdt"
-                               "marvell,armada-380-wdt":
-- clocks : Must contain an entry for each entry in clock-names.
-- clock-names : Must include the following entries:
-  "nbclk" (L2/coherency fabric clock),
-  "fixed" (Reference 25 MHz fixed-clock).
 
+  clocks:

Review

Quoted 10 lines
(quoted diff) +10 -0
+    minItems: 1
+    items:
+      - description: Reference 25 MHz fixed-clock supply.
+      - description: L2/coherency fabric clock input ("nbclk").
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: nbclk
+      - const: fixed
Quoted 2 lines

Shouldn't the "clock-names" items be in the same order as the "clocks" items? (With nbclk first)

Ah yes, I flipped the order of the names to match the .dts files, but not clocks.

Also, I found there is a 2nd interrupt in some cases.

Rob