USB gadget not working after boot-up


The apalis module can not detect already connected USB gadget (to Windows or Linux PC) during the boot-up:

dmesg | tail
[    3.367952] EXT3-fs (mmcblk0p4): using internal journal
[    3.367964] EXT3-fs (mmcblk0p4): mounted filesystem with ordered data mode
[    3.836676] g_serial gadget: Gadget Serial v2.4
[    3.836688] g_serial gadget: g_serial ready
[    3.879963] flexcan 2090000.flexcan can0: writing ctrl=0x07292005
[    3.880077] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[    3.885176] flexcan 2094000.flexcan can1: writing ctrl=0x01232004

cat /sys/devices/soc0/soc/2100000.aips-bus/2184000.usb/ci_hdrc.0/udc/ci_hdrc.0/state
not attached

The serial device already exists and can be opened, but no serial data comes in or can be sent out.

ll /dev/ttyGS0
crw-rw----    1 root     dialout   245,   0 Mar 28 16:25 /dev/ttyGS0

When the USB cable is unplugged and plugged again, then the USB is detected by the module.

dmesg | tail -n1
[  340.738593] g_serial gadget: high-speed config #2: CDC ACM config

cat /sys/devices/soc0/soc/2100000.aips-bus/2184000.usb/ci_hdrc.0/udc/ci_hdrc.0/state

Is there any way to get this working without unplugging the USB cable after every reboot?

Thanks in advance

I’m afraid BSP 2.7b1 is no longer supported. Have you tried with any later still supported BSP versions at all?