devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] ti: davinci, keystone: txt to yaml
@ 2024-07-26 14:57 Kousik Sanagavarapu
  2024-07-26 14:57 ` [PATCH v3 1/2] dt-bindings: timer: ti,davinci-timer: convert to dtschema Kousik Sanagavarapu
  2024-07-26 14:57 ` [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: " Kousik Sanagavarapu
  0 siblings, 2 replies; 4+ messages in thread
From: Kousik Sanagavarapu @ 2024-07-26 14:57 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wim Van Sebroeck, Guenter Roeck
  Cc: devicetree, linux-watchdog, linux-kernel, Kousik Sanagavarapu

Convert txt bindings of DaVinci Timer and DaVinci/Keystone WDT
Controller to dtschema.

v2: https://lore.kernel.org/linux-devicetree/20240725153711.16101-1-five231003@gmail.com/

Changes since v2:
- Add Reviewed-by tag on 1/2.

- Change the compatible to match the DTS on 2/2 and also mention in the
  commit msg that we are adding "power-domins" as an extra optional
  property, which was missing in txt binding.

v1: https://lore.kernel.org/linux-devicetree/20240721170840.15569-1-five231003@gmail.com/

Changes vs v1:
- Change davinci timer binding's file name to match with the compatible.
  Also add "maxItems" for interrupts.

- Change the order of compatibles in wdt controller bindings touched in
  order to match DTS.

- Drop 3/3 from v1 which might effect users and should not have been
  included in this series in the first place.

Kousik Sanagavarapu (2):
  dt-bindings: timer: ti,davinci-timer: convert to dtschema
  dt-bindings: watchdog: ti,davinci-wdt: convert to dtschema

 .../bindings/timer/ti,da830-timer.yaml        | 68 +++++++++++++++++++
 .../bindings/timer/ti,davinci-timer.txt       | 37 ----------
 .../bindings/watchdog/davinci-wdt.txt         | 24 -------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 55 +++++++++++++++
 4 files changed, 123 insertions(+), 61 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ti,da830-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ti,davinci-timer.txt
 delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml

-- 
2.45.2.827.g557ae147e6.dirty


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/2] dt-bindings: timer: ti,davinci-timer: convert to dtschema
  2024-07-26 14:57 [PATCH v3 0/2] ti: davinci, keystone: txt to yaml Kousik Sanagavarapu
@ 2024-07-26 14:57 ` Kousik Sanagavarapu
  2024-07-26 14:57 ` [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: " Kousik Sanagavarapu
  1 sibling, 0 replies; 4+ messages in thread
From: Kousik Sanagavarapu @ 2024-07-26 14:57 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wim Van Sebroeck, Guenter Roeck
  Cc: devicetree, linux-watchdog, linux-kernel, Kousik Sanagavarapu,
	Krzysztof Kozlowski

Convert txt binding of TI's DaVinci timer to dtschema to allow for
validation.

While at it, change the file name to match the compatible.

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/timer/ti,da830-timer.yaml        | 68 +++++++++++++++++++
 .../bindings/timer/ti,davinci-timer.txt       | 37 ----------
 2 files changed, 68 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ti,da830-timer.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ti,davinci-timer.txt

diff --git a/Documentation/devicetree/bindings/timer/ti,da830-timer.yaml b/Documentation/devicetree/bindings/timer/ti,da830-timer.yaml
new file mode 100644
index 000000000000..e9646f4e86cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/ti,da830-timer.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/ti,da830-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI DaVinci Timer
+
+maintainers:
+  - Kousik Sanagavarapu <five231003@gmail.com>
+
+description: |
+  This is a 64-bit timer found on TI's DaVinci architecture devices. The timer
+  can be configured as a general-purpose 64-bit timer, dual general-purpose
+  32-bit timers. When configured as dual 32-bit timers, each half can operate
+  in conjunction (chain mode) or independently (unchained mode) of each other.
+
+  The timer is a free running up-counter and can generate interrupts when the
+  counter reaches preset counter values.
+
+properties:
+  compatible:
+    const: ti,da830-timer
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 2
+    maxItems: 10
+
+  interrupt-names:
+    minItems: 2
+    items:
+      - const: tint12
+      - const: tint34
+      - const: cmpint0
+      - const: cmpint1
+      - const: cmpint2
+      - const: cmpint3
+      - const: cmpint4
+      - const: cmpint5
+      - const: cmpint6
+      - const: cmpint7
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    timer@20000 {
+        compatible = "ti,da830-timer";
+        reg = <0x20000 0x1000>;
+        interrupts = <21>, <22>;
+        interrupt-names = "tint12", "tint34";
+        clocks = <&pll0_auxclk>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/timer/ti,davinci-timer.txt b/Documentation/devicetree/bindings/timer/ti,davinci-timer.txt
deleted file mode 100644
index 29bf91ccf5b7..000000000000
--- a/Documentation/devicetree/bindings/timer/ti,davinci-timer.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-* Device tree bindings for Texas Instruments DaVinci timer
-
-This document provides bindings for the 64-bit timer in the DaVinci
-architecture devices. The timer can be configured as a general-purpose 64-bit
-timer, dual general-purpose 32-bit timers. When configured as dual 32-bit
-timers, each half can operate in conjunction (chain mode) or independently
-(unchained mode) of each other.
-
-The timer is a free running up-counter and can generate interrupts when the
-counter reaches preset counter values.
-
-Also see ../watchdog/davinci-wdt.txt for timers that are configurable as
-watchdog timers.
-
-Required properties:
-
-- compatible : should be "ti,da830-timer".
-- reg : specifies base physical address and count of the registers.
-- interrupts : interrupts generated by the timer.
-- interrupt-names: should be "tint12", "tint34", "cmpint0", "cmpint1",
-		   "cmpint2", "cmpint3", "cmpint4", "cmpint5", "cmpint6",
-		   "cmpint7" ("cmpintX" may be omitted if not present in the
-		   hardware).
-- clocks : the clock feeding the timer clock.
-
-Example:
-
-	clocksource: timer@20000 {
-		compatible = "ti,da830-timer";
-		reg = <0x20000 0x1000>;
-		interrupts = <21>, <22>, <74>, <75>, <76>, <77>, <78>, <79>,
-			     <80>, <81>;
-		interrupt-names = "tint12", "tint34", "cmpint0", "cmpint1",
-				  "cmpint2", "cmpint3", "cmpint4", "cmpint5",
-				  "cmpint6", "cmpint7";
-		clocks = <&pll0_auxclk>;
-	};
-- 
2.45.2.827.g557ae147e6.dirty


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: convert to dtschema
  2024-07-26 14:57 [PATCH v3 0/2] ti: davinci, keystone: txt to yaml Kousik Sanagavarapu
  2024-07-26 14:57 ` [PATCH v3 1/2] dt-bindings: timer: ti,davinci-timer: convert to dtschema Kousik Sanagavarapu
@ 2024-07-26 14:57 ` Kousik Sanagavarapu
  2024-07-26 15:29   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Kousik Sanagavarapu @ 2024-07-26 14:57 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Wim Van Sebroeck, Guenter Roeck
  Cc: devicetree, linux-watchdog, linux-kernel, Kousik Sanagavarapu

Convert txt bindings of TI's DaVinci/Keystone Watchdog Timer Controller
to dtschema to allow for validation.

While at it,

- Change the order of the compatibles.
- Add "power-domains", which is a phandle to the associated power
  domain.

w.r.t. to the txt binding to stay in sync with existing DTS.

Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
---
 .../bindings/watchdog/davinci-wdt.txt         | 24 --------
 .../bindings/watchdog/ti,davinci-wdt.yaml     | 55 +++++++++++++++++++
 2 files changed, 55 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml

diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
deleted file mode 100644
index aa10b8ec36e2..000000000000
--- a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
new file mode 100644
index 000000000000..3c78f60f5f48
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml
@@ -0,0 +1,55 @@
+# 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: TI DaVinci/Keystone Watchdog Timer Controller
+
+maintainers:
+  - Kousik Sanagavarapu <five231003@gmail.com>
+
+description: |
+  TI's Watchdog Timer Controller for DaVinci and Keystone Processors.
+
+  Datasheets
+
+    Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf
+    Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
+
+allOf:
+  - $ref: watchdog.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: ti,keystone-wdt
+          - const: ti,davinci-wdt
+      - items:
+          - const: ti,davinci-wdt
+
+  reg:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    wdt: watchdog@22f0080 {
+        compatible = "ti,keystone-wdt", "ti,davinci-wdt";
+        reg = <0x022f0080 0x80>;
+        clocks = <&clkwdtimer0>;
+    };
+
+...
-- 
2.45.2.827.g557ae147e6.dirty


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: convert to dtschema
  2024-07-26 14:57 ` [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: " Kousik Sanagavarapu
@ 2024-07-26 15:29   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-26 15:29 UTC (permalink / raw)
  To: Kousik Sanagavarapu, Daniel Lezcano, Thomas Gleixner, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Wim Van Sebroeck,
	Guenter Roeck
  Cc: devicetree, linux-watchdog, linux-kernel

On 26/07/2024 16:57, Kousik Sanagavarapu wrote:
> Convert txt bindings of TI's DaVinci/Keystone Watchdog Timer Controller
> to dtschema to allow for validation.
> 
> While at it,
> 

Drop blank line

> - Change the order of the compatibles.
> - Add "power-domains", which is a phandle to the associated power
>   domain.

Please do not explain what "power-domains" is. We all know it. Say why
you are doing it. Entire commit msg could be more concise with the same
amount of information.

> 
> w.r.t. to the txt binding to stay in sync with existing DTS.
> 
> Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-26 15:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 14:57 [PATCH v3 0/2] ti: davinci, keystone: txt to yaml Kousik Sanagavarapu
2024-07-26 14:57 ` [PATCH v3 1/2] dt-bindings: timer: ti,davinci-timer: convert to dtschema Kousik Sanagavarapu
2024-07-26 14:57 ` [PATCH v3 2/2] dt-bindings: watchdog: ti,davinci-wdt: " Kousik Sanagavarapu
2024-07-26 15:29   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).