Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
@ 2024-01-04  8:06 Fenglin Wu via B4 Relay
  2024-01-04  9:53 ` Dmitry Baryshkov
  0 siblings, 1 reply; 14+ messages in thread
From: Fenglin Wu via B4 Relay @ 2024-01-04  8:06 UTC (permalink / raw)
  To: kernel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Fenglin Wu

From: Fenglin Wu <quic_fenglinw@quicinc.com>

Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
so add it for ipq6018 gcc device node to eliminate following warning in
dtbs_check:

arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
	'#power-domain-cells' is a required property
from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index 39cd6b76b4c1..54914912d610 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -386,6 +386,7 @@ gcc: gcc@1800000 {
 			reg = <0x0 0x01800000 0x0 0x80000>;
 			clocks = <&xo>, <&sleep_clk>;
 			clock-names = "xo", "sleep_clk";
+			#power-domain-cells = <1>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 		};

---
base-commit: 17cb8a20bde66a520a2ca7aad1063e1ce7382240
change-id: 20240103-gcc-docs-update-fa604579e468

Best regards,
-- 
Fenglin Wu <quic_fenglinw@quicinc.com>


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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04  8:06 [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node Fenglin Wu via B4 Relay
@ 2024-01-04  9:53 ` Dmitry Baryshkov
  2024-01-04 10:07   ` Krzysztof Kozlowski
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2024-01-04  9:53 UTC (permalink / raw)
  To: quic_fenglinw
  Cc: kernel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
<devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>
> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>
> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
> so add it for ipq6018 gcc device node to eliminate following warning in
> dtbs_check:
>
> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>         '#power-domain-cells' is a required property
> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#

But ipq6018 doesn't implement GDSC support. So for the sake of fixing
the warning you are adding a bogus property.

>
> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> index 39cd6b76b4c1..54914912d610 100644
> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> @@ -386,6 +386,7 @@ gcc: gcc@1800000 {
>                         reg = <0x0 0x01800000 0x0 0x80000>;
>                         clocks = <&xo>, <&sleep_clk>;
>                         clock-names = "xo", "sleep_clk";
> +                       #power-domain-cells = <1>;
>                         #clock-cells = <1>;
>                         #reset-cells = <1>;
>                 };
>
> ---
> base-commit: 17cb8a20bde66a520a2ca7aad1063e1ce7382240
> change-id: 20240103-gcc-docs-update-fa604579e468
>
> Best regards,
> --
> Fenglin Wu <quic_fenglinw@quicinc.com>
>
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04  9:53 ` Dmitry Baryshkov
@ 2024-01-04 10:07   ` Krzysztof Kozlowski
  2024-01-04 10:13   ` Fenglin Wu
  2024-02-16 17:58   ` Bjorn Andersson
  2 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-04 10:07 UTC (permalink / raw)
  To: Dmitry Baryshkov, quic_fenglinw
  Cc: kernel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On 04/01/2024 10:53, Dmitry Baryshkov wrote:
> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>
>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>
>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
>> so add it for ipq6018 gcc device node to eliminate following warning in
>> dtbs_check:
>>
>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>         '#power-domain-cells' is a required property
>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> 
> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> the warning you are adding a bogus property.

Reminds me "fix" of removal of address/size-cells from DSI.

The point of fixing all the warnings is not only to make the warning go
away, but rather to fix the actual cause of the warning.

Best regards,
Krzysztof


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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04  9:53 ` Dmitry Baryshkov
  2024-01-04 10:07   ` Krzysztof Kozlowski
@ 2024-01-04 10:13   ` Fenglin Wu
  2024-01-04 10:16     ` Konrad Dybcio
  2024-02-16 17:58   ` Bjorn Andersson
  2 siblings, 1 reply; 14+ messages in thread
From: Fenglin Wu @ 2024-01-04 10:13 UTC (permalink / raw)
  To: Dmitry Baryshkov, quic_tdas, quic_aiquny
  Cc: kernel, Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel



On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>
>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>
>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
>> so add it for ipq6018 gcc device node to eliminate following warning in
>> dtbs_check:
>>
>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>          '#power-domain-cells' is a required property
>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> 
> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> the warning you are adding a bogus property.
> 
I agree. However, there are also some gcc drivers not implementing GDSC 
support but the bindings are adding '#power-domain-cells' in the DT 
example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, 
qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.

