Adding a USB Port to PocketBeagle

3,016 views
Skip to first unread message

Dan Brown

unread,
Sep 29, 2017, 10:01:15 AM9/29/17
to BeagleBoard
I have added a USB Type A connector to my Pocket Beagle.  When I plug a Kingston 8GB Flash Key into the port and boot the PocketBeagle, I can see that the device is sort of detected, but I never get access to the Flash.

In /var/log/messages I see the following block:

Sep 28 12:08:19 beaglebone kernel: [    2.177870] usbcore: registered new interface driver usb-storage
Sep 28 12:08:19 beaglebone kernel: [    2.180479] 47401300.usb-phy supply vcc not found, using dummy regulator
Sep 28 12:08:19 beaglebone kernel: [    2.183416] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.183453] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
Sep 28 12:08:19 beaglebone kernel: [    2.183781] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Sep 28 12:08:19 beaglebone kernel: [    2.183795] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep 28 12:08:19 beaglebone kernel: [    2.183805] usb usb1: Product: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.183814] usb usb1: Manufacturer: Linux 4.4.88-ti-r125 musb-hcd
Sep 28 12:08:19 beaglebone kernel: [    2.183824] usb usb1: SerialNumber: musb-hdrc.0.auto
Sep 28 12:08:19 beaglebone kernel: [    2.184765] hub 1-0:1.0: USB hub found
Sep 28 12:08:19 beaglebone kernel: [    2.184832] hub 1-0:1.0: 1 port detected
Sep 28 12:08:19 beaglebone kernel: [    2.187254] 47401b00.usb-phy supply vcc not found, using dummy regulator
Sep 28 12:08:19 beaglebone kernel: [    2.189903] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.189941] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
Sep 28 12:08:19 beaglebone kernel: [    2.190429] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
Sep 28 12:08:19 beaglebone kernel: [    2.190444] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep 28 12:08:19 beaglebone kernel: [    2.190454] usb usb2: Product: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.190463] usb usb2: Manufacturer: Linux 4.4.88-ti-r125 musb-hcd
Sep 28 12:08:19 beaglebone kernel: [    2.190473] usb usb2: SerialNumber: musb-hdrc.1.auto
Sep 28 12:08:19 beaglebone kernel: [    2.191478] hub 2-0:1.0: USB hub found
Sep 28 12:08:19 beaglebone kernel: [    2.191554] hub 2-0:1.0: 1 port detected

Notice that the network blocks are usb1 and usb2.  Without the Flash key inserted, those lines would be usb0 and usb1.

lsmod shows:

usb_f_mass_storage     51139  2

So shouldn't I have a /dev/sdX device then?

Jason Kridner

unread,
Sep 29, 2017, 11:35:42 AM9/29/17
to beagl...@googlegroups.com
On Fri, Sep 29, 2017 at 8:17 AM Dan Brown <dans.ga...@gmail.com> wrote:
I have added a USB Type A connector to my Pocket Beagle.  When I plug a Kingston 8GB Flash Key into the port and boot the PocketBeagle, I can see that the device is sort of detected, but I never get access to the Flash.

How did you wire it? Here's how I've connected a microUSB:

PocketBeagle_microUSB_bb.png 

I'm looking for a good Fritzing element for the USB type-A, but it is largely the same except that ID and GND are tied together (connector is only 4-pin).



In /var/log/messages I see the following block:

