VIM4 USB 3 failure when under load

TIM_VX’s constant names with the VSI_ prefix are in Amlogic NPU logs, no other vendors use this prefix. For example VSI_NN_INTERPOLATION_BILINEAR.

Good to hear! The exact configuration on my side is:

1. A USB-A 3.0 Hub (I am using VLxxx bases cheap ones)
2. A ESP32-S3 developer kit with a USB-C connection to the ESP32-S3's onboard JTAG (with 3 USB endpoints)
3. VIM4 (NPU)

I believe the ESP32 thingy does not matter that much, but it does have 3 EPs which is common, but not always the case for all USB devices.

The key is a bad cable with bad USB-A connector. This causes the device to disconnect intermittently and the hub will disable the USB device with a message saying disabled by hub, EMI?

On most platforms this is fine, the device will die but system is fine. On VIM4, as I stated before, it will fail with this:

[ 1674.477111] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[ 1674.477129] xhci-hcd xhci-hcd.0.auto: USBSTS: 0x00000000
[ 1674.477135] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
[ 1674.478879] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[ 1674.480224] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[ 1674.480228] xhci-hcd xhci-hcd.0.auto: USBSTS: 0x00000001 HCHalted

According to the xHCI standard: https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf

USBSTS of 0x0 means controller is ready and no error is raised. So this probably is just the xHCI implementation not implementing the stop endpoint TRB correctly. And then the xHCI driver assumed that the xHCI is dead (since it does not respond to a valid TRB), and stopped the xHCI.

We still can’t reproduce this on our side, have you checked other USB hub or checked other VIM4 board?

And double check you use the same image with us? https://dl.khadas.com/products/vim4/firmware/ubuntu/generic/vim4-ubuntu-22.04-gnome-linux-5.15-fenix-1.6-231229.img.xz

You can check the video we test on our side. https://dl.khadas.com/.test/vim4-usb-test.mp4

Could you also capture a video about you reproduce this issue ?

We fell into that same trap using NXP SoC. Not sure how to even get license for Vivante. Learned a hard lesson with that one, do your UI BEFORE starting the project. Pretty sure we are going to scrap all that we did on the NXP stuff and find another vendor.

Yes, have a hard deadline before wed this week, will do on Friday

Vivante is also from VeriSilicon lol

1 Like