diff mbox series

[2/8] dt-bindings: soc: qcom: eud: Add usb role switch property

Message ID 20240730222439.3469-3-quic_eserrao@quicinc.com
State New
Headers show
Series None | expand

Commit Message

Elson Roy Serrao July 30, 2024, 10:24 p.m. UTC
EUD hub is physically present in between the USB connector and the
USB controller. So the role switch notifications originating from
the connector should route through EUD. Hence to interpret the usb
role assigned by the connector, role switch property is needed.

Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
---
 Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Elson Roy Serrao Aug. 1, 2024, 12:16 a.m. UTC | #1
On 7/30/2024 10:36 PM, Krzysztof Kozlowski wrote:
> On 31/07/2024 00:24, Elson Roy Serrao wrote:
>> EUD hub is physically present in between the USB connector and the
>> USB controller. So the role switch notifications originating from
>> the connector should route through EUD. Hence to interpret the usb
>> role assigned by the connector, role switch property is needed.
>>
>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
>> ---
>>  Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>> index fca5b608ec63..0fa4608568d0 100644
>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>> @@ -37,6 +37,10 @@ properties:
>>      items:
>>        - const: usb2-phy
>>  
>> +  usb-role-switch:
>> +    $ref: /schemas/types.yaml#/definitions/flag
>> +    description: Support role switch.
> 
> So both EUD and DWC3 controller (as this binding states) are role switching?
> 

Yes. EUD would receive roles from the connector and relay it to the DWC3 controller. In addition to these roles, the DWC3 controller
would also receive roles from EUD itself (related to USB attach/detach events).

Thanks
Elson
Krzysztof Kozlowski Aug. 1, 2024, 7:46 a.m. UTC | #2
On 01/08/2024 02:16, Elson Serrao wrote:
> 
> 
> On 7/30/2024 10:36 PM, Krzysztof Kozlowski wrote:
>> On 31/07/2024 00:24, Elson Roy Serrao wrote:
>>> EUD hub is physically present in between the USB connector and the
>>> USB controller. So the role switch notifications originating from
>>> the connector should route through EUD. Hence to interpret the usb
>>> role assigned by the connector, role switch property is needed.
>>>
>>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
>>> ---
>>>  Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>>> index fca5b608ec63..0fa4608568d0 100644
>>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
>>> @@ -37,6 +37,10 @@ properties:
>>>      items:
>>>        - const: usb2-phy
>>>  
>>> +  usb-role-switch:
>>> +    $ref: /schemas/types.yaml#/definitions/flag
>>> +    description: Support role switch.
>>
>> So both EUD and DWC3 controller (as this binding states) are role switching?
>>
> 
> Yes. EUD would receive roles from the connector and relay it to the DWC3 controller. In addition to these roles, the DWC3 controller
> would also receive roles from EUD itself (related to USB attach/detach events).

Does not look right. Seems like you add something because it is easier
to code in drivers.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
index fca5b608ec63..0fa4608568d0 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
@@ -37,6 +37,10 @@  properties:
     items:
       - const: usb2-phy
 
+  usb-role-switch:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Support role switch.
+
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
     description: