I have a RockPi 4B
I noticed that following a reboot (cold or hot), sometimes the USB devices plugged into the USB port does not work any more. lsusb shows that no devices are connected to the port. To get it working I need to un-plug and re-plug the USB device, which always works after the system boots. But if I leave the device plugged in, even if I reboot many times, it may or may not connect.
I am using Debian 11, with https://radxa-repo.github.io/bsp/ compiled latest u-boot and stable linux headers.
I applied u-boot-latest_2023.10-1_arm64.deb and the linux stable .deb files.
Can anyone tell me why, and how can I reset the port / USB hub controller programmatically?
successful connects on boot:
[ 0.587765] usbcore: registered new interface driver usbfs
[ 0.587967] usbcore: registered new interface driver hub
[ 0.588118] usbcore: registered new device driver usb
[ 4.963470] usbcore: registered new interface driver usbhid
[ 4.963518] usbhid: USB HID core driver
[ 5.292753] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 5.376947] usb usb4: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 5.395698] ehci-platform fe380000.usb: EHCI Host Controller
[ 5.395823] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 5
[ 5.396244] ehci-platform fe380000.usb: irq 58, io mem 0xfe380000
[ 5.402684] ehci-platform fe3c0000.usb: EHCI Host Controller
[ 5.402879] ehci-platform fe3c0000.usb: new USB bus registered, assigned bus number 6
[ 5.403312] ehci-platform fe3c0000.usb: irq 59, io mem 0xfe3c0000
[ 5.404660] ohci-platform fe3a0000.usb: Generic Platform OHCI controller
[ 5.404754] ohci-platform fe3a0000.usb: new USB bus registered, assigned bus number 7
[ 5.405167] ohci-platform fe3a0000.usb: irq 60, io mem 0xfe3a0000
[ 5.411303] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 5.413269] ohci-platform fe3e0000.usb: Generic Platform OHCI controller
[ 5.416724] ohci-platform fe3e0000.usb: new USB bus registered, assigned bus number 8
[ 5.417117] ohci-platform fe3e0000.usb: irq 71, io mem 0xfe3e0000
[ 5.431097] ehci-platform fe3c0000.usb: USB 2.0 started, EHCI 1.00
[ 6.926946] usb 6-1: new high-speed USB device number 2 using ehci-platform
[ 18.966667] usbcore: registered new interface driver snd-usb-audio
Unsuccessful connects on boot
[ 0.585399] usbcore: registered new interface driver usbfs
[ 0.585584] usbcore: registered new interface driver hub
[ 0.585740] usbcore: registered new device driver usb
[ 5.042243] usbcore: registered new interface driver usbhid
[ 5.042542] usbhid: USB HID core driver
[ 5.370442] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 5.455326] usb usb4: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 5.474277] ehci-platform fe380000.usb: EHCI Host Controller
[ 5.474399] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 5
[ 5.474807] ehci-platform fe380000.usb: irq 58, io mem 0xfe380000
[ 5.481308] ehci-platform fe3c0000.usb: EHCI Host Controller
[ 5.481455] ehci-platform fe3c0000.usb: new USB bus registered, assigned bus number 6
[ 5.481843] ehci-platform fe3c0000.usb: irq 59, io mem 0xfe3c0000
[ 5.482644] ohci-platform fe3a0000.usb: Generic Platform OHCI controller
[ 5.482677] ohci-platform fe3a0000.usb: new USB bus registered, assigned bus number 7
[ 5.482842] ohci-platform fe3a0000.usb: irq 60, io mem 0xfe3a0000
[ 5.489472] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 5.492496] ohci-platform fe3e0000.usb: Generic Platform OHCI controller
[ 5.493817] ohci-platform fe3e0000.usb: new USB bus registered, assigned bus number 8
[ 5.494414] ohci-platform fe3e0000.usb: irq 71, io mem 0xfe3e0000
[ 5.505053] ehci-platform fe3c0000.usb: USB 2.0 started, EHCI 1.00
[ 5.761159] usb 6-1: new high-speed USB device number 2 using ehci-platform
[ 11.133092] usb 6-1: device descriptor read/64, error -110
[ 21.637094] usb 6-1: device descriptor read/64, error -71
[ 21.873096] usb 6-1: new high-speed USB device number 3 using ehci-platform
[ 22.033097] usb 6-1: device descriptor read/64, error -71
[ 22.301098] usb 6-1: device descriptor read/64, error -71
[ 22.409230] usb usb6-port1: attempt power cycle
[ 22.821097] usb 6-1: new high-speed USB device number 4 using ehci-platform
[ 23.253090] usb 6-1: device not accepting address 4, error -71
[ 23.381098] usb 6-1: new high-speed USB device number 5 using ehci-platform
[ 23.813090] usb 6-1: device not accepting address 5, error -71
[ 23.813965] usb usb6-port1: unable to enumerate USB device
[ 24.212919] usb 8-1: new full-speed USB device number 2 using ohci-platform
[ 24.412900] usb 8-1: device descriptor read/64, error -62
[ 24.712986] usb 8-1: device descriptor read/64, error -62
[ 25.008904] usb 8-1: new full-speed USB device number 3 using ohci-platform
[ 25.200962] usb 8-1: device descriptor read/64, error -62
[ 25.501031] usb 8-1: device descriptor read/64, error -62
[ 25.609195] usb usb8-port1: attempt power cycle
[ 25.829178] usb 8-1: new full-speed USB device number 4 using ohci-platform
[ 26.245023] usb 8-1: device not accepting address 4, error -62
[ 26.432901] usb 8-1: new full-speed USB device number 5 using ohci-platform
[ 26.848988] usb 8-1: device not accepting address 5, error -62
[ 26.849917] usb usb8-port1: unable to enumerate USB device