Connecting a USB3.0 device to the USB Type-A port on DE-10 Standard
Hi,
As we were verifying the behavior of our custom board, we found that the USB port did not behave as expected. We were able to reproduce this behavior on the DE-10 Standard evaluation board.
When connecting a USB2.0 device (for example a storage device or a simple charging device) the USB Type-A port everything works fine. The device shows up in `lsusb` and it shows the connected event in `dmesg`. The device also receives power.
However, when connecting a USB3.0 device (for example, a storage device, android phone or USB hub) nothing seems to happen. The device does not enter a "powered" state, nor does it show any notification of being connected. On the DE-10 side, nothing seems to happen either. `lsusb` shows no new devices.`dmesg` does not show any USB event, not even an error. Most importantly, connecting any other USB device after that does not change the situation. No device seems to be able to connect anymore, including a USB2.0 device which would previously work. Rebooting the DE-10 is necessary to be able to connect USB2.0 devices again.
We have enabled debug logging of the dwc2 driver. Connecting and disconnecting (from 69 seconds +) a USB2.0 device results in the following:
[ 60.528144] dwc2 ffb40000.usb: gintsts=05000021 gintmsk=f3000806 [ 60.541408] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_CONNECTION [ 60.630138] dwc2 ffb40000.usb: gintsts=04000025 gintmsk=f3000806 [ 60.636214] dwc2 ffb40000.usb: ++OTG Interrupt gotgint=80000 [a_host] [ 60.642623] dwc2 ffb40000.usb: ++OTG Interrupt: Debounce Done++ [ 60.664773] dwc2 ffb40000.usb: SetPortFeature [ 60.669125] dwc2 ffb40000.usb: SetPortFeature - USB_PORT_FEAT_RESET [ 60.675441] dwc2 ffb40000.usb: In host mode, hprt0=00021501 [ 60.744669] dwc2 ffb40000.usb: gintsts=05000021 gintmsk=f3000806 [ 60.794590] dwc2 ffb40000.usb: DWC OTG HCD HUB STATUS DATA: Root port status changed [ 60.802306] dwc2 ffb40000.usb: port_connect_status_change: 0 [ 60.808160] dwc2 ffb40000.usb: port_reset_change: 1 [ 60.813191] dwc2 ffb40000.usb: port_enable_change: 0 [ 60.818331] dwc2 ffb40000.usb: port_suspend_change: 0 [ 60.823535] dwc2 ffb40000.usb: port_over_current_change: 0 [ 60.829413] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_RESET [ 60.904636] usb 2-1: new full-speed USB device number 2 using dwc2 [ 60.910983] dwc2 ffb40000.usb: SetPortFeature [ 60.915397] dwc2 ffb40000.usb: SetPortFeature - USB_PORT_FEAT_RESET [ 60.921640] dwc2 ffb40000.usb: In host mode, hprt0=00021501 [ 60.927260] dwc2 ffb40000.usb: gintsts=05000029 gintmsk=f3000806 [ 60.994627] dwc2 ffb40000.usb: gintsts=05000029 gintmsk=f3000806 [ 61.044583] dwc2 ffb40000.usb: DWC OTG HCD HUB STATUS DATA: Root port status changed [ 61.052296] dwc2 ffb40000.usb: port_connect_status_change: 0 [ 61.058140] dwc2 ffb40000.usb: port_reset_change: 1 [ 61.063181] dwc2 ffb40000.usb: port_enable_change: 1 [ 61.068341] dwc2 ffb40000.usb: port_suspend_change: 0 [ 61.073556] dwc2 ffb40000.usb: port_over_current_change: 0 [ 61.079383] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_RESET [ 61.154762] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x00, ep->hcpriv=6b1d752a [ 61.163602] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x00, ep->hcpriv=00000000 [ 61.172506] dwc2 ffb40000.usb: DWC OTG HCD EP RESET: bEndpointAddress=0x00 [ 61.204871] dwc2 ffb40000.usb: --Host Channel 9 Interrupt: STALL Received-- [ 61.211917] dwc2 ffb40000.usb: --Host Channel 11 Interrupt: STALL Received-- [ 61.219159] dwc2 ffb40000.usb: --Host Channel 13 Interrupt: STALL Received-- [ 61.227611] dwc2 ffb40000.usb: DWC OTG HCD EP RESET: bEndpointAddress=0x81 [ 61.234465] dwc2 ffb40000.usb: DWC OTG HCD EP RESET: bEndpointAddress=0x02 [ 61.256908] hid-generic 0003:054C:0D8C.0001: device has no listeners, quitting [ 61.264977] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_ENABLE [ 69.154278] dwc2 ffb40000.usb: gintsts=25000029 gintmsk=f3000806 [ 69.160359] dwc2 ffb40000.usb: ++Disconnect Detected Interrupt++ (Host) a_host [ 69.294592] dwc2 ffb40000.usb: DWC OTG HCD HUB STATUS DATA: Root port status changed [ 69.302306] dwc2 ffb40000.usb: port_connect_status_change: 1 [ 69.308153] dwc2 ffb40000.usb: port_reset_change: 0 [ 69.313197] dwc2 ffb40000.usb: port_enable_change: 1 [ 69.318359] dwc2 ffb40000.usb: port_suspend_change: 0 [ 69.323577] dwc2 ffb40000.usb: port_over_current_change: 0 [ 69.329451] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_CONNECTION [ 69.336435] dwc2 ffb40000.usb: ClearPortFeature USB_PORT_FEAT_C_ENABLE [ 69.342994] usb 2-1: USB disconnect, device number 2 [ 69.348841] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x00, ep->hcpriv=6b1d752a [ 69.357774] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x00, ep->hcpriv=00000000 [ 69.366678] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x81, ep->hcpriv=00000000 [ 69.375614] dwc2 ffb40000.usb: DWC OTG HCD EP DISABLE: bEndpointAddress=0x02, ep->hcpriv=00000000 [ 69.584673] dwc2 ffb40000.usb: SetPortFeature [ 70.154277] dwc2 ffb40000.usb: gintsts=0400002d gintmsk=f1000806 [ 70.160357] dwc2 ffb40000.usb: ++OTG Interrupt gotgint=40000 [a_host] [ 70.166766] dwc2 ffb40000.usb: ++OTG Interrupt: A-Device Timeout Change++
Connecting a USB3.0 device results in the following single line (only once!):
[ 103.773638] dwc2 ffb40000.usb: gintsts=05000029 gintmsk=f1000806
Therefore, we believe the driver is stuck in the interrupt handler. It seems to be the GINTSTS_PRTINT (port interrupt)., but we are not entirely sure about this.
The behavior we would expect, is that the device would negotiate with the peripheral to function on USB2.0 speeds/functionalities. Definitely not that it would leave the port in an unusable state.
Is anybody else able to reproduce this behavior? Any ideas which could help us find the root cause?
Thanks!
Thomas
Hi all,
We have updated successfully to the 6.1.20 kernel (LTS), which resolves both the issue on the DE-10, as our own board. It did require some migration in our device tree, which took us some time.
Regards,
Thomas