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.

AM5748: USB gadget configfs configuration with two USB ports

Part Number: AM5748

Hi,

On custom HW, AM5748 based, using Linux SDK6.0, we would like to use both USB ports for "Ethernet over USB". g_ether gadget supports only one USB port.

Could you give us a hint how to setup/use usb gadget configfs for the two scenarios:

1) otg: USB1 and 2 set to otg mode in device tree

Both port shall support "Ethernet over USB" when attached to host and "USB mass storage device when attached to USB stick.

2) device: USB1 and 2 set to device (peripheral) mode in device tree

Both port shall support "Ethernet over USB" when attached to host.

Best regards, Chris

  • Hi Chris,

    For usb gadget configfs, please refer to the kernel document: <kernel source code>/Documentation/usb/gadget_configfs.txt, and searching on internet you should find more examples.

    Basically for using ether-over-USB on both USB1 and USB2, you would have to create two usb configfs gadgets, /sys/kernel/config/usb_gadget/g1, and /sys/kernel/config/usb_gadget/g2, and bind them to UDC of 48890000.usb and 488d0000.usb respectively.

    Please let me know if you have further questions.