Linux Kernel 4.4 DTS node for Xilinx AXI-DMA IP.

I recently switch to Linux Kernel 4.4 (from 4.0) for some of my projects and to my no surprise found Xilinx AXI-DMA not working again. This time it complained that it can't find DMA channel: "unable to read dma-channels property" and as result "Probing channels failed." So, looks like Xilinx added support for "multi-channel mode" for kernel driver and this is a big deal! And I waited for this forever!

But, as a result of this - DTS node were changed again, braking compatibility. Also, if you using the only one DMA-channel either MM2S or S2MM channel index in your custom DTS node must be 0 in either case, unlike before if you were using only s2mm index was 1 and if only mm2s index was 0.

So, below example of DTS node for AXI DMA and modified xilinx_dmatest(single channel) which works for me for Linux 4.4

axidma0: axidma@40400000 {
        compatible = "xlnx,axi-dma-1.00.a";
        #dma-cells = <1>;
        reg = <0x40400000 0x10000>;
        interrupt-parent = <&intc>;
        dma-channel@40400030 {
                compatible = "xlnx,axi-dma-s2mm-channel";
                dma-channels = <1>;
                interrupts = <0 29 4>;
                xlnx,datawidth = <32>;
                xlnx,include-dre = <0>;
} ;

dmatest0: dmatest@0 {
	compatible ="xlnx,axi-dma-test-1.00.a";
	dmas = <&axidma0 0>;
	dma-names = "axidma1";
Posted in AXI, Linux, Zynq Tagged with: , , , ,

Leave a Reply