USB #20
-
Device does not enumerate, as far as I can tell, it's not crashed. Any special cmdline/modules/kconfigs needed for usb ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
Add this to
USB Gadget kconfigFrom my kernel .configCONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG=y # CONFIG_USB_GADGET_VERBOSE is not set CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=500 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 # CONFIG_U_SERIAL_CONSOLE is not set # # USB Gadget precomposed configurations # # CONFIG_USB_ZERO is not set # CONFIG_USB_ETH is not set # CONFIG_USB_G_NCM is not set # CONFIG_USB_GADGETFS is not set # CONFIG_USB_FUNCTIONFS is not set # CONFIG_USB_MASS_STORAGE is not set # CONFIG_USB_G_SERIAL is not set # CONFIG_USB_G_PRINTER is not set CONFIG_USB_CDC_COMPOSITE=y # CONFIG_USB_G_NOKIA is not set # CONFIG_USB_G_ACM_MS is not set # CONFIG_USB_G_MULTI is not set # CONFIG_USB_G_HID is not set # CONFIG_USB_G_DBGP is not set # CONFIG_USB_RAW_GADGET is not set # end of USB Gadget precomposed configurations dmesg[ 4.076110] usbcore: registered new interface driver cdc_acm [ 4.082885] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 4.092285] usbcore: registered new interface driver cdc_wdm [ 4.193572] udc musb-hdrc.0.auto: registering UDC driver [g_cdc] [ 4.213470] g_cdc gadget: adding config #1 'CDC Composite (ECM + ACM)'/(ptrval) [ 4.222137] g_cdc gadget: adding 'cdc_ethernet'/(ptrval) to config 'CDC Composite (ECM + ACM)'/(ptrval) [ 4.245391] g_cdc gadget: CDC Ethernet: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in [ 4.254272] g_cdc gadget: adding 'acm'/(ptrval) to config 'CDC Composite (ECM + ACM)'/(ptrval) [ 4.264129] g_cdc gadget: acm ttyGS0: dual speed IN/ep3in OUT/ep2out NOTIFY/ep4in [ 4.272827] g_cdc gadget: cfg 1/(ptrval) speeds: high full [ 4.279388] g_cdc gadget: interface 0 = cdc_ethernet/(ptrval) [ 4.286376] g_cdc gadget: interface 1 = cdc_ethernet/(ptrval) [ 4.293395] g_cdc gadget: interface 2 = acm/(ptrval) [ 4.299621] g_cdc gadget: interface 3 = acm/(ptrval) [ 4.305786] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008 [ 4.314453] g_cdc gadget: g_cdc ready [ 7.745697] g_cdc gadget: high-speed config #1: CDC Composite (ECM + ACM) [ 7.749237] g_cdc gadget: init ecm [ 7.758575] g_cdc gadget: notify connect false [ 7.764068] g_cdc gadget: reset acm ttyGS0 [ 7.769134] g_cdc gadget: activate acm ttyGS0 [ 7.774444] g_cdc gadget: acm ttyGS0 serial state 0000 [ 7.781494] g_cdc gadget: notify speed 425984000 [ 7.787445] g_cdc gadget: activate ecm [ 7.796112] g_cdc gadget: ecm_close [ 7.801208] g_cdc gadget: packet filter 0c [ 7.801208] g_cdc gadget: ecm req21.43 v000c i0000 l0 [ 7.814270] g_cdc gadget: acm ttyGS0 req21.20 v0000 i0002 l7 [ 8.394836] g_cdc gadget: packet filter 0e [ 8.399932] g_cdc gadget: ecm req21.43 v000e i0000 l0 [ 8.445190] g_cdc gadget: notify connect false [ 8.450927] g_cdc gadget: notify speed 425984000 [ 9.880889] g_cdc gadget: acm ttyGS0 req21.22 v0003 i0002 l0 [ 9.887664] g_cdc gadget: acm ttyGS0 req21.20 v0000 i0002 l7 [ 9.894592] g_cdc gadget: acm ttyGS0 req21.22 v0002 i0002 l0 [ 10.001464] g_cdc gadget: acm ttyGS0 req21.22 v0003 i0002 l0 [ 14.425903] g_cdc gadget: packet filter 0e [ 14.425903] g_cdc gadget: ecm req21.43 v000e i0000 l0 [ 20.965911] g_cdc gadget: acm ttyGS0 req21.22 v0000 i0002 l0 [ 21.073059] g_cdc gadget: acm ttyGS0 req21.22 v0003 i0002 l0 [ 21.073303] g_cdc gadget: acm ttyGS0 req21.22 v0002 i0002 l0 [ 21.173706] g_cdc gadget: acm ttyGS0 req21.22 v0003 i0002 l0 [ 30.331604] g_cdc gadget: ecm_open [ 30.331604] g_cdc gadget: notify connect true [ 30.331604] g_cdc gadget: notify speed 425984000 [ 30.334594] g_cdc gadget: packet filter 0e [ 30.334594] g_cdc gadget: ecm req21.43 v000e i0000 l0 [ 30.629455] g_cdc gadget: acm ttyGS0 serial state 0003 [ 30.654235] g_cdc gadget: acm ttyGS0 serial state 0003 [ 30.960968] g_cdc gadget: acm ttyGS0 req21.22 v0000 i0002 l0 [ 31.014434] g_cdc gadget: acm ttyGS0 req21.22 v0003 i0002 l0 [ 31.014953] g_cdc gadget: acm ttyGS0 req21.20 v0000 i0002 l7 [ 36.963439] g_cdc gadget: acm ttyGS0 req21.22 v0000 i0002 l0 On my PC, I see /dev/ACM0 get enumerated with the device showing up in lsusb as:
To connect (with picocom, for example): |
Beta Was this translation helpful? Give feedback.
-
Weird, I already have those lines in defconfig. I can see the gadget drivers are loaded, but when I unplug/replug nothing happens on either end. I have this warning in startup log:
|
Beta Was this translation helpful? Give feedback.
-
Apparently this is not a devicetree issue, because I replaced the devicetree in your boot.img with mine and USB is still working. Looks like a kernel issue now. |
Beta Was this translation helpful? Give feedback.
-
Finally... via cdc_acm
|
Beta Was this translation helpful? Give feedback.
-
I am not sure why, but usb CDC/ACM is pretty flaky on 5.12.X. @mj-sakellaropoulos Do you have this issue as well? |
Beta Was this translation helpful? Give feedback.
Finally... via cdc_acm
Used the config in the tar archive above