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!

Reply

ZCU102 ES2 USB 3.0 Host mode

Accepted Solution Solved
Visitor
Posts: 2
Registered: ‎02-16-2017
Accepted Solution

ZCU102 ES2 USB 3.0 Host mode

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

 

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

 

 


Accepted Solutions
Visitor
Posts: 5
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

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!

View solution in original post


All Replies
Visitor
Posts: 5
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

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

Visitor
Posts: 5
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

One more thing:

 

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

Visitor
Posts: 5
Registered: ‎02-14-2017

Re: ZCU102 ES2 USB 3.0 Host mode

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!

Visitor
Posts: 2
Registered: ‎02-16-2017

Re: ZCU102 ES2 USB 3.0 Host mode

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!