News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0820 + TE0703 USB

Started by luca_osrf, February 21, 2019, 09:50:34 AM

Previous topic - Next topic

luca_osrf

Hi all,

We are trying to get the USB interface (device mode) on TE0820 to work, our plan is to start with USB 2.0 on TE0703 then move to our custom carrier board and move to USB 3.0.
I tried to get USB device to work and failed quite terribly (errors about failing to enable ep0out, as documented in https://forums.xilinx.com/t5/Embedded-Linux/Zynqmp-USB2-0/td-p/790522 ), hence I went back to the most basic example that I can think of that is get USB host to work in Petalinux with a USB mass storage device.

Both with my custom images and the prebuilt images supplied in the reference design I am unable to connect to a USB dongle.
A few more details:

The output of lsusb on a machine where the dongle works is:

Bus 005 Device 004: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick

While the output of lsusb on the Zynq only shows:

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

Also the output of dmesg | grep usb is the following:

[    1.483725] usbcore: registered new interface driver usbfs
[    1.489045] usbcore: registered new interface driver hub
[    1.494323] usbcore: registered new device driver usb
[    2.090801] usbcore: registered new interface driver asix
[    2.095710] usbcore: registered new interface driver ax88179_178a
[    2.101745] usbcore: registered new interface driver cdc_ether
[    2.107541] usbcore: registered new interface driver net1080
[    2.113163] usbcore: registered new interface driver cdc_subset
[    2.119044] usbcore: registered new interface driver zaurus
[    2.124589] usbcore: registered new interface driver cdc_ncm
[    2.147542] usbcore: registered new interface driver uas
[    2.152617] usbcore: registered new interface driver usb-storage
[    2.230388] usbcore: registered new interface driver uvcvideo
[    2.299838] usbcore: registered new interface driver bcm203x
[    2.305454] usbcore: registered new interface driver bpa10x
[    2.310989] usbcore: registered new interface driver bfusb
[    2.316441] usbcore: registered new interface driver btusb
[    2.327527] usbcore: registered new interface driver ath3k
[    2.476622] usbcore: registered new interface driver usbhid
[    2.508919] usbhid: USB HID core driver
[    2.519450] usbcore: registered new interface driver snd-usb-audio
[    2.713759] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy
[    2.752923] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.759710] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.766921] usb usb1: Product: xHCI Host Controller
[    2.771788] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    2.778480] usb usb1: SerialNumber: xhci-hcd.0.auto
[    2.804634] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.812788] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    2.819565] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.826776] usb usb2: Product: xHCI Host Controller
[    2.831645] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    2.838337] usb usb2: SerialNumber: xhci-hcd.0.auto
[    5.892793] usb usb1-port1: connect-debounce failed


Where the connect-debounce failed is the error I get when I connect any USB device (I also tried with a USB mouse and keyboard, with no success).
The interesting part is that the hardware itself is configured correctly, since if I try to access it from u-boot everything looks good:

ZynqMP> usb tree
USB device tree:
  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Mass Storage (480 Mb/s, 200mA)
                USB Flash Memory 00D0C9CCDF16ED9060000F69
     


I'll also be attaching my compiled device tree as a reference.

And my kernel (default one really) has USB mass storage drivers enabled by default.
Am I missing something? Should I worry about this error?
[    2.713759] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy

Or do you have any suggestion on how to get USB to work on Petalinux with TE0820?

Thanks!

JH

Hi,
check that USB3 is enabled on PS and also GTR REF CLK is set correctly (which one did you use?).

We use USB3 on TE0808 with TEBF0803, you can check change on linux and device tree there:

br
John

luca_osrf

Hi!

I checked the clocking and it seems that in my example it was wrong (set to clock 0 and 26 MHz), I restarted from scratch from the latest reference design which was set to clock 3 and 100MHz and it seems to be OK now.
Wonder if that was the issue? For future reference it seems indeed that the error "Can't find usb3-phy" can be safely ignored.

Thanks!
/Luca

JH

Hi,
good to hear that it works know.


I saw the same message ("Can't find usb3-phy") on our 808 Design with working USB3, so I agree with you that this can be ignored at the moment.

br
John

Grano

#4
Hi!

I got the same problem today and could resolve it with the help of this thread. For the record my FSBL lacked the code to program the SI5338 because I thought it is only needed for USB 3.0 and not for 2.0. So USB worked sometimes and when it not worked the kernel prints out the "connect-debounce failed" message. I checked the TRM and TE0820-Test-Board pages of the wiki and nothing mentions there that the SI5338 is needed for USB 2.0 and 3.0 and I was under the impression no further clock was needed because the ULPI is connected to an oscillator. Could someone please add a section to the wiki that mentions these pitfalls?

Sincerely, Grano

JH

Hi,
normally, it is not needed if you actives USB2 only on PS and you set device tree to USB2 only. But there was some problems with some Petalinux versions and some (not all) USB-Sticks, when only USB2 is activated. I think something is not proper configured with petalinux drivers, when USB3 is deactivated. Maybe this is fixed on newest petalinux version. I left it inside to be on the save side.
So it's not really a topic on the TRM and it depends also on the PS configuration. I think I will add a additional not on the reference design description, this will be better location for this.
br
John