[U-Boot] [PATCH v2 00/15] usb: hub: Support USB 3.0 hubs

Bin Meng bmeng.cn at gmail.com
Wed Jul 12 08:37:50 UTC 2017


This series is a follow-up series to previous series [1] that adds
support for USB 3.0 hubs.

USB 3.0 hubs have slightly different hub descriptor format, as well
as different port status bit positions. These needs to be properly
handled by U-Boot USB core stack codes. xHCI driver has also been
updated to correctly set up context structures that are required
for devices behind a 3.0 hub to work.

Besides USB 3.0 hubs support, this series also adds support for low
speed/full speed devices connected behind a high speed hub with the
xHC controller. It turns out the 'Transaction Translator' part in
the xHC data structure is missing.

Note there is one error during testing USB keyboard when
CONFIG_USB_KEYBOARD is on.

  "Failed to get keyboard state from device 413c:2105"

The enumeration process did pass and the error was thrown in the
USB keyboard driver. This was due to the interrupt transfer is
still not supported by xHCI driver, as of today.

This series is available at u-boot-x86/xhci-working2 for testing.

[1] https://lists.denx.de/pipermail/u-boot/2017-June/296166.html

Changes in v2:
- update the xhci-pci driver Kconfig to make it depend on DM_USB
- nuke xhci_pci_remove() altogether
- trim down the ifdefs by adding usb_get_hub_device() and limit
  ifdefs only in that function
- new patch to "remove hub_port_reset()"
- squash the xchi is_root_port() changes into previous commit
- change to use 'packets' in the comments
- handle port number is greater than 15 in route string
- fix several nits in the commit message
- add a comment for 666 in TT think time

Bin Meng (15):
  usb: xhci-pci: Drop non-DM version of xhci-pci driver
  usb: xhci-pci: Clean up the driver a little bit
  usb: hub: Use 'struct usb_hub_device' as hub device's uclass_priv
  usb: hub: Remove hub_port_reset()
  usb: hub: Add a new API to test if a hub device is root hub
  usb: hub: Translate USB 3.0 hub port status into old version
  usb: hub: Support 'set hub depth' request for USB 3.0 hubs
  usb: xhci: Change xhci_setup_addressable_virt_dev() signature
  usb: xhci: Program 'route string' in the input slot context
  usb: hub: Parse and save TT details from device descriptor
  dm: usb: Add a new USB controller operation 'update_hub_device'
  usb: hub: Call usb_update_hub_device() after hub descriptor is fetched
  usb: xhci: Implement update_hub_device() operation
  usb: xhci: Correct TT_SLOT and TT_PORT macros
  usb: xhci: Enable TT to support LS/FS devices behind a HS hub

 common/usb_hub.c              | 208 ++++++++++++++++++++++++++++++++++++++----
 drivers/usb/host/Kconfig      |   1 +
 drivers/usb/host/usb-uclass.c |  13 ++-
 drivers/usb/host/xhci-mem.c   |  50 +++++++++-
 drivers/usb/host/xhci-pci.c   |  73 +--------------
 drivers/usb/host/xhci.c       |  86 ++++++++++++-----
 drivers/usb/host/xhci.h       |   8 +-
 include/usb.h                 |  64 +++++++++----
 include/usb_defs.h            |  15 +++
 9 files changed, 377 insertions(+), 141 deletions(-)

-- 
2.9.2



More information about the U-Boot mailing list