Skip to contentSkip to conversation

dt-bindings: watchdog: davinci-wdt: convert txt to yaml

PATCH In review Nik Bune 4 participants 4 messages Oct 21, 2023 – Oct 24, 2023

Subsystems (2)
lore
Share & tools
lore

Nik Bune

author
#0 lore raw

PATCH 1/1 dt-bindings: watchdog: davinci-wdt: convert txt to yaml

Convert txt file to yaml.
Add maintainers list. Took from ti,rti-wdt.yaml file.

---
 .../bindings/watchdog/davinci-wdt.txt         | 24 ---------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt deleted +0 -24
deleted file mode 100644
index aa10b8ec36e2..000000000000
@@ -1,24 +0,0 @@
-Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
-
-Required properties:
-- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt"
-- reg : Should contain WDT registers location and length
-
-Optional properties:
-- timeout-sec : Contains the watchdog timeout in seconds
-- clocks : the clock feeding the watchdog timer.
-	   Needed if platform uses clocks.
-	   See clock-bindings.txt
-
-Documentation:
-Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
-Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
-
-Examples:
-
-wdt: wdt@2320000 {
-	compatible = "ti,davinci-wdt";
-	reg = <0x02320000 0x80>;
-	timeout-sec = <30>;
-	clocks = <&clkwdtimer0>;
-};
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw

I'd swear I replied here already, but I checked on lore and saw nothing...

Quoted 67 lines · Nik Bune

Convert txt file to yaml.
Add maintainers list. Took from ti,rti-wdt.yaml file.

---
 .../bindings/watchdog/davinci-wdt.txt         | 24 ---------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt deleted +0 -24
deleted file mode 100644
index aa10b8ec36e2..000000000000
@@ -1,24 +0,0 @@
-Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
-
-Required properties:
-- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt"
-- reg : Should contain WDT registers location and length
-
-Optional properties:
-- timeout-sec : Contains the watchdog timeout in seconds
-- clocks : the clock feeding the watchdog timer.
-	   Needed if platform uses clocks.
-	   See clock-bindings.txt
-
-Documentation:
-Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
-Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
-
-Examples:
-
-wdt: wdt@2320000 {
-	compatible = "ti,davinci-wdt";
-	reg = <0x02320000 0x80>;
-	timeout-sec = <30>;
-	clocks = <&clkwdtimer0>;
-};
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +20 -0
new file mode 100644
index 000000000000..357c1effff49
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller
+
+description: |
+  Documentation:
+  Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
+  Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a
+
+maintainers:
+  - Tero Kristo <[email protected]>
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:

Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +9 -0
+  compatible:
+    enum:
+      - ti,davinci-wdt
+      - ti,keystone-wdt
+
+  reg:
+    maxItems: 1
+
 
+  timeout-sec: true

Cos of the unevaluatedProperties below, and the reference to watchdog.yaml, setting timeout-sec: true here is not required.

Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml line 35

Quoted 6 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +6 -0
+
+  clocks:
+    description:
+      the clock feeding the watchdog timer.
+      Needed if platform uses clocks.
+      See clock-bindings.txt

This can just be

clocks:
maxItems: 1

Although I suspect there are no platforms that do not actually use clocks, and really this should be required...

Cheers,
Conor.

Quoted 17 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +15 -0
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@2320000 {
+        compatible = "ti,davinci-wdt";
+        reg = <0x02320000 0x80>;
+        timeout-sec = <30>;
+        clocks = <&clkwdtimer0>;
+    };
Signature · 1 line
2.34.1
maintainer
#3 lore raw
Quoted 7 lines · Krzysztof Kozlowski
Quoted 2 lines · Conor Dooley

I'd swear I replied here already, but I checked on lore and saw nothing...

You're almost right:
https://lore.kernel.org/all/[email protected]/
Different binding, but same things to fix. :)

Welcome to the blur of DT maintainership. :)

Rob