dt-bindings: clock: via,vt8500: Convert to DT Schema
Subsystems (3)
PATCH 1/1 dt-bindings: clock: via,vt8500: Convert to DT Schema
Convert the VIA/Wondermedia VT8500 and Wondermedia WM8xxx series SoCs clock controller binding from the legacy text format to DT schema.
--- .../bindings/clock/via,vt8500-clock.yaml | 122 ++++++++++++++++++ .../devicetree/bindings/clock/vt8500.txt | 74 ----------- 2 files changed, 122 insertions(+), 74 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml delete mode 100644 Documentation/devicetree/bindings/clock/vt8500.txt
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file +122 -0
@@ -0,0 +1,122 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/via,vt8500-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VIA/Wondermedia VT8500 Clock Controller + +maintainers: + - Michael Turquette <[email protected]> + - Stephen Boyd <[email protected]> + +description: | + Clock controller bindings for VIA/Wondermedia VT8500 and Wondermedia WM8xxx + series SoCs. + +properties: + compatible: + enum: + - via,vt8500-pll-clock + - wm,wm8650-pll-clock + - wm,wm8750-pll-clock + - wm,wm8850-pll-clock + - via,vt8500-device-clock + + reg: + maxItems: 1 + description: + Offset of the PLL register within the PMC register space. + + clocks: + maxItems: 1 + description: + Parent reference clock. + + "#clock-cells": + const: 0 + + enable-reg: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset of the clock enable register within the PMC register space. + + enable-bit: + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 31 + description: + Bit index controlling clock enable. + + divisor-reg: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Offset of the clock divisor register within the PMC register space. + + divisor-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask describing the divisor field inside divisor-reg. + +required: + - compatible + - "#clock-cells" + +allOf: + - if: + properties: + compatible: + enum: + - via,vt8500-pll-clock + - wm,wm8650-pll-clock + - wm,wm8750-pll-clock + - wm,wm8850-pll-clock + then: + required: + - reg + - clocks + + - if: + properties: + compatible: + const: via,vt8500-device-clock + then: + required: + - clocks + anyOf: + - required: + - enable-reg + - enable-bit + - required: + - divisor-reg + +additionalProperties: false + +examples: + - | + / { + #address-cells = <1>; + #size-cells = <0>; + + ref25: ref25M { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + }; + + plla: clock@200 { + compatible = "wm,wm8650-pll-clock"; + reg = <0x200>; + clocks = <&ref25>; + #clock-cells = <0>; + }; + + clksdhc: clock { + compatible = "via,vt8500-device-clock"; + clocks = <&plla>; + divisor-reg = <0x328>; + divisor-mask = <0x3f>; + enable-reg = <0x254>; + enable-bit = <18>; + #clock-cells = <0>; + }; + };
Documentation/devicetree/bindings/clock/vt8500.txt deleted +0 -74
74 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Missing default value for `divisor-mask` property in the DT schema. - [Low] Example node uses a…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Missing default value for divisor-mask property in the DT schema.
- [Low] Example node uses a deprecated name for fixed-clock, which will cause schema validation warnings. --
commit 5bd68ac4f98e8a51a2fee1d1c82c98071336d42f
Author: Udaya Kiran Challa <[email protected]>
dt-bindings: clock: via,vt8500: Convert to DT Schema
Convert the VIA/Wondermedia VT8500 and Wondermedia WM8xxx series SoCs clock controller binding from the legacy text format to DT schema.
Quoted 5 lines
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml line 58
Quoted 4 lines
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file +4
-0+ divisor-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask describing the divisor field inside divisor-reg.
[Severity: Low]
The legacy text binding explicitly specified that divisor-mask defaults to 0x1f if not specified. Can we include a default value here to ensure the dt-schema validation tools can infer it?
[ ... ]
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml line 100
Quoted 7 lines
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file +7
-0+examples: + - | + / { + #address-cells = <1>; + #size-cells = <0>; + + ref25: ref25M {
[Severity: Low]
Does this node name cause schema validation warnings? The core fixed-clock.yaml schema requires node names to match the pattern ^clock-([0-9]+|[a-z0-9-]+)$.
Naming it clock-25000000 might be better to avoid warnings during make dt_binding_check.
Quoted 4 lines
Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml new file +4
-0+ compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Rob Herring (Arm)
maintainerQuoted 11 lines · Udaya Kiran Challa
Convert the VIA/Wondermedia VT8500 and Wondermedia WM8xxx series SoCs clock controller binding from the legacy text format to DT schema.
Signed-off-by Udaya Kiran Challa <[email protected]>--- .../bindings/clock/via,vt8500-clock.yaml | 122 ++++++++++++++++++ .../devicetree/bindings/clock/vt8500.txt | 74 ----------- 2 files changed, 122 insertions(+), 74 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml delete mode 100644 Documentation/devicetree/bindings/clock/vt8500.txt
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/via,vt8500-clock.example.dtb: /: clock@200:reg:0: [512] is too short
from schema $id: http://devicetree.org/schemas/root-node.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/via,vt8500-clock.example.dtb: /: #size-cells: 0 is not one of [1, 2]
from schema $id: http://devicetree.org/schemas/root-node.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/via,vt8500-clock.example.dtb: /: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/via,vt8500-clock.example.dtb: /: 'model' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.