Skip to contentSkip to conversation

dt-bindings: watchdog: brcm,kona-wdt: convert txt file to yaml

PATCH Superseded Nikita Bondarenko 2 participants 2 messages Apr 2, 2023

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: watchdog: brcm,kona-wdt: convert txt file to yaml

Remove device tree binding in txt
Add device tree binding in json-schema

---

Changes in v2, according to review comments:
- use subject prefixes matching the subsystem in patch subject
- add commit message
- update the list of maintainers: add here all maintainers returned by scripts/get_maintainer.p who are marked as "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX"
- remove quotes in - $ref: watchdog.yaml#
- remove description for reg
- leave one example
- add all SoCs mentioned in txt file description to compatible enum values

Both checks (dtbs_check, dt_binding_check) return no error:

make DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dtbs_check

  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json

make DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dt_binding_check

  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  DTEX    Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dts

DTC_CHK Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dtb

 .../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 2 lines · Nikita Bondarenko

Remove device tree binding in txt
Add device tree binding in json-schema

Write complete sentences. The commit msg purpose is not to explain the diff, we can read that. The purpose is to explain why though we don't need much reasoning why for conversions. What is useful is any fixes or changes you made to the binding (only because the existing binding didn't match reality). For example, there's a mismatch in the compatible. If you aren't adjusting the schema, then it means you think the .dts file is wrong and it needs to be fixed.

Quoted 2 lines

Single blank line here.

Quoted 12 lines

---

Changes in v2, according to review comments:
- use subject prefixes matching the subsystem in patch subject
- add commit message
- update the list of maintainers: add here all maintainers returned by scripts/get_maintainer.p who are marked as "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX"
- remove quotes in - $ref: watchdog.yaml#
- remove description for reg
- leave one example
- add all SoCs mentioned in txt file description to compatible enum values

Quoted 6 lines

Both checks (dtbs_check, dt_binding_check) return no error:

make DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dtbs_check

  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json

Doesn't match what I get below...

Quoted 6 lines

make DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.yaml ARCH=arm dt_binding_check

  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
  DTEX    Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dts
Quoted 8 lines

DTC_CHK Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.example.dtb

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