devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding
@ 2023-04-04  5:44 Otabek Nazrullaev
  2023-04-04  5:53 ` Krzysztof Kozlowski
  2023-04-04 12:36 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Otabek Nazrullaev @ 2023-04-04  5:44 UTC (permalink / raw)
  Cc: Otabek Nazrullaev, Marek Behún, Wim Van Sebroeck,
	Guenter Roeck, Rob Herring, Krzysztof Kozlowski, linux-watchdog,
	devicetree, linux-kernel

Convert Armada 37xx watchdog timer controller to YAML format

Signed-off-by: Otabek Nazrullaev <otabeknazrullaev1998@gmail.com>
---
 .../bindings/watchdog/armada-37xx-wdt.txt     | 23 --------
 .../bindings/watchdog/armada-37xx-wdt.yaml    | 54 +++++++++++++++++++
 2 files changed, 54 insertions(+), 23 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml

diff --git a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
deleted file mode 100644
index a8d00c31a1d8..000000000000
--- a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-* Armada 37xx CPU Watchdog Timer Controller
-
-Required properties:
-- compatible : must be "marvell,armada-3700-wdt"
-- reg : base physical address of the controller and length of memory mapped
-	region.
-- clocks : the clock feeding the watchdog timer. See clock-bindings.txt
-- marvell,system-controller : reference to syscon node for the CPU Miscellaneous
-	Registers
-
-Example:
-
-	cpu_misc: system-controller@d000 {
-		compatible = "marvell,armada-3700-cpu-misc", "syscon";
-		reg = <0xd000 0x1000>;
-	};
-
-	wdt: watchdog@8300 {
-		compatible = "marvell,armada-3700-wdt";
-		reg = <0x8300 0x40>;
-		marvell,system-controller = <&cpu_misc>;
-		clocks = <&xtalclk>;
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
new file mode 100644
index 000000000000..e9bdae720bed
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/watchdog/armada-37xx-wdt.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+maintainers:
+  - Otabek Nazrullaev <otabeknazrullaev1998@gmail.com>
+
+title: Armada 37xx CPU Watchdog Timer Controller
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+properties:
+  compatible:
+    const: marvell,armada-3700-wdt
+
+  reg:
+    maxItems: 1
+    description: |
+      base physical address of the controller and length of memory mapped
+      region.
+
+  clocks:
+    maxItems: 1
+    description: the clock feeding the watchdog timer.
+
+  marvell,system-controller:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: |
+      reference to syscon node for the CPU Miscellaneous Registers
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - marvell,system-controller
+
+additionalProperties: false
+
+examples:
+  - |
+    cpu_misc: system-controller@d000 {
+      compatible = "marvell,armada-3700-cpu-misc", "syscon";
+      reg = <0xd000 0x1000>;
+    };
+
+    watchdog@8300 {
+      compatible = "marvell,armada-3700-wdt";
+      reg = <0x8300 0x40>;
+      marvell,system-controller = <&cpu_misc>;
+      clocks = <&xtalclk>;
+    };
-- 
2.34.1


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

* Re: [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding
  2023-04-04  5:44 [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding Otabek Nazrullaev
@ 2023-04-04  5:53 ` Krzysztof Kozlowski
  2023-04-04 12:36 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-04  5:53 UTC (permalink / raw)
  To: Otabek Nazrullaev
  Cc: Marek Behún, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, linux-watchdog, devicetree, linux-kernel

