Re: [PATCH v2] dt-bindings: clock: via,vt8500: Convert to DT Schema

From: Krzysztof Kozlowski

Date: Fri May 22 2026 - 02:42:54 EST


On Thu, May 21, 2026 at 10:37:28PM +0530, Udaya Kiran Challa wrote:
> 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 <challauday369@xxxxxxxxx>
> ---
> Changelog:
> Changes since v1:
> - Add default value for divisor-mask
> - Add required properties compatible and model
> - Fix example node name
> - Update example size cells and reg value
>
> Link to v1:https://lore.kernel.org/all/20260520025131.17772-1-challauday369@xxxxxxxxx/
> ---
> .../bindings/clock/via,vt8500-clock.yaml | 126 ++++++++++++++++++
> .../devicetree/bindings/clock/vt8500.txt | 74 ----------
> 2 files changed, 126 insertions(+), 74 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml
> delete mode 100644 Documentation/devicetree/bindings/clock/vt8500.txt
>
> diff --git a/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml
> new file mode 100644
> index 000000000000..9e19103866bc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/via,vt8500-clock.yaml
> @@ -0,0 +1,126 @@
> +# 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 <mturquette@xxxxxxxxxxxx>
> + - Stephen Boyd <sboyd@xxxxxxxxxx>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

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

Drop description

> +
> + "#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
> + default: 0x1f
> + 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

reg: false, no?

> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + / {
> + compatible = "via,wm8650";
> + model = "Wondermedia WM8650";
> +
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + ref25: clock-25000000 {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <25000000>;
> + };

Drop everything above

> +
> + plla: clock@200 {
> + compatible = "wm,wm8650-pll-clock";
> + reg = <0x200 0x04>;
> + clocks = <&ref25>;
> + #clock-cells = <0>;
> + };
> +
> + clksdhc: clock {

Entire binding is for part of other device, so where is the rest? This
should not be done separately from the parent. And then example goes
only to one place.

Best regards,
Krzysztof