Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20793 Discussions

Connecting a USB3.0 device to the USB Type-A port on DE-10 Standard

Thomas16
Novice
1,822 Views

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

 

Labels (2)
0 Kudos
1 Solution
Thomas16
Novice
1,524 Views

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

View solution in original post

0 Kudos
9 Replies
Farabi
Employee
1,784 Views

Hello,


Is this the board you are using? pls confirm.

link : https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=1081


regards,

Farabi


0 Kudos
Thomas16
Novice
1,776 Views

That is correct. We are using the board you linked.

0 Kudos
Fakhrul
Employee
1,734 Views

Hi Thomas16,


The board features two USB 2.0 type-A ports using the SMSC USB3300 controller. However, it's essential to note that the USB3300 is designed for USB 2.0 and cannot provide USB 3.0 speeds. USB 2.0 and USB 3.0 are distinct generations with different data capabilities. If you connect a USB 3.0 device to the USB3300, it will likely operate at USB 2.0 speeds. While basic functionality will work, you won't achieve full USB 3.0 data rates. To attain USB 3.0 speeds, you'll need a USB 3.0-compatible transceiver or controller.


Regards,

Fakhrul


0 Kudos
Thomas16
Novice
1,722 Views

Hi Fakhurl,

 

Thank you, that was our expectation as well.

 

You state "While basic functionality will work". However, this is not the case. A USB3.0 device does not function at all. Not even at degraded performance. The device does not show up on `lsusb` either.

 

Even worse, after this, USB2.0 does not work either. With the same observation, no indication of any connected USB device within the system.

 

In the logs we only see the interrupt handler, after that, nothing.

 

To be able to use the USB again, we have to restart the device.

 

We have tried this with multiple USB devices.

 

Regards,

Thomas

0 Kudos
Fakhrul
Employee
1,693 Views

Hi Thomas,


I understand your concerns. But I believe the USB3300 controller is not designed for USB3.0 devices, and attempting to use them can cause system instability, as observed. To ensure smooth operations, I would recommend considering USB controllers specifically designed for USB3.0 applications.


If you have any questions or need further assistance, please feel free to ask.


Best regards,

Fakhrul


0 Kudos
Fakhrul
Employee
1,642 Views

We would like to inform you that since we haven't received a response from you regarding our previous notification, we will now move this discussion to community support. If you have any new questions or concerns, we recommend starting a new thread to receive assistance from Intel experts. Alternatively, if you don't have any further inquiries, our community users will be here to help you in this thread. Your understanding is greatly appreciated.


0 Kudos
Thomas16
Novice
1,637 Views

Hi Fakhrul,

 

We found your answer unsatisfactory. We believe USB has been designed in a backwards-compatible manner such that it should negotiate the speeds it operates at upon connect. We do not want USB3.0 speeds, but USB3.0-compatible devices should be able to operate at USB2.0 speeds with our device. This is extremely common in many consumer devices.

 

The kernel included in the SD card image is somewhat older (5.11). Therefore, we will be attempting to upgrade to a newer kernel to see if this resolves our issue.

 

We will report back results.

0 Kudos
FvM
Valued Contributor III
1,629 Views

Hi,
completely agree with the above comment. USB 3.0 devices are basically designed with downward compatibility to USB 2.0 hosts.
Exceptions are e.g. devices with a current consumption that can't be achieved by the host.

Problem is most likely caused by a driver not fully complying with USB specification.

Thomas16
Novice
1,525 Views

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

0 Kudos
Reply