cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
1,478 Views
Registered: ‎01-14-2015

Enable USB host on zc706 using petalinux

Jump to solution

We have ZC706 kit and trying to use its J2 micro USB port as a host and we are testing it with a mass storage device. We have build the OS using petalinux 2018.3 with all USB related drivers enabled in kernel config. Our device entry in system.dts (converted back from system.dtb) looks like following

usb@e0002000 {
            compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
            status = "okay";
            clocks = <0x1 0x1c>;
            interrupt-parent = <0x4>;
            interrupts = <0x0 0x15 0x4>;
            reg = <0xe0002000 0x1000>;
            phy_type = "ulpi";
            usb-reset = <0x5 0x7 0x0>;
            dr_mode = "host";
        };

We followed procedure given in UG1144 to modify device tree for USB. Still it doesn't work. We even followed procedure given in

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

Even USB jumper settings are as per the host mode given in table 1-7 in UG954. We are not able to figure out where are we going wrong. We want to read the mass storage device on ZC706, so we assume that it should be configured as a USB host. Also attaching the dmesg.txt output on console of linux boot.

 

Has anyone tried doing similar thing?

 

Regards

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
1,443 Views
Registered: ‎05-10-2017

I think you're probably missing the pinctrl nodes for usb. You can look at the dtsi here

https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.3/BOARD/zc706.dtsi

You can decompile the system.dtb from the prebuilt directory of the zc706 bsp for an example.

As a quick test, you can also boot using the prebuilt images and see if that works. (I think these are built for host mode)

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

3 Replies
Highlighted
Moderator
Moderator
1,444 Views
Registered: ‎05-10-2017

I think you're probably missing the pinctrl nodes for usb. You can look at the dtsi here

https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.3/BOARD/zc706.dtsi

You can decompile the system.dtb from the prebuilt directory of the zc706 bsp for an example.

As a quick test, you can also boot using the prebuilt images and see if that works. (I think these are built for host mode)

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

Highlighted
Contributor
Contributor
1,423 Views
Registered: ‎01-14-2015

Thanks Jovitac for the suggestion. As you rightly mentioned, pre-built image has USB enabled in host mode and it works on ZC706. We de-compiled the pre-built_system.dtb and it has pinctrl nodes for USB.

0 Kudos
Highlighted
Contributor
Contributor
1,389 Views
Registered: ‎05-18-2018

Hi, 

How to add ZC706.dtsi file in our system_top.dtsi file? Even I was facing same issues. I tried adding in BB_append file where system_user.dtsi file is sourced and then build the image. But when I decompiled the generated system.dtb file, it didn't reflect. So basically I am asking this to make custom changes in ZC706 board or even use a custom board. 

 

0 Kudos