[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231128093241.707a4fa0@aktux>
Date: Tue, 28 Nov 2023 09:32:41 +0100
From: Andreas Kemnade <andreas@...nade.info>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: mturquette@...libre.com, sboyd@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
kristo@...nel.org, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: clock: ti: Convert interface.txt to
json-schema
On Tue, 28 Nov 2023 09:00:16 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> 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
Powered by blists - more mailing lists