Skip to content

usb: xhci: Fix USB xHCI support on Intel platform

Bin Meng u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20usb: xhci: Remove incorrect comments for struct xhci_container_ctxdrivers/usb/host/xhci.h+1 -21 reply
2/20usb: xhci: Correct command TRB 4th dword initializationdrivers/usb/host/xhci-ring.c+9 -21 reply
3/20usb: xhci: Initialize scratchpad buffer array and scratchpad buffersdrivers/usb/host/xhci-mem.c drivers/usb/host/xhci.h+95 -21 reply
4/20usb: xhci: Add input slot context in xhci_set_configuration()drivers/usb/host/xhci.c+2 -21 reply
5/20usb: hub: Update handling connect status/change in usb_scan_port()common/usb_hub.c+9 -62 replies
6/20usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hubcommon/usb_hub.c drivers/usb/host/xhci.c include/usb_defs.h+13 -11 reply
7/20usb: hub: Revise wLength for 'get port status' requestcommon/usb_hub.c+1 -11 reply
8/20usb: hub: Change USB hub descriptor to match USB 3.0 hubscommon/usb_hub.c drivers/usb/emul/sandbox_hub.c drivers/usb/host/ehci-hcd.c +2 more+31 -141 reply
9/20usb: hub: Add 3.0 hub port status mask of 2.0 hubinclude/usb_defs.h+6 -11 reply
10/20usb: xhci: Change MAX_HC_PORTS to 255drivers/usb/host/xhci.h+3 -31 reply
11/20usb: xhci: Get rid of CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTSdrivers/usb/host/xhci.c drivers/usb/host/xhci.h+6 -61 reply
12/20configs: Remove CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS in all boardsinclude/configs/am43xx_evm.h include/configs/am57xx_evm.h include/configs/cl-som-am57x.h +24 more+2 -371 reply
12/20configs: Remove CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS in all boards+0 -01 reply
13/20usb: ehci: Get rid of CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTSdrivers/usb/host/ehci-hcd.c drivers/usb/host/ehci.h+10 -71 reply
14/20configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boardsarch/arm/include/asm/ehci-omap.h include/configs/MPC8572DS.h include/configs/cm_t54.h +27 more+2 -601 reply
14/20configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boards+0 -01 reply
15/20usb: cmd: Print actual packet size for super speed devicescmd/usb.c+5 -21 reply
16/20usb: xhci: Convert CONFIG_USB_XHCI_PCI to Kconfigdrivers/usb/host/Kconfig+6 -01 reply
17/20x86: minnowmax: Configure GPIO pins to turn on USB ports VBUSboard/intel/minnowmax/minnowmax.c include/configs/minnowmax.h+54 -01 reply
17/20x86: minnowmax: Configure GPIO pins to turn on USB ports VBUS+0 -00 replies
17/20x86: minnowmax: Configure GPIO pins to turn on USB ports VBUS+0 -00 replies
18/20x86: minnowmax: Add a environment variable for USB power-on delayinclude/configs/minnowmax.h+2 -11 reply
19/20x86: minnowmax: Enable USB xHCI supportarch/x86/dts/minnowmax.dts configs/minnowmax_defconfig+4 -01 reply
19/20x86: minnowmax: Enable USB xHCI support+0 -00 replies
20/20x86: Remove CONFIG_USB_MAX_CONTROLLER_COUNTinclude/configs/conga-qeval20-qa3-e3845.h include/configs/dfi-bt700.h include/configs/minnowmax.h +1 more+0 -101 reply
20/20x86: Remove CONFIG_USB_MAX_CONTROLLER_COUNT+0 -00 replies

Reviews trailers per patch

25 of 26 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon GlassDinh NguyenStefan Roese
SeriesT-b R-b
1/20R-b
2/20R-b
3/20R-b
4/20R-b
5/20T-b
6/20R-b
7/20R-b
8/20R-b
9/20R-b
10/20R-b
11/20R-b
12/20R-b R-b
12/20R-b R-b
13/20R-b
14/20R-b R-b
14/20R-b R-b
15/20R-b
16/20R-b
17/20R-b
17/20R-b
17/20R-b
18/20R-b
19/20R-b
19/20R-b
20/20R-b
20/20R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [U-Boot] [PATCH 00/20] usb: xhci: Fix USB xHCI support on Intel platform

Currently U-Boot xHCI driver does not work on Intel BayTrail SoC based boards that have USB 3.0 ports. Trying to do a 'usb start' simply hangs the board. This series fixes a bunch of xHCI driver issues to make it work on Intel's platform.

Issues identified in the U-Boot xHCI driver are really spec violations, but apparently other xHCI IPs found on ARM SoCs (mainly Synopsis IP?) are quite tolerant with these spec violations, or IOW those IPs don't respect the xHCI spec. While it comes to Intel platform, it just breaks.

Note xHCI interrupt transfer is still not supported in this series, as it has been there since the original commit of xHCI support for years.

Tested on Intel MinnowMax board with the following USB devices:
- Dell USB 1.1 keyboard
- Dell USB 2.0 mouse
- Netac USB 2.0 flash disk
- JetFlash USB 3.0 flash disk
- GenesysLogic 4-port USB 3.0 hub, with an integrated Realtek USB ethernet chipset connected to one of its downstream port

Testing were performed on both ports (2.0 port and 3.0 port), and both ports are connected to xHCI (configure MinnowMax to enable xHCI).

Testing results:
- DELL USB 1.1 keyboard and 2.0 mouse can be enumerated on both ports
- USB 2.0 and 3.0 flash disks work fine (enumerated, read/write) on both ports
- GenesysLogic USB 3.0 hub can be enumerated on 2.0 port as a 2.0 hub, and the integrated Realtek USB ethernet chipset enumerated as well. USB 2.0 and 3.0 flash disks connected via the hub can be enumerated, but DELL USB 1.1 keyboard and 2.0 mouse cannot.
- GenesysLogic USB 3.0 hub can be enumerated on 3.0 port as a 3.0 hub, but the integrated Realtek USB ethernet chipset cannot be enumerated. None of devices connected via the hub can be enumerated. U-Boot xHCI driver just throws BUG_ON() on the event TRB handling.

This indicates that USB 3.0 hub support in U-Boot is seriously broken. So far this series tries to fix some of the issues identified, but the USB 3.0 hub is still not working. This will be left as future work, or if someone else is interested it to pick up the work.

The USB 3.0 hub work includes: port status translation, USB 3.0 newly added "Set Hub Depth" request support, xHCI codes update to fill in hub description fields in the input slot context when issuing commands to xHC, etc.

