2022-11-18 14:38:15

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 04/12] dt-bindings: watchdog: convert meson-wdt.txt to dt-schema

Convert the Amlogic Meson6 SoCs Watchdog timer bindings to dt-schema.

Signed-off-by: Neil Armstrong <[email protected]>
---
.../bindings/watchdog/amlogic,meson6-wdt.yaml | 39 ++++++++++++++++++++++
.../devicetree/bindings/watchdog/meson-wdt.txt | 21 ------------
2 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/amlogic,meson6-wdt.yaml b/Documentation/devicetree/bindings/watchdog/amlogic,meson6-wdt.yaml
new file mode 100644
index 000000000000..4e33a5a9c23c
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/amlogic,meson6-wdt.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/amlogic,meson6-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson6 SoCs Watchdog timer
+
+maintainers:
+ - Neil Armstrong <[email protected]>
+ - Martin Blumenstingl <[email protected]>
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ enum:
+ - amlogic,meson6-wdt
+ - amlogic,meson8-wdt
+ - amlogic,meson8b-wdt
+ - amlogic,meson8m2-wdt
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ wdt: watchdog@c1109900 {
+ compatible = "amlogic,meson6-wdt";
+ reg = <0xc1109900 0x8>;
+ timeout-sec = <10>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
deleted file mode 100644
index 7588cc3971bf..000000000000
--- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Meson SoCs Watchdog timer
-
-Required properties:
-
-- compatible : depending on the SoC this should be one of:
- "amlogic,meson6-wdt" on Meson6 SoCs
- "amlogic,meson8-wdt" and "amlogic,meson6-wdt" on Meson8 SoCs
- "amlogic,meson8b-wdt" on Meson8b SoCs
- "amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
-- reg : Specifies base physical address and size of the registers.
-
-Optional properties:
-- timeout-sec: contains the watchdog timeout in seconds.
-
-Example:
-
-wdt: watchdog@c1109900 {
- compatible = "amlogic,meson6-wdt";
- reg = <0xc1109900 0x8>;
- timeout-sec = <10>;
-};

--
b4 0.10.1


2022-11-18 15:59:46

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 04/12] dt-bindings: watchdog: convert meson-wdt.txt to dt-schema

On 18/11/2022 15:33, Neil Armstrong wrote:
> Convert the Amlogic Meson6 SoCs Watchdog timer bindings to dt-schema.
>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2022-11-18 19:25:09

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 04/12] dt-bindings: watchdog: convert meson-wdt.txt to dt-schema


On Fri, 18 Nov 2022 15:33:30 +0100, Neil Armstrong wrote:
> Convert the Amlogic Meson6 SoCs Watchdog timer bindings to dt-schema.
>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> .../bindings/watchdog/amlogic,meson6-wdt.yaml | 39 ++++++++++++++++++++++
> .../devicetree/bindings/watchdog/meson-wdt.txt | 21 ------------
> 2 files changed, 39 insertions(+), 21 deletions(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221117-b4-amlogic-bindings-convert-v1-4-3f025599b968@linaro.org


watchdog@9900: compatible: ['amlogic,meson8m2-wdt', 'amlogic,meson8b-wdt'] is too long
arch/arm/boot/dts/meson8m2-mxiii-plus.dtb

watchdog@9900: Unevaluated properties are not allowed ('compatible', 'interrupts' were unexpected)
arch/arm/boot/dts/meson8m2-mxiii-plus.dtb

watchdog@9900: Unevaluated properties are not allowed ('interrupts' was unexpected)
arch/arm/boot/dts/meson6-atv1200.dtb
arch/arm/boot/dts/meson8b-ec100.dtb
arch/arm/boot/dts/meson8b-mxq.dtb
arch/arm/boot/dts/meson8b-odroidc1.dtb
arch/arm/boot/dts/meson8-minix-neo-x8.dtb


2022-11-25 23:48:01

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH 04/12] dt-bindings: watchdog: convert meson-wdt.txt to dt-schema

Hi Neil,

On Fri, Nov 18, 2022 at 3:33 PM Neil Armstrong
<[email protected]> wrote:
[...]
> +unevaluatedProperties: false
Could you please also add an "interrupts" property?
This watchdog IP can generate an interrupt instead of resetting the
SoC. We don't support this in the driver yet, but still it's w
Somehow the interrupt made it into the .dtsi but not the bindings.

[...]
> -- compatible : depending on the SoC this should be one of:
> - "amlogic,meson6-wdt" on Meson6 SoCs
> - "amlogic,meson8-wdt" and "amlogic,meson6-wdt" on Meson8 SoCs
> - "amlogic,meson8b-wdt" on Meson8b SoCs
> - "amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
The last part did not quite make it into the new schema.
arch/arm/boot/dts/meson8m2.dtsi currently has:
compatible = "amlogic,meson8m2-wdt", "amlogic,meson8b-wdt";


Best regards,
Martin