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: 
Explorer
Explorer
2,244 Views
Registered: ‎09-14-2016

SDIO over USB

Hi all,

 

I have a custom Zynq7030 based board. We have a other custom board with an USB2642 chip and an USB2412 Hub. We have also an OTG USB connection.

 

OTG works fine. The trouble is about SD card detection.

 

Linux Kernel seems to probe everything successfully:

 

    3.741085] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    3.892425] hub 1-1:1.0: USB hub found
[    3.898976] hub 1-1:1.0: 2 ports detected
[    3.955046] udevd[626]: starting version 3.1.5
[    3.960177] random: udevd urandom read with 1 bits of entropy available
[    4.181120] usb 1-1.2: new high-speed USB device number 3 using ci_hdrc
[    4.312250] hub 1-1.2:1.0: USB hub found
[    4.321484] hub 1-1.2:1.0: 3 ports detected
[    4.601128] usb 1-1.2.1: new high-speed USB device number 4 using ci_hdrc
[    4.728590] usb-storage 1-1.2.1:1.0: USB Mass Storage device detected
[    4.771533] scsi host0: usb-storage 1-1.2.1:1.0
[    5.793259] scsi 0:0:0:0: Direct-Access     Generic  Ultra HS-SD/MMC  2.09 PQ: 0 ANSI: 0
[    5.819619] sd 0:0:0:0: [sda] 31291392 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    5.827849] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    5.842357] sd 0:0:0:0: [sda] Write Protect is on
[    5.846987] sd 0:0:0:0: [sda] Mode Sense: 23 00 80 00
[    5.851282] sd 0:0:0:0: [sda] No Caching mode page found
[    5.861137] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    5.886601]  sda: sda1
[    5.897744] sd 0:0:0:0: [sda] Attached SCSI removable disk

BUT only if the SD card is connected during the boot process :-(

 

If I unplug the SD card after boot process I must relaunch udev daemon in order to remove sda1 from /dev.

Stopping udevd
Starting udev
stat: can't stat 'lib/udev/rules.d/*': No such file or directory
stat: can't stat 'etc/udev/rules.d/*': No such file or directory
udev: Not using udev cache because of changes detected in the following files:
udev:     /proc/version /proc/cmdline /proc/devices
udev:     lib/udev/rules.d/* etc/udev/rules.d/*
udev: The udev cache will be regenerated. To identify the detected changes,
udev: compare the cached sysconf at   /etc/udev/cache.data
udev: against the current sysconf at  /dev/shm/udev.cache
[  193.050539] udevd[1120]: starting version 3.1.5
[  193.236706] udevd[1126]: inotify_add_watch(6, /dev/sda1, 10) failed: No such file or directory

According to the issue description I have to launch udev daemon if I want to see again sda1 in /dev.

Stopping udevd
Starting udev
stat: can't stat 'lib/udev/rules.d/*': No such file or directory
stat: can't stat 'etc/udev/rules.d/*': No such file or directory
udev: Not using udev cache because of changes detected in the following files:
udev:     /proc/version /proc/cmdline /proc/devices
udev:     lib/udev/rules.d/* etc/udev/rules.d/*
udev: The udev cache will be regenerated. To identify the detected changes,
udev: compare the cached sysconf at   /etc/udev/cache.data
udev: against the current sysconf at  /dev/shm/udev.cache
[  259.951524] udevd[1158]: starting version 3.1.5
[  260.119297] sd 0:0:0:0: [sda] 31291392 512-byte logical blocks: (16.0 GB/14.9 GiB)
[  260.148223]  sda: sda1

 

The USB custom board works find on windows....

 

For information dts part:

 

usb_phy0: phy0 {
        compatible = "usb-nop-xceiv";
        #phy-cells = <0>;
    };

    usb_phy1: phy1 {
        compatible = "usb-nop-xceiv";
        #phy-cells = <0>;
    };


&usb0 {
    status = "okay";
    dr_mode = "peripheral";
    usb-phy = <&usb_phy0>;
};

&usb1 {
    status = "okay";
    dr_mode = "host";
    usb-phy = <&usb_phy1>;
};

 

Last info

compatible = "ulpi-phy"

Doesn't work and I don't know why :S

 

If someone has advises, please feel free to let know :)

 

Best regards,

Trigger

0 Kudos