Actually I thought that maybe we should do a clean up by removing 
'#power-domain-cells' out of the qcom,gcc.yaml binding and only adding 
it into individual qcom,gcc-xxx.yaml for the driver which has 
implemented GDSC support. I checked this with Taniya offline, but she 
prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by 
adding the property, and she expects the GDSC support should be existing 
in most of qcom,gcc drivers especially the newer Qcom chipsets.


>>
>> Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> index 39cd6b76b4c1..54914912d610 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
>> @@ -386,6 +386,7 @@ gcc: gcc@1800000 {
>>                          reg = <0x0 0x01800000 0x0 0x80000>;
>>                          clocks = <&xo>, <&sleep_clk>;
>>                          clock-names = "xo", "sleep_clk";
>> +                       #power-domain-cells = <1>;
>>                          #clock-cells = <1>;
>>                          #reset-cells = <1>;
>>                  };
>>
>> ---
>> base-commit: 17cb8a20bde66a520a2ca7aad1063e1ce7382240
>> change-id: 20240103-gcc-docs-update-fa604579e468
>>
>> Best regards,
>> --
>> Fenglin Wu <quic_fenglinw@quicinc.com>
>>
>>
> 
> 

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:13   ` Fenglin Wu
@ 2024-01-04 10:16     ` Konrad Dybcio
  2024-01-04 10:27       ` Fenglin Wu
                         ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Konrad Dybcio @ 2024-01-04 10:16 UTC (permalink / raw)
  To: Fenglin Wu, Dmitry Baryshkov, quic_tdas, quic_aiquny
  Cc: kernel, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On 4.01.2024 11:13, Fenglin Wu wrote:
> 
> 
> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>
>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>
>>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
>>> so add it for ipq6018 gcc device node to eliminate following warning in
>>> dtbs_check:
>>>
>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>          '#power-domain-cells' is a required property
>>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>
>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>> the warning you are adding a bogus property.
>>
> I agree. However, there are also some gcc drivers not implementing GDSC support but the bindings are adding '#power-domain-cells' in the DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
> 
> Actually I thought that maybe we should do a clean up by removing '#power-domain-cells' out of the qcom,gcc.yaml binding and only adding it into individual qcom,gcc-xxx.yaml for the driver which has implemented GDSC support. I checked this with Taniya offline, but she prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by adding the property, and she expects the GDSC support should be existing in most of qcom,gcc drivers especially the newer Qcom chipsets.

Before we start changing anything, we should assess whether these
platforms actually have GDSCs within this clock controller block,
even if they are (currently) not described in the clk driver.

Konrad

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:16     ` Konrad Dybcio
@ 2024-01-04 10:27       ` Fenglin Wu
  2024-01-04 10:30         ` Dmitry Baryshkov
  2024-01-04 10:32       ` Robert Marko
  2024-01-04 10:34       ` Dmitry Baryshkov
  2 siblings, 1 reply; 14+ messages in thread
From: Fenglin Wu @ 2024-01-04 10:27 UTC (permalink / raw)
  To: Konrad Dybcio, Dmitry Baryshkov, quic_tdas, quic_aiquny
  Cc: kernel, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel



On 1/4/2024 6:16 PM, Konrad Dybcio wrote:
> On 4.01.2024 11:13, Fenglin Wu wrote:
>>
>>
>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>>
>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>>
>>>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
>>>> so add it for ipq6018 gcc device node to eliminate following warning in
>>>> dtbs_check:
>>>>
>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>>           '#power-domain-cells' is a required property
>>>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>>
>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>>> the warning you are adding a bogus property.
>>>
>> I agree. However, there are also some gcc drivers not implementing GDSC support but the bindings are adding '#power-domain-cells' in the DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
>>
>> Actually I thought that maybe we should do a clean up by removing '#power-domain-cells' out of the qcom,gcc.yaml binding and only adding it into individual qcom,gcc-xxx.yaml for the driver which has implemented GDSC support. I checked this with Taniya offline, but she prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by adding the property, and she expects the GDSC support should be existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
> 
> Before we start changing anything, we should assess whether these
> platforms actually have GDSCs within this clock controller block,
> even if they are (currently) not described in the clk driver.
> 
I would assume '#power-domain-cells' is only required for drivers which 
register GDSC as power-domain device, for drivers that only configure 
GDSC during probe or for platforms have GDSC but not register them as 
power-domain device, making '#power-domain-cells' as a required property 
doesn't help anything but just generating more dtbs check warnings.

