USB OTG Host mode with BBB?

Hi All,

I’ve been playing around with getting the mini-USB pc connector to function as a second USB host (I’m using RCN’s Ubuntu, Raring, but I’d assume this would apply to Angstrom as well). There is a post here decribing how to do this with some hardware modifications, but looking at the AM335x technical reference manual it looks like I should be able to set USB Port 0 to function as a host through software alone (i.e. without needing to ground the USB ID pin, or to modify anything else on the board).

So what I have done so far is modify the ‘am33xx.dtsi’ file under the ‘usb_otg_hs’ section, and change the item ‘port0-mode = <3>’ to ‘port0-mode = <1>’, which, according to ‘am33xx-usb.txt’ in the device tree documentation, should force this port to function in Host mode.

I then had a look through menu config, in the ‘Device Drivers’ → ‘USB Support’ section and there didn’t seem to be anything specifically relating to setting the mode of any particular usb port, so I left all of this unchanged.

Upon booting I can see that whereas previously I would get the following wit regards to USB0:

musb-hdrc *** mode=3

I now get

musb-hdrc *** mode=1

This would appear to indicate that my device tree change had been successfully applied, and the initialisation of USB port0 now looks identical to that of port1. whereas previously they were quite different.

I then customised my USB cable to have an external 5V feed (wired to SYS_5V on the expansion header) and added a female-female USB A adaptor to give me a host socket.

However, it doesn’t work.

I have checked the power rail and can see 5V on R159 on the bottom of the BBB and I have double checked that the comms wires are the correct polarity, and everything buzzes out as expected.

The device boots, and I can SSH into it. Plugging a memory stick into the standard usb host plug causes messages related to detecting and attaching a disk, but when I plug the same disk into the modified connector assembly I get noting at all.

Taking out my change to the device tree returns the mini-USB connection to normal functionality, i.e. providing a network connection, so it would appear that the hardware is all still in good working order.

So I’m wonder if anyone else has had luck using the USB OTG connection in host mode - without making any hardware modifications to the board? I all looks like it should work, so I’m guessing I’ve missed something fairly basic.

Andrew Glen.

Like the fact that the processor needs to see the 5V on the processor pin when it turns on the 5V?

Take a look at the host port design. Both ports are actually OTG ports by design. To make the state machine in the HW function as a host, you need to make it work like the other OTG port, the one we call the Host port, which is configured for host…


Thanks Gerald,

That was one thing I was not absolutely clear on. The TRM has the following passage concerning USB power control:

When any of the USB controllers assumes the role of a host, the USB is required to supply a 5V power
source to an attached device through its VBUS line. In order to achieve this task, the USB controller
requires the use of an external power logic (or charge pump) capable of sourcing 5V power. A
USB_DRVVBUS is used as a control signal to enable/disable this external power logic to either source or
disable power on the VBUS line. The control on the USB_DRVVBUS is automatic and is handled by the
USB controller.” (AM335X TRM, pg. 1697)

So are you saying, in addition to the above, that the USB port must be in control of the VBUS enable - assumedly detecting the voltage as off when disabled, and on when enabled, with specific timing requirements around these edges - so that there is no way to simply have the 5V there the whole time?

If this is the case I guess there is a chance that I could add some kind of gpio control through the expansion header to enable/disable the 5V rail as and when required (or I could just modify the board - but I’m trying to avoid this and be able to just plug my clean BBB into my horrible looking base board…)


Yes, that is what I am saying. I did a design where the 5V was always there. It din’t work. I had to add a power switch like I did on the BBB design.


Understood. Thanks for taking the time to clear that up for me.


Hi There

I am too trying to make the mini usb port to work as a host.

I am trying to scan the expansion port signals it seams like none of the pins offers direct access to the processor vbus signal. Should I do this with some software?

If with software; what time should it work to enable/disable the volt? And should it listen to the signal all the time or just during the port initialization stage?

Best Regards


This guy seems to have had some success, with some minor hardware modifications:


Hi, has anyone sucessfully done this yet?

Has anyone made any progress with this?

I’m in the same boat trying to get this work and realise we will have to add some hardware to provide the correctly timed 5V. It looks like the biggest problem is the DRVVBUS pin for USB0 isn’t tracked.



Dear Ian,

Did you able to convert USB0 Port in BBB to Host? If So, Can you explain? I need to Convert Both the ports in BBB to Host. It is urgent.

With regards


Hi, I have got BBB Rev C. I did it, but BBB died and I can’t restore him((((