BBB USB0 change from client to host

1,604 views
Skip to first unread message

marc...@gmail.com

unread,
Apr 17, 2014, 6:01:27 AM4/17/14
to beagl...@googlegroups.com
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 
 

marc...@gmail.com

unread,
Apr 17, 2014, 3:48:21 PM4/17/14
to beagl...@googlegroups.com, marc...@gmail.com
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

vincent....@gmail.com

unread,
Sep 9, 2014, 9:09:06 AM9/9/14
to beagl...@googlegroups.com, marc...@gmail.com
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.


Le jeudi 17 avril 2014 12:01:27 UTC+2, marc...@gmail.com a écrit :
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
        u...@47401000 {

                status = "okay";
                dr_mode = "host";
        };
        u...@47401800 {

Me

unread,
Sep 10, 2014, 6:27:01 AM9/10/14
to vincent....@gmail.com, beagl...@googlegroups.com
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

Sent from my iPhone

Siddhiq Ahmed

unread,
Dec 18, 2014, 1:43:35 PM12/18/14
to beagl...@googlegroups.com, vincent....@gmail.com, marc...@gmail.com
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

Robert Nelson

unread,
Dec 18, 2014, 1:45:38 PM12/18/14
to Beagle Board, vincent....@gmail.com, marc...@gmail.com
On Thu, Dec 18, 2014 at 12:43 PM, Siddhiq Ahmed <sid...@gmail.com> wrote:
> 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.

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

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Siddhiq Ahmed

unread,
Dec 18, 2014, 1:55:14 PM12/18/14
to beagl...@googlegroups.com, vincent....@gmail.com, marc...@gmail.com
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


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/rJt1Rhtpphk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
With regards

Siddhiq Ahamed,
Vaaraahi Embedded
350-A3, Rosun Builidngs,Subramaniampalayam Road,
G.N.Mills(PO),
Coimbatore - 641 029.

Me

unread,
Dec 19, 2014, 5:15:07 AM12/19/14
to Siddhiq Ahmed, beagl...@googlegroups.com, vincent....@gmail.com
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

Sent from my iPhone

Siddhiq Ahmed

unread,
Dec 21, 2014, 10:00:16 AM12/21/14
to beagl...@googlegroups.com, sid...@vaaraahi.com, vincent....@gmail.com, marc...@gmail.com
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

Ison Thomas

unread,
Nov 5, 2015, 8:21:55 AM11/5/15
to BeagleBoard, marc...@gmail.com

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?


On Thursday, 17 April 2014 15:31:27 UTC+5:30, marc...@gmail.com wrote:
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
        u...@47401000 {

                status = "okay";
                dr_mode = "host";
        };
        u...@47401800 {

Ison Thomas

unread,
Nov 5, 2015, 8:24:50 AM11/5/15
to BeagleBoard, vincent....@gmail.com
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?

Antonio Garcia Oteros

unread,
Feb 29, 2016, 11:38:38 AM2/29/16
to beagl...@googlegroups.com
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.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

pran...@gmail.com

unread,
Jul 4, 2016, 4:54:05 PM7/4/16
to BeagleBoard, marc...@gmail.com


Hello,
Has anyone manage how to convert USB1 (normally host) to client?
Regards
Reply all
Reply to author
Forward
0 new messages