> Konrad

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:27       ` Fenglin Wu
@ 2024-01-04 10:30         ` Dmitry Baryshkov
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2024-01-04 10:30 UTC (permalink / raw)
  To: Fenglin Wu
  Cc: Konrad Dybcio, quic_tdas, quic_aiquny, kernel, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel

On Thu, 4 Jan 2024 at 12:27, Fenglin Wu <quic_fenglinw@quicinc.com> wrote:
>
>
>
> On 1/4/2024 6:16 PM, Konrad Dybcio wrote:
> > On 4.01.2024 11:13, Fenglin Wu wrote:
> >>
> >>
> >> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
> >>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> >>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
> >>>>
> >>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
> >>>>
> >>>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
> >>>> so add it for ipq6018 gcc device node to eliminate following warning in
> >>>> dtbs_check:
> >>>>
> >>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
> >>>>           '#power-domain-cells' is a required property
> >>>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> >>>
> >>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> >>> the warning you are adding a bogus property.
> >>>
> >> I agree. However, there are also some gcc drivers not implementing GDSC support but the bindings are adding '#power-domain-cells' in the DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
> >>
> >> Actually I thought that maybe we should do a clean up by removing '#power-domain-cells' out of the qcom,gcc.yaml binding and only adding it into individual qcom,gcc-xxx.yaml for the driver which has implemented GDSC support. I checked this with Taniya offline, but she prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by adding the property, and she expects the GDSC support should be existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
> >
> > Before we start changing anything, we should assess whether these
> > platforms actually have GDSCs within this clock controller block,
> > even if they are (currently) not described in the clk driver.
> >
> I would assume '#power-domain-cells' is only required for drivers which
> register GDSC as power-domain device, for drivers that only configure
> GDSC during probe or for platforms have GDSC but not register them as
> power-domain device, making '#power-domain-cells' as a required property
> doesn't help anything but just generating more dtbs check warnings.

If there is a hardware GDSC, it should be registered in software
unless there is a good reason to do otherwise.


-- 
With best wishes
Dmitry

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:16     ` Konrad Dybcio
  2024-01-04 10:27       ` Fenglin Wu
@ 2024-01-04 10:32       ` Robert Marko
  2024-01-04 10:40         ` Fenglin Wu
  2024-01-04 10:34       ` Dmitry Baryshkov
  2 siblings, 1 reply; 14+ messages in thread
From: Robert Marko @ 2024-01-04 10:32 UTC (permalink / raw)
  To: Konrad Dybcio, Fenglin Wu, Dmitry Baryshkov, quic_tdas,
	quic_aiquny
  Cc: kernel, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel


On 04. 01. 2024. 11:16, Konrad Dybcio wrote:
> On 4.01.2024 11:13, Fenglin Wu wrote:
>>
>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>>
>>>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
>>>> so add it for ipq6018 gcc device node to eliminate following warning in
>>>> dtbs_check:
>>>>
>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>>           '#power-domain-cells' is a required property
>>>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>>> the warning you are adding a bogus property.
>>>
>> I agree. However, there are also some gcc drivers not implementing GDSC support but the bindings are adding '#power-domain-cells' in the DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
>>
>> Actually I thought that maybe we should do a clean up by removing '#power-domain-cells' out of the qcom,gcc.yaml binding and only adding it into individual qcom,gcc-xxx.yaml for the driver which has implemented GDSC support. I checked this with Taniya offline, but she prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by adding the property, and she expects the GDSC support should be existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
> Before we start changing anything, we should assess whether these
> platforms actually have GDSCs within this clock controller block,
> even if they are (currently) not described in the clk driver.
Hi,
IPQ6018 has GDSC-s, at least for the USB-s.
I tried configuring them a while ago, but the USB2.0 GDSC seems to 
either have a HW bug or
it uses some special configuration as its status bits never show that 
its ON [1].

[1] 
https://patchwork.kernel.org/project/linux-arm-msm/patch/20231025104457.628109-2-robimarko@gmail.com/

Regards,
Robert

>
> Konrad

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:16     ` Konrad Dybcio
  2024-01-04 10:27       ` Fenglin Wu
  2024-01-04 10:32       ` Robert Marko
