diff mbox series

[1/1] dt-bindings: watchdog: convert ziirave-wdt.txt to yaml

Message ID 20240811220515.3776756-1-Frank.Li@nxp.com (mailing list archive)
State Superseded
Headers show
Series [1/1] dt-bindings: watchdog: convert ziirave-wdt.txt to yaml | expand

Commit Message

Frank Li Aug. 11, 2024, 10:05 p.m. UTC
Convert ziirave-wdt.txt to yaml format.

Additional change:
- Add i2c node in example.

Fix below warning:
arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dtb: /soc@0/bus@30800000/i2c@30a40000/watchdog@38:
	failed to match any schema with compatible: ['zii,rave-wdt']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../bindings/watchdog/zii,rave-wdt.yaml       | 47 +++++++++++++++++++
 .../bindings/watchdog/ziirave-wdt.txt         | 19 --------
 2 files changed, 47 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
 delete mode 100644 Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt

Comments

Krzysztof Kozlowski Aug. 12, 2024, 9:22 a.m. UTC | #1
On 12/08/2024 00:05, Frank Li wrote:
> Convert ziirave-wdt.txt to yaml format.
> 
> Additional change:
> - Add i2c node in example.
> 
> Fix below warning:
> arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dtb: /soc@0/bus@30800000/i2c@30a40000/watchdog@38:
> 	failed to match any schema with compatible: ['zii,rave-wdt']
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../bindings/watchdog/zii,rave-wdt.yaml       | 47 +++++++++++++++++++
>  .../bindings/watchdog/ziirave-wdt.txt         | 19 --------
>  2 files changed, 47 insertions(+), 19 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml b/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
> new file mode 100644
> index 0000000000000..6c0a16912d7f4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/zii,rave-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Zodiac RAVE Watchdog Timer
> +
> +maintainers:
> +  - Frank Li <Frank.Li@nxp.com>
> +

Missing $ref to watchdog

> +properties:
> +  compatible:
> +    const: zii,rave-wdt
> +
> +  reg:
> +    maxItems: 1
> +    description: i2c slave address of device, usually 0x38
> +
> +  timeout-sec:
> +    description: Watchdog timeout value in seconds.

Drop property

> +
> +  reset-duration-ms:
> +    description:
> +      Duration of the pulse generated when the watchdog times
> +      out. Value in milliseconds.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

and this becomes unevaluatedProperties: false

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml b/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
new file mode 100644
index 0000000000000..6c0a16912d7f4
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/zii,rave-wdt.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/zii,rave-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Zodiac RAVE Watchdog Timer
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    const: zii,rave-wdt
+
+  reg:
+    maxItems: 1
+    description: i2c slave address of device, usually 0x38
+
+  timeout-sec:
+    description: Watchdog timeout value in seconds.
+
+  reset-duration-ms:
+    description:
+      Duration of the pulse generated when the watchdog times
+      out. Value in milliseconds.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        watchdog@38 {
+            compatible = "zii,rave-wdt";
+            reg = <0x38>;
+            timeout-sec = <30>;
+            reset-duration-ms = <30>;
+        };
+    };
+
diff --git a/Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt b/Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt
deleted file mode 100644
index 3d878184ec3ff..0000000000000
--- a/Documentation/devicetree/bindings/watchdog/ziirave-wdt.txt
+++ /dev/null
@@ -1,19 +0,0 @@ 
-Zodiac RAVE Watchdog Timer
-
-Required properties:
-- compatible: must be "zii,rave-wdt"
-- reg: i2c slave address of device, usually 0x38
-
-Optional Properties:
-- timeout-sec: Watchdog timeout value in seconds.
-- reset-duration-ms: Duration of the pulse generated when the watchdog times
-  out. Value in milliseconds.
-
-Example:
-
-	watchdog@38 {
-		compatible = "zii,rave-wdt";
-		reg = <0x38>;
-		timeout-sec = <30>;
-		reset-duration-ms = <30>;
-	};