Hello I have a device tree that looks like this. I need to reference the dma@40400000 node in another file where this device tree is included. In this device tree the dma@40400000 node does not have a label.
device-tree1.dtsi
/dts-v1/;
/ {
amba_pl {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = "simple-bus";
ranges;
dma@40400000 {
#dma-cells = <0x1>;
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
clocks = <0x1 0xf 0x1 0xf 0x1 0xf 0x1 0xf>;
compatible = "xlnx,axi-dma-1.00.a";
interrupt-parent = <0x4>;
interrupts = <0x0 0x1d 0x4 0x0 0x1e 0x4>;
reg = <0x40400000 0x10000>;
xlnx,addrwidth = <0x20>;
dma-channel@40400000 {
compatible = "xlnx,axi-dma-mm2s-channel";
dma-channels = <0x1>;
interrupts = <0x0 0x1d 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
dma-channel@40400030 {
compatible = "xlnx,axi-dma-s2mm-channel";
dma-channels = <0x1>;
interrupts = <0x0 0x1e 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
};
};
};
I would like to redefine it or optionally the amba_pl node such that the node dma@40400000 is not changed but has a label axi_dma
device-tree2.dtsi
/include/ "device-tree1.dtsi"
/ {
&amba_pl {
axi_dma: dma@40400000 {
#dma-cells = <0x1>;
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
clocks = <0x1 0xf 0x1 0xf 0x1 0xf 0x1 0xf>;
compatible = "xlnx,axi-dma-1.00.a";
interrupt-parent = <0x4>;
interrupts = <0x0 0x1d 0x4 0x0 0x1e 0x4>;
reg = <0x40400000 0x10000>;
xlnx,addrwidth = <0x20>;
dma-channel@40400000 {
compatible = "xlnx,axi-dma-mm2s-channel";
dma-channels = <0x1>;
interrupts = <0x0 0x1d 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
dma-channel@40400030 {
compatible = "xlnx,axi-dma-s2mm-channel";
dma-channels = <0x1>;
interrupts = <0x0 0x1e 0x4>;
xlnx,datawidth = <0x20>;
xlnx,device-id = <0x0>;
};
};
};
};
However when I try to redefine amba_pl from device-tree1.dtsi in device-tree2.dtsi, the compiler fails to parse the device tree. How can I add a label to the node dma@40400000 from device-tree1.dtsi?
UPDATE
Having looked through the spec, I want to reword my question. How can I add a phandle to a node that is included from a different dtsi file or reference the node without a phandle?