@ 2024-01-04 10:34       ` Dmitry Baryshkov
  2 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2024-01-04 10:34 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Fenglin Wu, quic_tdas, quic_aiquny, kernel, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel

On Thu, 4 Jan 2024 at 12:16, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 4.01.2024 11:13, Fenglin Wu wrote:
> >
> >
> > On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
> >> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> >> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
> >>>
> >>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
> >>>
> >>> Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
> >>> so add it for ipq6018 gcc device node to eliminate following warning in
> >>> dtbs_check:
> >>>
> >>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
> >>>          '#power-domain-cells' is a required property
> >>> from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> >>
> >> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> >> the warning you are adding a bogus property.
> >>
> > I agree. However, there are also some gcc drivers not implementing GDSC support but the bindings are adding '#power-domain-cells' in the DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
> >
> > Actually I thought that maybe we should do a clean up by removing '#power-domain-cells' out of the qcom,gcc.yaml binding and only adding it into individual qcom,gcc-xxx.yaml for the driver which has implemented GDSC support. I checked this with Taniya offline, but she prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by adding the property, and she expects the GDSC support should be existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
>
> Before we start changing anything, we should assess whether these
> platforms actually have GDSCs within this clock controller block,
> even if they are (currently) not described in the clk driver.

APQ8064 / MSM8960 / MSM8x60  (and thus I assume IPQ8064) have an older
power rail control mechanism called footswitch / GFS_CTL. We do not
implement it (for now), but it might be worth implementing it as the
question has been raised.

-- 
With best wishes
Dmitry

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:32       ` Robert Marko
@ 2024-01-04 10:40         ` Fenglin Wu
  2024-01-04 10:49           ` Dmitry Baryshkov
  0 siblings, 1 reply; 14+ messages in thread
From: Fenglin Wu @ 2024-01-04 10:40 UTC (permalink / raw)
  To: Robert Marko, Konrad Dybcio, Dmitry Baryshkov, quic_tdas,
	quic_aiquny
  Cc: kernel, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel



On 1/4/2024 6:32 PM, Robert Marko wrote:
> 
> On 04. 01. 2024. 11:16, Konrad Dybcio wrote:
>> On 4.01.2024 11:13, Fenglin Wu wrote:
>>>
>>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>>>
>>>>> Property '#power-domain-cells' is required as per defined in 
>>>>> qcom,gcc.yaml
>>>>> so add it for ipq6018 gcc device node to eliminate following 
>>>>> warning in
>>>>> dtbs_check:
>>>>>
>>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>>>           '#power-domain-cells' is a required property
>>>>> from schema $id: 
>>>>> http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>>>> the warning you are adding a bogus property.
>>>>
>>> I agree. However, there are also some gcc drivers not implementing 
>>> GDSC support but the bindings are adding '#power-domain-cells' in the 
>>> DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml, 
>>> qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
>>>
>>> Actually I thought that maybe we should do a clean up by removing 
>>> '#power-domain-cells' out of the qcom,gcc.yaml binding and only 
>>> adding it into individual qcom,gcc-xxx.yaml for the driver which has 
>>> implemented GDSC support. I checked this with Taniya offline, but she 
>>> prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by 
>>> adding the property, and she expects the GDSC support should be 
>>> existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
>> Before we start changing anything, we should assess whether these
>> platforms actually have GDSCs within this clock controller block,
>> even if they are (currently) not described in the clk driver.
> Hi,
> IPQ6018 has GDSC-s, at least for the USB-s.
> I tried configuring them a while ago, but the USB2.0 GDSC seems to 
> either have a HW bug or
> it uses some special configuration as its status bits never show that 
> its ON [1].
> 
> [1] 
> https://patchwork.kernel.org/project/linux-arm-msm/patch/20231025104457.628109-2-robimarko@gmail.com/
> 
Thanks for the link! I checked the spec internal, and I did see GDSC 
device for USB0/USB1 controller is present in GCC clock controller.
So considering there is a patch ongoing to add GDSC device for ipq6018 
gcc driver, can the DT commit which adds '#power-domain-cells' be accepted?

