cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chintan_bl
Contributor
Contributor
299 Views
Registered: ‎04-20-2020

DMA drivers with 2 DMA IP instantiations

Hi,

We have a design working in hardware with dma-proxy-test using simple streaming loopback in the PL. As part of getting the drivers to work correctly, I had to modify the device tree (using xilinx-tools layer in yocto) to include this:

dma_proxy_test_0: dma_proxy@0 {
* compatible ="xlnx,dma_proxy";
* dmas = <&axi_dma_0 0
* &axi_dma_0 1>;
* dma-names = "dma_proxy_tx", "dma_proxy_rx";
* };

Now that we have DMA engines in PL, how do we change the device tree to have both DMA engines show up character devices in linux. 

This is what I have tried, but didn't work as expected .

 

/ {

dma_proxy_test_0: dma_proxy@0 {
compatible ="xlnx,dma_proxy";
dmas = <&axi_dma_0 0
&axi_dma_0 1>;
dma-names = "dma_proxy_tx_0", "dma_proxy_rx_0";
};

dma_proxy_test_1: dma_proxy@1 {
compatible ="xlnx,dma_proxy";
dmas = <&axi_dma_1 0
&axi_dma_1 1>;
dma-names = "dma_proxy_tx_1", "dma_proxy_rx_1";
};

};

 

Any thoughts?

Tags (2)
0 Kudos
1 Reply
Lordlothard
Observer
Observer
218 Views
Registered: ‎03-12-2021

In PL.dtsi make sure that your dmas match with the names axi_dma_0 & axi_dma_1 : for one DMA you should have something like this :

axi_dma_0: axidma0@40400000 {
    #dma-cells = <1>;
    compatible = "xlnx,axi-dma", "xlnx,axi-dma-6.03.a", "xlnx,axi-dma-1.00.a";
    reg = <0x40400000 0x10000>;
    clocks = <&clkc 15>, <&clkc 15>, <&clkc 15>, <&clkc 15>;
    clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";    
    xlnx,include-sg;    
    xlnx,addrwidth = <32>;

    dma-mm2s-channel@40400000 {
        compatible = "xlnx,axi-dma-mm2s-channel";
        dma-channels = <1>;
        xlnx,datawidth = <64>;
        xlnx,device-id = <0>;
        interrupt-parent = <&intc>;
        interrupts = <0 29 4>;
    };
    
    dma-s2mm-channel@40400000 {
        compatible = "xlnx,axi-dma-s2mm-channel";
        dma-channels = <1>;
        xlnx,datawidth = <64>;
        xlnx,device-id = <1>;
        interrupt-parent = <&intc>;
        interrupts = <0 30 4>;
    };
};

 If you have 2 dmas I wonder you have two times this node with the names axi_dma_0 and axi_dma_1 ? Make shure that the names match. 

0 Kudos