Sep 28 12:08:19 beaglebone kernel: [    2.177870] usbcore: registered new interface driver usb-storage
Sep 28 12:08:19 beaglebone kernel: [    2.180479] 47401300.usb-phy supply vcc not found, using dummy regulator
Sep 28 12:08:19 beaglebone kernel: [    2.183416] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.183453] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
Sep 28 12:08:19 beaglebone kernel: [    2.183781] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Sep 28 12:08:19 beaglebone kernel: [    2.183795] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep 28 12:08:19 beaglebone kernel: [    2.183805] usb usb1: Product: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.183814] usb usb1: Manufacturer: Linux 4.4.88-ti-r125 musb-hcd
Sep 28 12:08:19 beaglebone kernel: [    2.183824] usb usb1: SerialNumber: musb-hdrc.0.auto
Sep 28 12:08:19 beaglebone kernel: [    2.184765] hub 1-0:1.0: USB hub found
Sep 28 12:08:19 beaglebone kernel: [    2.184832] hub 1-0:1.0: 1 port detected
Sep 28 12:08:19 beaglebone kernel: [    2.187254] 47401b00.usb-phy supply vcc not found, using dummy regulator
Sep 28 12:08:19 beaglebone kernel: [    2.189903] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.189941] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
Sep 28 12:08:19 beaglebone kernel: [    2.190429] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
Sep 28 12:08:19 beaglebone kernel: [    2.190444] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep 28 12:08:19 beaglebone kernel: [    2.190454] usb usb2: Product: MUSB HDRC host driver
Sep 28 12:08:19 beaglebone kernel: [    2.190463] usb usb2: Manufacturer: Linux 4.4.88-ti-r125 musb-hcd
Sep 28 12:08:19 beaglebone kernel: [    2.190473] usb usb2: SerialNumber: musb-hdrc.1.auto
Sep 28 12:08:19 beaglebone kernel: [    2.191478] hub 2-0:1.0: USB hub found
Sep 28 12:08:19 beaglebone kernel: [    2.191554] hub 2-0:1.0: 1 port detected

Notice that the network blocks are usb1 and usb2.  Without the Flash key inserted, those lines would be usb0 and usb1.

The index delta is interesting. Did you change the device tree at all? I attempted to make the default device tree enable host mode on the USB1 (hardware) port.

Even though the controller shows up, you don't seem to have the flash drive showing up. Are VBUS and ID connected properly?
 

lsmod shows:

usb_f_mass_storage     51139  2

I believe that is just the "function" mass storage class driver, ie. slave, not master.
 

So shouldn't I have a /dev/sdX device then?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/061c31aa-5d9b-4258-aacc-f996683185b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Dan Brown

unread,
Oct 3, 2017, 3:46:00 PM10/3/17
to BeagleBoard
Issue was solved via help from the IRC channel.  Issue was the Extra pins needing to be shorted to GND and 5V.

I have now created a Expansion board that adds a Host port with proper switching of power, and ESD protection.  Details are at:

Andy Bushnell

unread,
Oct 7, 2017, 3:05:43 PM10/7/17
to BeagleBoard
Which pins are to +5 and gnd?  

Thanks!
Andy
Message has been deleted

Dan Brown

unread,
Oct 10, 2017, 3:00:21 PM10/10/17
to BeagleBoard
On the expansion connectors, the +5V from the built-in USB port is connected to the pins labeled VOUT on the back.  GND labels ground pins. 

Andy Bushnell

unread,
Oct 11, 2017, 10:19:02 AM10/11/17
to beagl...@googlegroups.com
On the pinouts 5,7,9,11,13 and 15 are shown as USB1.  So: 

tie ID to Gnd (15,13) and 15 to gnd on the connector
There is a Vin(7) and Vbus(5).  One of those are not used for the +5 connection?  So +5 goes to pin Vout(13)

Is  Vin used when the power is flowing into the PB from the USB?  

Thanks
Andy


--
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/GOwSuY4oiyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/931b44e5-6abb-4214-af6c-2cabf14ee0d4%40googlegroups.com.
Message has been deleted

Dan Brown

unread,
Oct 11, 2017, 11:08:10 AM10/11/17
to BeagleBoard
If you are just trying to hook up a quick and dirty connection, then tie 15 and 13 together for grounding the ID pin.  Then you will tie 5 and 7 together so the CPU understands there is a USB port in use and it is powered.  Your USB connector connects then to pins 7, 9, 11, and 15.   Pin 15 is already connected to system ground.

In my circuit I am using the Power section from the BBB to do this a bit cleaner.

Andy Bushnell

unread,
Oct 11, 2017, 11:13:00 AM10/11/17
to beagl...@googlegroups.com
Sounds good to me.  

Thanks for the great input.

Andy

On Oct 11, 2017 8:06 AM, "Dan Brown" <dans.ga...@gmail.com> wrote:

If you are just trying to hook up a quick and dirty connection, then tie 15 and 13 together for grounding the ID pin.  Then you will tie 5 and 7 together so the CPU understands there is a USB port in use and it is powered.  Your USB connector connects then to pins 7, 9, 11, and 15.   Pin 15 is already connected to system ground.

In my circuit I am using the Power section from the BBB to do this a bit cleaner.



On Wednesday, October 11, 2017 at 10:19:02 AM UTC-4, Andy Bushnell wrote:
On the pinouts 5,7,9,11,13 and 15 are shown as USB1.  So: 

tie ID to Gnd (15,13) and 15 to gnd on the connector
There is a Vin(7) and Vbus(5).  One of those are not used for the +5 connection?  So +5 goes to pin Vout(13)

Is  Vin used when the power is flowing into the PB from the USB?  

Thanks
Andy

On Tue, Oct 10, 2017 at 12:00 PM, Dan Brown <dans.ga...@gmail.com> wrote:
On the expansion connectors, the +5V from the built-in USB port is connected to the pins labeled VOUT on the back.  GND labels ground pins. 

On Saturday, October 7, 2017 at 3:05:43 PM UTC-4, Andy Bushnell wrote:
Which pins are to +5 and gnd?  

Thanks!
Andy

--
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/GOwSuY4oiyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

--
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/GOwSuY4oiyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard+unsubscribe@googlegroups.com.

Graham

unread,
Oct 11, 2017, 11:42:43 PM10/11/17
to BeagleBoard
Dan:

What is the part number for your U4 ?

You are going to have to add some I2C pull-up resistors somewhere.

Thanks,
--- Graham

==

Dan Brown

unread,
Oct 12, 2017, 12:08:56 PM10/12/17
to BeagleBoard
U4 is a USBLC6-2.

As for the I2C pullups, I forgot to add to this board as I have them on another.  I'll add here too...

Jason Kridner

unread,
Oct 12, 2017, 10:56:22 PM10/12/17
to BeagleBoard
The on-chip pull-ups work for most cases.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/2ddb9d68-5e67-4fe7-8de6-396189797f42%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Graham

unread,
Oct 13, 2017, 11:39:47 AM10/13/17
to BeagleBoard
I hacked a "quick and dirty" second USB port as described.
Then connected a LAN7500 USB-2 to Gb-Ethernet board.
Came right up, drivers are already in the kernel, no device tree changes.
Connected to the network at 1 Gb.

speedtest-cli results (on a 1 Gb up/down network)
Download 27 Mbps, Upload 41 Mbps.

And it has a legitimate MAC address.  :-)

(for comparison, BBB Rev.C is download 60 Mbps, upload 70 Mbps, which
is about all I would expect out of a 100 Mbps connection.)

--- Graham

==

William Hermans

unread,
Oct 14, 2017, 12:07:17 PM10/14/17
to beagl...@googlegroups.com
So, I'm not going ot argue about this, and I'm only going to say this once.

I've real world tested ethernet on several A5A's, several C's, and a boatload of green's.  Down speeds 11.6MB/s( that's megabyte ), up speed 11.4-11.5MB/s.

Real world test was a NFS share, reading / writing 1GB of data, or more.

Additionally, I've benchmarked USB networking, Down speeds 105 Mbit/s, and uploads were a bit shy at around 85Mbit/s.

You may want to check to make sure your speed test is accurate.

Graham Haddock

unread,
Oct 14, 2017, 1:30:46 PM10/14/17
to BeagleBoard
I am just reporting what "speedtest-cli" says.

I note that watching "htop" at the same time, on the USB-2 to Ethernet tests, the CPU is maxing out at 100 percent, so the speed is not necessarily constrained by the network interface, but the CPU's ability to feed it, through the USB stack.

I don't know how speedtest-cli works. If it runs a random number continuously, then we might be testing the speed of the random number generator, rather than the network.  If it builds a large data table in advance and just streams the table, then it is probably representative of the fastest the system can run.

A long winded way of agreeing with you.

But, there is no doubt in my mind that the USB-2 to Ethernet interface is about an order of magnitude faster than the SPI to Ethernet interface.  

One conclusion is that putting a 1Gb Ethernet interface on a PocketBeagle is a waste of money and power.  A 10/100 Mb USB-2 to Ethernet interface would be cheaper, just as fast for throughput, and about one fourth the power.

--- Graham

==

--
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/GOwSuY4oiyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard+unsubscribe@googlegroups.com.

William Hermans

unread,
Oct 14, 2017, 2:29:33 PM10/14/17
to beagl...@googlegroups.com

On Sat, Oct 14, 2017 at 10:30 AM, Graham Haddock <gra...@flexradio.com> wrote:
I am just reporting what "speedtest-cli" says.

I note that watching "htop" at the same time, on the USB-2 to Ethernet tests, the CPU is maxing out at 100 percent, so the speed is not necessarily constrained by the network interface, but the CPU's ability to feed it, through the USB stack.

I don't know how speedtest-cli works. If it runs a random number continuously, then we might be testing the speed of the random number generator, rather than the network.  If it builds a large data table in advance and just streams the table, then it is probably representative of the fastest the system can run.

A long winded way of agreeing with you.

But, there is no doubt in my mind that the USB-2 to Ethernet interface is about an order of magnitude faster than the SPI to Ethernet interface.  

One conclusion is that putting a 1Gb Ethernet interface on a PocketBeagle is a waste of money and power.  A 10/100 Mb USB-2 to Ethernet interface would be cheaper, just as fast for throughput, and about one fourth the power.

--- Graham
 
As far as using the gether gadget driver for USB, I was kind of thinking the same thing, but I did not comment at that time. e.g. should be a lot faster than "slow" SPI ethernet. But while on the subject, I'm thinking the PRU's could be used as well. Either as "software" SPI interface, or perhaps something else I'm unaware of.

When I tested gether, I tested using iperf, which seems to be "the standard" for old school linux admins. However, with that said, I usually prefer real world tests, as that tells me what I can expect when I use an interface as such. Not some "mumbo jumbo" that may, or may not have anything to do with what I'm trying to accomplish.

As far as the pocketbeagle goes . . . I do not own one, and do not currently plan on having one any time soon. But I have tested the "bejesus" out of the blacks, and the greens. They actually achieve better networking speeds than most Windows based desktops / laptops. On a PC, under windows, you'd be doing good to get 10-10.5MB/s through put over a fast ethernet connection. On GbE, the fastest I can think of personally, was around 60MB/s and that was not constant. Do note, that I used Intel Pro NiC's . . .but the bottleneck was, I'm thinking in the PCIe lanes of the motherboards . . .

John Morris

unread,
Oct 19, 2017, 6:09:04 PM10/19/17
to BeagleBoard


On Friday, September 29, 2017 at 10:35:42 AM UTC-5, Jason Kridner wrote:

I'm looking for a good Fritzing element for the USB type-A, but it is largely the same except that ID and GND are tied together (connector is only 4-pin).

You're welcome to use the picture here [1].  The part can be found in this bin [2], and I modeled it after this one from eBay [3].

Thanks for the info.  My USB WiFi adapter works great connected this way.


    John
Reply all
Reply to author
Forward
Message has been deleted
0 new messages