Bin Meng (20):
usb: xhci: Remove incorrect comments for struct xhci_container_ctx
usb: xhci: Correct command TRB 4th dword initialization
usb: xhci: Initialize scratchpad buffer array and scratchpad buffers
usb: xhci: Add input slot context in xhci_set_configuration()
usb: hub: Update handling connect status/change in usb_scan_port()
usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hub
usb: hub: Revise wLength for 'get port status' request
usb: hub: Change USB hub descriptor to match USB 3.0 hubs
usb: hub: Add 3.0 hub port status mask of 2.0 hub
usb: xhci: Change MAX_HC_PORTS to 255
usb: xhci: Get rid of CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS
configs: Remove CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS in all boards
usb: ehci: Get rid of CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS
configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boards
usb: cmd: Print actual packet size for super speed devices
usb: xhci: Convert CONFIG_USB_XHCI_PCI to Kconfig
x86: minnowmax: Configure GPIO pins to turn on USB ports VBUS
x86: minnowmax: Add a environment variable for USB power-on delay
x86: minnowmax: Enable USB xHCI support
x86: Remove CONFIG_USB_MAX_CONTROLLER_COUNT

 arch/arm/include/asm/ehci-omap.h          |  4 --
 arch/x86/dts/minnowmax.dts                |  3 ++
 board/intel/minnowmax/minnowmax.c         | 53 +++++++++++++++++++
 cmd/usb.c                                 |  7 ++-
 common/usb_hub.c                          | 41 ++++++++++-----
 configs/minnowmax_defconfig               |  1 +
 drivers/usb/emul/sandbox_hub.c            |  7 ++-
 drivers/usb/host/Kconfig                  |  6 +++
 drivers/usb/host/ehci-hcd.c               | 14 +++--
 drivers/usb/host/ehci.h                   |  7 ++-
 drivers/usb/host/xhci-mem.c               | 87 +++++++++++++++++++++++++++++++
 drivers/usb/host/xhci-ring.c              | 11 +++-
 drivers/usb/host/xhci.c                   | 17 +++---
 drivers/usb/host/xhci.h                   | 23 ++++----
 include/configs/MPC8572DS.h               |  1 -
 include/configs/am43xx_evm.h              |  1 -
 include/configs/am57xx_evm.h              |  1 -
 include/configs/cl-som-am57x.h            |  1 -
 include/configs/cm_t43.h                  |  1 -
 include/configs/cm_t54.h                  |  1 -
 include/configs/conga-qeval20-qa3-e3845.h |  3 --
 include/configs/corvus.h                  |  3 --
 include/configs/dfi-bt700.h               |  3 --
 include/configs/dra7xx_evm.h              |  1 -
 include/configs/ds414.h                   |  1 -
 include/configs/duovero.h                 |  2 -
 include/configs/exynos5-common.h          |  3 --
 include/configs/ls1012afrdm.h             |  1 -
 include/configs/ls1012aqds.h              |  1 -
 include/configs/ls1012ardb.h              |  1 -
 include/configs/ls1021aiot.h              |  1 -
 include/configs/ls1021aqds.h              |  1 -
 include/configs/ls1021atwr.h              |  1 -
 include/configs/ls1043aqds.h              |  1 -
 include/configs/ls1043ardb.h              |  1 -
 include/configs/ls1046aqds.h              |  1 -
 include/configs/ls1046ardb.h              |  1 -
 include/configs/ls2080aqds.h              |  1 -
 include/configs/ls2080ardb.h              |  1 -
 include/configs/ma5d4evk.h                |  1 -
 include/configs/mcx.h                     |  1 -
 include/configs/minnowmax.h               |  7 ++-
 include/configs/mvebu_armada-37xx.h       |  9 +---
 include/configs/mvebu_armada-8k.h         |  9 +---
 include/configs/mx35pdk.h                 |  1 -
 include/configs/odroid.h                  |  1 -
 include/configs/omap3_beagle.h            |  1 -
 include/configs/omap3_overo.h             |  1 -
 include/configs/omap4_panda.h             |  2 -
 include/configs/omap5_uevm.h              |  1 -
 include/configs/picosam9g45.h             |  3 --
 include/configs/rk3328_common.h           |  2 -
 include/configs/rk3399_common.h           |  3 --
 include/configs/sama5d2_ptc.h             |  4 --
 include/configs/snapper9g45.h             |  3 --
 include/configs/sunxi-common.h            |  1 -
 include/configs/tam3517-common.h          |  1 -
 include/configs/tao3530.h                 |  1 -
 include/configs/tegra114-common.h         |  1 -
 include/configs/tegra124-common.h         |  1 -
 include/configs/tegra20-common.h          |  1 -
 include/configs/tegra210-common.h         |  1 -
 include/configs/tegra30-common.h          |  1 -
 include/configs/ti_armv7_keystone2.h      |  1 -
 include/configs/uniphier.h                |  3 --
 include/configs/vinco.h                   |  6 ---
 include/configs/x86-common.h              |  2 -
 include/configs/xilinx_zynqmp.h           |  2 -
 include/usb.h                             | 18 +++++--
 include/usb_defs.h                        |  8 ++-
 scripts/config_whitelist.txt              |  2 -
 71 files changed, 259 insertions(+), 155 deletions(-)
Signature · 1 line
2.9.2