diff mbox series

[v7,1/9] dt-bindings: usb: qcom,dwc3: Add bindings for SC8280 Multiport

Message ID 20230501143445.3851-2-quic_kriskura@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add multiport support for DWC3 controllers | expand

Commit Message

Krishna Kurapati May 1, 2023, 2:34 p.m. UTC
Add the compatible string for SC8280 Multiport USB controller from
Qualcomm.

There are 4 power event irq interrupts supported by this controller
(one for each port of multiport). Added all the 4 as non-optional
interrupts for SC8280XP-MP

Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
---
 .../devicetree/bindings/usb/qcom,dwc3.yaml    | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Krzysztof Kozlowski May 2, 2023, 7:48 a.m. UTC | #1
On 01/05/2023 16:34, Krishna Kurapati wrote:
> Add the compatible string for SC8280 Multiport USB controller from
> Qualcomm.
> 
> There are 4 power event irq interrupts supported by this controller
> (one for each port of multiport). Added all the 4 as non-optional
> interrupts for SC8280XP-MP
> 
> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> ---
>  .../devicetree/bindings/usb/qcom,dwc3.yaml    | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> index d84281926f10..2c96da1ce5b8 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> @@ -26,6 +26,7 @@ properties:
>            - qcom,sc7180-dwc3
>            - qcom,sc7280-dwc3
>            - qcom,sc8280xp-dwc3
> +          - qcom,sc8280xp-dwc3-mp

SC8280xp comes with two USB controllers: one single-port and one multi-port?
>            - qcom,sdm660-dwc3
>            - qcom,sdm670-dwc3
>            - qcom,sdm845-dwc3
> @@ -455,6 +456,26 @@ allOf:
>              - const: dm_hs_phy_irq
>              - const: ss_phy_irq
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,sc8280xp-dwc3-mp

You miss entries for all other constraints.


Best regards,
Krzysztof
Krishna Kurapati May 2, 2023, 8:35 a.m. UTC | #2
On 5/2/2023 1:18 PM, Krzysztof Kozlowski wrote:
> On 01/05/2023 16:34, Krishna Kurapati wrote:
>> Add the compatible string for SC8280 Multiport USB controller from
>> Qualcomm.
>>
>> There are 4 power event irq interrupts supported by this controller
>> (one for each port of multiport). Added all the 4 as non-optional
>> interrupts for SC8280XP-MP
>>
>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>> ---
>>   .../devicetree/bindings/usb/qcom,dwc3.yaml    | 21 +++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> index d84281926f10..2c96da1ce5b8 100644
>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>> @@ -26,6 +26,7 @@ properties:
>>             - qcom,sc7180-dwc3
>>             - qcom,sc7280-dwc3
>>             - qcom,sc8280xp-dwc3
>> +          - qcom,sc8280xp-dwc3-mp
> 
> SC8280xp comes with two USB controllers: one single-port and one multi-port?

Hi Krzysztof,

   SC8280XP comes with 3 controllers. The first two are single port 
controller and the third one is a multiport controller. In DTSI:
usb_0 / usb1: have compatible set to : "qcom,sc8280xp-dwc3"

And multiport controller has it set to "qcom,sc8280xp-dwc3-mp"


>>             - qcom,sdm660-dwc3
>>             - qcom,sdm670-dwc3
>>             - qcom,sdm845-dwc3
>> @@ -455,6 +456,26 @@ allOf:
>>               - const: dm_hs_phy_irq
>>               - const: ss_phy_irq
>>   
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - qcom,sc8280xp-dwc3-mp
> 
> You miss entries for all other constraints.
>
Let me add the clock properties as well.

Regards,
Krishna,
Krzysztof Kozlowski May 2, 2023, 8:47 a.m. UTC | #3
On 02/05/2023 10:35, Krishna Kurapati PSSNV wrote:
> 
> 
> On 5/2/2023 1:18 PM, Krzysztof Kozlowski wrote:
>> On 01/05/2023 16:34, Krishna Kurapati wrote:
>>> Add the compatible string for SC8280 Multiport USB controller from
>>> Qualcomm.
>>>
>>> There are 4 power event irq interrupts supported by this controller
>>> (one for each port of multiport). Added all the 4 as non-optional
>>> interrupts for SC8280XP-MP
>>>
>>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>>> ---
>>>   .../devicetree/bindings/usb/qcom,dwc3.yaml    | 21 +++++++++++++++++++
>>>   1 file changed, 21 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> index d84281926f10..2c96da1ce5b8 100644
>>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>> @@ -26,6 +26,7 @@ properties:
>>>             - qcom,sc7180-dwc3
>>>             - qcom,sc7280-dwc3
>>>             - qcom,sc8280xp-dwc3
>>> +          - qcom,sc8280xp-dwc3-mp
>>
>> SC8280xp comes with two USB controllers: one single-port and one multi-port?
> 
> Hi Krzysztof,
> 
>    SC8280XP comes with 3 controllers. The first two are single port 
> controller and the third one is a multiport controller. In DTSI:
> usb_0 / usb1: have compatible set to : "qcom,sc8280xp-dwc3"
> 
> And multiport controller has it set to "qcom,sc8280xp-dwc3-mp"

