I have a Xilinx Block Design that incorporates an "AXI BRAM Controller" (a Xilinx IP Core that interfaces an AXI bus to a Block Memory Generator - the details of this probably aren't important).
The key thing, I think, is that the Xilinx tools automatically generate a file called components/plnx_workspace/device-tree/device-tree/pl.dtsi
that contains the device-tree definition for this Core:
/* components/plnx_workspace/device-tree/device-tree/pl.dtsi */
&amba {
#address-cells = <2>;
#size-cells = <2>;
[snip]
axi_bram_ctrl_1: axi_bram_ctrl@a0040000 {
clock-names = "s_axi_aclk";
clocks = <&zynqmp_clk 71>;
compatible = "xlnx,axi-bram-ctrl-4.1";
reg = <0x0 0xa0040000 0x0 0x2000>;
xlnx,bram-addr-width = <0xb>;
[snip]
};
I also have a file, called project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
, that is assigned for users to modify, and is the last .dtsi
that is processed by the compiler.
I wish to use this file to modify the axi_bram_ctrl_1
node to enable UIO:
/* project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi */
/include/ "system-conf.dtsi"
/ {
};
&axi_bram_ctrl_1 {
compatible = "generic-uio";
};
My understanding, based on Device Tree Mysteries#Labels, is that:
Using a label for a node's path is commonly used to refer to a previously existing node for the purpose of modifying the value of one or more properties in that node. In this example, the reg property is modified. Note that the reference is placed at the top level of the .dts file, not within a node, because the reference is expanded to the full path.
This is what I believe I have done, but the Device Tree Compiler throws the following error:
Exception: subprocess.CalledProcessError: Command '['dtc', '-@', '-@', '-p', '0x1000', '-@', '-i',
[snip lots of paths]
' returned non-zero exit status 1.
Subprocess output:
Error: build/tmp/work/xilinx_zcu208-xilinx-linux/device-tree/xilinx-v2023.1+gitAUTOINC+0bd6e466ba-r0/system-user.dtsi:173.1-17
Label or path axi_bram_ctrl_1 not found
FATAL ERROR: Syntax error parsing input tree
This is confusing to me, because in the live tree, I can see:
$ dtc -f /proc/device-tree
/ {
[snip]
__symbols__ {
[snip]
axi_bram_ctrl_1 = "/axi/axi_bram_ctrl@a0040000";
[snip]
axi {
[snip]
axi_bram_ctrl@a0040000 {
xlnx,single-port-bram = <0x01>;
xlnx,memory-depth = <0x800>;
clock-names = "s_axi_aclk";
xlnx,bram-inst-mode = "EXTERNAL";
[snip]
I've seen quite a few examples of this syntax, and it all looks similar to what I'm doing here. What could be causing this to fail?