diff mbox series

[05/11] DT: watchdog: Convert marvel.txt to YAML

Message ID 20220820194804.3352415-6-andrew@lunn.ch
State New
Headers show
Series Start converting MVEBU bindings to YAML | expand

Commit Message

Andrew Lunn Aug. 20, 2022, 7:47 p.m. UTC
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 .../devicetree/bindings/watchdog/marvel.txt   | 45 ----------
 .../bindings/watchdog/marvell,orion-wdt.yaml  | 83 +++++++++++++++++++
 2 files changed, 83 insertions(+), 45 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/marvel.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml

Comments

Rob Herring Aug. 21, 2022, 8:21 p.m. UTC | #1
On Sat, 20 Aug 2022 21:47:58 +0200, Andrew Lunn wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  .../devicetree/bindings/watchdog/marvel.txt   | 45 ----------
>  .../bindings/watchdog/marvell,orion-wdt.yaml  | 83 +++++++++++++++++++
>  2 files changed, 83 insertions(+), 45 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/watchdog/marvel.txt
>  create mode 100644 Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml
> 

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/patch/


watchdog@20300: interrupts-extended: [[3, 0, 64, 4], [3, 0, 9, 4]] is too long
	arch/arm/boot/dts/armada-381-netgear-gs110emx.dtb
	arch/arm/boot/dts/armada-382-rd-ac3x-48g4x2xl.dtb
	arch/arm/boot/dts/armada-385-atl-x530.dtb
	arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dtb
	arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dtb
	arch/arm/boot/dts/armada-385-db-88f6820-amc.dtb
	arch/arm/boot/dts/armada-385-db-ap.dtb
	arch/arm/boot/dts/armada-385-linksys-caiman.dtb
	arch/arm/boot/dts/armada-385-linksys-cobra.dtb
	arch/arm/boot/dts/armada-385-linksys-rango.dtb
	arch/arm/boot/dts/armada-385-linksys-shelby.dtb
	arch/arm/boot/dts/armada-385-synology-ds116.dtb
	arch/arm/boot/dts/armada-385-turris-omnia.dtb
	arch/arm/boot/dts/armada-388-clearfog-base.dtb
	arch/arm/boot/dts/armada-388-clearfog.dtb
	arch/arm/boot/dts/armada-388-clearfog-pro.dtb
	arch/arm/boot/dts/armada-388-db.dtb
	arch/arm/boot/dts/armada-388-gp.dtb
	arch/arm/boot/dts/armada-388-helios4.dtb
	arch/arm/boot/dts/armada-388-rd.dtb

watchdog@20300: 'oneOf' conditional failed, one must be fixed:
	arch/arm/boot/dts/armada-370-c200-v2.dtb
	arch/arm/boot/dts/armada-370-db.dtb
	arch/arm/boot/dts/armada-370-dlink-dns327l.dtb
	arch/arm/boot/dts/armada-370-mirabox.dtb
	arch/arm/boot/dts/armada-370-netgear-rn102.dtb
	arch/arm/boot/dts/armada-370-netgear-rn104.dtb
	arch/arm/boot/dts/armada-370-rd.dtb
	arch/arm/boot/dts/armada-370-seagate-nas-2bay.dtb
	arch/arm/boot/dts/armada-370-seagate-nas-4bay.dtb
	arch/arm/boot/dts/armada-370-seagate-personal-cloud-2bay.dtb
	arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtb
	arch/arm/boot/dts/armada-370-synology-ds213j.dtb
	arch/arm/boot/dts/armada-375-db.dtb
	arch/arm/boot/dts/armada-398-db.dtb
	arch/arm/boot/dts/armada-xp-axpwifiap.dtb
	arch/arm/boot/dts/armada-xp-crs305-1g-4s-bit.dtb
	arch/arm/boot/dts/armada-xp-crs305-1g-4s.dtb
	arch/arm/boot/dts/armada-xp-crs326-24g-2s-bit.dtb
	arch/arm/boot/dts/armada-xp-crs326-24g-2s.dtb
	arch/arm/boot/dts/armada-xp-crs328-4c-20s-4s-bit.dtb
	arch/arm/boot/dts/armada-xp-crs328-4c-20s-4s.dtb
	arch/arm/boot/dts/armada-xp-db.dtb
	arch/arm/boot/dts/armada-xp-db-dxbc2.dtb
	arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dtb
	arch/arm/boot/dts/armada-xp-gp.dtb
	arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dtb
	arch/arm/boot/dts/armada-xp-linksys-mamba.dtb
	arch/arm/boot/dts/armada-xp-matrix.dtb
	arch/arm/boot/dts/armada-xp-netgear-rn2120.dtb
	arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dtb
	arch/arm/boot/dts/armada-xp-synology-ds414.dtb

watchdog@20300: Unevaluated properties are not allowed ('interrupts-extended' was unexpected)
	arch/arm/boot/dts/armada-381-netgear-gs110emx.dtb
	arch/arm/boot/dts/armada-382-rd-ac3x-48g4x2xl.dtb
	arch/arm/boot/dts/armada-385-atl-x530.dtb
	arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dtb
	arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dtb
	arch/arm/boot/dts/armada-385-db-88f6820-amc.dtb
	arch/arm/boot/dts/armada-385-db-ap.dtb
	arch/arm/boot/dts/armada-385-linksys-caiman.dtb
	arch/arm/boot/dts/armada-385-linksys-cobra.dtb
	arch/arm/boot/dts/armada-385-linksys-rango.dtb
	arch/arm/boot/dts/armada-385-linksys-shelby.dtb
	arch/arm/boot/dts/armada-385-synology-ds116.dtb
	arch/arm/boot/dts/armada-385-turris-omnia.dtb
	arch/arm/boot/dts/armada-388-clearfog-base.dtb
	arch/arm/boot/dts/armada-388-clearfog.dtb
	arch/arm/boot/dts/armada-388-clearfog-pro.dtb
	arch/arm/boot/dts/armada-388-db.dtb
	arch/arm/boot/dts/armada-388-gp.dtb
	arch/arm/boot/dts/armada-388-helios4.dtb
	arch/arm/boot/dts/armada-388-rd.dtb

watchdog-timer@20300: $nodename:0: 'watchdog-timer@20300' does not match '^watchdog(@.*|-[0-9a-f])?$'
	arch/arm/boot/dts/kirkwood-b3.dtb
	arch/arm/boot/dts/kirkwood-blackarmor-nas220.dtb
	arch/arm/boot/dts/kirkwood-c200-v1.dtb
	arch/arm/boot/dts/kirkwood-cloudbox.dtb
	arch/arm/boot/dts/kirkwood-d2net.dtb
	arch/arm/boot/dts/kirkwood-db-88f6281.dtb
	arch/arm/boot/dts/kirkwood-db-88f6282.dtb
	arch/arm/boot/dts/kirkwood-dir665.dtb
	arch/arm/boot/dts/kirkwood-dns320.dtb
	arch/arm/boot/dts/kirkwood-dns325.dtb
	arch/arm/boot/dts/kirkwood-dockstar.dtb
	arch/arm/boot/dts/kirkwood-dreamplug.dtb
	arch/arm/boot/dts/kirkwood-ds109.dtb
	arch/arm/boot/dts/kirkwood-ds110jv10.dtb
	arch/arm/boot/dts/kirkwood-ds111.dtb
	arch/arm/boot/dts/kirkwood-ds112.dtb
	arch/arm/boot/dts/kirkwood-ds209.dtb
	arch/arm/boot/dts/kirkwood-ds210.dtb
	arch/arm/boot/dts/kirkwood-ds212.dtb
	arch/arm/boot/dts/kirkwood-ds212j.dtb
	arch/arm/boot/dts/kirkwood-ds409.dtb
	arch/arm/boot/dts/kirkwood-ds409slim.dtb
	arch/arm/boot/dts/kirkwood-ds411.dtb
	arch/arm/boot/dts/kirkwood-ds411j.dtb
	arch/arm/boot/dts/kirkwood-ds411slim.dtb
	arch/arm/boot/dts/kirkwood-goflexnet.dtb
	arch/arm/boot/dts/kirkwood-guruplug-server-plus.dtb
	arch/arm/boot/dts/kirkwood-ib62x0.dtb
	arch/arm/boot/dts/kirkwood-iconnect.dtb
	arch/arm/boot/dts/kirkwood-iomega_ix2_200.dtb
	arch/arm/boot/dts/kirkwood-is2.dtb
	arch/arm/boot/dts/kirkwood-km_kirkwood.dtb
	arch/arm/boot/dts/kirkwood-l-50.dtb
	arch/arm/boot/dts/kirkwood-laplug.dtb
	arch/arm/boot/dts/kirkwood-linkstation-lsqvl.dtb
	arch/arm/boot/dts/kirkwood-linkstation-lsvl.dtb
	arch/arm/boot/dts/kirkwood-linkstation-lswsxl.dtb
	arch/arm/boot/dts/kirkwood-linkstation-lswvl.dtb
	arch/arm/boot/dts/kirkwood-linkstation-lswxl.dtb
	arch/arm/boot/dts/kirkwood-linksys-viper.dtb
	arch/arm/boot/dts/kirkwood-lschlv2.dtb
	arch/arm/boot/dts/kirkwood-lsxhl.dtb
	arch/arm/boot/dts/kirkwood-mplcec4.dtb
	arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dtb
	arch/arm/boot/dts/kirkwood-nas2big.dtb
	arch/arm/boot/dts/kirkwood-net2big.dtb
	arch/arm/boot/dts/kirkwood-net5big.dtb
	arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dtb
	arch/arm/boot/dts/kirkwood-netgear_readynas_nv+_v2.dtb
	arch/arm/boot/dts/kirkwood-ns2.dtb
	arch/arm/boot/dts/kirkwood-ns2lite.dtb
	arch/arm/boot/dts/kirkwood-ns2max.dtb
	arch/arm/boot/dts/kirkwood-ns2mini.dtb
	arch/arm/boot/dts/kirkwood-nsa310a.dtb
	arch/arm/boot/dts/kirkwood-nsa310.dtb
	arch/arm/boot/dts/kirkwood-nsa320.dtb
	arch/arm/boot/dts/kirkwood-nsa325.dtb
	arch/arm/boot/dts/kirkwood-openblocks_a6.dtb
	arch/arm/boot/dts/kirkwood-openblocks_a7.dtb
	arch/arm/boot/dts/kirkwood-openrd-base.dtb
	arch/arm/boot/dts/kirkwood-openrd-client.dtb
	arch/arm/boot/dts/kirkwood-openrd-ultimate.dtb
	arch/arm/boot/dts/kirkwood-pogo_e02.dtb
	arch/arm/boot/dts/kirkwood-pogoplug-series-4.dtb
	arch/arm/boot/dts/kirkwood-rd88f6192.dtb
	arch/arm/boot/dts/kirkwood-rd88f6281-a.dtb
	arch/arm/boot/dts/kirkwood-rd88f6281-z0.dtb
	arch/arm/boot/dts/kirkwood-rs212.dtb
	arch/arm/boot/dts/kirkwood-rs409.dtb
	arch/arm/boot/dts/kirkwood-rs411.dtb
	arch/arm/boot/dts/kirkwood-sheevaplug.dtb
	arch/arm/boot/dts/kirkwood-sheevaplug-esata.dtb
	arch/arm/boot/dts/kirkwood-t5325.dtb
	arch/arm/boot/dts/kirkwood-topkick.dtb
	arch/arm/boot/dts/kirkwood-ts219-6281.dtb
	arch/arm/boot/dts/kirkwood-ts219-6282.dtb
	arch/arm/boot/dts/kirkwood-ts419-6281.dtb
	arch/arm/boot/dts/kirkwood-ts419-6282.dtb

wdt@20300: $nodename:0: 'wdt@20300' does not match '^watchdog(@.*|-[0-9a-f])?$'
	arch/arm/boot/dts/orion5x-kuroboxpro.dtb
	arch/arm/boot/dts/orion5x-lacie-d2-network.dtb
	arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dtb
	arch/arm/boot/dts/orion5x-linkstation-lschl.dtb
	arch/arm/boot/dts/orion5x-linkstation-lsgl.dtb
	arch/arm/boot/dts/orion5x-linkstation-lswtgl.dtb
	arch/arm/boot/dts/orion5x-lswsgl.dtb
	arch/arm/boot/dts/orion5x-maxtor-shared-storage-2.dtb
	arch/arm/boot/dts/orion5x-netgear-wnr854t.dtb
	arch/arm/boot/dts/orion5x-rd88f5182-nas.dtb