> Regards,
> Robert
> 
>>
>> Konrad

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:40         ` Fenglin Wu
@ 2024-01-04 10:49           ` Dmitry Baryshkov
  2024-01-04 10:55             ` Fenglin Wu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2024-01-04 10:49 UTC (permalink / raw)
  To: Fenglin Wu
  Cc: Robert Marko, Konrad Dybcio, quic_tdas, quic_aiquny, kernel,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On Thu, 4 Jan 2024 at 12:41, Fenglin Wu <quic_fenglinw@quicinc.com> wrote:
>
>
>
> On 1/4/2024 6:32 PM, Robert Marko wrote:
> >
> > On 04. 01. 2024. 11:16, Konrad Dybcio wrote:
> >> On 4.01.2024 11:13, Fenglin Wu wrote:
> >>>
> >>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
> >>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> >>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
> >>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
> >>>>>
> >>>>> Property '#power-domain-cells' is required as per defined in
> >>>>> qcom,gcc.yaml
> >>>>> so add it for ipq6018 gcc device node to eliminate following
> >>>>> warning in
> >>>>> dtbs_check:
> >>>>>
> >>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
> >>>>>           '#power-domain-cells' is a required property
> >>>>> from schema $id:
> >>>>> http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> >>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> >>>> the warning you are adding a bogus property.
> >>>>
> >>> I agree. However, there are also some gcc drivers not implementing
> >>> GDSC support but the bindings are adding '#power-domain-cells' in the
> >>> DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml,
> >>> qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
> >>>
> >>> Actually I thought that maybe we should do a clean up by removing
> >>> '#power-domain-cells' out of the qcom,gcc.yaml binding and only
> >>> adding it into individual qcom,gcc-xxx.yaml for the driver which has
> >>> implemented GDSC support. I checked this with Taniya offline, but she
> >>> prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by
> >>> adding the property, and she expects the GDSC support should be
> >>> existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
> >> Before we start changing anything, we should assess whether these
> >> platforms actually have GDSCs within this clock controller block,
> >> even if they are (currently) not described in the clk driver.
> > Hi,
> > IPQ6018 has GDSC-s, at least for the USB-s.
> > I tried configuring them a while ago, but the USB2.0 GDSC seems to
> > either have a HW bug or
> > it uses some special configuration as its status bits never show that
> > its ON [1].
> >
> > [1]
> > https://patchwork.kernel.org/project/linux-arm-msm/patch/20231025104457.628109-2-robimarko@gmail.com/
> >
> Thanks for the link! I checked the spec internal, and I did see GDSC
> device for USB0/USB1 controller is present in GCC clock controller.
> So considering there is a patch ongoing to add GDSC device for ipq6018
> gcc driver, can the DT commit which adds '#power-domain-cells' be accepted?

What for?

-- 
With best wishes
Dmitry

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:49           ` Dmitry Baryshkov
@ 2024-01-04 10:55             ` Fenglin Wu
  2024-01-04 12:07               ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: Fenglin Wu @ 2024-01-04 10:55 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Robert Marko, Konrad Dybcio, quic_tdas, quic_aiquny, kernel,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel



On 1/4/2024 6:49 PM, Dmitry Baryshkov wrote:
> On Thu, 4 Jan 2024 at 12:41, Fenglin Wu <quic_fenglinw@quicinc.com> wrote:
>>
>>
>>
>> On 1/4/2024 6:32 PM, Robert Marko wrote:
>>>
>>> On 04. 01. 2024. 11:16, Konrad Dybcio wrote:
>>>> On 4.01.2024 11:13, Fenglin Wu wrote:
>>>>>
>>>>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>>>>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>>>>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>>>>>
>>>>>>> Property '#power-domain-cells' is required as per defined in
>>>>>>> qcom,gcc.yaml
>>>>>>> so add it for ipq6018 gcc device node to eliminate following
>>>>>>> warning in
>>>>>>> dtbs_check:
>>>>>>>
>>>>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>>>>>            '#power-domain-cells' is a required property
>>>>>>> from schema $id:
>>>>>>> http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>>>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>>>>>> the warning you are adding a bogus property.
>>>>>>
>>>>> I agree. However, there are also some gcc drivers not implementing
>>>>> GDSC support but the bindings are adding '#power-domain-cells' in the
>>>>> DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml,
>>>>> qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
>>>>>
>>>>> Actually I thought that maybe we should do a clean up by removing
>>>>> '#power-domain-cells' out of the qcom,gcc.yaml binding and only
>>>>> adding it into individual qcom,gcc-xxx.yaml for the driver which has
>>>>> implemented GDSC support. I checked this with Taniya offline, but she
>>>>> prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by
>>>>> adding the property, and she expects the GDSC support should be
>>>>> existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
>>>> Before we start changing anything, we should assess whether these
>>>> platforms actually have GDSCs within this clock controller block,
>>>> even if they are (currently) not described in the clk driver.
>>> Hi,
>>> IPQ6018 has GDSC-s, at least for the USB-s.
>>> I tried configuring them a while ago, but the USB2.0 GDSC seems to
>>> either have a HW bug or
>>> it uses some special configuration as its status bits never show that
>>> its ON [1].
>>>
>>> [1]
>>> https://patchwork.kernel.org/project/linux-arm-msm/patch/20231025104457.628109-2-robimarko@gmail.com/
>>>
>> Thanks for the link! I checked the spec internal, and I did see GDSC
>> device for USB0/USB1 controller is present in GCC clock controller.
>> So considering there is a patch ongoing to add GDSC device for ipq6018
>> gcc driver, can the DT commit which adds '#power-domain-cells' be accepted?
> 
> What for?
Maria (quic_aiquny@quicinc.com, copied) is working on automation tool in 
Qcom internally to check dt_binding and dtbs and she expects all the 
warnings/errors reported on Qcom board files can be fixed. She can help 
to comment further.

> 

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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04 10:55             ` Fenglin Wu
@ 2024-01-04 12:07               ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-04 12:07 UTC (permalink / raw)
  To: Fenglin Wu, Dmitry Baryshkov
  Cc: Robert Marko, Konrad Dybcio, quic_tdas, quic_aiquny, kernel,
	Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

On 04/01/2024 11:55, Fenglin Wu wrote:
> 
> 
> On 1/4/2024 6:49 PM, Dmitry Baryshkov wrote:
>> On Thu, 4 Jan 2024 at 12:41, Fenglin Wu <quic_fenglinw@quicinc.com> wrote:
>>>
>>>
>>>
>>> On 1/4/2024 6:32 PM, Robert Marko wrote:
>>>>
>>>> On 04. 01. 2024. 11:16, Konrad Dybcio wrote:
>>>>> On 4.01.2024 11:13, Fenglin Wu wrote:
>>>>>>
>>>>>> On 1/4/2024 5:53 PM, Dmitry Baryshkov wrote:
>>>>>>> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
>>>>>>> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
>>>>>>>> From: Fenglin Wu <quic_fenglinw@quicinc.com>
>>>>>>>>
>>>>>>>> Property '#power-domain-cells' is required as per defined in
>>>>>>>> qcom,gcc.yaml
>>>>>>>> so add it for ipq6018 gcc device node to eliminate following
>>>>>>>> warning in
>>>>>>>> dtbs_check:
>>>>>>>>
>>>>>>>> arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
>>>>>>>>            '#power-domain-cells' is a required property
>>>>>>>> from schema $id:
>>>>>>>> http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
>>>>>>> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
>>>>>>> the warning you are adding a bogus property.
>>>>>>>
>>>>>> I agree. However, there are also some gcc drivers not implementing
>>>>>> GDSC support but the bindings are adding '#power-domain-cells' in the
>>>>>> DT example, such as: qcom,gcc-apq8064.yaml, qcom,gcc-ipq4019.yaml,
>>>>>> qcom,gcc-ipq6018.yaml, qcom,gcc-ipq8064.yaml, qcom,gcc-msm8660.yaml.
>>>>>>
>>>>>> Actually I thought that maybe we should do a clean up by removing
>>>>>> '#power-domain-cells' out of the qcom,gcc.yaml binding and only
>>>>>> adding it into individual qcom,gcc-xxx.yaml for the driver which has
>>>>>> implemented GDSC support. I checked this with Taniya offline, but she
>>>>>> prefers only fixing it in ipq6018.dtsi as it doesn't hurt anything by
>>>>>> adding the property, and she expects the GDSC support should be
>>>>>> existing in most of qcom,gcc drivers especially the newer Qcom chipsets.
>>>>> Before we start changing anything, we should assess whether these
>>>>> platforms actually have GDSCs within this clock controller block,
>>>>> even if they are (currently) not described in the clk driver.
>>>> Hi,
>>>> IPQ6018 has GDSC-s, at least for the USB-s.
>>>> I tried configuring them a while ago, but the USB2.0 GDSC seems to
>>>> either have a HW bug or
>>>> it uses some special configuration as its status bits never show that
>>>> its ON [1].
>>>>
>>>> [1]
>>>> https://patchwork.kernel.org/project/linux-arm-msm/patch/20231025104457.628109-2-robimarko@gmail.com/
>>>>
>>> Thanks for the link! I checked the spec internal, and I did see GDSC
>>> device for USB0/USB1 controller is present in GCC clock controller.
>>> So considering there is a patch ongoing to add GDSC device for ipq6018
>>> gcc driver, can the DT commit which adds '#power-domain-cells' be accepted?
>>
>> What for?
> Maria (quic_aiquny@quicinc.com, copied) is working on automation tool in 
> Qcom internally to check dt_binding and dtbs and she expects all the 

