All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] usb start causes u-boot restart with TUSB8041 hub
@ 2018-06-04 13:12 Chris Welch
  2018-06-04 14:42 ` Bin Meng
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Welch @ 2018-06-04 13:12 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] usb start causes u-boot restart with TUSB8041 hub
  2018-06-04 13:12 [U-Boot] usb start causes u-boot restart with TUSB8041 hub Chris Welch
@ 2018-06-04 14:42 ` Bin Meng
       [not found]   ` <BN6PR18MB1171F3F5A19D563D0C932D6C86670@BN6PR18MB1171.namprd18.prod.outlook.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Meng @ 2018-06-04 14:42 UTC (permalink / raw)
  To: u-boot

Hi Chris,

On Mon, Jun 4, 2018 at 9:12 PM, Chris Welch
<Chris.Welch@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?

Regards,
Bin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] usb start causes u-boot restart with TUSB8041 hub
       [not found]     ` <CAEUhbmVSvSoCHxg7j9ioeU5tbdWTG7UbUVnxsNsOkmGmjmeaRw@mail.gmail.com>
@ 2018-06-05 13:16       ` Chris Welch
  2018-06-05 21:13         ` Chris Welch
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Welch @ 2018-06-05 13:16 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Bin Meng <bmeng.cn@gmail.com>
> Sent: Monday, June 04, 2018 9:28 PM
> To: Chris Welch <Chris.Welch@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@viavisolutions.com> wrote:
> >> -----Original Message-----
> >> From: Bin Meng <bmeng.cn@gmail.com>
> >> Sent: Monday, June 04, 2018 10:43 AM
> >> To: Chris Welch <Chris.Welch@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@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] usb start causes u-boot restart with TUSB8041 hub
  2018-06-05 13:16       ` Chris Welch
@ 2018-06-05 21:13         ` Chris Welch
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Welch @ 2018-06-05 21:13 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Chris Welch
> Sent: Tuesday, June 05, 2018 9:17 AM
> To: 'bmeng.cn at gmail.com' <bmeng.cn@gmail.com>
> Cc: U-Boot-Denx <u-boot@lists.denx.de>
> Subject: RE: [U-Boot] usb start causes u-boot restart with TUSB8041 hub
> 
> > -----Original Message-----
> > From: Bin Meng <bmeng.cn@gmail.com>
> > Sent: Monday, June 04, 2018 9:28 PM
> > To: Chris Welch <Chris.Welch@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@viavisolutions.com> wrote:
> > >> -----Original Message-----
> > >> From: Bin Meng <bmeng.cn@gmail.com>
> > >> Sent: Monday, June 04, 2018 10:43 AM
> > >> To: Chris Welch <Chris.Welch@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@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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-05 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 13:12 [U-Boot] usb start causes u-boot restart with TUSB8041 hub Chris Welch
2018-06-04 14:42 ` Bin Meng
     [not found]   ` <BN6PR18MB1171F3F5A19D563D0C932D6C86670@BN6PR18MB1171.namprd18.prod.outlook.com>
     [not found]     ` <CAEUhbmVSvSoCHxg7j9ioeU5tbdWTG7UbUVnxsNsOkmGmjmeaRw@mail.gmail.com>
2018-06-05 13:16       ` Chris Welch
2018-06-05 21:13         ` Chris Welch

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.