USB3 on BBAI

96 views
Skip to first unread message

Dave

unread,
Aug 13, 2020, 12:22:43 PM8/13/20
to BeagleBoard
Hi there,

I'm trying to connect a USB3 camera I have to the BBAI (uname -r gives 4.14.108-ti-r131). 

I've run "sudo /opt/scripts/boot/bbai_usb_host.sh" to change the USB port from a client into a host. I'm powering my camera from the 5V on the beaglebone on P5, pin 8. However the camera is not getting detected when connected. I know the camera works as if I connect it to the USB2 port it all works perfectly.

lsusb gives:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The relevant messages from dmesg I get are as follows: 

[  578.405741] xhci-hcd xhci-hcd.2.auto: remove, state 4
[  578.405797] usb usb4: USB disconnect, device number 1
[  578.410192] xhci-hcd xhci-hcd.2.auto: USB bus 4 deregistered
[  578.410264] xhci-hcd xhci-hcd.2.auto: remove, state 4
[  578.410312] usb usb3: USB disconnect, device number 1
[  578.414352] xhci-hcd xhci-hcd.2.auto: USB bus 3 deregistered
[  578.422839] dwc3 48890000.usb: changing max_speed on rev 5533202a
[  579.151738] using random self ethernet address
[  579.151765] using random host ethernet address
[  579.283590] Mass Storage Function, version: 2009/09/11
[  579.283620] LUN: removable file: (no medium)
[  579.347612] using random self ethernet address
[  579.347640] using random host ethernet address
[  579.374212] usb0: HOST MAC 28:ec:9a:eb:df:84
[  579.374471] usb0: MAC 28:ec:9a:eb:df:85
[  579.388618] usb1: HOST MAC 28:ec:9a:eb:df:86
[  579.389016] usb1: MAC 28:ec:9a:eb:df:87
[  579.516850] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[  579.589767] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[  583.176056] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[  583.176124] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[  583.185551] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x0000000002010010
[  583.185633] xhci-hcd xhci-hcd.2.auto: irq 223, io mem 0x48890000
[  583.186576] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[  583.186602] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  583.186624] usb usb3: Product: xHCI Host Controller
[  583.186644] usb usb3: Manufacturer: Linux 4.14.108-ti-r131 xhci-hcd
[  583.186664] usb usb3: SerialNumber: xhci-hcd.2.auto
[  583.190665] hub 3-0:1.0: USB hub found
[  583.190793] hub 3-0:1.0: 1 port detected
[  583.191869] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[  583.191916] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[  583.191961] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0  SuperSpeed
[  583.194273] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[  583.194695] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[  583.194721] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  583.194743] usb usb4: Product: xHCI Host Controller
[  583.194762] usb usb4: Manufacturer: Linux 4.14.108-ti-r131 xhci-hcd
[  583.194781] usb usb4: SerialNumber: xhci-hcd.2.auto
[  583.199144] hub 4-0:1.0: USB hub found
[  583.201451] hub 4-0:1.0: 1 port detected

I'm thinking that the line "We don't know the algorithms for LPM for this host, disabling LPM" may be pointing me to the issue, but I'm not sure what to do about it. Has anyone experienced this issue before and if so, how did you get around it? Any help you can give would be much appreciated. 

Thanks,
David

Roger Quadros

unread,
Aug 14, 2020, 3:57:03 AM8/14/20
to beagl...@googlegroups.com, Dave
Hi David,

On 13/08/2020 19:21, Dave wrote:
> Hi there,
>
> I'm trying to connect a USB3 camera I have to the BBAI (uname -r gives 4.14.108-ti-r131).

How are you connecting the camera to the Type-C port? Does the camera support Type-C?
If not what type-C to Type-A adaptor are you using? Does it support USB3.0? Did you verify it with your laptop's type-C port for example?

>
> I've run "sudo /opt/scripts/boot/bbai_usb_host.sh" to change the USB port from a client into a host. I'm powering my camera from the 5V on the beaglebone on P5, pin 8. However the camera is not getting detected when connected. I know the camera works as if I connect it to the USB2 port it all works perfectly.

What is P5?

Camera should be able to take power from the USB port. Why the custom power connection?
No. That line is harmless. It just says that the XHCI driver doesn't undrestand the LPM mechanism so LPM will be disabled.
(LPM->Link power management)

The issue is more about signal integrity at 3.0 speeds or power sequencing of the camera.

cheers,
-roger

>
> Thanks,
> David
>
> --
> 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 <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/17b66917-3622-418f-9b98-88daa38b61fbo%40googlegroups.com <https://groups.google.com/d/msgid/beagleboard/17b66917-3622-418f-9b98-88daa38b61fbo%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

David Nolan

unread,
Aug 18, 2020, 2:36:22 PM8/18/20
to Roger Quadros, beagl...@googlegroups.com
Hi Roger,

Thanks for your email. Apologies for the delay getting back to you. Yes, I'm connecting the camera to the Type-C port. The camera has a Micro B connector so what I have right now is a cable with a USB Type-C on one end and a Micro-B connector on the other side. Unfortunately my laptop doesn't have a USB Type-C connector so I can't check it on my own laptop. The camera supports USB 3 according to the manufacturer. 

My Apologies, I was incorrect on P5, it's connected to P9, the cape connector on the same side of the board as the Type-C connector. 

Your point that the camera should be able to take power from USB Type-C connector perhaps could be pointing to an issue. I'm not able to get any power out of that port. Is there some setting I have to make, or a jumper or something to get that to work? Mine seems to only take power in on the Type-C connector.

Thanks,
David

Roger Quadros

unread,
Aug 19, 2020, 3:35:46 AM8/19/20
to David Nolan, beagl...@googlegroups.com
David,