OK, then this looks fine.

Please add the compatible to existing allOf:if:then to constrain clocks
and other pieces. If none of existing if:then: matches your case, add
new one.

Best regards,
Krzysztof
Krishna Kurapati May 2, 2023, 8:52 a.m. UTC | #4
On 5/2/2023 2:17 PM, Krzysztof Kozlowski wrote:
> On 02/05/2023 10:35, Krishna Kurapati PSSNV wrote:
>>
>>
>> On 5/2/2023 1:18 PM, Krzysztof Kozlowski wrote:
>>> On 01/05/2023 16:34, Krishna Kurapati wrote:
>>>> Add the compatible string for SC8280 Multiport USB controller from
>>>> Qualcomm.
>>>>
>>>> There are 4 power event irq interrupts supported by this controller
>>>> (one for each port of multiport). Added all the 4 as non-optional
>>>> interrupts for SC8280XP-MP
>>>>
>>>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>>>> ---
>>>>    .../devicetree/bindings/usb/qcom,dwc3.yaml    | 21 +++++++++++++++++++
>>>>    1 file changed, 21 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>>> index d84281926f10..2c96da1ce5b8 100644
>>>> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>>> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
>>>> @@ -26,6 +26,7 @@ properties:
>>>>              - qcom,sc7180-dwc3
>>>>              - qcom,sc7280-dwc3
>>>>              - qcom,sc8280xp-dwc3
>>>> +          - qcom,sc8280xp-dwc3-mp
>>>
>>> SC8280xp comes with two USB controllers: one single-port and one multi-port?
>>
>> Hi Krzysztof,
>>
>>     SC8280XP comes with 3 controllers. The first two are single port
>> controller and the third one is a multiport controller. In DTSI:
>> usb_0 / usb1: have compatible set to : "qcom,sc8280xp-dwc3"
>>
>> And multiport controller has it set to "qcom,sc8280xp-dwc3-mp"
> 
> OK, then this looks fine.
> 
> Please add the compatible to existing allOf:if:then to constrain clocks
> and other pieces. If none of existing if:then: matches your case, add
> new one.
> 
> Best regards,
> Krzysztof
> 

Thanks Krzysztof. One query:

Clocks are same for both single/multiport controllers. Would the 
following be fine ?

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml 
b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index 2c96da1ce5b8..c0f4745febf0 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -263,6 +263,7 @@ allOf:
            contains:
              enum:
                - qcom,sc8280xp-dwc3
+             - qcom,sc8280xp-dwc3-mp
      then:
        properties:
          clocks:

Regards,
Krishna,
Krzysztof Kozlowski May 2, 2023, 10:15 a.m. UTC | #5
On 02/05/2023 10:52, Krishna Kurapati PSSNV wrote:
>> Best regards,
>> Krzysztof
>>
> 
> Thanks Krzysztof. One query:
> 
> Clocks are same for both single/multiport controllers. Would the 
> following be fine ?
> 

Yes, thanks.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index d84281926f10..2c96da1ce5b8 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -26,6 +26,7 @@  properties:
           - qcom,sc7180-dwc3
           - qcom,sc7280-dwc3
           - qcom,sc8280xp-dwc3
+          - qcom,sc8280xp-dwc3-mp
           - qcom,sdm660-dwc3
           - qcom,sdm670-dwc3
           - qcom,sdm845-dwc3
@@ -455,6 +456,26 @@  allOf:
             - const: dm_hs_phy_irq
             - const: ss_phy_irq
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,sc8280xp-dwc3-mp
+    then:
+      properties:
+        interrupts:
+          maxItems: 7
+        interrupt-names:
+          items:
+            - const: pwr_event_1
+            - const: pwr_event_2
+            - const: pwr_event_3
+            - const: pwr_event_4
+            - const: dp_hs_phy_irq
+            - const: dm_hs_phy_irq
+            - const: ss_phy_irq
+
 additionalProperties: false
 
 examples: