Re: [RFC PATCH v2 01/19] dt-bindings: clock: Add VO subsystem clocks and update address requirements

From: Stephen Boyd
Date: Mon Dec 23 2024 - 15:51:24 EST


Quoting Michal Wilczynski (2024-12-23 04:55:35)
> The T-Head TH1520 SoC’s AP clock controller now needs two address ranges
> to manage both the Application Processor (AP) and Video Output (VO)
> subsystem clocks. Update the device tree bindings to require two `reg`
> entries, one for the AP clocks and one for the VO clocks.
>
> Additionally, introduce new VO subsystem clock constants in the header
> file. These constants will be used by the driver to control VO-related
> components such as display and graphics units.
>
> Signed-off-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
> ---
[...]
> diff --git a/Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml b/Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml
> index 0129bd0ba4b3..f0df97a450ef 100644
> --- a/Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml
> +++ b/Documentation/devicetree/bindings/clock/thead,th1520-clk-ap.yaml
> @@ -47,7 +54,9 @@ examples:
> #include <dt-bindings/clock/thead,th1520-clk-ap.h>
> clock-controller@ef010000 {
> compatible = "thead,th1520-clk-ap";
> - reg = <0xef010000 0x1000>;
> + reg = <0xef010000 0x1000>,
> + <0xff010000 0x1000>;

I don't get it. Why not have two nodes and two devices? They have
different register regions so likely they're different devices on the
internal SoC bus. They may have the same input clks, but otherwise I
don't see how they're the same node.

> + reg-names = "ap-clks", "vo-clks";
> clocks = <&osc>;
> #clock-cells = <1>;
> };