On 04/04/2023 07:44, Otabek Nazrullaev wrote:
> Convert Armada 37xx watchdog timer controller to YAML format
> 
> Signed-off-by: Otabek Nazrullaev <otabeknazrullaev1998@gmail.com>
> ---
>  .../bindings/watchdog/armada-37xx-wdt.txt     | 23 --------
>  .../bindings/watchdog/armada-37xx-wdt.yaml    | 54 +++++++++++++++++++
>  2 files changed, 54 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
> deleted file mode 100644
> index a8d00c31a1d8..000000000000
> --- a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -* Armada 37xx CPU Watchdog Timer Controller
> -
> -Required properties:
> -- compatible : must be "marvell,armada-3700-wdt"
> -- reg : base physical address of the controller and length of memory mapped
> -	region.
> -- clocks : the clock feeding the watchdog timer. See clock-bindings.txt
> -- marvell,system-controller : reference to syscon node for the CPU Miscellaneous
> -	Registers
> -
> -Example:
> -
> -	cpu_misc: system-controller@d000 {
> -		compatible = "marvell,armada-3700-cpu-misc", "syscon";
> -		reg = <0xd000 0x1000>;
> -	};
> -
> -	wdt: watchdog@8300 {
> -		compatible = "marvell,armada-3700-wdt";
> -		reg = <0x8300 0x40>;
> -		marvell,system-controller = <&cpu_misc>;
> -		clocks = <&xtalclk>;
> -	};
> diff --git a/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
> new file mode 100644
> index 000000000000..e9bdae720bed
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/watchdog/armada-37xx-wdt.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes.

> +
> +maintainers:
> +  - Otabek Nazrullaev <otabeknazrullaev1998@gmail.com>
> +
> +title: Armada 37xx CPU Watchdog Timer Controller
> +
> +allOf:
> +  - $ref: "watchdog.yaml#"

Drop quotes.

On which tree you based this? Always start from the most recent next.

> +
> +properties:
> +  compatible:
> +    const: marvell,armada-3700-wdt
> +
> +  reg:
> +    maxItems: 1
> +    description: |
> +      base physical address of the controller and length of memory mapped
> +      region.

Drop description.

> +
> +  clocks:
> +    maxItems: 1
> +    description: the clock feeding the watchdog timer.
> +
> +  marvell,system-controller:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: |
> +      reference to syscon node for the CPU Miscellaneous Registers
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - marvell,system-controller
> +
> +additionalProperties: false

This should be unevaluatedProperties: false.

> +
> +examples:
> +  - |
> +    cpu_misc: system-controller@d000 {
> +      compatible = "marvell,armada-3700-cpu-misc", "syscon";
> +      reg = <0xd000 0x1000>;
> +    };

Drop this node.


Best regards,
Krzysztof


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

* Re: [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding
  2023-04-04  5:44 [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding Otabek Nazrullaev
  2023-04-04  5:53 ` Krzysztof Kozlowski
@ 2023-04-04 12:36 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-04-04 12:36 UTC (permalink / raw)
  To: Otabek Nazrullaev
  Cc: Krzysztof Kozlowski, devicetree, Rob Herring, Wim Van Sebroeck,
	Marek Behún, linux-kernel, linux-watchdog, Guenter Roeck


On Tue, 04 Apr 2023 14:44:08 +0900, Otabek Nazrullaev wrote:
> Convert Armada 37xx watchdog timer controller to YAML format
> 
> Signed-off-by: Otabek Nazrullaev <otabeknazrullaev1998@gmail.com>
> ---
>  .../bindings/watchdog/armada-37xx-wdt.txt     | 23 --------
>  .../bindings/watchdog/armada-37xx-wdt.yaml    | 54 +++++++++++++++++++
>  2 files changed, 54 insertions(+), 23 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.example.dtb: /example-0/system-controller@d000: failed to match any schema with compatible: ['marvell,armada-3700-cpu-misc', 'syscon']

doc reference errors (make refcheckdocs):
MAINTAINERS: Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230404054449.5665-1-otabeknazrullaev1998@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

end of thread, other threads:[~2023-04-04 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04  5:44 [PATCH] watchdog: dt-bindings: armada-37xx-wdt: convert text binding Otabek Nazrullaev
2023-04-04  5:53 ` Krzysztof Kozlowski
2023-04-04 12:36 ` Rob Herring

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).