USB errors (-71) with USB touchscreen, does not recover until full power-cycle

Hello,

We are running a custom Yocto build (based on the console-tdx-image) and have a touchscreen connected to USBH2.
No changes have been made to any USB-related feature of the image. Also the configuration of USBH2 in the device tree has not been altered.
I remember also seeing these issues with the default console-tdx-image.

From time to time, we start to get USB-related errors on the OS when our USB touchscreen is connected:

[ 5212.578434] usb usb1-port1: unable to enumerate USB device
[ 5212.888445] usb 1-1: new high-speed USB device number 56 using ci_hdrc
[ 5213.032443] usb 1-1: device no response, device descriptor read/64, error -71
[ 5213.284445] usb 1-1: device no response, device descriptor read/64, error -71
[ 5213.524442] usb 1-1: new high-speed USB device number 57 using ci_hdrc
[ 5213.668447] usb 1-1: device no response, device descriptor read/64, error -71
[ 5213.920441] usb 1-1: device no response, device descriptor read/64, error -71
[ 5214.032480] usb usb1-port1: attempt power cycle
[ 5214.688445] usb 1-1: new high-speed USB device number 58 using ci_hdrc
[ 5215.116447] usb 1-1: device not accepting address 58, error -71
[ 5215.248448] usb 1-1: new high-speed USB device number 59 using ci_hdrc
[ 5215.676447] usb 1-1: device not accepting address 59, error -71

I also noticed the following error during startup at some point:

[   12.259678] usb 1-1.2: reset full-speed USB device number 3 using ci_hdrc
[   12.621816] usb 1-1.2: device firmware changed
[   12.628158] usb 1-1.2: USB disconnect, device number 3
[   12.739658] usb 1-1.2: new full-speed USB device number 4 using ci_hdrc
[   13.255561] usb 1-1.2: device not accepting address 4, error -71
[   13.339585] usb 1-1.2: new full-speed USB device number 5 using ci_hdrc
[   13.863569] usb 1-1.2: device not accepting address 5, error -71
[   13.869938] usb 1-1-port2: attempt power cycle
[   14.475574] usb 1-1.2: new full-speed USB device number 6 using ci_hdrc
[   14.903596] usb 1-1.2: device not accepting address 6, error -71
[   14.987577] usb 1-1.2: new full-speed USB device number 7 using ci_hdrc
[   15.109820] usbhid 1-1.2:1.0: can't add hid device: -71
[   15.115240] usbhid: probe of 1-1.2:1.0 failed with error -71
[   15.126000] imx6q-pcie 5f000000.pcie: 5f000000.pcie supply epdev_on not found, using dummy regulator

These messages just keep on repeating until the entire board (and therefore the iMX8) is power-cycled.

Simply rebooting the OS does not seem to resolve the issue.
Rebooting does get rid of the usb errors on the kernel output put still fails to detect any new devices that are connected to USBH2.
In order for this to start working again, I have to power-cycle the entire board (and therefore the iMX8), after which new devices connected to USBH2 are discovered again.

The weird thing is that when the USB errors above are visible and the USB touchscreen is disconnected, the same errors keep on coming. It seems like the USB driver / hub fails and is unable to recover from this state until a full power-cycle.
I’ve tried several different units of this USB touchscreen and replaced cables but this USB issue keeps occurring from time to time.

Does anyone have any idea what could be going wrong here?

Thanks in advance.

Kevin

UPDATE:
After further testing I noticed that the USB3503 USB hub seems to disappear from the output of lsusb.
When the USB is working as expected, but the touchscreen is disconnected, lsusb shows the following:

Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When the USB errors occur, lsusb shows the following:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So it seems like the complete USB hub on the Apalis was removed from the USB devices, which might explain the requirement to power-cycle the entire Apalis module in order to get the USB working again.

Hi @DemKev

Probably this issue is fixed with the following commit:
http://git.toradex.com/cgit/u-boot-toradex.git/commit/?h=toradex_imx_v2018.03_4.14.98_2.3.0_bringup&id=f6b6437462eca3f2d615a3fbb2a3c1b723d8175b

Can you try that?

Regards,
Stefan

Yes, this does indeed seem to solve the issue. Thank-you.

Hello DemKev,

thank you for the feedback!

Best Regards,

Matthias