UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor cwchung
Visitor
8,979 Views
Registered: ‎02-16-2017

ZCU102 ES2 USB 3.0 Host mode

Jump to solution

I want to enable USB 3.0 Host mode for Linux running on ZCU102 ES2 board. (e.g. USB 3.0 pendrive)

Linux says it has two usb buses (lsusb). However, whenever I connect USB 3.0 drive to the board, the drive is recognized as USB 2.0 drive not USB 3.0 drive.

 

Has anyone successfully connected USB 3.0 devices to ZCU102 board?

 

---------------------------

Before connecting USB3.0 drive,

$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

 

This suggests that Bus 02 is USB 3.0 / Bus 01 is USB 2.0

 

After connecting USB 3.0 drive,

$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 480M

 

Even If the drive supports USB 3.0 SuperSpeed, it only connects to Bus 01 which is USB 2.0

I want this drive to be connected

 

 

 

Followings are configuration that I use to enable USB 3.0 GTR PHY.

-------------------------------------

I am using petalinux 16.4 to build kernel/device tree and rootfs.

 

I looked into the reference:

  http://www.wiki.xilinx.com/Zynq+Ultrascale+MPSOC+Linux+USB+device+driver   : says dwc3 driver supports USB 3.0 host mode

  http://www.wiki.xilinx.com/Zynq+Ultrascale+MPSOC+Linux+SIOU+driver : SIOU serdes driver

 

ICM settings that I chose: Lane0 - PCIe / Lane1 - DP0 / Lane2 - usb0 / Lane3 - Sata1

 

SIOU SERDES:

  I checked ICM_CFG0 and ICM_CFG1 in psu_init.c and found out that usb0 is correctly set on PS-GTR lane 1.

  Also I have correct phys information in my device tree

 &dwc3_0 {
 > status = "okay";
 > dr_mode = "host";
 > snps,usb3_lpm_capable;
 > phy-names = "usb3-phy";
 > phys = <&lane2 PHY_TYPE_USB3 0 2 26000000>;
 };

 

I checked gtr lane2 for usb0 is pll_locked from kernel message

$ dmesg | grep gtr
[ 2.470147] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:3 protocol:2 pll_locked:yes
[ 2.629933] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes  //> Lane2 type 0(usb0) protocol 3 (usb)

 

Furthermore, ZCU102 ES2 has extra GT muxes(switch) for USB/PCIe/SATA/DPs. PS_GTR_LANE_SEL0~4 are generated by I2C0 gpio and I set this up in device tree as follows:

&i2c0 {
> status = "okay";
> clock-frequency = <400000>;

> tca6416_u97: gpio@20 {
> > /*
> > * Enable all GTs to out from U-Boot
> > * i2c mw 20 6 0 - setup IO to output
> > * i2c mw 20 2 ef - setup output values on pins 0-7
> > * i2c mw 20 3 ff - setup output values on pins 10-17
> > */
> > compatible = "ti,tca6416";
> > reg = <0x20>;
> > gpio-controller;
> > #gpio-cells = <2>;
> > /*
> > * IRQ not connected
> > * Lines:
> > * 0 - PS_GTR_LAN_SEL0
> > * 1 - PS_GTR_LAN_SEL1
> > * 2 - PS_GTR_LAN_SEL2
> > * 3 - PS_GTR_LAN_SEL3
> > * 4 - PCI_CLK_DIR_SEL
> > * 5 - IIC_MUX_RESET_B
> > * 6 - GEM3_EXP_RESET_B
> > * 7, 10 - 17 - not connected
> > */

> > gtr_sel0 {
> > > gpio-hog;
> > > gpios = <0 0>;
> > > output-low; /* PCIE = 0, DP = 1 */
> > > line-name = "sel0";
> > };
> > gtr_sel1 {
> > > gpio-hog;
> > > gpios = <1 0>;
> > > output-high; /* PCIE = 0, DP = 1 */
> > > line-name = "sel1";
> > };
> > gtr_sel2 {
> > > gpio-hog;
> > > gpios = <2 0>;
> > > output-high; /* PCIE = 0, USB0 = 1 */
> > > line-name = "sel2";
> > };
> > gtr_sel3 {
> > > gpio-hog;
> > > gpios = <3 0>;
> > > output-high; /* PCIE = 0, SATA = 1 */
> > > line-name = "sel3";
> > };
> };

.............

};

 

and these PS_GTR_LANE_SEL[0~4] signals are properly shown in kernel message:

~$ dmesg | grep sel
[ 2.806147] GPIO line 322 (sel0) hogged as output/low
[ 2.811817] GPIO line 323 (sel1) hogged as output/high
[ 2.817568] GPIO line 324 (sel2) hogged as output/high
[ 2.823314] GPIO line 325 (sel3) hogged as output/high

 

-----------------------------

 

 

0 Kudos
1 Solution

Accepted Solutions
13,643 Views
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

FIXED:

 

As I suspected, it was host adapter. 

 

Order this one, and don't bother with ones on Amazon, which do not:

 

Firefold USB 3.0 Type A Female to Micro USB Type B Male Adapter.

 

It is confirmed working!

0 Kudos
17 Replies
8,647 Views
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

I was just researching USB 3.0 ZCU102, and found the following from the Ultrascale Linux USB Driver wiki [http://www.wiki.xilinx.com/Zynq+Ultrascale+MPSOC+Linux+USB+device+driver]

 

It has a "SuperSpeed USB" flash drive detected by the kernel, so I would try to reproduce that.

 

Also, here some other things I would do:

 

1) Check jumpers

2) Try other USB3.0 devices

