cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
7,293 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

 

1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
7,587 Views
Registered: ‎09-12-2007
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

View solution in original post

5 Replies
Highlighted
Moderator
Moderator
7,265 Views
Registered: ‎09-12-2007
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
Highlighted
7,258 Views
Registered: ‎02-12-2018

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
Highlighted
Moderator
Moderator
7,588 Views
Registered: ‎09-12-2007
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

View solution in original post

Highlighted
2,518 Views
Registered: ‎09-18-2018
As per _ug1144-petalinux-tools-reference-guide_
_An example of a well-formed device tree node for the system-user.dtsi is shown below:_
```
/dts-v1/;
/include/ "system-conf.dtsi"
/ {
};
&gem0 {
    phy-handle = <&phy0>;
    ps7_ethernet_0_mdio: mdio {
        phy0: phy@7 {
        compatible = "marvell,88e1116r";
        device_type = "ethernet-phy";
        reg = <7>;
        };
    };
};
```

 

A good reference would be https://github.com/u-boot/u-boot/tree/master/arch/arm/dts

For example, `vim zynqmp.dtsi zynqmp-zcu102-rev*` seems to show how dts files include each other.

0 Kudos
Highlighted
436 Views
Registered: ‎05-20-2019

Hello,

In a previous design we used the uio framework as described in XAPP1251 for the AXI to JTAG IP.
So, as already mentioned, I guess your entry should be something like this:

 

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

&amba_pl{
axi_jtag@43c00000 { compatible = "generic-uio"; };
};

 

If you really want to delete a node, have a look at
https://elinux.org/Device_Tree_Source_Undocumented
The syntax is is /delete-node/ &node_label; e.g.

/delete-node/ &axi_jtag_0;

 

@stephenm
However i would like to know more about the driver/component "xlnx,axi-jtag-1.0".

Is there a new version of the xvcserver that uses this?

I can't find any other hints of its existence besides petalinux automatically adding this compatible string, further information is greatly appreciated.

 

 

 

0 Kudos