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 ben_onera
Visitor
591 Views
Registered: ‎07-18-2016

ZC706 USB stick not working

Jump to solution

Hello,

I have a ZC706 board and I put Petalinux 2018.3 on it. Everything works fine except the USB host. When I plug a USB stick, the stick is recognized but linux is not able to mount it because it didn't find "/dev/sda" (log below).

When I plug in the stick :

usb 1-1: reset high-speed USB device number 2 using ci_hdrc
usb 1-1.4: new high-speed USB device number 4 using ci_hdrc
usb 1-1.4: New USB device found, idVendor=058f, idProduct=6387
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.4: Product: Mass Storage
usb 1-1.4: Manufacturer: Generic
usb 1-1.4: SerialNumber: 263EA8A3
usb-storage 1-1.4:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1.4:1.0
scsi 0:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] 15974400 512-byte logical blocks: (8.18 GB/7.62 GiB)
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
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
udevd[1240]: inotify_add_watch(7, /dev/sda, 10) failed: No such file or directory
udevd[1240]: inotify_add_watch(7, /dev/sda1, 10) failed: No such file or directory

lsusb :

root@zc706-0153:~# lsusb
Bus 001 Device 004: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 001 Device 002: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsblk :

root@zc706-0153:~# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1  7.6G  0 disk
`-sda1        8:1    1  7.6G  0 part
mtdblock0    31:0    0    5M  0 disk
mtdblock1    31:1    0  128K  0 disk
mtdblock2    31:2    0 10.5M  0 disk
mtdblock3    31:3    0 16.4M  0 disk
mmcblk0     179:0    0  7.4G  0 disk
|-mmcblk0p1 179:1    0  512M  0 part /run/media/mmcblk0p1
`-mmcblk0p2 179:2    0  6.9G  0 part /run/media/mmcblk0p2

ls /dev

root@zc706-0153:~# ls /dev
block            loop2             mtd1                ram0   ram9    tty14  tty28  tty41  tty55               urandom
bus              loop3             mtd1ro              ram1   random  tty15  tty29  tty42  tty56               vcs
char             loop4             mtd2                ram10  root    tty16  tty3   tty43  tty57               vcs1
console          loop5             mtd2ro              ram11  shm     tty17  tty30  tty44  tty58               vcsa
cpu_dma_latency  loop6             mtd3                ram12  snd     tty18  tty31  tty45  tty59               vcsa1
disk             loop7             mtd3ro              ram13  stderr  tty19  tty32  tty46  tty6                watchdog
fd               mdev.seq          mtdblock0           ram14  stdin   tty2   tty33  tty47  tty60               watchdog0
full             mem               mtdblock1           ram15  stdout  tty20  tty34  tty48  tty61               zero
i2c-0            memory_bandwidth  mtdblock2           ram2   tty     tty21  tty35  tty49  tty62
initctl          mmcblk0           mtdblock3           ram3   tty0    tty22  tty36  tty5   tty63
kmsg             mmcblk0p1         network_latency     ram4   tty1    tty23  tty37  tty50  tty7
log              mmcblk0p2         network_throughput  ram5   tty10   tty24  tty38  tty51  tty8
loop-control     mtab              null                ram6   tty11   tty25  tty39  tty52  tty9
loop0            mtd0              ptmx                ram7   tty12   tty26  tty4   tty53  ttyPS0
loop1            mtd0ro            pts                 ram8   tty13   tty27  tty40  tty54  udev_network_queue

I tried many things like activate other drivers more or less related, changing the device tree but none of theses things seem working.

system-user.dtsi

/include/ "system-conf.dtsi"
/ {
	usb_phy0: phy0 {
		compatible = "ulpi-phy";
		#phy-cells = <0>;
		reg = <0xe0002000 0x1000>;
		view-port = <0x170>;
		drv-vbus;
	};
};
&pinctrl0 {
	pinctrl_usb0_default: usb0-default {
		mux {
			groups = "usb0_0_grp";
			function = "usb0";
		};
		conf {
			groups = "usb0_0_grp";
			slew-rate = <0>;
			io-standard = <1>;
		};
		conf-rx {
			pins = "MIO29", "MIO31", "MIO36";
			bias-high-impedance;
		};
		conf-tx {
			pins = "MIO28", "MIO30", "MIO32", "MIO33", "MIO34",
			       "MIO35", "MIO37", "MIO38", "MIO39";
			bias-disable;
		};
	};
};
&usb0 {
	status = "okay";
	dr_mode = "host";
	usb-phy = <&usb_phy0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usb0_default>;
};

Before, I tried with this file but it's also not working :

/include/ "system-conf.dtsi"
/ {
usb_phy0:phy0 { compatible="usb-nop-xceiv"; #phy-cells = <0>; reg = <0xe0002000 0x1000>; view-port=<0x170>; drv-vbus; }; }; &usb0 { status = "okay"; dr_mode = "host"; usb-phy = <&usb_phy0>; };

To sum up, I can see the USB stick with lsusb and lsblk but nothing shows up in /dev.

Let me know if you have a clue ! 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Visitor ben_onera
Visitor
450 Views
Registered: ‎07-18-2016

Re: ZC706 USB stick not working

Jump to solution

I found out the problem. busybox mdev was not correctly configured.

Solutions :

- in Petalinux, enter the following command :

echo /sbin/mdev/ > /proc/sys/kernel/hotplug
mdev -s

Ref

 

OR

- desactivate busybox mdev in rootfs config : Filesystem Packages  -> base -> busybox

 

Thanks @aravindb for your help

0 Kudos
7 Replies
Moderator
Moderator
586 Views
Registered: ‎02-07-2018

Re: ZC706 USB stick not working

Jump to solution

HI @ben_onera 

Did you try with prebuilt images(pre-built/linux/images/).

aslo please check by  removing  & reconnect  the pendrive.

 

Thanks & eragrds

Aarvind

Visitor ben_onera
Visitor
573 Views
Registered: ‎07-18-2016

Re: ZC706 USB stick not working

Jump to solution

I already tried removing & reconnect the pendrive but it's not working. Also, I just tried with prebuilt images and it's working fine !

So I don't know what causes the error in my project : device tree, kernel config ?

0 Kudos
Moderator
Moderator
568 Views
Registered: ‎02-07-2018

Re: ZC706 USB stick not working

Jump to solution

HI @ben_onera 

Looks device tree is proper. Can you share the kernel config file. You can get it from linux console by running below command.

zcat /proc/config.gz > kernel_conf.txt

Are you using the petalinux BSP project or creating proeject with template.

 

Thanks & ergards

Aarvind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Visitor ben_onera
Visitor
563 Views
Registered: ‎07-18-2016

Re: ZC706 USB stick not working

Jump to solution

I created a project with template (hdf file) generated by Vivado (custom project).

I compared my device tree with the device tree from the prebuilt image and I don't see differences about usb. The kernel config is in attachment.

0 Kudos
Moderator
Moderator
519 Views
Registered: ‎02-07-2018

Re: ZC706 USB stick not working

Jump to solution

Hi @ben_onera 

Can you try this below trails, hope it  should work & make sure that usb jumper settings should be as per host mode.

Please refer this link for USB jumoer settings:https://www.xilinx.com/support/documentation/boards_and_kits/zc702_zvik/ug850-zc702-eval-bd.pdf (page no:23)

Trail1:

If we change the MACHINE_NAME as zc706 in DTG settings & build.

For your reference:

petalinux-config

DTG Settings  --->(zc706) MACHINE_NAME

vim system-user.dtsi 

&usb0 {

       status = "okay";

       dr_mode = "host";

};

 

Trail2:

Add below  device tree changes & no need to change the MACHINE_NAME.

 

        usb_phy0: usb_phy@0 {

        compatible = "ulpi-phy";

        #phy-cells = <0>;

        reg = <0xe0002000 0x1000>;

        view-port = <0x0170>;

        drv-vbus;

        };

 

&usb0 {

       status = "okay";

       dr_mode = "host";

       usb-phy = <&usb_phy0>;

        pinctrl-0 = <&pinctrl_usb0_default>;

};

 

Thanks & Regards

Aravind

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Visitor ben_onera
Visitor
477 Views
Registered: ‎07-18-2016

Re: ZC706 USB stick not working

Jump to solution

Hi @aravindb 

None of these solutions work and again I have the same error message :

udevd[1251]: inotify_add_watch(7, /dev/sda, 10) failed: No such file or directory
udevd[1251]: inotify_add_watch(7, /dev/sda1, 10) failed: No such file or directory

I think it's more a software issue than a device tree issue, but I can't find what can cause this.

0 Kudos
Visitor ben_onera
Visitor
451 Views
Registered: ‎07-18-2016

Re: ZC706 USB stick not working

Jump to solution

I found out the problem. busybox mdev was not correctly configured.

Solutions :

- in Petalinux, enter the following command :

echo /sbin/mdev/ > /proc/sys/kernel/hotplug
mdev -s

Ref

 

OR

- desactivate busybox mdev in rootfs config : Filesystem Packages  -> base -> busybox

 

Thanks @aravindb for your help

0 Kudos