Hi Hui, just in case I tried again, but no it won't work if I put "dtoverlay=dwc2" w/o dr_mode. I remember dwc2 should be new code and should be used, hence why I use that instead of dwc_otg.
Anyway, if we use "dtoverlay=dwc2" only, I guess the actual "dr_mode" value may not be init properly in run time memory space, and thus it didn't work. Say using no "dr_mode", on my Pi 4B I can see g_cdc driver loaded correctly, but then on the host side, my L470, it actually won't work. Something like this would appear: ----- pi4 ----- [ 5.317371] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers ... [ 7.497909] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008 [ 7.497913] g_cdc gadget: g_cdc ready [ 7.497921] dwc2 fe980000.usb: bound driver g_cdc ----- L470 ----- [44740.491468] usb 1-3.1: new high-speed USB device number 18 using xhci_hcd [44741.837984] usb 1-3.1: device descriptor read/64, error -71 [44757.718734] usb 1-3.1: device descriptor read/64, error -110 [44757.902877] usb 1-3.1: new high-speed USB device number 19 using xhci_hcd [44763.350132] usb 1-3.1: device descriptor read/64, error -110 [44779.223840] usb 1-3.1: device descriptor read/64, error -110 [44779.329078] usb 1-3-port1: attempt power cycle [44779.942228] usb 1-3.1: new high-speed USB device number 20 using xhci_hcd [44785.366277] usb 1-3.1: device descriptor read/64, error -110 [44801.236885] usb 1-3.1: device descriptor read/64, error -110 [44801.423944] usb 1-3.1: new high-speed USB device number 21 using xhci_hcd [44806.870008] usb 1-3.1: device descriptor read/64, error -110 [44822.743518] usb 1-3.1: device descriptor read/64, error -110 [44822.849333] usb 1-3-port1: unable to enumerate USB device but if I use "dtoverlay=dwc2,dr_mode=peripheral" then no problem. I didn't test the Ethernet part yet as I don't have the network part properly set up, so I tried g_cdc instead, bind console to ttyGS0 with systemd and tried login from L470 to Pi via minicom, which was successful. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1861070 Title: Raspberry Pi 4B: USB OTG is not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1861070/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs