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: 
Highlighted
4,334 Views
Registered: ‎02-12-2018

device tree - how to override nodes?

Jump to solution

- IP, Version: AXI JTAG, 1.0
- Vivado, SDK, Petalinux: 2017.4
- Device:      Zynq-7000

hello,

I added the AXI-JTAG IP-Core from Xilinx to my hardware platform. To use it in my petalinux platform the toolset already generated a device-tree for me, like so:

pl.dtsi:

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Thu May 17 18:41:26 2018
 */


/ {
    amba_pl: amba_pl {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "simple-bus";
        ranges ;
        axi_jtag_0: axi_jtag@43c00000 {
            compatible = "xlnx,axi-jtag-1.0";
            reg = <0x43c00000 0x10000>;
            xlnx,tck-clock-ratio = <0x10>;
        };
    };
};




However, I'd like to use the device with UIO driver, so I need it to be defined like this:

 

 

system-user.dtsi:

&amba {
    ranges ;
    axi_jtag_0: axi-jtag@43c00000 {
        compatible = "generic-uio";
        reg = <0x43c00000 0x10000>;
    };
};




Adding this node to system-user.dtsi is conflicting with the generated node since axi_jtag_0 already exists. Is there a way to override or overload the previous declaration?

 

Thank you

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
4,628 Views
Registered: ‎09-12-2007

Re: device tree - how to override nodes?

Jump to solution
The parameters given in the system-user.dtsi will overwrite parameters in the original node.

See wiki below:
http://www.wiki.xilinx.com/Testing+UIO+with+Interrupt+on+Zynq+Ultrascale
3 Replies
Moderator
Moderator
4,306 Views
Registered: ‎09-12-2007

Re: device tree - how to override nodes?

Jump to solution
You can update a node using the system-user.dts file in the devicetree recipe.

See page 75:
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_1/ug1144-petalinux-tools-reference-guide.pdf#page74
0 Kudos
4,299 Views
Registered: ‎02-12-2018

Re: device tree - how to override nodes?

Jump to solution

hello @stephenm,

 

I think I was not clear in describing my actual problem.

 

My problem is, the node axi_jtag_0 had already automatically been added, but not the way I wanted. It is missing the "generic-uio" property value for the "compatible" property name.

 

Following UG1144, page 75 lets me add information to the automatically generated device-tree.That is, I am able to add the node axi_jtag_0 again, to the device tree which leads to a conflict of these two.

 

Shall I give the node a different name, like axi_jtag_1, or can I prevent the generation of axi_jtag_0 node in pl.dtsi?

 

What I want to do is this:

dtb_ex.png

source: http://www.wiki.xilinx.com/Device+Tree+Tips -> Device Trees For Dummies

 

I might want to do the same, In the figure above ocp is defined twice, in two different files. My attempt to do that resulted in a compilation error of the dtb.

0 Kudos
Moderator
Moderator
4,629 Views
Registered: ‎09-12-2007

Re: device tree - how to override nodes?

Jump to solution
The parameters given in the system-user.dtsi will overwrite parameters in the original node.

See wiki below:
http://www.wiki.xilinx.com/Testing+UIO+with+Interrupt+on+Zynq+Ultrascale