[U-Boot] usb start causes u-boot restart with TUSB8041 hub

Chris Welch Chris.Welch at viavisolutions.com
Tue Jun 5 21:13:46 UTC 2018


> -----Original Message-----
> From: Chris Welch
> Sent: Tuesday, June 05, 2018 9:17 AM
> To: 'bmeng.cn at gmail.com' <bmeng.cn at gmail.com>
> Cc: U-Boot-Denx <u-boot at lists.denx.de>
> Subject: RE: [U-Boot] usb start causes u-boot restart with TUSB8041 hub
> 
> > -----Original Message-----
> > From: Bin Meng <bmeng.cn at gmail.com>
> > Sent: Monday, June 04, 2018 9:28 PM
> > To: Chris Welch <Chris.Welch at viavisolutions.com>
> > Subject: Re: [U-Boot] usb start causes u-boot restart with TUSB8041
> > hub
> >
> > Hi Cris,
> >
> > On Mon, Jun 4, 2018 at 11:14 PM, Chris Welch
> > <Chris.Welch at viavisolutions.com> wrote:
> > >> -----Original Message-----
> > >> From: Bin Meng <bmeng.cn at gmail.com>
> > >> Sent: Monday, June 04, 2018 10:43 AM
> > >> To: Chris Welch <Chris.Welch at viavisolutions.com>
> > >> Cc: u-boot at lists.denx.de
> > >> Subject: Re: [U-Boot] usb start causes u-boot restart with TUSB8041
> > >> hub
> > >>
> > >> Hi Chris,
> > >>
> > >> On Mon, Jun 4, 2018 at 9:12 PM, Chris Welch
> > >> <Chris.Welch at viavisolutions.com> wrote:
> > >> > We are developing a product based on the TI AM5728 EVM.  The
> > >> > product has
> > >> a TUSB8041 USB hub on the AM5728 USB host port for additional USB
> ports.
> > >> >
> > >> > The hub works without any problems in Linux kernel, but causes
> > >> > u-boot to
> > >> restart when the TUSB8041 is probed during usb start.
> > >> >
> > >> > We are working with the 4.03.00.05 TI SDK which uses u-boot
> > >> > 2017.01 as the
> > >> base code.  We can run "usb start" in uboot if we leave the
> > >> TUSB8041
> > disabled.
> > >> Not useful though as we cannot communicate with any of our product
> > >> ports because they are on the hub.
> > >> >
> > >> > usb start fails whenever the hub is enabled:
> > >> >
> > >> > => usb start
> > >> > starting USB...
> > >> > USB0:   Register 2000140 NbrPorts 2
> > >> > Starting the controller
> > >> > USB XHCI 1.00
> > >> > scanning bus 0 for devices... ERROR: Configure Endpoint command
> > >> > returned
> > >> completion code 8.
> > >> > Failed to configure xHCI endpoint failed to set default
> > >> > configuration len 25, status 80000000
> > >> > BUG: failure at drivers/usb/host/xhci.c:503/_xhci_alloc_device()!
> > >> > BUG!
> > >> > resetting ...
> > >> >
> > >> > We are using the hub with all default settings except PWRCTL
> > >> > polarity is
> > >> active high and disable the custom battery charging feature.  We
> > >> configure and enable the hub via I2C in board.c of uboot, here is
> > >> an example of the code we
> > >> use:
> > >> >
> > >> > To configure TUSB8041:
> > >> >
> > >> > palmas_i2c_write_u8(TUSB8041_HUB_1, 0xA, 0x20);
> > >> >
> > >> > Exit TUSB8041 configuration mode and activate:
> > >> >
> > >> > palmas_i2c_write_u8(TUSB8041_HUB_1, 0xF8, 0x1);
> > >> >
> > >> > and uboot resets when usb start is requested.
> > >> >
> > >> > No issues if the hub is not activated by commenting out the i2c
> > >> > initialization
> > >> code in board.c:
> > >> >
> > >> > => usb start
> > >> > starting USB...
> > >> > USB0: Register 2000140 NbrPorts 2 Starting the controller USB
> > >> > XHCI 1.00 scanning bus 0 for devices... 1 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
> > >> >
> > >> > Any help with this would be appreciated.  Thanks
> > >>
> > >> What USB devices are connected behind this hub on your board?
> > >
> > > There are no devices connected to this hub or on the board.  Only
> > > the
> > TUSB8041 hub.
> >
> > You mentioned "Not useful though as we cannot communicate with any of
> > our product ports because they are on the hub."
> >
> The hub is used to provide the USB ports on the product.  The AM5728  only has
> 2 USB host ports so we use the TUSB8041 to provide additional  ports on the
> product.
> 
> u-boot crashes with just the TUSB8041 connected so it makes no sense to
> connect any other devices for u-boot testing until this is fixed.
> 
> Everything works fine with the Linux kernel running, the problem is isolated to
> u-boot.
> 
> > So if there are no devices connected to this hub, what is this hub for?
> >
> > Regards,
> > Bin

Some additional test information, I put together a build using u-boot 2018.07 to see if 
newer version would work.

2018.07 also fails using "usb start" causing u-boot to reset.  Here is the failure:

=> usb start
starting USB...
USB0:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... Device not responding to set address.

      USB device not accepting new address (error=80000000)
WARN halted endpoint, queueing URB anyway.
Unexpected XHCI event TRB, skipping... (fcf24670 00000000 13000000 02008400)
BUG at drivers/usb/host/xhci-ring.c:495/abort_td()!
BUG!
resetting ...

I can flip on debugging with either the 2017.01 or the 2018.07 code if someone with some
experience in this area can look at it.




More information about the U-Boot mailing list