BBB USB0 change from client to host

Hello
I have finally managed to get my hands on an BBB and started to try and get my system up and running the way I need by building a kernel (3.14.1).

I am attempting to use the USB client port (USB0) in host mode and think I have done all the things necessary to get this working:

Kernel config has EHCI enabled and set to host only
Hardware mod on the board to short pins 4&5 of micro socket to force USB-ID low to indicate host mode.
Changed the arch/arm/boot/dts/am335x-bone-common.dtsi file to put it into host mode
usb@47401000 {
status = “okay”;
dr_mode = “host”;
};
usb@47401800 {
status = “okay”;
dr_mode = “host”;
};

No matter what I plug in nothing gets identified ???

Plugging into the USB1 host port is fine so the kernel is configured correctly.

Boot log shows ports being identified:
[ 2.057294] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 2.063996] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[ 2.072673] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.079868] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.087467] usb usb1: Product: MUSB HDRC host driver
[ 2.092722] usb usb1: Manufacturer: Linux 3.14.1 musb-hcd
[ 2.098402] usb usb1: SerialNumber: musb-hdrc.0.auto
[ 2.104856] hub 1-0:1.0: USB hub found
[ 2.108880] hub 1-0:1.0: 1 port detected
[ 2.117574] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 2.124275] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[ 2.133045] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.140253] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.147851] usb usb2: Product: MUSB HDRC host driver
[ 2.153105] usb usb2: Manufacturer: Linux 3.14.1 musb-hcd
[ 2.158786] usb usb2: SerialNumber: musb-hdrc.1.auto
[ 2.165268] hub 2-0:1.0: USB hub found
[ 2.169312] hub 2-0:1.0: 1 port detected

Any ideas ???

Thanks
marc

I will answer my own question…

After looking at the circuit diagram I see that there is no 5V supply to the USB port for the mini USB connector. I know that this is normally for a host to supply and power the beagle via but I am plugging in a device to BE powered.

So the solution is to divert power from the 5V DC jack to the USB_DC rail.

This can be done near the TPMS chip by connecting the 5V side of C2 to the USB_DC side of C1. That will do 2 things ;
1 supply 5V to the USB connection
2 indicate to the AM335x that there is volts on the port so it can wake up and operate.

Also shorting pins 4&5 of the mini USB socket forces the port into Host mode.

Devices can now be hot plugged and recognised.

Yay.

Maybe this will help someone one day.

Regards
Marc

Thanks Marc, these few lines are very useful since I need 2 USB hosts and don’t want to add a USB hub. About the supply, maybe adding inductor filters like on USB1 schematic would be better.

Vince.

Hi Vince
Thanks for the suggestion. Issue was solved long ago but I didn’t update the post. But you are right with the use of inductors and you also need to change the mode selection to out the port into host mode.

Kind Regards
Marc

Dear All,

I am also working with a Clone of BBB. In which I need to Convert USB0 as Host. I need to use both the USB0 and USB1 has Host. Kindly, suggest. How to Convert the USB0 Port to Host.

With regards

Siddhiq

I suggest you take a look at the schematic and compare usb0 & usb1..

Regards,

Dear Robert,

Thanks for the quick reply. I had followed the same schematics as BBB. The USB1 is working has HOST. I have Grounded USB1_ID and I have used USB1_DRVVBUS to drive the 5V and USB1_VBUS for sensing. But, USB0 is not working. I have Grounded USB0_ID and I have not Used USB0_DRVBUS. But I have connected USB0_VBUS to Permanent 5V.

The USB0 is not able to detect any device when plugged in.

Kindly, help me to sort it out.

With regards

Siddhiq

It is not just the circuit that needs to change, you also need to update the kernel to force into Host mode. This is done using the binary tree.

Regards
Marc

Hai Marc,

Can we Configure Kernel and force into Host Mode without any change in the Hardware. I had made the Hardware Already based on Beaglebone Black.

With regards

Siddhiq

Hi,

I am trying to acheive a similar goal here. I want to change my USB0 to host and USB1 to device. I tried to make this change in arch/arm/boot/dts/am335x-bone-
common.dtsi file but the file structure has changed significantly. It is now having :

" &usb_otg_hs {
interface_type = <1>;
power = <250>;
status = “okay”;
}; " instead of what is posted in your querry.

Also the am33xx.dtsi file is changed in the usb part as:

" usb_otg_hs: usb@47400000 {
compatible = “ti,musb-am33xx”;
reg = <0x47400000 0x1000 /* usbss /
0x47401000 0x800 /
musb instance 0 /
0x47401800 0x800>; /
musb instance 1 /
interrupts = <17 /
usbss /
18 /
musb instance 0 /
19>; /
musb instance 1 */
multipoint = <1>;
num-eps = <16>;
ram-bits = <12>;
port0-mode = <3>;
port1-mode = <1>;
power = <250>;
ti,hwmods = “usb_otg_hs”;
status = “disabled”;
}; "

Do you have any idea on how to make the USB0 to work as host and USB1 to work as device with the latest files?

Also do we have to make any change using the ‘menuconfig’ for achieving this or the default configuration used for beaglebone is sufficient?

Hi Robert,

I am trying to acheive a similar goal here. I want to change my USB0 to host and USB1 to device. I tried to make this change in arch/arm/boot/dts/am335x-bone-
common.dtsi file but the file structure has changed significantly. It is now having :

" &usb_otg_hs {
interface_type = <1>;
power = <250>;
status = “okay”;
}; " instead of what is posted in the original querry.

Also the am33xx.dtsi file is changed in the usb part as:

" usb_otg_hs: usb@47400000 {
compatible = “ti,musb-am33xx”;
reg = <0x47400000 0x1000 /* usbss /
0x47401000 0x800 /
musb instance 0 /
0x47401800 0x800>; /
musb instance 1 /
interrupts = <17 /
usbss /
18 /
musb instance 0 /
19>; /
musb instance 1 */
multipoint = <1>;
num-eps = <16>;
ram-bits = <12>;
port0-mode = <3>;
port1-mode = <1>;
power = <250>;
ti,hwmods = “usb_otg_hs”;
status = “disabled”;
}; "

Do you have any idea on how to make the USB0 to work as host and USB1 to work as device with the latest files?

Also do we have to make any change in the ‘menuconfig’ for achieving this or the default configuration used for beaglebone is sufficient?

Hi ,
I would like to know if you have the solution to convert this USB0 port to periferical port.

I have the same problem like you.

Thanks in advanced.

Hello,
Has anyone manage how to convert USB1 (normally host) to client?
Regards