多次开关机,发现usb hub和4G都通信失败了,这就有点奇怪了,按理说usb驱动是没啥问题的
先查看usb log
root@linaro-alip:/# dmesg | grep usb
[ 1.723797] usbcore: registered new interface driver usbfs
[ 1.723828] usbcore: registered new interface driver hub
[ 1.723858] usbcore: registered new device driver usb
[ 2.323771] rockchip-usb2phy ff770000.syscon:usb2-phy@e450: IRQ index 0 not found
[ 2.324021] rockchip-usb2phy ff770000.syscon:usb2-phy@e450: failed to create phy
[ 2.324162] rockchip-usb2phy ff770000.syscon:usb2-phy@e460: IRQ index 0 not found
[ 2.324266] rockchip-usb2phy ff770000.syscon:usb2-phy@e460: failed to create phy
[ 5.708638] usbcore: registered new interface driver rtl8150
[ 5.708666] usbcore: registered new interface driver r8152
[ 5.712153] usbcore: registered new interface driver cdc_acm
[ 5.712330] usbcore: registered new interface driver uas
[ 5.712366] usbcore: registered new interface driver usb-storage
[ 5.712423] usbcore: registered new interface driver usbserial_generic
[ 5.712443] usbserial: USB Serial support registered for generic
[ 5.712466] usbcore: registered new interface driver cp210x
[ 5.712481] usbserial: USB Serial support registered for cp210x
[ 5.712504] usbcore: registered new interface driver ftdi_sio
[ 5.712519] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 5.712542] usbcore: registered new interface driver keyspan
[ 5.712557] usbserial: USB Serial support registered for Keyspan - (without firmware)
[ 5.712575] usbserial: USB Serial support registered for Keyspan 1 port adapter
[ 5.712592] usbserial: USB Serial support registered for Keyspan 2 port adapter
[ 5.712606] usbserial: USB Serial support registered for Keyspan 4 port adapter
[ 5.712629] usbcore: registered new interface driver option
[ 5.712644] usbserial: USB Serial support registered for GSM modem (1-port)
[ 5.712667] usbcore: registered new interface driver oti6858
[ 5.712682] usbserial: USB Serial support registered for oti6858
[ 5.712705] usbcore: registered new interface driver pl2303
[ 5.712720] usbserial: USB Serial support registered for pl2303
[ 5.712746] usbcore: registered new interface driver qcserial
[ 5.712761] usbserial: USB Serial support registered for Qualcomm USB modem
[ 5.712785] usbcore: registered new interface driver sierra
[ 5.712800] usbserial: USB Serial support registered for Sierra USB modem
[ 5.713525] usbcore: registered new interface driver usbtouchscreen
[ 5.729292] usbcore: registered new interface driver uvcvideo
[ 5.730856] usbcore: registered new interface driver bfusb
[ 5.730887] usbcore: registered new interface driver btusb
[ 5.736029] usbcore: registered new interface driver usbhid
[ 5.736036] usbhid: USB HID core driver
[ 5.741130] usbcore: registered new interface driver snd-usb-audio
[ 5.944921] rockchip-usb2phy ff770000.syscon:usb2-phy@e450: IRQ index 0 not found
[ 5.949599] rockchip-usb2phy ff770000.syscon:usb2-phy@e460: IRQ index 0 not found
[ 6.368180] phy phy-ff770000.syscon:[email protected]: illegal mode
[ 6.368762] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 6.368772] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.368779] usb usb1: Product: xHCI Host Controller
[ 6.368787] usb usb1: Manufacturer: Linux 5.10.160 xhci-hcd
[ 6.368794] usb usb1: SerialNumber: xhci-hcd.5.auto
[ 6.369635] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 6.369716] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[ 6.369724] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.369731] usb usb2: Product: xHCI Host Controller
[ 6.369738] usb usb2: Manufacturer: Linux 5.10.160 xhci-hcd
[ 6.369745] usb usb2: SerialNumber: xhci-hcd.5.auto
[ 6.374098] ehci-platform fe380000.usb: EHCI Host Controller
[ 6.374622] ehci-platform fe380000.usb: new USB bus registered, assigned bus number 3
[ 6.374739] ehci-platform fe380000.usb: irq 36, io mem 0xfe380000
[ 6.386801] ehci-platform fe380000.usb: USB 2.0 started, EHCI 1.00
[ 6.386983] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 6.386993] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.387002] usb usb3: Product: EHCI Host Controller
[ 6.387009] usb usb3: Manufacturer: Linux 5.10.160 ehci_hcd
[ 6.387016] usb usb3: SerialNumber: fe380000.usb
[ 6.390060] ehci-platform fe3c0000.usb: EHCI Host Controller
[ 6.390552] ehci-platform fe3c0000.usb: new USB bus registered, assigned bus number 4
[ 6.390668] ehci-platform fe3c0000.usb: irq 38, io mem 0xfe3c0000
[ 6.403454] ehci-platform fe3c0000.usb: USB 2.0 started, EHCI 1.00
[ 6.403620] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[ 6.403631] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.403639] usb usb4: Product: EHCI Host Controller
[ 6.403646] usb usb4: Manufacturer: Linux 5.10.160 ehci_hcd
[ 6.403653] usb usb4: SerialNumber: fe3c0000.usb
[ 6.405069] ohci-platform fe3a0000.usb: Generic Platform OHCI controller
[ 6.405324] ohci-platform fe3a0000.usb: new USB bus registered, assigned bus number 5
[ 6.405429] ohci-platform fe3a0000.usb: irq 37, io mem 0xfe3a0000
[ 6.464282] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[ 6.464301] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.464310] usb usb5: Product: Generic Platform OHCI controller
[ 6.464318] usb usb5: Manufacturer: Linux 5.10.160 ohci_hcd
[ 6.464325] usb usb5: SerialNumber: fe3a0000.usb
[ 6.465598] ohci-platform fe3e0000.usb: Generic Platform OHCI controller
[ 6.465791] ohci-platform fe3e0000.usb: new USB bus registered, assigned bus number 6
[ 6.465875] ohci-platform fe3e0000.usb: irq 39, io mem 0xfe3e0000
[ 6.524280] usb usb6: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[ 6.524301] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.524309] usb usb6: Product: Generic Platform OHCI controller
[ 6.524317] usb usb6: Manufacturer: Linux 5.10.160 ohci_hcd
[ 6.524325] usb usb6: SerialNumber: fe3e0000.usb
[ 6.636916] usb 3-1: new high-speed USB device number 2 using ehci-platform
[ 6.785382] usb 3-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.38
[ 6.785416] usb 3-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 6.785422] usb 3-1: Product: USB2.0 Hub
[ 8.090344] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 8.107822] usb 2-1: New USB device found, idVendor=174c, idProduct=1153, bcdDevice= 0.01
[ 8.107846] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 8.107855] usb 2-1: Product: AS2115
[ 8.107860] usb 2-1: Manufacturer: ASMedia
[ 8.107865] usb 2-1: SerialNumber: 00000000000000000000
[ 8.108959] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 8.109883] scsi host0: usb-storage 2-1:1.0
[ 10.859439] dwc3 fe800000.usb: device reset
[ 43.065576] usb 3-1: Failed to suspend device, error -110
root@linaro-alip:/#
Populating /dev using udev: [ 4.628905] udevd[233]: starting version 3.2.10
[ 4.629211] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.629336] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.629372] random: udevd: uninitialized urandom read (16 bytes read)
[ 4.634473] udevd[234]: starting eudev-3.2.10
[ 5.106932] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 5.125688] usb 2-1: New USB device found, idVendor=174c, idProduct=1153, bcdDevice= 0.01
[ 5.125789] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 5.125808] usb 2-1: Product: AS2115
[ 5.125825] usb 2-1: Manufacturer: ASMedia
[ 5.125842] usb 2-1: SerialNumber: 00000000000000000000
[ 5.130685] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 5.135402] scsi host0: usb-storage 2-1:1.0
[ 6.141755] scsi 0:0:0:0: Direct-Access ASMT 2115 0 PQ: 0 ANSI: 6
[ 6.183043] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 6.886328] iep: iep dpi mode inactivity
[ 10.297728] usb 3-1-port2: cannot reset (err = -110)
[ 11.338985] usb 3-1-port2: cannot reset (err = -110)
[ 12.378986] usb 3-1-port2: cannot reset (err = -110)
[ 13.418988] usb 3-1-port2: cannot reset (err = -110)
[ 14.458988] usb 3-1-port2: cannot reset (err = -110)
[ 14.459089] usb 3-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 15.498955] usb 3-1-port2: cannot disable (err = -110)
[ 16.538939] usb 3-1-port2: cannot reset (err = -110)
[ 17.578892] usb 3-1-port2: cannot reset (err = -110)
[ 18.618985] usb 3-1-port2: cannot reset (err = -110)
[ 19.658985] usb 3-1-port2: cannot reset (err = -110)
[ 20.698985] usb 3-1-port2: cannot reset (err = -110)
[ 20.699087] usb 3-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 21.738975] usb 3-1-port2: cannot disable (err = -110)
[ 21.739095] usb 3-1-port2: attempt power cycle
[ 35.571443] android_work: sent uevent USB_STATE=CONNECTED
[ 35.578525] usb 3-1-port2: cannot reset (err = -110)
[ 35.578569] usb 3-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 35.597013] android_work: sent uevent USB_STATE=CONFIGURED
[ 35.873998] Freeing drm_logo memory: 2080K
[ 36.618734] usb 3-1-port2: cannot disable (err = -110)
[ 36.618813] usb 3-1-port2: unable to enumerate USB device
[ 37.658990] usb 3-1-port2: cannot disable (err = -110)
[ 37.733167] random: crng init done
[ 37.733308] random: 4 urandom warning(s) missed due to ratelimiting
[ 39.140971] EXT4-fs (mmcblk2p9): mounted filesystem with ordered data mode. Opts:
[ 42.858763] hub 3-1:1.0: hub_ext_port_status failed (err = -110)
[ 48.058726] hub 3-1:1.0: hub_ext_port_status failed (err = -110)
[ 53.258558] hub 3-1:1.0: hub_ext_port_status failed (err = -110)
[ 58.458767] hub 3-1:1.0: hub_ext_port_status failed (err = -110)
[ 63.658629] hub 3-1:1.0: hub_ext_port_status failed (err = -110)
[ 66.183125] udevd[234]: worker [240] /devices/platform/fe380000.usb/usb3/3-1 is taking a long time
先排除硬件上的问题,然后就烧录kernel 4.1的的镜像,多次测试也没有发现这个问题,所以排除了硬件上的问题,然后。查下usb hub和usb 4G的复位脚,写驱动都给它们配上了,但是还是存在这个问题。最后通过对比rk3399.dtsi发现少了个power-domains = <&power RK3399_PD_PERIHP>;配置
加上后,重新编译烧录,重新测试没有发现这个问题了!!!