diff mbox series

[v4,2/5] dt-bindings: usb: qcom,dwc3: Update ipq5332 clock details

Message ID 20240723090304.336428-3-quic_varada@quicinc.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series Add interconnect driver for IPQ5332 SoC | expand

Commit Message

Varadarajan Narayanan July 23, 2024, 9:03 a.m. UTC
USB uses icc-clk framework to enable the NoC interface clock.
Hence the 'iface' clock is removed from the list of clocks.
Update the clock-names list accordingly.

Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 .../devicetree/bindings/usb/qcom,dwc3.yaml      | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski July 24, 2024, 6:27 a.m. UTC | #1
On 23/07/2024 11:03, Varadarajan Narayanan wrote:
> USB uses icc-clk framework to enable the NoC interface clock.
> Hence the 'iface' clock is removed from the list of clocks.
> Update the clock-names list accordingly.

But the clock is still there and is still used by this block. This looks
like adjusting hardware per Linux implementation.

Why suddenly this clock was removed from this hardware?

> 
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  .../devicetree/bindings/usb/qcom,dwc3.yaml      | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> index efde47a5b145..6c5f962bbcf9 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> @@ -220,6 +220,22 @@ allOf:
>              - const: sleep
>              - const: mock_utmi
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,ipq5332-dwc3
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 3
> +        clock-names:
> +          items:
> +            - const: core
> +            - const: sleep
> +            - const: mock_utmi

So this is the same as first case. Just put it there. It's your task to
check if you are duplicating a case, not reviewer's...

Best regards,
Krzysztof
Varadarajan Narayanan July 24, 2024, 11:41 a.m. UTC | #2
On Wed, Jul 24, 2024 at 08:27:03AM +0200, Krzysztof Kozlowski wrote:
> On 23/07/2024 11:03, Varadarajan Narayanan wrote:
> > USB uses icc-clk framework to enable the NoC interface clock.
> > Hence the 'iface' clock is removed from the list of clocks.
> > Update the clock-names list accordingly.
>
> But the clock is still there and is still used by this block. This looks
> like adjusting hardware per Linux implementation.
>
> Why suddenly this clock was removed from this hardware?

This clock per se is not used by the USB block. It is needed to
enable the path for CPU to reach the USB block (and vice versa).
Hence, we were adviced to use the ICC framework to enable this
clock and not the clocks/clock-names DT entries.

Please refer to [1] where similar clocks for IPQ9574 were NAK'ed.

[1] https://lore.kernel.org/linux-arm-msm/CAA8EJppabK8j9T40waMv=t-1aksXfqJibWuS41GhruzLhpatrg@mail.gmail.com/

> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> >  .../devicetree/bindings/usb/qcom,dwc3.yaml      | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > index efde47a5b145..6c5f962bbcf9 100644
> > --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > @@ -220,6 +220,22 @@ allOf:
> >              - const: sleep
> >              - const: mock_utmi
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - qcom,ipq5332-dwc3
> > +    then:
> > +      properties:
> > +        clocks:
> > +          maxItems: 3
> > +        clock-names:
> > +          items:
> > +            - const: core
> > +            - const: sleep
> > +            - const: mock_utmi
>
> So this is the same as first case. Just put it there. It's your task to
> check if you are duplicating a case, not reviewer's...

Will fix that.

Thanks
Varada
Krzysztof Kozlowski July 24, 2024, 11:55 a.m. UTC | #3
On 24/07/2024 13:41, Varadarajan Narayanan wrote:
> On Wed, Jul 24, 2024 at 08:27:03AM +0200, Krzysztof Kozlowski wrote:
>> On 23/07/2024 11:03, Varadarajan Narayanan wrote:
>>> USB uses icc-clk framework to enable the NoC interface clock.
>>> Hence the 'iface' clock is removed from the list of clocks.
>>> Update the clock-names list accordingly.
>>
>> But the clock is still there and is still used by this block. This looks
>> like adjusting hardware per Linux implementation.
>>
>> Why suddenly this clock was removed from this hardware?
> 
> This clock per se is not used by the USB block. It is needed to
> enable the path for CPU to reach the USB block (and vice versa).
> Hence, we were adviced to use the ICC framework to enable this
> clock and not the clocks/clock-names DT entries.
> 
> Please refer to [1] where similar clocks for IPQ9574 were NAK'ed.

So the original submission was not correct?

You really need to stop sending DTS based on current driver support and
focus on proper hardware description.

Such things pop up from time to time for Qualcomm and I don't see much
of improvement. And we do not talk about some ancient code, predating
guidelines, but IPQ5332 upstreamed ~1 year ago.

Best regards,
Krzysztof
Varadarajan Narayanan July 25, 2024, 7:55 a.m. UTC | #4
On Wed, Jul 24, 2024 at 01:55:41PM +0200, Krzysztof Kozlowski wrote:
> On 24/07/2024 13:41, Varadarajan Narayanan wrote:
> > On Wed, Jul 24, 2024 at 08:27:03AM +0200, Krzysztof Kozlowski wrote:
> >> On 23/07/2024 11:03, Varadarajan Narayanan wrote:
> >>> USB uses icc-clk framework to enable the NoC interface clock.
> >>> Hence the 'iface' clock is removed from the list of clocks.
> >>> Update the clock-names list accordingly.
> >>
> >> But the clock is still there and is still used by this block. This looks
> >> like adjusting hardware per Linux implementation.
> >>
> >> Why suddenly this clock was removed from this hardware?
> >
> > This clock per se is not used by the USB block. It is needed to
> > enable the path for CPU to reach the USB block (and vice versa).
> > Hence, we were adviced to use the ICC framework to enable this
> > clock and not the clocks/clock-names DT entries.
> >
> > Please refer to [1] where similar clocks for IPQ9574 were NAK'ed.
>
> So the original submission was not correct?

Unlike MSM SoC, IPQ SoC doesn't use RPM to aggregate bandwidth
requests and scale the NoC frequency. The NoCs are turned on and
set to a specific frequency at boot time and that is used for the
lifetime of the system. Hence interconnect was not considered and
this submission was accepted.

The same approach was used for PCIe and at that point the
consensus was to move to interconnect. Hence implemented the ICC
driver and updating the existing USB driver to use the ICC
driver.

> You really need to stop sending DTS based on current driver support and
> focus on proper hardware description.
>
> Such things pop up from time to time for Qualcomm and I don't see much
> of improvement. And we do not talk about some ancient code, predating
> guidelines, but IPQ5332 upstreamed ~1 year ago.

We are trying, but falling short. Hopefully we meet the
expectations soon.

Thanks
Varada
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index efde47a5b145..6c5f962bbcf9 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -220,6 +220,22 @@  allOf:
             - const: sleep
             - const: mock_utmi
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,ipq5332-dwc3
+    then:
+      properties:
+        clocks:
+          maxItems: 3
+        clock-names:
+          items:
+            - const: core
+            - const: sleep
+            - const: mock_utmi
+
   - if:
       properties:
         compatible:
@@ -267,7 +283,6 @@  allOf:
           contains:
             enum:
               - qcom,ipq5018-dwc3
-              - qcom,ipq5332-dwc3
               - qcom,msm8994-dwc3
               - qcom,qcs404-dwc3
     then: