I have the following device-tree node which is auto generated by Xilinx PetaLinux in a proper dtsi file (which cannot be modified):
axi_dma_0: dma@a0000000 { #dma-cells = <1>; clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk"; clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>; compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a"; interrupt-names = "s2mm_introut"; interrupt-parent = <&gic>; interrupts = <0 89 4>; reg = <0x0 0xa0000000 0x0 0x10000>; xlnx,addrwidth = <0x28>; xlnx,include-sg ; xlnx,sg-length-width = <0x1a>; dma-channel@a0000030 { compatible = "xlnx,axi-dma-s2mm-channel"; dma-channels = <0x1>; interrupts = <0 89 4>; xlnx,datawidth = <0x20>; xlnx,device-id = <0x0>; }; } To give access to the whole AXI DMA hardware from UIO, the following code can be used from another custom file that PetaLinux accounts for:
&axi_dma_0 { compatible = "generic-uio"; linux,uio-name = "axi_dma"; }; What I would like to do is to give UIO access only to the dma-channel sub-node instead of the whole AXI DMA. To do this I tried something as this:
&axi_dma_0 { dma-channel@a0000030 { compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Or adding reg space declaration to dma-channel subnode:
&axi_dma_0 { dma-channel@a0000030 { reg = <0x0 0xa0000030 0x0 0x28>; compatible = "generic-uio"; linux,uio-name = "axi_dma_s2mm"; }; }; Among others... I cannot make it to create the /dev/uioX file.. What is wrong or what am I missing to make it work, or understand why it is not possible (if so) ?