Greetings,

What is missing in U-Boot for the DWC3 host controller to support OTG
mode for usb_ether (USB Ethernet gadget)? I'm unable to get the usb
ethernet gadget to work for the imx8mp as it errors out with 'No UDC
available in the system'.

The ums/acm/sdp gadget's all call udc_device_get_by_index to get the
UDC controller which for DWC3 is provided by
drivers/usb/dwc3/dwc3-generic.c and these gadgets work, however
usb_ether is different in that it calls usb_gadget_register_driver to
bind the gadget driver to the UDC and for DWC3 this calls
usb_gadget_probe_driver which iterates over udc_list which does not
contain DWC3 hosts that are in peripheral/otg mode.

Before I spend a lot more time on this I wanted to see if anyone else
understands why boards with DWC3 host controllers like imx8mp don't
seem to register controllers in udc_list that are not in host mode.

I'm also unclear how to get a DWC3 controller to switch roles
dynamically at runtime based on a gpio state for example. That support
appears to be missing and I'm not sure what the right way would be to
go about adding it. I notice that some imx8mp boards like the
imx8mp-evk have a u-boot.dtsi that just forces its OTG controller to
peripheral mode and I force the imx8mp-venice OTG controllers into
host mode.

Best Regards,

Tim

Reply via email to