Skip to contentSkip to conversation

Convert brcm,kona-wdt.txt to brcm,kona-wdt.yaml

PATCH Superseded Nikita Bondarenko 3 participants 4 messages Mar 30, 2023 – Apr 2, 2023

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Convert brcm,kona-wdt.txt to brcm,kona-wdt.yaml

---
 .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
 .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 15 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt deleted +0 -15
deleted file mode 100644
index 2b86a00e351d..000000000000
@@ -1,15 +0,0 @@
-Broadcom Kona Family Watchdog Timer
------------------------------------
-
-This watchdog timer is used in the following Broadcom SoCs:
-  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
-
-Required properties:
-  - compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-  - reg: memory address & range
-
-Example:
-	watchdog@35002f40 {
-		compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-		reg = <0x35002f40 0x6c>;
-	};
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 8 lines · Nikita Bondarenko
---
 .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
 .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 15 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-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/project/devicetree-bindings/patch/[email protected]

watchdog@35002f40: compatible: ['brcm,bcm11351-wdt', 'brcm,kona-wdt'] is too long

	arch/arm/boot/dts/bcm28155-ap.dtb

watchdog@35002f40: Unevaluated properties are not allowed ('compatible' was unexpected)

	arch/arm/boot/dts/bcm28155-ap.dtb
#2 lore raw
In reply to Nikita Bondarenko
Quoted 1 line · Nikita Bondarenko

Use subject prefixes matching the subsystem (which you can get for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching).

Missing commit msg.

Quoted 38 lines
---
 .../bindings/watchdog/brcm,kona-wdt.txt       | 15 -------
 .../bindings/watchdog/brcm,kona-wdt.yaml      | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 15 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt deleted +0 -15
deleted file mode 100644
index 2b86a00e351d..000000000000
@@ -1,15 +0,0 @@
-Broadcom Kona Family Watchdog Timer
------------------------------------
-
-This watchdog timer is used in the following Broadcom SoCs:
-  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
-
-Required properties:
-  - compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-  - reg: memory address & range
-
-Example:
-	watchdog@35002f40 {
-		compatible = "brcm,bcm11351-wdt", "brcm,kona-wdt";
-		reg = <0x35002f40 0x6c>;
-	};
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +4 -0
new file mode 100644
index 000000000000..ffc4870bdb57
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/brcm,kona-wdt.yaml#

Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Kona Family Watchdog Timer
+
+description: |
+  This watchdog timer is used in the following Broadcom SoCs:
+  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
+
+maintainers:
+  - Rob Herring <[email protected]>

No, it should be device maintainer.

Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml line 17

Quoted 3 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +3 -0
+
+allOf:
+  - $ref: "watchdog.yaml#"

Drop quotes.

Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +10 -0
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm11351-wdt
+      - brcm,kona-wdt
+
+  reg:
+    maxItems: 1
+    description: memory address & range

Drop description.

Quoted 5 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +5 -0
+
+required:
+  - compatible
+  - reg
+

Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml line 42

Quoted 10 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +10 -0
+unevaluatedProperties: false
+
+examples:
+  - |
+    watchdog@35002f40 {
+      compatible = "brcm,bcm11351-wdt";
+      reg = <0x35002f40 0x6c>;
+    };
+  - |
+    watchdog@35002f40 {

Does not look like you tested the bindings. Please run make dt_binding_check (see Documentation/devicetree/bindings/writing-schema.rst for instructions).

Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml line 45

Quoted 3 lines
Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml new file +3 -0
+      compatible = "brcm,kona-wdt";
+      reg = <0x35002f40 0x6c>;
+    };

Keep only one example.

Best regards,
Krzysztof