Check existing tree is trivial, I had something running months ago.
Unless you meant checking patches before you send them?

> warnings/errors reported on Qcom board files can be fixed. She can help 
> to comment further.

Anyway, fixing something incorrectly just because your tool cannot
handle existing issues, is not the reason.


Best regards,
Krzysztof


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

* Re: [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node
  2024-01-04  9:53 ` Dmitry Baryshkov
  2024-01-04 10:07   ` Krzysztof Kozlowski
  2024-01-04 10:13   ` Fenglin Wu
@ 2024-02-16 17:58   ` Bjorn Andersson
  2 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2024-02-16 17:58 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: quic_fenglinw, kernel, Andy Gross, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On Thu, Jan 04, 2024 at 11:53:46AM +0200, Dmitry Baryshkov wrote:
> On Thu, 4 Jan 2024 at 10:06, Fenglin Wu via B4 Relay
> <devnull+quic_fenglinw.quicinc.com@kernel.org> wrote:
> >
> > From: Fenglin Wu <quic_fenglinw@quicinc.com>
> >
> > Property '#power-domain-cells' is required as per defined in qcom,gcc.yaml
> > so add it for ipq6018 gcc device node to eliminate following warning in
> > dtbs_check:
> >
> > arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: gcc@1800000:
> >         '#power-domain-cells' is a required property
> > from schema $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq6018.yaml#
> 
> But ipq6018 doesn't implement GDSC support. So for the sake of fixing
> the warning you are adding a bogus property.
> 

The platform does indeed have two USB GDSCs, which you can see being
referred to in gcc_ipq6018_probe().

But while this patch removes a warning, I think the proper solution
would be to actually describe those GDSCs in the DeviceTree as well.
Unfortunately this would imply the need to actually implement them in
Linux as well.


Alternatively, there exist a reason for not actually change the state of
these GDSCs at runtime - i.e. the gcc driver is doing the right thing.
But if so, this patch would be wrong...

Regards,
Bjorn

> >
> > Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
> > ---
> >  arch/arm64/boot/dts/qcom/ipq6018.dtsi | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> > index 39cd6b76b4c1..54914912d610 100644
> > --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> > @@ -386,6 +386,7 @@ gcc: gcc@1800000 {
> >                         reg = <0x0 0x01800000 0x0 0x80000>;
> >                         clocks = <&xo>, <&sleep_clk>;
> >                         clock-names = "xo", "sleep_clk";
> > +                       #power-domain-cells = <1>;
> >                         #clock-cells = <1>;
> >                         #reset-cells = <1>;
> >                 };
> >
> > ---
> > base-commit: 17cb8a20bde66a520a2ca7aad1063e1ce7382240
> > change-id: 20240103-gcc-docs-update-fa604579e468
> >
> > Best regards,
> > --
> > Fenglin Wu <quic_fenglinw@quicinc.com>
> >
> >
> 
> 
> -- 
> With best wishes
> Dmitry

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

end of thread, other threads:[~2024-02-16 17:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04  8:06 [PATCH] arm64: dts: qcom: ipq6018: add #power-domain-cells for gcc node Fenglin Wu via B4 Relay
2024-01-04  9:53 ` Dmitry Baryshkov
2024-01-04 10:07   ` Krzysztof Kozlowski
2024-01-04 10:13   ` Fenglin Wu
2024-01-04 10:16     ` Konrad Dybcio
2024-01-04 10:27       ` Fenglin Wu
2024-01-04 10:30         ` Dmitry Baryshkov
2024-01-04 10:32       ` Robert Marko
2024-01-04 10:40         ` Fenglin Wu
2024-01-04 10:49           ` Dmitry Baryshkov
2024-01-04 10:55             ` Fenglin Wu
2024-01-04 12:07               ` Krzysztof Kozlowski
2024-01-04 10:34       ` Dmitry Baryshkov
2024-02-16 17:58   ` Bjorn Andersson

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