Sorry, you need to enable JavaScript to visit this website.

using petalinux configure zedboard,but usb-otg can not work

Solved
9 posts / 0 new
mybear's picture
mybear
Junior(0)
using petalinux configure zedboard,but usb-otg can not work

I made a project using VIVADO 2014.4, based on ZedBoard CTT, Vivado 2014.2. Then I created the boot and image using petalinux. With SD boot, it started ok, but the usb-otg interface not worked, by plug in a u-disk. Is there something wrong. Who can give me some advice?

Thanks.

TroutChaser's picture
TroutChaser
Moderator(18)
This is an English language

This is an English language forum. Please translate your question into English so that we can help you or post on the alternate forum: 
http://zedboard.org/forums/zedboard%E8%8B%B1%E8%AA%9E%E3%83%95%E3%82%A9%...
 
-Gary

mybear's picture
mybear
Junior(0)
who can help me ?

is there sonme encountered the similar problem?who can give me some help?

hockeyman1972's picture
hockeyman1972
Junior(11)
USB-OTG not included by default

Hi mybear,
I think the problem is that by default, USB OTG support is not included in the PetaLinux kernel.  Here is a link to some instructions on how to add this support to your project.
Ron
U-Boot - USB Host.pdf
https://avnet.egnyte.com/dl/5x1BuppFNW
 

mybear's picture
mybear
Junior(0)
i will try it

thank you very much, i will try it.

mybear's picture
mybear
Junior(0)
I tried, but i failed. some

I tried, but i failed. some items in the pdf can not be found in the config file. I do not know how to modify the config file. Could you give me more help? Thanks.

hockeyman1972's picture
hockeyman1972
Junior(11)
More problem detail

When you say USB-OTG is not working, what are the symptoms?
1. Do you see any indication that the device has power (illuminated LED perhaps)?
2. If this is a USB-disk, have you tried it simply with a USB flash stick?
3. Do you see any registration messages from Linux when the device is plugged in?
4. If yes to 3, can you see any partitions on the device?  I recently had a problem with a PicoZed board in 2014.4 where everything appeared operational, but I could only see /dev/sda  and not /dev/sda1.   I knew for sure there was a vfat partition, so I plugged in a powered USB hub and attached my flash stick to that, and it worked fine.   So sometimes there can be enough power to detect a device, but not actually enough to work completely.   This is doubly true for a USB Disk Drive, which you should always plug into a powered hub.
Ron

hockeyman1972's picture
hockeyman1972
Junior(11)
USB-OTG Issue in 2015.2

This problem has been identified by Xilinx in 2015.2, and a patch has been posted to the xilinx github.  I'm working on trying to integrate the fixes right now.  There appear to be at least two problems.  Essentially the problem causes the board to be recognized as an OTG-device, rather than an OTG-host  And in this mode it shuts off the power supply to the USB-OTG connector.
I currently have the power working, but so far I'm still stuck trying to get a response from the kernel when I plug in a USB stick.  So stay tuned (and of course if somebody else has figured this out, I'd like to know the magic!)
Ron

hockeyman1972's picture
hockeyman1972
Junior(11)
Solution to USB-OTG in PetaLinux 2015.4

Everyone interested in USB-OTG:
Modifications made to the PetaLinux 2015.4 tools and driver set have resolved issues on Zynq boards around the USB-OTG functionality.  In the default kernel configuration, there are no longer any changes required to activity USB-OTG, and the requirement for adding a special application for activating USB power has been eliminated.  This is good news.
The only addition required for USB-OTG operation in PetaLinux on Avnet Zynq boards is to update the device tree (system-top.dts) file to add the following entry:

/{

    usb_phy0:phy0 {

        compatible="ulpi-phy";

        #phy-cells = <0>;

       reg = <0xe0002000 0x1000>;

       view-port=<0x170>;

       drv-vbus;

    };

};

 

 

&usb0 {

        status = "okay";

        dr_mode = "host";

        usb-phy = <&usb_phy0>;

} ;

 

Ron