Skip to contentSkip to conversation

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

PATCH Superseded Nik Bune 3 participants 3 messages Oct 24, 2023 – Oct 26, 2023

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Nik Bune

author
#0 lore raw

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

Convert txt file to yaml.
Add maintainers list, based on the git history. Mark clock as required property, by reviewer's suggestion.

---

Changes in v2 (according to review comments):
- Added clocks to the list of required properties.
- Updated clocks property to have only maxItems without $ref and description.
- Removed timeout-sec explicit definition, as it is defined in watchdog.yaml.
- Updated maintainers list from the git history.

v1 patch: https://lore.kernel.org/all/[email protected]/

 .../bindings/watchdog/davinci-wdt.txt         | 24 ----------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 47 +++++++++++++++++++
 2 files changed, 47 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 +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 63 lines · Nik Bune

Convert txt file to yaml.
Add maintainers list, based on the git history. Mark clock as required property, by reviewer's suggestion.

---

Changes in v2 (according to review comments):
- Added clocks to the list of required properties.
- Updated clocks property to have only maxItems without $ref and description.
- Removed timeout-sec explicit definition, as it is defined in watchdog.yaml.
- Updated maintainers list from the git history.

v1 patch: https://lore.kernel.org/all/[email protected]/

  .../bindings/watchdog/davinci-wdt.txt         | 24 ----------
  .../bindings/watchdog/ti,davinci-wdt.yaml     | 47 +++++++++++++++++++
  2 files changed, 47 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 +6 -0
new file mode 100644
index 000000000000..4747be98b7d9
@@ -0,0 +1,47 @@
+# 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#
+

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

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +10 -0
+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:
+  - Murali Karicheri <[email protected]>
+  - Ivan Khoronzhuk <[email protected]>

Neither of these folks will be available for this, you can use me if you want an email that won't bounce for now.

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +5 -0
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:

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

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

We also have some instances with an optional power-domains prop.

power-domains:
description: A phandle and PM domain specifier as defined by bindings of
the power controller specified by phandle. See Documentation/devicetree/bindings/power/power-domain.yaml for details.

Andrew

Quoted 16 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +16 -0
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@2320000 {
+        compatible = "ti,davinci-wdt";
+        reg = <0x02320000 0x80>;
+        timeout-sec = <30>;
+        clocks = <&clkwdtimer0>;
+    };
maintainer
#2 lore raw
Quoted 96 lines · Andrew Davis
Quoted 63 lines · Nik Bune

Convert txt file to yaml.
Add maintainers list, based on the git history. Mark clock as required property, by reviewer's suggestion.

---

Changes in v2 (according to review comments):
- Added clocks to the list of required properties.
- Updated clocks property to have only maxItems without $ref and description.
- Removed timeout-sec explicit definition, as it is defined in watchdog.yaml.
- Updated maintainers list from the git history.

v1 patch: https://lore.kernel.org/all/[email protected]/

  .../bindings/watchdog/davinci-wdt.txt         | 24 ----------
  .../bindings/watchdog/ti,davinci-wdt.yaml     | 47 +++++++++++++++++++
  2 files changed, 47 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 +6 -0
new file mode 100644
index 000000000000..4747be98b7d9
@@ -0,0 +1,47 @@
+# 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#
+

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

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +10 -0
+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:
+  - Murali Karicheri <[email protected]>
+  - Ivan Khoronzhuk <[email protected]>

Neither of these folks will be available for this, you can use me if you want an email that won't bounce for now.

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file +5 -0
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:

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

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

We also have some instances with an optional power-domains prop.

Quoted 4 lines

power-domains:
description: A phandle and PM domain specifier as defined by bindings of
the power controller specified by phandle. See Documentation/devicetree/bindings/power/power-domain.yaml for details.

But not what the schema should look like here. Same as others. How many and what order if more than 1.

Rob