On Mon, Jun 24, 2024 at 2:39 PM Tim Harvey <thar...@gateworks.com> wrote:
>
> 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.

I think there is some interaction between the DWC controller and a
type-c controller, but I think the mainline code lacks a proper type-c
controller and/or framework.  Not everyone might use a USB Type-C
chip, but it seems like if the USB is set to dual-role, it could
default to peripheral mode until someone starts the USB host stuff
with 'usb start'

I am just not sure how to handle situations where a USB cable may be
connected to a host computer and someone issues a start command and
brings up VBUS which may cause a voltage contention.
I think some people tried to push a Type-C driver if memory serves,
but I think it was rejected.  I don't recall the details and my memory
is terrible.  :-)

adam
>
> Best Regards,
>
> Tim

Reply via email to