dt-bindings: watchdog: convert Broadcom's WDT to the json-schema
Subsystems (5)
PATCH v4 1/2 dt-bindings: watchdog: convert Broadcom's WDT to the json-schema
From: Rafał Miłecki <[email protected]>
This helps validating DTS files.
---
V2: Use valid $id
V3: Add "clocks" maxItems and include Rob's Reviewed-by
--- .../bindings/watchdog/brcm,bcm7038-wdt.txt | 19 --------- .../bindings/watchdog/brcm,bcm7038-wdt.yaml | 41 +++++++++++++++++++ 2 files changed, 41 insertions(+), 19 deletions(-) delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt deleted +0 -19
@@ -1,19 +0,0 @@ -BCM7038 Watchdog timer - -Required properties: - -- compatible : should be "brcm,bcm7038-wdt" -- reg : Specifies base physical address and size of the registers. - -Optional properties: - -- clocks: The clock running the watchdog. If no clock is found the - driver will default to 27000000 Hz. - -Example: - -watchdog@f040a7e8 { - compatible = "brcm,bcm7038-wdt"; - clocks = <&upg_fixed>; - reg = <0xf040a7e8 0x16>; -};
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH v4 2/2 dt-bindings: mfd: add Broadcom's Timer-Watchdog block
From: Rafał Miłecki <[email protected]>
It's a block implementing few time related functions depending on a (SoC specific) variant. At this point there is ready binding for a watchdog only. Work on remaining subblocks (e.g. "reg" based reboot) is in progress.
---
V2: Update $id, description, compatible, example & commit message
V3: Drop "brcm,twd" from compatible list per Rob's review
--- .../devicetree/bindings/mfd/brcm,twd.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/brcm,twd.yaml
Documentation/devicetree/bindings/mfd/brcm,twd.yaml new file +61 -0
@@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/brcm,twd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom's Timer-Watchdog (aka TWD) + +maintainers: + - Rafał Miłecki <[email protected]> + +description: | + Broadcom has a Timer-Watchdog block used in multiple SoCs (e.g., BCM4908, + BCM63xx, BCM7038). There are few variants available (they differ slightly in + registers layout). This block consists of: timers, watchdog and optionally a + software reset handler. + +properties: + compatible: + items: + - enum: + - brcm,bcm4908-twd + - brcm,bcm7038-twd + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + '^watchdog@[a-f0-9]+$': + $ref: /schemas/watchdog/brcm,bcm7038-wdt.yaml + +additionalProperties: false + +required: + - reg + +examples: + - | + timer-mfd@ff800400 { + compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; + reg = <0xff800400 0x4c>; + ranges = <0x00000000 0xff800400 0x4c>; + + #address-cells = <1>; + #size-cells = <1>; + + watchdog@28 { + compatible = "brcm,bcm7038-wdt"; + reg = <0x28 0x8>; + }; + };
Signature · 1 line
2.31.1
Rob Herring
maintainerRe: [PATCH V4 2/2] dt-bindings: mfd: add Broadcom's Timer-Watchdog block
Quoted 7 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
It's a block implementing few time related functions depending on a (SoC specific) variant. At this point there is ready binding for a watchdog only. Work on remaining subblocks (e.g. "reg" based reboot) is in progress.
Quoted 9 lines
Signed-off-by Rafał Miłecki <[email protected]>---
V2: Update $id, description, compatible, example & commit message
V3: Drop "brcm,twd" from compatible list per Rob's review--- .../devicetree/bindings/mfd/brcm,twd.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/brcm,twd.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Unknown file referenced: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/dtschema/schemas/watchdog/brcm,bcm7038-wdt.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/brcm,twd.example.dt.yaml'
Unknown file referenced: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/dtschema/schemas/watchdog/brcm,bcm7038-wdt.yaml' make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/mfd/brcm,twd.example.dt.yaml] Error 255
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1554679
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.