Re: [PATCH] dt-bindings: clock: ti: Convert interface.txt to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 28 Nov 2023 09:00:16 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote:

> > +required:
> > +  - compatible
> > +  - clocks
> > +  - '#clock-cells'  
> 
> reg is required. Device cannot take "reg" from parent, DTS does not work
> like this.

Well, apparently they do... and I am just dealing with status quo and not
how it should be.
Look at commit 31fc1c63c2ae4a542e3c7ac572a10a59ece45c24
for the reasoning of not having reg.


well, look at drivers/clk/ti/clk.c
ti_clk_get_reg_addr();

...

       if (of_property_read_u32_index(node, "reg", index, &val)) {
                if (of_property_read_u32_index(node->parent, "reg",
                                               index, &val)) {
                        pr_err("%pOFn or parent must have reg[%d]!\n",
                               node, index);
                        return -EINVAL;
                }
        }


We have two usecases here (status quo in dts usage and code):
If these interface clocks are below a ti,clksel then we are describing 
multiple bits in the same register and therefore every child of ti,clksel
would have the same reg.
If the interface clock is not below a ti,clksel then we have reg.

Regards,
Andreas




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux