Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3354: Cannot configure USB as gadget - udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers

Part Number: AM3354

I am attempting to connect to a custom SBC in gadget mode, but when I run `modprobe g_ether`

it doesn't load, as dmesg tells me:

[ 3873.952312] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers


I am able to use the USB host functionality just fine (can mount a USB drive). I am attempting to use a USB-A to USB-A cable to connect to an Ubuntu machine.


I set all the USB Peripheral Controllers available in menuconfig to be loadable as a module, and tried enabling each of them individually along with starting g_ether. None of them loaded, except the dummy HCD.

A bit more relevant info:

CONFIG_USB_MUSB_DUAL_ROLE=y

I ran the script from this topic, here is the output:

chkusb.sh Version 0.2.8
Linux dorado 4.14.40-ti-jumpnow #1 PREEMPT Fri Jul 26 19:51:00 UTC 2019 armv7l armv7l armv7l GNU/Linux
USB is initialized
/sys/kernel/debug/musb-hdrc.0/regdump:Power       : e0
/sys/kernel/debug/musb-hdrc.0/regdump:Testmode    : 00
/sys/kernel/debug/musb-hdrc.0/regdump:DevCtl      : 19
/sys/kernel/debug/musb-hdrc.1/regdump:Power       : e0
/sys/kernel/debug/musb-hdrc.1/regdump:Testmode    : 00
/sys/kernel/debug/musb-hdrc.1/regdump:DevCtl      : 19
usb@47401000: host, okay
usb@47401800: host, okay

Gadget Kernel Config: g_ether is enabled
Gadget Kernel Config: g_mass_storage is enabled
Gadget Kernel Config: g_serial is enabled
gadget driver loaded: (none)

The list of USB gadget drivers installed:
/lib/modules/4.14.40-ti-jumpnow/kernel/drivers/usb/gadget/:
function/
legacy/
libcomposite.ko
udc/

/lib/modules/4.14.40-ti-jumpnow/kernel/drivers/usb/gadget/function:
u_ether.ko
u_serial.ko
usb_f_acm.ko
usb_f_ecm.ko
usb_f_ecm_subset.ko
usb_f_eem.ko
usb_f_fs.ko
usb_f_hid.ko
usb_f_mass_storage.ko
usb_f_ncm.ko
usb_f_obex.ko
usb_f_rndis.ko
usb_f_serial.ko
usb_f_uvc.ko

/lib/modules/4.14.40-ti-jumpnow/kernel/drivers/usb/gadget/legacy:
g_acm_ms.ko
g_cdc.ko
g_ether.ko
g_ffs.ko
g_hid.ko
g_mass_storage.ko
g_multi.ko
g_serial.ko
gadgetfs.ko

/lib/modules/4.14.40-ti-jumpnow/kernel/drivers/usb/gadget/udc:
bdc/
dummy_hcd.ko
fotg210-udc.ko
fusb300_udc.ko
gr_udc.ko
m66592-udc.ko
mv_u3d_core.ko
mv_udc.ko
net2272.ko
pxa27x_udc.ko
r8a66597-udc.ko
snps_udc_core.ko
snps_udc_plat.ko
udc-xilinx.ko

/lib/modules/4.14.40-ti-jumpnow/kernel/drivers/usb/gadget/udc/bdc:
bdc.ko

  • Hi,

    Thanks for the detailed report.

    Robert Curtin said:
    /sys/kernel/debug/musb-hdrc.0/regdump:DevCtl      : 19
    ...
    /sys/kernel/debug/musb-hdrc.1/regdump:DevCtl      : 19
    usb@47401000: host, okay
    usb@47401800: host, okay

    The log shows both MUSB controllers are configured in host-only mode in device tree. So you don't have a UDC.

    Please change the corresponding MUSB device tree dr_mode to "org" to use it in peripheral mode. Please also ensure its USBx_ID pin is not grounded on the board.

  • Thanks for the prompt response!

    I tried setting dr_mode to "otg", and am still getting the same issue, as well as
    usb@47401000: host, okay
    usb@47401800: host, okay

    Is that expected? Is there any other configuration I would need to do to in order to get dual mode working?

    Edit: I tried another build with dr_mode set to "org" and am still seeing the same issue, is there any other configuration that I might be missing?

  • usb@47401000: host, okay
    usb@47401800: host, okay

    NO, this output is not expected. "host" here tells dr_mode is set to "host" in device tree. So either you didn't modify the dts file correctly, or you didn't load the correct dtb file in U-Boot.

  • To answer your another question, dr_mode in dts is the only config needed to tell which mode the MUSB controller to work on.

  • Good call. I was modifying the wrong dts file. It works now, and I'm able to load g_mass_storage and g_ether. Thanks for your help!

    I'm still not seeing it show up when I connect it to my laptop (I'm checking dmesg), but that's a different issue (see https://e2e.ti.com/support/processors/f/791/t/826346 for that issue)

  • Hi,

    Thanks for the update. I am glad the issue is solved.

    Whenever you need help on the new issues please just create a new thread on this e2e forum.