libpayload/usb: add USB 3.1 GEN2 support

USB 3.1 GEN2 report speed type 4, add into speed enum.

BUG=b:139787920
BRANCH=N/A
TEST=Build libpayload and depthcharge on sarien and boot with
USB GEN2 HUB with USB disk. Check ultra speed device in cbmem log.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Ia0ef12b2f0d91bf0d0db766bbc9019de1614a4f4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35023
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Eric Lai
2019-08-22 12:41:12 +08:00
committed by Patrick Georgi
parent 1458777c3b
commit da10b9224a
4 changed files with 22 additions and 6 deletions

View File

@@ -267,7 +267,7 @@ _free_ic_return:
static int
xhci_finish_hub_config(usbdev_t *const dev, inputctx_t *const ic)
{
int type = dev->speed == SUPER_SPEED ? 0x2a : 0x29; /* similar enough */
int type = is_usb_speed_ss(dev->speed) ? 0x2a : 0x29; /* similar enough */
hub_descriptor_t desc;
if (get_descriptor(dev, gen_bmRequestType(device_to_host, class_type,