06-25-2020 01:10 AM
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
06-27-2020 09:26 PM
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
06-25-2020 01:43 AM
Hi @lokesh_oepl ,
Can you share
Saban
06-25-2020 03:28 AM
Hi @sabankocal ,
Thanks for your response. Please find the attachment for the boot log.
Warm Regards
Lokesh
06-25-2020 03:44 AM - edited 06-25-2020 03:45 AM
Hi @lokesh_oepl ,
Your logs says: driver is enabled.
I need to ask some questions:
Test Procedure Tested with mas-storage device. Connect the mass storage device and perform the file read/write operations.
Saban
06-25-2020 04:17 AM
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
06-25-2020 04:41 AM
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
06-25-2020 05:15 AM
i @sabankocal ,
Please check the image, I don't have that Xilinx Zync OTG Dual Role Support.
I'm using Petalinux - 2019.2,
Now what do i do.?
Thanks
Lokesh
06-25-2020 05:29 AM
Hi @lokesh_oepl ,
That was all, what I can do. Now Xilinx employee's turn.
Saban
06-27-2020 09:26 PM
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