All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 00/20] usb: xhci: Fix USB xHCI support on Intel platform
Date: Wed, 21 Jun 2017 11:28:54 +0200	[thread overview]
Message-ID: <f1d3cef6-80bf-cc5d-3a3a-7c5694025e15@denx.de> (raw)
In-Reply-To: <1497619909-29454-1-git-send-email-bmeng.cn@gmail.com>

Hi Bin,

On 16.06.2017 15:31, Bin Meng wrote:
> 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.

I've now installed this version on one of my BayTrail targets (DFI SoM
based). And yes, I'm now able to detect USB devices connected to
the HSIC ports of the BayTrail only connected to xHCI and not eHCI.
But I have a problem detecting these USB devices after a reset
has occured. Here the log after a power-up:

U-Boot 2017.07-rc1-00297-gbedd877d5d-dirty (Jun 20 2017 - 16:41:19 +0200)

CPU: x86_64, vendor Intel, device 30679h
DRAM:  4 GiB
MMC:   ValleyView SDHCI: 0, ValleyView SDHCI: 1, ValleyView SDHCI: 2
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Model: theadorable-x86-DFI-BT700
SCSI:  Target spinup took 0 ms.
SATA link 1 timeout.
AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: 64bit ncq stag pm led clo pio slum part sxs 
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: SanDisk Ultra II Rev: X411
            Type: Hard Disk
            Capacity: 457862.8 MB = 447.1 GB (937703088 x 512)
Found 1 device(s).
Net:   No ethernet found.
960138 bytes read in 73 ms (12.5 MiB/s)
Video: 800x600x16
Hit any key to stop autoboot:  0 
=> usb reset
resetting USB...
USB0:   Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 5 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller 
  |
  +-2  Vendor specific (480 Mb/s, 180mA)
  |    Realtek USB 10/100/1000 LAN 000002000000
  |  
  +-3  Hub (480 Mb/s, 2mA)
    |
    +-4  Mass Storage (480 Mb/s, 200mA)
    |    JetFlash Mass Storage Device 3281440601
    |  
    +-5  Mass Storage (480 Mb/s, 300mA)
         Kingston DataTraveler 2.0 C860008863CCBFC07A0668FC
       
=> reset
resetting ...
=>

U-Boot 2017.07-rc1-00297-gbedd877d5d-dirty (Jun 20 2017 - 16:41:19 +0200)

CPU: x86_64, vendor Intel, device 30679h
DRAM:  4 GiB
MMC:   ValleyView SDHCI: 0, ValleyView SDHCI: 1, ValleyView SDHCI: 2
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Model: theadorable-x86-DFI-BT700
SCSI:  Target spinup took 0 ms.
SATA link 1 timeout.
AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: 64bit ncq stag pm led clo pio slum part sxs 
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: SanDisk Ultra II Rev: X411
            Type: Hard Disk
            Capacity: 457862.8 MB = 447.1 GB (937703088 x 512)
Found 1 device(s).
Net:   No ethernet found.
960138 bytes read in 73 ms (12.5 MiB/s)
Video: 800x600x16
Hit any key to stop autoboot:  0 
=> usb reset
resetting USB...
USB0:   Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
=> usb tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller 
  |
  +-2  Vendor specific (480 Mb/s, 180mA)
       Realtek USB 10/100/1000 LAN 000002000000


As you can see, the 2 USB mass storage devices which are connected
to the xHCI HSIC port are only detected after a power-up and not
after a system reset.

Is this something that you can reproduce on your setup? Could you
please check and let me know if this works for you or if you have
an idea on this issue?

Thanks,
Stefan

  parent reply	other threads:[~2017-06-21  9:28 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 13:31 [U-Boot] [PATCH 00/20] usb: xhci: Fix USB xHCI support on Intel platform Bin Meng
2017-06-16 13:31 ` [U-Boot] [PATCH 01/20] usb: xhci: Remove incorrect comments for struct xhci_container_ctx Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 02/20] usb: xhci: Correct command TRB 4th dword initialization Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 03/20] usb: xhci: Initialize scratchpad buffer array and scratchpad buffers Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 04/20] usb: xhci: Add input slot context in xhci_set_configuration() Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 05/20] usb: hub: Update handling connect status/change in usb_scan_port() Bin Meng
2017-06-16 14:19   ` Marek Vasut
2017-06-20 15:18     ` Dinh Nguyen
2017-06-16 13:31 ` [U-Boot] [PATCH 06/20] usb: hub: Send correct wValue to get hub descriptor of a USB 3.0 hub Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 07/20] usb: hub: Revise wLength for 'get port status' request Bin Meng
2017-06-17  3:43   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 08/20] usb: hub: Change USB hub descriptor to match USB 3.0 hubs Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 09/20] usb: hub: Add 3.0 hub port status mask of 2.0 hub Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 10/20] usb: xhci: Change MAX_HC_PORTS to 255 Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 11/20] usb: xhci: Get rid of CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 12/20] configs: Remove CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS in all boards Bin Meng
2017-06-16 14:06   ` Bin Meng
2017-06-21 12:13     ` Stefan Roese
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 13/20] usb: ehci: Get rid of CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 14/20] configs: Remove CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS in all boards Bin Meng
2017-06-16 14:09   ` Bin Meng
2017-06-21 12:13     ` Stefan Roese
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 15/20] usb: cmd: Print actual packet size for super speed devices Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 16/20] usb: xhci: Convert CONFIG_USB_XHCI_PCI to Kconfig Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 17/20] x86: minnowmax: Configure GPIO pins to turn on USB ports VBUS Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-17 13:41     ` Bin Meng
2017-06-22  6:44     ` Bin Meng
2017-06-16 13:31 ` [U-Boot] [PATCH 18/20] x86: minnowmax: Add a environment variable for USB power-on delay Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-16 13:31 ` [U-Boot] [PATCH 19/20] x86: minnowmax: Enable USB xHCI support Bin Meng
2017-06-17  3:44   ` Simon Glass
2017-06-17 13:43     ` Bin Meng
2017-06-16 13:31 ` [U-Boot] [PATCH 20/20] x86: Remove CONFIG_USB_MAX_CONTROLLER_COUNT Bin Meng
2017-06-17  3:45   ` Simon Glass
2017-06-22  6:44     ` Bin Meng
2017-06-16 13:42 ` [U-Boot] [PATCH 00/20] usb: xhci: Fix USB xHCI support on Intel platform Bin Meng
2017-06-16 14:21 ` Marek Vasut
2017-06-16 14:29   ` Stefan Roese
2017-06-21  9:28 ` Stefan Roese [this message]
2017-06-21 10:24   ` Bin Meng
2017-06-21 12:07     ` Stefan Roese
2017-06-21 12:44       ` Bin Meng
2017-06-22  6:32         ` Bin Meng
2017-06-21 12:10 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1d3cef6-80bf-cc5d-3a3a-7c5694025e15@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.