Cannot boot with (nor hotplug) USB Hub with Beaglebone Black

I have a beaglebone black rev A5A, plugged in from a USB hub (through a USB-to-power 5v cable). Everything works fine at this point, but once I plug in the USB Hub to the USB Host port on the BBB (so that I can actually use the hub as a hub), the bone resets and bootloops. When booting with the USB Hub plugged in onto the USB host port, it also bootloops.

Sometimes it does not bootloop but simply does nothing and there is no dmesg or anything. But the USB Host port becomes unresponsive, a regular USB thumb drive wouldn’t not even be recognized, unless I reboot.

The hub is a D-Link DUB-H7 High Speed USB 2.0 7-Port Hub (http://www.amazon.com/gp/product/B00008VFAF/)

Here’s some logs (through serial ftdi)

`

U-Boot SPL 2013.04-dirty (May 06 2013 - 16:12:47)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

U-Boot 2013.04-dirty (May 06 2013 - 16:12:47)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
mmc_send_cmd : timeout: No status update

Card did not respond to voltage select!
mmc0(part 0) is current device
mmc_send_cmd : timeout: No status update
Card did not respond to voltage select!
No micro SD card found, setting mmcdev to 1
mmc_send_cmd : timeout: No status update
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnv.txt
14 bytes read in 3 ms (3.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc …
gpio: pin 55 (gpio 55) value is 1
4221128 bytes read in 755 ms (5.3 MiB/s)
gpio: pin 56 (gpio 56) value is 1
23469 bytes read in 37 ms (619.1 KiB/s)
Booting from mmc …

Booting kernel from Legacy Image at 80007fc0 …

Image Name: Angstrom/3.8.11/beaglebone
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4221064 Bytes = 4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Flattened Device Tree blob at 80f80000

Booting using the fdt blob at 0x80f80000
XIP Kernel Image … OK
OK
Using Device Tree in place at 80f80000, end 80f88bac

Starting kernel …

Uncompressing Linux… done, booting the kernel.
[ 0.191469] omap2_mbox_probe: platform not supported
[ 0.201943] tps65217-bl tps65217-bl: no platform data provided
[ 0.274901] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.312007] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.349115] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.386225] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.416342] omap_hsmmc mmc.4: of_parse_phandle_with_args of ‘reset’ failed

U-Boot SPL 2013.04-dirty (May 06 2013 - 16:12:47)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

U-Boot 2013.04-dirty (May 06 2013 - 16:12:47)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc0(part 0) is current device

mmc_send_cmd : timeout: No status update
Card did not respond to voltage select!
No micro SD card found, setting mmcdev to 1
mmc_send_cmd : timeout: No status update
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnv.txt
14 bytes read in 3 ms (3.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc …
gpio: pin 55 (gpio 55) value is 1
4221128 bytes read in 756 ms (5.3 MiB/s)
gpio: pin 56 (gpio 56) value is 1
23469 bytes read in 37 ms (619.1 KiB/s)
Booting from mmc …

Booting kernel from Legacy Image at 80007fc0 …

Image Name: Angstrom/3.8.11/beaglebone
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4221064 Bytes = 4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Flattened Device Tree blob at 80f80000

Booting using the fdt blob at 0x80f80000
XIP Kernel Image … OK
OK
Using Device Tree in place at 80f80000, end 80f88bac

Starting kernel …

Uncompressing Linux… done, booting the kernel.
[ 0.191425] omap2_mbox_probe: platform not supported
[ 0.201892] tps65217-bl tps65217-bl: no platform data provided
[ 0.276882] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.313988] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.351097] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.388206] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.418400] omap_hsmmc mmc.4: of_parse_phandle_with_args of ‘reset’ failed

U-Boot SPL 2013.04-dirty (May 06 2013 - 16:12:47)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4

musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

U-Boot 2013.04-dirty (May 06 2013 - 16:12:47)

I2C: ready
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot#
U-Boot# usb tree

USB is stopped. Please issue ‘usb start’ first.
U-Boot# usb start
(Re)start USB…
USB0:
U-Boot SPL 2013.04-dirty (May 06 2013 - 16:12:47)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img

…etc

`

I am trying to figure out what all this means from an electrical standpoint.

Try unplugging the USB to DC jack and use it on a PC or a laptop to provide the power. Hook everything else up the same and see how that works.

Gerald

It seems to work and boots, but something weird happens when I unplug the hub, wait 10-20 seconds and plug it again.

See in attached file, starting on at this line:
[ 179.398446] musb_stage0_irq 790: unhandled DISCONNECT transition (a_idle)

Especially all the:

[ 215.023020] usb 1-1: usb-storage timed out on ep0out len=0/0
[ 215.023044] hub 1-1:1.0: cannot reset port 2 (err = -110)
[ 215.028718] hub 1-1:1.0: port 2 not enabled, trying reset again…
[ 216.031077] usb 1-1: usb-storage timed out on ep0out len=0/0
[ 216.031105] hub 1-1:1.0: cannot reset port 2 (err = -110)
[ 216.036804] hub 1-1:1.0: port 2 not enabled, trying reset again…
[ 217.038617] usb 1-1: usb-storage timed out on ep0out len=0/0
[ 217.038643] hub 1-1:1.0: cannot reset port 2 (err = -110)
[ 217.044314] hub 1-1:1.0: port 2 not enabled, trying reset again…
[ 217.044327] hub 1-1:1.0: Cannot enable port 2. Maybe the USB cable is bad?

mydmesg.txt (46.5 KB)

There can be an issue that if you unplug it, it may not reconnect. I would leave it connected.

Gerald

Thanks Gerald for the quick reponses!

Back to the original issue. I had plugged the BBB to the high-powered plugs available on the hub (“Two high-current (1.2 amps per port) USB fast charging ports”). Would that affect anything? maybe the hub could not take the load and reduced power?
I tried the same setup as before but the BBB plugged (using USB-to-DC jack) and it seems to work too.

I meant to say: but the BBB plugged (using USB-to-DC jack) onto a regular port on the hub and it seems to work.

I am not sure what happens when you connect the host port back into the HUB that also powers the board. It may want to see enumeration before it supplies full current, which could cause the HUB to shutdown the port that supplies the DC to the board because the main port, the board, is not happen. basically starting the process all over again.

I know we used to to this on one HUB back in the day, but it was not this brand.

Gerald

Well it looks like this setup (with the whole loop thing) seems to
work but only if I'm not plugging the BBB to the high-current plugs.
Those two high-current ports must be a tricky system then, or they may
not provide a stable output.

Not sure how they function and how they are affected by the main port. If they work in the scenario you say, as long as it works, great.

Gerald

I really appreciate your help Gerald.
Thanks!

I know this post is old but thought I would add something. If you look at the documentation for the DUB-H7 those high current ports are enabled when the hub is not connected to a running computer. When they are attached to a running machine they become standard ports. I think that might have something to do with the behavior you were seeing.