USB host errors with EVB and stock kernel

Started by thom_nic, April 18, 2017, 08:41:29 PM

Previous topic - Next topic

thom_nic

We noticed when using the stock kernel and the -evb.dtb we were unable to act as USB host.  This appears in dmesg and various devices never seem to come up when plugged in:


[   10.586153] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[   10.587619] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[   10.765187] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   10.765225] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   10.765242] usb usb1: Product: MUSB HDRC host driver
[   10.765258] usb usb1: Manufacturer: Linux 4.4.21-ge82e4c1 musb-hcd
[   10.765273] usb usb1: SerialNumber: musb-hdrc.1.auto
[   10.819480] hub 1-0:1.0: USB hub found
[   10.835372] hub 1-0:1.0: 1 port detected
[   10.909409] systemd-journald[112]: Received request to flush runtime journal from PID 1
[   11.001919] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #1, port1 00000104
[   11.154349] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000104
[   11.306767] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #3, port1 00000104
[   11.459199] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010c


However I found this thread: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/423586/1510861

which links to the following AM335x wiki documentation: http://processors.wiki.ti.com/index.php/MUSB_Linux_Driver_Configuration

After following the procedure given to update kconfig options, we see something much more sane in dmesg:


[   12.299239] usbcore: registered new interface driver usbfs
[   12.300039] usbcore: registered new interface driver hub
[   12.300384] usbcore: registered new device driver usb
[   14.071221] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[   14.071258] musb-hdrc: MHDRC RTL version 2.0
[   14.071274] musb-hdrc: setup fifo_mode 4
[   14.071300] musb-hdrc: 28/31 max ep, 16384/16384 memory
[   14.085385] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[   14.085418] musb-hdrc: MHDRC RTL version 2.0
[   14.085432] musb-hdrc: setup fifo_mode 4
[   14.085455] musb-hdrc: 28/31 max ep, 16384/16384 memory
[   14.086352] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[   14.087561] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[   14.277056] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   14.277093] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   14.277110] usb usb1: Product: MUSB HDRC host driver
[   14.277127] usb usb1: Manufacturer: Linux 4.4.21-00004-ge82e4c1-dirty musb-hcd
[   14.277142] usb usb1: SerialNumber: musb-hdrc.1.auto
[   14.337811] hub 1-0:1.0: USB hub found
[   14.338835] hub 1-0:1.0: 1 port detected
[   14.421926] userial_init: registered 4 ttyGS* devices
[   14.783536] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[   14.926754] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[   14.926792] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   14.926809] usb 1-1: Product: USB2.0 Hub
[   14.947678] hub 1-1:1.0: USB hub found
[   14.965952] hub 1-1:1.0: 4 ports detected
[   15.450734] udc musb-hdrc.0.auto: registering UDC driver [serial]
[   15.451083] configfs-gadget gadget: adding 'acm'/de5f0dc0 to config 'c'/de77e498
[   15.451135] configfs-gadget gadget: acm ttyGS0: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in


Now, plugging in various devices, a USB SD card reader and a Realtek wifi dongle we see expected output in dmesg:


[ 2508.789878] usb 1-1.4: new high-speed USB device number 3 using musb-hdrc
[ 2508.899565] usb 1-1.4: New USB device found, idVendor=090c, idProduct=6200
[ 2508.899821] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2508.899867] usb 1-1.4: Product: Generic USB2.0 card
[ 2508.899908] usb 1-1.4: Manufacturer: Silicon Motion, Inc.
[ 2508.899947] usb 1-1.4: SerialNumber: 12345678901234567890
[ 2509.131469] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 2509.172017] scsi host0: usb-storage 1-1.4:1.0
[ 2509.178490] usbcore: registered new interface driver usb-storage
[ 2510.196652] scsi 0:0:0:0: Direct-Access     Generic  USB  SD Reader   1.00 PQ: 0 ANSI: 0 CCS
[ 2510.247280] sd 0:0:0:0: [sda] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
[ 2510.248499] sd 0:0:0:0: [sda] Write Protect is off
[ 2510.248564] sd 0:0:0:0: [sda] Mode Sense: 4b 00 00 08
[ 2510.266271] sd 0:0:0:0: [sda] No Caching mode page found
[ 2510.266355] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 2510.356363]  sda: sda1
[ 2510.407212] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 2542.259778] usb 1-1.4: USB disconnect, device number 3
[ 2547.780365] usb 1-1.4: new high-speed USB device number 4 using musb-hdrc
[ 2547.882463] usb 1-1.4: New USB device found, idVendor=7392, idProduct=7811
[ 2547.882503] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2547.882523] usb 1-1.4: Product: 802.11n WLAN Adapter
[ 2547.882542] usb 1-1.4: Manufacturer: Realtek
[ 2547.882560] usb 1-1.4: SerialNumber: 00e04c000001


So I wanted to put this out there and see if anyone else has seen similar behavior: Do you have USB devices working with the stock 4.4.21 kernel?