2023-10-22 12:04:06

by Nik Bune

[permalink] [raw]
Subject: [PATCH] dt-bindings: watchdog: cnxt,cx92755-wdt: convert txt to yaml

Convert txt file to yaml.
Add maintainers list. Took from Documentation/devicetree/bindings/arm/digicolor.yaml file.

Signed-off-by: Nik Bune <[email protected]>
---
.../bindings/watchdog/cnxt,cx92755-wdt.yaml | 49 +++++++++++++++++++
.../bindings/watchdog/digicolor-wdt.txt | 25 ----------
2 files changed, 49 insertions(+), 25 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
delete mode 100644 Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt

diff --git a/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
new file mode 100644
index 000000000000..acd2d30b20f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/cnxt,cx92755-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Conexant Digicolor SoCs Watchdog timer
+
+description: |
+ The watchdog functionality in Conexant Digicolor SoCs relies on the so called
+ "Agent Communication" block. This block includes the eight programmable system
+ timer counters. The first timer (called "Timer A") is the only one that can be
+ used as watchdog.
+
+allOf:
+ - $ref: watchdog.yaml#
+
+maintainers:
+ - Baruch Siach <[email protected]>
+
+properties:
+ compatible:
+ const: cnxt,cx92755-wdt
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ specifies the clock that drives the timer
+
+ timeout-sec: true
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog@f0000fc0 {
+ compatible = "cnxt,cx92755-wdt";
+ reg = <0xf0000fc0 0x8>;
+ clocks = <&main_clk>;
+ timeout-sec = <15>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt b/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
deleted file mode 100644
index a882967e17d4..000000000000
--- a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Conexant Digicolor SoCs Watchdog timer
-
-The watchdog functionality in Conexant Digicolor SoCs relies on the so called
-"Agent Communication" block. This block includes the eight programmable system
-timer counters. The first timer (called "Timer A") is the only one that can be
-used as watchdog.
-
-Required properties:
-
-- compatible : Should be "cnxt,cx92755-wdt"
-- reg : Specifies base physical address and size of the registers
-- clocks : phandle; specifies the clock that drives the timer
-
-Optional properties:
-
-- timeout-sec : Contains the watchdog timeout in seconds
-
-Example:
-
- watchdog@f0000fc0 {
- compatible = "cnxt,cx92755-wdt";
- reg = <0xf0000fc0 0x8>;
- clocks = <&main_clk>;
- timeout-sec = <15>;
- };
--
2.34.1


2023-10-22 17:31:05

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: watchdog: cnxt,cx92755-wdt: convert txt to yaml

On Sun, Oct 22, 2023 at 02:03:28PM +0200, Nik Bune wrote:
> Convert txt file to yaml.
> Add maintainers list. Took from Documentation/devicetree/bindings/arm/digicolor.yaml file.

That seems like a bit of an odd reasoning, but Baruch was the submitter
for the original txt form binding for this watchdog , per the git history.

>
> Signed-off-by: Nik Bune <[email protected]>
> ---
> .../bindings/watchdog/cnxt,cx92755-wdt.yaml | 49 +++++++++++++++++++
> .../bindings/watchdog/digicolor-wdt.txt | 25 ----------
> 2 files changed, 49 insertions(+), 25 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> delete mode 100644 Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
>
> diff --git a/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> new file mode 100644
> index 000000000000..acd2d30b20f3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/cnxt,cx92755-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Conexant Digicolor SoCs Watchdog timer
> +
> +description: |
> + The watchdog functionality in Conexant Digicolor SoCs relies on the so called
> + "Agent Communication" block. This block includes the eight programmable system
> + timer counters. The first timer (called "Timer A") is the only one that can be
> + used as watchdog.
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +maintainers:
> + - Baruch Siach <[email protected]>
> +
> +properties:
> + compatible:
> + const: cnxt,cx92755-wdt
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + specifies the clock that drives the timer

This can just be:
clocks:
maxItems: 1

as clocks is a generic property & if there's only one clock, describing
it is usually needless.

Otherwise this conversion looks okay to me.

Cheers,
Conor.

> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + watchdog@f0000fc0 {
> + compatible = "cnxt,cx92755-wdt";
> + reg = <0xf0000fc0 0x8>;
> + clocks = <&main_clk>;
> + timeout-sec = <15>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt b/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
> deleted file mode 100644
> index a882967e17d4..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -Conexant Digicolor SoCs Watchdog timer
> -
> -The watchdog functionality in Conexant Digicolor SoCs relies on the so called
> -"Agent Communication" block. This block includes the eight programmable system
> -timer counters. The first timer (called "Timer A") is the only one that can be
> -used as watchdog.
> -
> -Required properties:
> -
> -- compatible : Should be "cnxt,cx92755-wdt"
> -- reg : Specifies base physical address and size of the registers
> -- clocks : phandle; specifies the clock that drives the timer
> -
> -Optional properties:
> -
> -- timeout-sec : Contains the watchdog timeout in seconds
> -
> -Example:
> -
> - watchdog@f0000fc0 {
> - compatible = "cnxt,cx92755-wdt";
> - reg = <0xf0000fc0 0x8>;
> - clocks = <&main_clk>;
> - timeout-sec = <15>;
> - };
> --
> 2.34.1
>


Attachments:
(No filename) (3.64 kB)
signature.asc (235.00 B)
Download all attachments

2023-10-22 17:45:56

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: watchdog: cnxt,cx92755-wdt: convert txt to yaml

On Sun, Oct 22, 2023 at 06:30:04PM +0100, Conor Dooley wrote:
> On Sun, Oct 22, 2023 at 02:03:28PM +0200, Nik Bune wrote:
> > Convert txt file to yaml.
> > Add maintainers list. Took from Documentation/devicetree/bindings/arm/digicolor.yaml file.
>
> That seems like a bit of an odd reasoning, but Baruch was the submitter
> for the original txt form binding for this watchdog , per the git history.
>
> >
> > Signed-off-by: Nik Bune <[email protected]>
> > ---
> > .../bindings/watchdog/cnxt,cx92755-wdt.yaml | 49 +++++++++++++++++++
> > .../bindings/watchdog/digicolor-wdt.txt | 25 ----------
> > 2 files changed, 49 insertions(+), 25 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> > delete mode 100644 Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
> >
> > diff --git a/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> > new file mode 100644
> > index 000000000000..acd2d30b20f3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/watchdog/cnxt,cx92755-wdt.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Conexant Digicolor SoCs Watchdog timer
> > +
> > +description: |
> > + The watchdog functionality in Conexant Digicolor SoCs relies on the so called
> > + "Agent Communication" block. This block includes the eight programmable system
> > + timer counters. The first timer (called "Timer A") is the only one that can be
> > + used as watchdog.
> > +
> > +allOf:
> > + - $ref: watchdog.yaml#
> > +
> > +maintainers:
> > + - Baruch Siach <[email protected]>
> > +
> > +properties:
> > + compatible:
> > + const: cnxt,cx92755-wdt
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + specifies the clock that drives the timer
>
> This can just be:
> clocks:
> maxItems: 1
>
> as clocks is a generic property & if there's only one clock, describing
> it is usually needless.
>
> Otherwise this conversion looks okay to me.

> > +
> > + timeout-sec: true

While looking at your other wd conversion I noticed this, which should
not be needed since you are referencing watchdog.yaml.

Cheers,
Conor.

> > +
> > +required:
> > + - compatible
> > + - reg
> > + - clocks
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + watchdog@f0000fc0 {
> > + compatible = "cnxt,cx92755-wdt";
> > + reg = <0xf0000fc0 0x8>;
> > + clocks = <&main_clk>;
> > + timeout-sec = <15>;
> > + };
> > diff --git a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt b/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
> > deleted file mode 100644
> > index a882967e17d4..000000000000
> > --- a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
> > +++ /dev/null
> > @@ -1,25 +0,0 @@
> > -Conexant Digicolor SoCs Watchdog timer
> > -
> > -The watchdog functionality in Conexant Digicolor SoCs relies on the so called
> > -"Agent Communication" block. This block includes the eight programmable system
> > -timer counters. The first timer (called "Timer A") is the only one that can be
> > -used as watchdog.
> > -
> > -Required properties:
> > -
> > -- compatible : Should be "cnxt,cx92755-wdt"
> > -- reg : Specifies base physical address and size of the registers
> > -- clocks : phandle; specifies the clock that drives the timer
> > -
> > -Optional properties:
> > -
> > -- timeout-sec : Contains the watchdog timeout in seconds
> > -
> > -Example:
> > -
> > - watchdog@f0000fc0 {
> > - compatible = "cnxt,cx92755-wdt";
> > - reg = <0xf0000fc0 0x8>;
> > - clocks = <&main_clk>;
> > - timeout-sec = <15>;
> > - };
> > --
> > 2.34.1
> >



Attachments:
(No filename) (4.05 kB)
signature.asc (235.00 B)
Download all attachments