3) Clone the Xilinx kernel, and investigate commits around the Xilinx drivers you're using

 

Hope you find a solution

--Tom

0 Kudos
8,641 Views
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

One more thing:

 

Are you using a USB 3.0 OTG adapter as pictured in the Wiki?

0 Kudos
13,644 Views
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

FIXED:

 

As I suspected, it was host adapter. 

 

Order this one, and don't bother with ones on Amazon, which do not:

 

Firefold USB 3.0 Type A Female to Micro USB Type B Male Adapter.

 

It is confirmed working!

0 Kudos
Visitor cwchung
Visitor
7,970 Views
Registered: ‎02-16-2017

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

I ended up using SATA instead, but makes sense that the cable comes with the board does not support USB 3.0 correctly. I'll try to get one you mentioned and test it later.

 

Thanks for letting me know :-)


@tgolubev_mentor wrote:

FIXED:

 

As I suspected, it was host adapter. 

 

Order this one, and don't bother with ones on Amazon, which do not:

 

Firefold USB 3.0 Type A Female to Micro USB Type B Male Adapter.

 

It is confirmed working!


 

0 Kudos
Participant eejlny
Participant
346 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Hello,

Is this the one you are using:

https://www.firefold.com/products/usb-3-0-type-a-female-to-micro-usb-type-b-male-adapter

Any other suggestions confirmed working, please ?

I have bought a couple here in the UK from other vendors and none of them work.  Only USB 2.0. 

root@ultrascale:~/eejlny# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 012: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thanks,

0 Kudos
Explorer
Explorer
243 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Hi @eejlny ,

I'm also having this issue with a different dev board here in UK, did you finally find a solution or a working adapter?

Thanks.

0 Kudos
Participant eejlny
Participant
237 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Unfortunately not. The issue is still there. Xilinx sent me some instructions on how to set the board for USB that you can see in the other question I created in the zcu102 forum but this has not changed anything. It will be good if they could still confirm which adapter they are using at Xilinx to get this to work as USB 3.0. 

0 Kudos
Explorer
Explorer
228 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Really frustrating one...yes, it would be great if Xilinx could confirm which ones are good.

I ordered a few different adapters to test, if any works I'll let you know. Did you try the Firefold one suggested above? 

0 Kudos
Participant eejlny
Participant
226 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

No, I did not feel like ordering from US without some confirmation that I was getting the one confirmed to be working but I did not get a reply about that.

I got a couple from the UK :Amazon, ebay but none of them worked as USB 3.0.

I also tried with a USB 3.0 hub but it was recognised as USB 2.0. 

 

 

0 Kudos
Visitor liqi
Visitor
173 Views
Registered: ‎11-29-2018

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Hi, I'm trying to use USB3.0 device mode for Freertos running on ZCU102. And I have the same problem. 

When I connect the cable to PC(USB 3.0 connector), the speed is High, not SuperHigh.

I think the key reason is that GTR pins of USB3.0 are not corrcetly connected to USB cable. In the schematic file of ZCU102, there exists a mux named U127, which selects the destination of GTR_LANE2 pins.

U127 is controled by I2C0, maybe we should config I2C0 before using USB3.0.

0 Kudos
Explorer
Explorer
164 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Hi,

Maybe worth it to try for the ZCU102, but honestly I don't think that is the issue, I'm using the Ultrazed-EV dev kit instead with same problem, and this platform doesn't have any mux, also the USB3 Hub is being detected by the OS (linux in my case) so I'm assuming that the termination is detected so GTR lines are properly connected. The key I think, is on the Micro type B connector adapter type is being used, if they are not properly built, can change or corrupt the impedance termination when the device is plugged in, which I'm suspecting can happen with a cheap adapters....

I'm currently trying quite a different number I'll let it now here if any works.

 

0 Kudos
Participant eejlny
Participant
151 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Hello,

According to a previous post an adapter by a company called firefly works but I have not been able to get that to test it. 

What is strange is that the adapter that comes in the box and provided by Xilinx does not work.

In my setup the Linux OS correctly identifies the USB 3.0 port so I will also think that the port itself is wired correctly. 

0 Kudos
Explorer
Explorer
135 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

I've tried to order the Firefold  one and it is discontinued, it would be great if Xilinx could point us to another working alternartive....

0 Kudos
Participant eejlny
Participant
131 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

That is bad.

Did you try to order this ?

https://www.firefold.com/products/usb-3-0-male-to-usb-micro-b-male

I reached to the order point and it was not saying discontinued but I could not order due to university restrictions for suppliers.

 

 

0 Kudos
Explorer
Explorer
127 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Yes, bad news....

I tried to order this one:

https://www.firefold.com/products/usb-3-0-type-a-female-to-micro-usb-type-b-male-adapter

Which is the one I need to convert the micro b port to an standard female type A.

We've placed the order and they sent an email back saying that it was discontinued...

 

0 Kudos
Explorer
Explorer
98 Views
Registered: ‎07-06-2016

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Good news at last, 

I tried this cable (UPDATE: mind max USB3 length of 3m if this is used with other cable, there's also shorter versions available):

https://www.amazon.co.uk/dp/B00NH13BI2/ref=pe_3187911_185740111_TE_item

With this adapter:

https://www.amazon.co.uk/dp/B0734KNVLX/ref=pe_3187911_185740111_TE_item

And now detects any USB3 device:

Screenshot from 2019-05-15 15-10-43.png

Hope it helps.

Participant eejlny
Participant
77 Views
Registered: ‎05-05-2015

Re: ZCU102 ES2 USB 3.0 Host mode

Jump to solution

Thanks for the info. I will try them and see if they work with the zcu102 as well. 

0 Kudos