cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lokesh_oepl
Adventurer
Adventurer
946 Views
Registered: ‎03-12-2018

ZC702 USB host is not working on Petalinux

Jump to solution

Hi there,

I'm working with ZC702 and booting it with Petalinux.

I want to use USB web camera, for that I'm trying to enable USB host. 

I've followed the following link from Xilinx Confluence for USB Host - 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842272/Zynq+Linux+USB+Device+Driver  

Did Exactly same. But I'm not able to see USB related (sda) at place under dev/. Moreover this, I don't see any LED comping up on my camera.

How can I get it working.?? Can Anyone help me with this.??

I'm struggling from fortnight with this. 

Looking forward to get a quick and positive response.

Warm Regards,

Lokesh

Lokesh J.
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
lokesh_oepl
Adventurer
Adventurer
727 Views
Registered: ‎03-12-2018

hi @sabankocal ,

I've found the solution.

While creating project I'm using following command:

petalinux-create --type project --tamplete zynq --name USB_Host

As I'm using --template zynq, so while performing following command need to change the DTG Setting,

petalinux-config --get-hw-description=/home/work/ProjectFiles/<XSA/HDF>

{ Blue Screen Will Appear }

Inside DTG Settings -->

Change MACHINE_NAME from (template) to (zc702)

And Problem Solved

 

Thanks

Lokesh

Lokesh J.

View solution in original post

0 Kudos
8 Replies
sabankocal
Voyager
Voyager
929 Views
Registered: ‎08-02-2019

Hi @lokesh_oepl ,

 

Can you share

  • petalinux boot log
  • ls -l /dev/

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos
lokesh_oepl
Adventurer
Adventurer
913 Views
Registered: ‎03-12-2018

Hi @sabankocal ,

Thanks for your response. Please find the attachment for the boot log.

Warm Regards

Lokesh

Lokesh J.
0 Kudos
sabankocal
Voyager
Voyager
908 Views
Registered: ‎08-02-2019

Hi @lokesh_oepl ,

Your logs says: driver is enabled.

I need to ask some questions:

  • This directions, you shared, tested with a mass-storage device, not with camera. Can you test it exactly decribed in your document?
Test Procedure
Tested with mas-storage device.
Connect the mass storage device and perform the file read/write operations.
  • Are your sure , you made related device-tree changings and which file you changed? Sometimes people changes some auto generated files and it will effect nothing. I'm asking, just to be sure.

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos
lokesh_oepl
Adventurer
Adventurer
900 Views
Registered: ‎03-12-2018

Hi @sabankocal ,

Yes, I'm trying to detect mass storage only as part of first USB test.

I'm modifying the device tree in the following path :

<plnx_workSpace>/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

Inside the file, I've copied the content of device tree from Xilinx Confluence page and pasted as it is like follows:

Old System-User.dtsi:

/include/ "system-conf.dtsi"
/{
};

New System-User.dtsi

/include/ "system-conf.dtsi"
/{
    usb_0: usb@e0002000 {
         compatible = "xlnx,zynq-usb-2.20.a", "chipidea,usb2";
         clocks = <&clkc 28>;
         dr_mode = "host";
         interrupt-parent = <&intc>;
         interrupts = <0 21 4>;
         reg = <0xe0002000 0x1000>;
         usb-phy = <&usb_phy0>;
     };
 
 usb_phy0: phy0 {
    compatible = "ulpi-phy";
    #phy-cells = <0>;
    reg = <0xe0002000 0x1000>;
    view-port = <0x170>;
    drv-vbus;
}
}

 

Also on ZC702 board, I've changed J35 from 1-2 to 2-3, as 1-2 is OTG and Peripheral and 2-3 is Host

Thanks

Lokesh

Lokesh J.
0 Kudos
sabankocal
Voyager
Voyager
891 Views
Registered: ‎08-02-2019

Hi @lokesh_oepl ,

Everything seems correct.

There is a 6 years old thread, mentioned similar issue and one extra config setting, not mentioned in Xilinx documentations.

A lot of people thanks him. You can control that thread.

I figured that in menuconfig, you have to select:
Device Drivers->USB Support->USB Physical Layer Drivers-->Xilinx Zynq USB OTG dual-role support
Otherwise somehow linux won't enable to 5V CPEN pin for powering the device you plug in the USB port. (that was on the Zedboard).

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos
lokesh_oepl
Adventurer
Adventurer
878 Views
Registered: ‎03-12-2018

@sabankocal ,

Please check the image, I don't have that Xilinx Zync OTG Dual Role Support.

I'm using Petalinux - 2019.2,

deviceDriver.png Now what do i do.?

Thanks

Lokesh

Lokesh J.
0 Kudos
sabankocal
Voyager
Voyager
874 Views
Registered: ‎08-02-2019

Hi @lokesh_oepl ,

That was all, what I can do. Now Xilinx employee's turn.

Saban

 

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos
lokesh_oepl
Adventurer
Adventurer
728 Views
Registered: ‎03-12-2018

hi @sabankocal ,

I've found the solution.

While creating project I'm using following command:

petalinux-create --type project --tamplete zynq --name USB_Host

As I'm using --template zynq, so while performing following command need to change the DTG Setting,

petalinux-config --get-hw-description=/home/work/ProjectFiles/<XSA/HDF>

{ Blue Screen Will Appear }

Inside DTG Settings -->

Change MACHINE_NAME from (template) to (zc702)

And Problem Solved

 

Thanks

Lokesh

Lokesh J.

View solution in original post

0 Kudos