cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jgiotis
Visitor
Visitor
1,185 Views
Registered: ‎09-06-2014

PetaLinux 2017.1 Zynq 7030 USB Not working

We transitioned from PetaLinux 2014.4 to 2017.1 and found that the USB interface was no longer working.

 

After reviewing the many posts on this issue, and adjusting the device tree for host operation, the detection of the interface started working properly. We had to add custom udev rules because the device was not appearing under /dev automatically (as in 2014.4).

Note that we are using USB1 (and not USB0) and the reset is on MIO7. The USB1 portion of the device tree is:

 

/ {
   usb_phy1: usb_phy@1 {
   compatible = "ulpi-phy";
   #phy-cells = <0>;
   reg = <0xe0003000 0x1000>;
   view-port = <0x0170>;
   drv-vbus;
};

&usb1 {
  usb-phy = <&usb_phy1>;
  dr_mode = "host";
  usb-reset = <&gpio0 7 0>;
} ;

 

At boot time things appear normal. The interface is detected along with the USB stick:

 

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

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

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

ehci-pci: EHCI PCI platform driver

usbcore: registered new interface driver usb-storage

usbcore: registered new interface driver usbserial

e0003000.usb supply vbus not found, using dummy regulator

ULPI transceiver vendor/product ID 0x0424/0x0007

Found SMSC USB3320 ULPI transceiver.

ULPI integrity check: passed.

ci_hdrc ci_hdrc.0: EHCI Host Controller

ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1

ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: EHCI Host Controller

usb usb1: Manufacturer: Linux 4.9.0-xilinx-v2017.1 ehci_hcd

usb usb1: SerialNumber: ci_hdrc.0

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

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

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

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

usb 1-1: new high-speed USB device number 2 using ci_hdrc

random: fast init done

usb 1-1: New USB device found, idVendor=0781, idProduct=5571

usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-1: Product: Cruzer Fit

usb 1-1: Manufacturer: SanDisk

usb 1-1: SerialNumber: 4C530007060503108534

usb-storage 1-1:1.0: USB Mass Storage device detected

scsi host0: usb-storage 1-1:1.0

EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)

FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

/etc/mdev/mdev-mount.sh: line 28: [: /sys/block/mmcblk0/mmcblk0boot1: binary operator expected

mount: /dev/mmcblk0 is already mounted or /run/media/mmcblk0 busy

Starting udev

udevd[868]: starting version 3.2

udevd[869]: starting eudev-3.2

scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.00 PQ: 0 ANSI: 6

sd 0:0:0:0: [sda] 62521344 512-byte logical blocks: (32.0 GB/29.8 GiB)

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

Populating dev cache

tar: /dev/shm/udev-cache-tmp.tar: Wrote only 2048 of 10240 bytes

tar: Error is not recoverable: exiting now

udev-cache: update failed!

 sda: sda1

sd 0:0:0:0: [sda] Attached SCSI removable disk

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

 

The problem is that when the USB memory stick is mounted we see a burst of device resets:

 

root@plnx_arm:~#

root@plnx_arm:~# mount /dev/sda1 /media/usb

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00

sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 30 00 00 20 00

blk_update_request: I/O error, dev sda, sector 48

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00

sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 30 00 00 08 00

blk_update_request: I/O error, dev sda, sector 48

Buffer I/O error on dev sda1, logical block 2, async page read

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00

sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 30 00 00 08 00

blk_update_request: I/O error, dev sda, sector 48

Buffer I/O error on dev sda1, logical block 2, async page read

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

usb 1-1: reset high-speed USB device number 2 using ci_hdrc

sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00

sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 30 00 00 08 00

blk_update_request: I/O error, dev sda, sector 48

Buffer I/O error on dev sda1, logical block 2, async page read

FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

root@plnx_arm:~# ls -l /media/usb

total 15680

-rwxr-xr-x 1 root root 16024600 Feb  5  2015 RunSanDiskSecureAccess_Win.exe

drwxr-xr-x 2 root root    16384 Feb 23  2015 SanDiskSecureAccess

-rwxr-xr-x 1 root root        0 Jan  1  1980 jimfile.txt

root@plnx_arm:~#

 

A similar burst of resets also happens when the device is unmounted.

 

As suggestions as to how to deal with this?

 

Thanks!

0 Kudos
0 Replies