diff mbox series

[2/5] arm64: dts: qcom: apq8096-db820c: drop simple-bus from clocks

Message ID 20230324202244.744271-2-krzysztof.kozlowski@linaro.org
State Accepted
Commit 704e26678c8d50d8988e30a47edddbb361e9e973
Headers show
Series [1/5] arm64: dts: qcom: msm8916-thwc-ufi001c: add function to pin config | expand

Commit Message

Krzysztof Kozlowski March 24, 2023, 8:22 p.m. UTC
'clocks' node is not a bus, but just a placeholder for clocks:

  apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
    From schema: dtschema/schemas/simple-bus.yaml
  apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]],  ...
    From schema: dtschema/schemas/simple-bus.yaml

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 1 -
 1 file changed, 1 deletion(-)

Comments

Konrad Dybcio March 25, 2023, 12:03 p.m. UTC | #1
On 24.03.2023 21:22, Krzysztof Kozlowski wrote:
> 'clocks' node is not a bus, but just a placeholder for clocks:
> 
>   apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
>     From schema: dtschema/schemas/simple-bus.yaml
>   apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]],  ...
>     From schema: dtschema/schemas/simple-bus.yaml
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> index 4476e2e22816..b599909c4463 100644
> --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> @@ -63,7 +63,6 @@ chosen {
>  	};
>  
>  	clocks {
> -		compatible = "simple-bus";
>  		divclk4: divclk4 {
>  			compatible = "fixed-clock";
>  			#clock-cells = <0>;
Dmitry Baryshkov Aug. 31, 2023, 9:04 a.m. UTC | #2
On Fri, 24 Mar 2023 at 22:23, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> 'clocks' node is not a bus, but just a placeholder for clocks:
>
>   apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
>     From schema: dtschema/schemas/simple-bus.yaml
>   apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]],  ...
>     From schema: dtschema/schemas/simple-bus.yaml
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

This patch broke audio support on DB820c. Now the divclk1 clock is not
registered, as drivers/clk/clk-gpio.c doesn't have CLK_OF_DECLARE().

Stephen, What would be the best way to fix this? Add CLK_OF_DECLARE
support to clk-gpio.c? Or simply move divclk1 from /clocks into a
separate device?

What is the rule, which clock drivers must support such device-less
binding using /clocks/foo nodes?

> ---
>  arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> index 4476e2e22816..b599909c4463 100644
> --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> @@ -63,7 +63,6 @@ chosen {
>         };
>
>         clocks {
> -               compatible = "simple-bus";
>                 divclk4: divclk4 {
>                         compatible = "fixed-clock";
>                         #clock-cells = <0>;
> --
> 2.34.1
>
Krzysztof Kozlowski Sept. 1, 2023, 8:04 a.m. UTC | #3
On 31/08/2023 11:04, Dmitry Baryshkov wrote:
> On Fri, 24 Mar 2023 at 22:23, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> 'clocks' node is not a bus, but just a placeholder for clocks:
>>
>>   apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
>>     From schema: dtschema/schemas/simple-bus.yaml
>>   apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]],  ...
>>     From schema: dtschema/schemas/simple-bus.yaml
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> This patch broke audio support on DB820c. Now the divclk1 clock is not
> registered, as drivers/clk/clk-gpio.c doesn't have CLK_OF_DECLARE().
> 
> Stephen, What would be the best way to fix this? Add CLK_OF_DECLARE
> support to clk-gpio.c? Or simply move divclk1 from /clocks into a
> separate device?
> 
> What is the rule, which clock drivers must support such device-less
> binding using /clocks/foo nodes?

Uh, sorry for that, I think my patch is incomplete. I did not notice
that not all clocks have CLK_OF_DECLARE. How about moving all the clocks
out of "clocks" node to the root? Then they should be instantiated,
regardless of having CLK_OF_DECLARE.

Best regards,
Krzysztof
Dmitry Baryshkov Sept. 1, 2023, 2:24 p.m. UTC | #4
On Fri, 1 Sept 2023 at 11:04, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 31/08/2023 11:04, Dmitry Baryshkov wrote:
> > On Fri, 24 Mar 2023 at 22:23, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> 'clocks' node is not a bus, but just a placeholder for clocks:
> >>
> >>   apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
> >>     From schema: dtschema/schemas/simple-bus.yaml
> >>   apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]],  ...
> >>     From schema: dtschema/schemas/simple-bus.yaml
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >
> > This patch broke audio support on DB820c. Now the divclk1 clock is not
> > registered, as drivers/clk/clk-gpio.c doesn't have CLK_OF_DECLARE().
> >
> > Stephen, What would be the best way to fix this? Add CLK_OF_DECLARE
> > support to clk-gpio.c? Or simply move divclk1 from /clocks into a
> > separate device?
> >
> > What is the rule, which clock drivers must support such device-less
> > binding using /clocks/foo nodes?
>
> Uh, sorry for that, I think my patch is incomplete. I did not notice
> that not all clocks have CLK_OF_DECLARE. How about moving all the clocks
> out of "clocks" node to the root? Then they should be instantiated,
> regardless of having CLK_OF_DECLARE.

We can do this, but first I'd like to understand the rule with /clocks/.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
index 4476e2e22816..b599909c4463 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
@@ -63,7 +63,6 @@  chosen {
 	};
 
 	clocks {
-		compatible = "simple-bus";
 		divclk4: divclk4 {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;