mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema
@ 2026-05-31 17:15 Udaya Kiran Challa
  2026-06-01  8:47 ` Alexey Charkov
  2026-06-01 11:42 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Udaya Kiran Challa @ 2026-05-31 17:15 UTC (permalink / raw)
  To: alchark, krzk, robh, krzk+dt, conor+dt
  Cc: skhan, me, linux-rtc, devicetree, linux-kernel, Udaya Kiran Challa

Convert the VIA/Wondermedia VT8500 Power Management controller binding
from the legacy text format to DT schema.

Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
---
Changelog:
Changes since v1:
- Make child node binding constrained
- Fix example to include the clock container node
- Fix maintainers list

Link to v1:https://lore.kernel.org/all/20260524110047.37590-1-challauday369@gmail.com/
---
 .../bindings/arm/vt8500/via,vt8500-pmc.txt    | 13 -----
 .../bindings/arm/vt8500/via,vt8500-pmc.yaml   | 53 +++++++++++++++++++
 2 files changed, 53 insertions(+), 13 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml

diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
deleted file mode 100644
index 521b9c7de933..000000000000
--- a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-VIA/Wondermedia VT8500 Power Management Controller
------------------------------------------------------
-
-Required properties:
-- compatible : "via,vt8500-pmc"
-- reg : Should contain 1 register ranges(address and length)
-
-Example:
-
-	pmc@d8130000 {
-		compatible = "via,vt8500-pmc";
-		reg = <0xd8130000 0x1000>;
-	};
diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml
new file mode 100644
index 000000000000..e340281e5726
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/vt8500/via,vt8500-pmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VIA/Wondermedia VT8500 Power Management Controller
+
+maintainers:
+  - Alexey Charkov <alchark@gmail.com>
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+description:
+  The VIA/Wondermedia Power Management Controller provides register access for
+  clock and power management functions on VT8500 and WM8xxx series SoCs.
+
+properties:
+  compatible:
+    const: via,vt8500-pmc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    type: object
+    description: Container node for VT8500/WM8xxx clock provider nodes.
+    properties:
+      "#address-cells":
+        const: 1
+      "#size-cells":
+        const: 0
+    required:
+      - "#address-cells"
+      - "#size-cells"
+    additionalProperties: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pmc@d8130000 {
+        compatible = "via,vt8500-pmc";
+        reg = <0xd8130000 0x1000>;
+
+        clocks {
+            #address-cells = <1>;
+            #size-cells = <0>;
+        };
+    };
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema
  2026-05-31 17:15 [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema Udaya Kiran Challa
@ 2026-06-01  8:47 ` Alexey Charkov
  2026-06-01 11:42 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Charkov @ 2026-06-01  8:47 UTC (permalink / raw)
  To: Udaya Kiran Challa
  Cc: krzk, robh, krzk+dt, conor+dt, skhan, me, linux-rtc, devicetree,
	linux-kernel

On Sun, May 31, 2026 at 9:16 PM Udaya Kiran Challa
<challauday369@gmail.com> wrote:
>
> Convert the VIA/Wondermedia VT8500 Power Management controller binding
> from the legacy text format to DT schema.
>
> Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
> ---
> Changelog:
> Changes since v1:
> - Make child node binding constrained
> - Fix example to include the clock container node
> - Fix maintainers list
>
> Link to v1:https://lore.kernel.org/all/20260524110047.37590-1-challauday369@gmail.com/
> ---
>  .../bindings/arm/vt8500/via,vt8500-pmc.txt    | 13 -----
>  .../bindings/arm/vt8500/via,vt8500-pmc.yaml   | 53 +++++++++++++++++++
>  2 files changed, 53 insertions(+), 13 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
>  create mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
> deleted file mode 100644
> index 521b9c7de933..000000000000
> --- a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -VIA/Wondermedia VT8500 Power Management Controller
> ------------------------------------------------------
> -
> -Required properties:
> -- compatible : "via,vt8500-pmc"
> -- reg : Should contain 1 register ranges(address and length)
> -
> -Example:
> -
> -       pmc@d8130000 {
> -               compatible = "via,vt8500-pmc";
> -               reg = <0xd8130000 0x1000>;
> -       };
> diff --git a/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml
> new file mode 100644
> index 000000000000..e340281e5726
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/vt8500/via,vt8500-pmc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VIA/Wondermedia VT8500 Power Management Controller
> +
> +maintainers:
> +  - Alexey Charkov <alchark@gmail.com>
> +  - Krzysztof Kozlowski <krzk@kernel.org>
> +
> +description:
> +  The VIA/Wondermedia Power Management Controller provides register access for
> +  clock and power management functions on VT8500 and WM8xxx series SoCs.
> +
> +properties:
> +  compatible:
> +    const: via,vt8500-pmc

Each SoC version had different registers within the PMC node (even
though key components such as the OS timer and reset control kept the
same offsets and function). So this really should be a SoC-versioned
enum rather than a single "compatible", as they were never really
mutually compatible (despite what current DTs say).

> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    type: object
> +    description: Container node for VT8500/WM8xxx clock provider nodes.
> +    properties:
> +      "#address-cells":
> +        const: 1
> +      "#size-cells":
> +        const: 0
> +    required:
> +      - "#address-cells"
> +      - "#size-cells"

#address-cells and #size-cells are automatically required once the
subnodes have regs, so it seems that this whole section could become
just "clocks: true" with no particular loss of meaning.

> +    additionalProperties: true

If the PMC binding ends up separate from the clock control bindings
(which I'm somewhat skeptical of, see [1]), shouldn't the subnodes of
this clocks node be explicitly specified to follow that binding? The
fixed 25 MHz reference clock is not part of the PMC and doesn't belong
there (despite what current device trees contain), but the rest do.

[1] https://lore.kernel.org/all/CABjd4YzJoHrx1suMbhNvrMP+X=d=thvXYwSY=UD-4Qy=7-qmjw@mail.gmail.com/

Best regards,
Alexey

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pmc@d8130000 {
> +        compatible = "via,vt8500-pmc";
> +        reg = <0xd8130000 0x1000>;
> +
> +        clocks {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +        };
> +    };
> --
> 2.43.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema
  2026-05-31 17:15 [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema Udaya Kiran Challa
  2026-06-01  8:47 ` Alexey Charkov
@ 2026-06-01 11:42 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-06-01 11:42 UTC (permalink / raw)
  To: Udaya Kiran Challa, alchark, robh, krzk+dt, conor+dt
  Cc: skhan, me, linux-rtc, devicetree, linux-kernel

On 31/05/2026 19:15, Udaya Kiran Challa wrote:
> +  clocks:
> +    type: object
> +    description: Container node for VT8500/WM8xxx clock provider nodes.
> +    properties:
> +      "#address-cells":
> +        const: 1
> +      "#size-cells":
> +        const: 0
> +    required:
> +      - "#address-cells"
> +      - "#size-cells"
> +    additionalProperties: true


No improvements. Which part was confusing? Or let's rephrase, from where
did you take such syntax?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-01 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31 17:15 [PATCH v2] dt-bindings: arm: vt8500: via,vt8500-pmc: Convert to DT Schema Udaya Kiran Challa
2026-06-01  8:47 ` Alexey Charkov
2026-06-01 11:42 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®