Rob Herring Aug. 22, 2022, 1:47 p.m. UTC | #2
On Mon, Aug 22, 2022 at 02:20:02AM +0200, Andrew Lunn wrote:
> > watchdog-timer@20300: $nodename:0: 'watchdog-timer@20300' does not match '^watchdog(@.*|-[0-9a-f])?$'
> > 	arch/arm/boot/dts/kirkwood-b3.dtb
> > 	arch/arm/boot/dts/kirkwood-blackarmor-nas220.dtb
> 
> This is fixed in the next patch.

Not really worried about that one.

> So far, i've been working on kirkwood. There are too many mvebu
> platforms to convert them all at once to YAML, i have over 50 patches
> with just kirkwood. So i expect there to be warnings for other SoC at
> the moment. Once i have kirkwood finished, i will probably work on
> orion5x and then armada-xp, and the other armada SoCs.

It was interrupts-extended warning that caught my attention. You've said 
there is only 1 interrupt, but clearly some platforms have 2. It's fine 
to fix the schemas to match reality in the conversion if needed, just 
note the changes in the commit msg.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt
deleted file mode 100644
index c1b67a78f00c..000000000000
--- a/Documentation/devicetree/bindings/watchdog/marvel.txt
+++ /dev/null
@@ -1,45 +0,0 @@ 
-* Marvell Orion Watchdog Time
-
-Required Properties:
-
-- Compatibility : "marvell,orion-wdt"
-		  "marvell,armada-370-wdt"
-		  "marvell,armada-xp-wdt"
-		  "marvell,armada-375-wdt"
-		  "marvell,armada-380-wdt"
-
-- reg		: Should contain two entries: first one with the
-		  timer control address, second one with the
-		  rstout enable address.
-
-For "marvell,armada-375-wdt" and "marvell,armada-380-wdt":
-
-- reg		: A third entry is mandatory and should contain the
-                  shared mask/unmask RSTOUT address.
-
-Clocks required for compatibles = "marvell,orion-wdt",
-				  "marvell,armada-370-wdt":
-- clocks : Must contain a single entry describing the clock input
-
-Clocks required for compatibles = "marvell,armada-xp-wdt"
-				  "marvell,armada-375-wdt"
-				  "marvell,armada-380-wdt":
-- clocks : Must contain an entry for each entry in clock-names.
-- clock-names : Must include the following entries:
-  "nbclk" (L2/coherency fabric clock),
-  "fixed" (Reference 25 MHz fixed-clock).
-
-Optional properties:
-
-- interrupts	: Contains the IRQ for watchdog expiration
-- timeout-sec	: Contains the watchdog timeout in seconds
-
-Example:
-
-	wdt@20300 {
-		compatible = "marvell,orion-wdt";
-		reg = <0x20300 0x28>, <0x20108 0x4>;
-		interrupts = <3>;
-		timeout-sec = <10>;
-		clocks = <&gate_clk 7>;
-	};
diff --git a/Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml b/Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml
new file mode 100644
index 000000000000..8607e1620f72
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/marvell,orion-wdt.yaml
@@ -0,0 +1,83 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/marvell,orion-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Orion Watchdog Device Tree Bindings
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+
+properties:
+  compatible:
+    enum:
+      - marvell,orion-wdt
+      - marvell,armada-370-wdt
+      - marvell,armada-xp-wdt
+      - marvell,armada-375-wdt
+      - marvell,armada-380-wdt
+
+  reg:
+    description:
+      Normally two items, the timer control address and the rstout enable
+      address. However armada-375 and 380 require and additional shared
+      mask/unmask rstout address
+
+  clocks:
+    minItems: 1
+    items:
+      - description: L2/coherency fabric clock
+      - description: Reference 25 MHz fixed-clock
+
+  interrupts:
+    maxItems: 1
+
+  timeout-sec: true
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - marvell,armada-xp-wdt
+          - marvell,armada-375-wdt
+          - marvell,armada-380-wdt
+then:
+  properties:
+    clocks:
+      minItems: 2
+    clock-names:
+      items:
+        - const: nbclk
+        - const: fixed
+
+  required:
+    - clock-names
+
+else:
+  properties:
+    clocks:
+      maxItems: 1
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@20300 {
+        compatible = "marvell,orion-wdt";
+        reg = <0x20300 0x28>, <0x20108 0x4>;
+        interrupts = <3>;
+        timeout-sec = <10>;
+        clocks = <&gate_clk 7>;
+    };
+...