Re: [PATCH v9 4/8] usb: misc: qcom_eud: add per-path role switch support
From: Elson Serrao
Date: Fri Oct 16 2026 - 21:16:19 EST
On 10/15/2026 7:43 AM, Konrad Dybcio wrote:
> On 9/29/26 11:35 PM, Elson Serrao wrote:
>> The EUD hardware can support multiple High-Speed USB paths, each connected
>> to different USB controllers. The current implementation uses a single
>> chip-level role switch, which cannot properly handle multi-path
>> configurations where each path needs independent role management. Since
>> EUD is physically present between the USB connector and the controller,
>> it should also relay the role change requests from the connector.
>>
>> Restructure the driver to support per-path role switches and remove the
>> chip-level role switch. Additionally, as EUD need not modify the USB
>> role upon enabling, remove the unnecessary role switch call from
>> enable_eud().
>>
>> Reviewed-by: Peter Chen <peter.chen@xxxxxxxxxx>
>> Signed-off-by: Elson Serrao <elson.serrao@xxxxxxxxxxxxxxxx>
>> ---
>
>
> [...]
>
>> + sw = usb_role_switch_find_by_fwnode(of_fwnode_handle(controller_node));
>> + if (!sw) {
>> + of_node_put(controller_node);
>> + return dev_err_probe(chip->dev, -EPROBE_DEFER,
>> + "Failed to get controller role switch for path %d\n",
>> + path_num);
>> + }
>
> This will always probe defer on a fixed-role controller, we should patch
> dwc3 to always register a roleswitch
>
You mean for fixed-role controllers where an explicit `dr_mode` is not
provided in DT and the fixed mode is derived from the HW capabilities?
For explicit `dr_mode=host/peripheral` cases we bail out earlier and
never reach this path.
The EUD databook does not explicitly mention fixed-role controllers,
so I was assuming all DWC3 controllers relevant to EUD are DR-capable
and register a role switch.
I can see how a no-op role switch would address this case. Would it be
reasonable to handle that as a follow-up improvement for controllers
that resolve to a fixed role at runtime, rather than as part of this
series?
Thanks
Elson