On 18/08/2020 21:35, David Nolan wrote:
Hi Roger,

Thanks for your email. Apologies for the delay getting back to you. Yes, I'm connecting the camera to the Type-C port. The camera has a Micro B connector so what I have right now is a cable with a USB Type-C on one end and a Micro-B connector on the other side. Unfortunately my laptop doesn't have a USB Type-C connector so I can't check it on my own laptop. The camera supports USB 3 according to the manufacturer.

This is not the right way of connecting a device to the Type-C port. You will need a Type-C to Type-A adapter to connect non type-C peripherals.
The Adapter is important because it will tell the Type-C logic on the board to switch to DFP (Downstream facing port mode) and so turn on VBUS.

You should not need to run the script. AFAIK the port is in dual-role mode "otg" and should automatically switch to host on connecting the right adapter.
In case you have a type-c thumb drive you should be able to test this out.


My Apologies, I was incorrect on P5, it's connected to P9, the cape connector on the same side of the board as the Type-C connector. 

Your point that the camera should be able to take power from USB Type-C connector perhaps could be pointing to an issue. I'm not able to get any power out of that port. Is there some setting I have to make, or a jumper or something to get that to work? Mine seems to only take power in on the Type-C connector.

Right. That's why you need to use the type-C to type-A adapter.
e.g.
https://www.amazon.com/Anker-Adapter-Converts-Technology-Compatible/dp/B01COOQIKU?ref_=fsclp_pl_dp_5

cheers,
-roger

David Nolan

unread,
Sep 1, 2020, 12:21:23 PM9/1/20
to BeagleBoard
Hi Roger,

I finally got a Type-C to Type-A adapter but when I connected it, I still get no power to my camera, or to a USB Thumb Drive. Is there some setting I need to change to get this to work perhaps? 

Thanks,
David

robert.sty...@gmail.com

unread,
Sep 1, 2020, 12:46:12 PM9/1/20
to BeagleBoard
From what I can see on the schematic, there is no way to power a USB device plugged into the BBAI USB Type-C socket, there is no path to switch +5V power to the Type-C socket VBUS.

You would need some sort of adapter or hub with power to supply your device (and the BBAI see below).

The BBAI needs power from either USB Type-C or (+5V) P9.5, P9.6 and (0V) P9.1, P9.2.

The USB2 can supply power to a device.

David Nolan

unread,
Sep 1, 2020, 12:55:04 PM9/1/20
to beagl...@googlegroups.com
Hi Robert,

For me I've powered the device on P9.5 and P9.1, as you've said, and connected a powered USB hub to the Type-C also. In this scenario my camera gets power, but is not seen by the BBAI (same for a USB key). When I do a lsusb, it just shows the USB hubs (internally) as if nothing is connected. When I connect to the USB 2 port everything works as expected. 

Has anyone successfully gotten the USB3 to work as a host? If so, how?

Appreciate all the help,

Thanks,
David

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/eEoZullAhMY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/e3a996da-d692-4270-8262-9fc6b01542e1n%40googlegroups.com.

robert.sty...@gmail.com

unread,
Sep 1, 2020, 12:56:26 PM9/1/20
to BeagleBoard
Would this work?
  • RSHTECH  ASIN : B07KFDFT4D

David Nolan

unread,
Sep 1, 2020, 1:00:20 PM9/1/20
to beagl...@googlegroups.com
Hi Roger,

That's exactly the one I'm using actually. This gives power to the device, but it's still not recognized by the device. 

David

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

robert.sty...@gmail.com

unread,
Sep 1, 2020, 1:16:05 PM9/1/20
to BeagleBoard
Sorry replies crossed.

The BBAI has a TUSB322IRWBR chip to monitor VBUS, CC1 and CC2 -- it detects power (signalling), cable orientation (DIR) and power from (ID) (host?)

So hardware wise may be the VBUS = 0, and CC1 (or upside-down CC2) set to indicate device, that USB 3 Type A socket should signal it is a device to the BBAI

Otherwise it is software/driver problem

Roger Quadros

unread,
Sep 2, 2020, 5:33:34 AM9/2/20
to beagl...@googlegroups.com, David Nolan
David,

Does the USB1 automatically switch to host mode when you plug the type-C adapter?
Can you please print the kernel log without the adapter connected and then plug the
type-C adapter?

Looking at device tree (usb1 dr_mode = "otg") I assumed that the type-C was designed for
both device and host cases but it looks like it was never designed to be used as a host as
there is no VBUS regulator for the type-C port.

The safest way to provide power to the peripheral is like what Robert suggested
- Use a *powered USB3 hub and connect your camera to that

cheers,
-roger

On 01/09/2020 19:54, David Nolan wrote:
> Hi Robert,
>
> For me I've powered the device on P9.5 and P9.1, as you've said, and connected a powered USB hub to the Type-C also. In this scenario my camera gets power, but is not seen by the BBAI (same for a USB key). When I do a lsusb, it just shows the USB hubs (internally) as if nothing is connected. When I connect to the USB 2 port everything works as expected.
>
> Has anyone successfully gotten the USB3 to work as a host? If so, how?
>
> Appreciate all the help,
>
> Thanks,
> David
>
> To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/e3a996da-d692-4270-8262-9fc6b01542e1n%40googlegroups.com <https://groups.google.com/d/msgid/beagleboard/e3a996da-d692-4270-8262-9fc6b01542e1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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 <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAExD9oJw%3DN1iL9dM54eVOCcEMfut3QwX861K%2BDcio_AWzryYxQ%40mail.gmail.com <https://groups.google.com/d/msgid/beagleboard/CAExD9oJw%3DN1iL9dM54eVOCcEMfut3QwX861K%2BDcio_AWzryYxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages