Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Support USB super speed in fastboot #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mengxianglinx
Copy link
Contributor

Refine Self USB device mode:

  1. USB device mode driver support 64Bit base address
  2. Get xHCI base address from PCI config
    Support super speed in fastboot:
  3. Update needed usb3.0 descriptors to support super speed mode
    With self_usb_device_mode_protocol enabled, kernelflinger
    support usb super speed and high speed.
  4. With self_usb_device_mode_protocol disabled, kernelflinger
    only support usb high speed.

Tracked-On: OAM-88234
Signed-off-by: Meng Xianglin [email protected]

Refine Self USB device mode:
1. USB device mode driver support 64Bit base address
2. Get xHCI base address from PCI config
Support super speed in fastboot:
1. Update needed usb3.0 descriptors to support super speed mode
   With self_usb_device_mode_protocol enabled, kernelflinger
   support usb super speed and high speed.
2. With self_usb_device_mode_protocol disabled, kernelflinger
   only support usb high speed.

Tracked-On: OAM-88234
Signed-off-by: Meng Xianglin <[email protected]>
Copy link
Contributor

@jeremy-compostella jeremy-compostella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't the super speed support be dynamically detected to avoid the creation of compilation flag ?

@mengxianglinx
Copy link
Contributor Author

There is no UEFI interface or call back to get information about whether high speed or super speed is negotiated before "usb_device->Bind()", we can just provide usb3.0 descriptors for both high speed and super speed.
As of this patch writing, test on my NUC, usb device mode protocol of BIOS can't handle usb3.0 descriptors, it can negotiate super speed at physical layer, but transferring a usb3.0 descriptor will crash the BIOS.
The self implemented usb device mode protocol can transfer usb3.0 descriptors successfully no matter high speed or super speed is negotiated.

@neolee66x
Copy link

@mengxianglinx , do you mean, you always report USB3.0 descriptors to host whatever it connected to USB2.0 or USB3.0 port? I think the descriptors are different for high speed and super speed.

May I know what's the CPU type of your NUC? I have a AAEON UP Squared board (ApolloLake SOC), but it can't identify Super Speed when I connect to host USB3.0 port through USB3.0 cable. The device status register (DSTS 0xC70C) bit[2:0] is 0 (high speed).

And, I think is it possible report descriptor to host by CONNECTSPD (Actual speed) in DSTS register (Need to modify USB device mode driver)? It will support dynamically detected, rather than by compilation flag.

@neolee66x
Copy link

@mengxianglinx , sorry to bother you. May I know if USB Super Speed works or not in device mode on ApolloLake (UP2 board)? I did some experiment, seems can't be identified as Super Speed. Thanks.

@mengxianglinx
Copy link
Contributor Author

Sorry, I'm working on another project now, when I took care of this issue, I tested with a NUC7i5DNHE(bios version 0067).

@neolee66x
Copy link

Thanks @mengxianglinx . if KabyLake works, maybe APL SOC or UP2 board issue. Same issue observed on Linux kernel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants