My design uses the ADRV9361-Z7035 SoM running Linux and started from the default HDL reference project. I added custom HDL processing blocks that read data from the ADC FIFO and input to the additional adc_pack blocks that output to additional ADI AXI DMA Controllers. These processing blocks trigger interrupts. I successfully added the additional DMAs to the device tree and regenerated the Boot.bin file using my updated .hdf file. On the Linux side, I see the additional interrupts using "ls -l /proc/interrupts" and I also see the additional DMAs. The problem is I want to be able to react to the specific interrupts and read from that DMA using the iio-rx-dma driver. Currently, the axi-dmac-rx@0 block in the device tree only has one phandle. I tried addition more axi-dmac-rx blocks but Linux wouldn't boot. Do I need to add the other DMA phandles of the dmas line in the axi-dmac-rx block? How can I add drivers to all of my additional DMA controllers? I copied a snippet from my device tree below.
axi_ad9361_adc_dma: dma@7c400000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x7c400000 0x10000>;
#dma-cells = <0x1>;
interrupts = <0x0 0x39 0x0>;
clocks = <0x2 0x10>;
linux,phandle = <0xb>;
phandle = <0xb>;
adi,channels {
#size-cells = <0x0>;
#address-cells = <0x1>;
dma-channel@0 {
reg = <0x0>;
adi,source-bus-width = <0x40>;
adi,source-bus-type = <0x2>;
adi,destination-bus-width = <0x40>;
adi,destination-bus-type = <0x0>;
};
};
};
axi_ad9361_dac_dma: dma@7c420000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x7c420000 0x10000>;
#dma-cells = <0x1>;
interrupts = <0x0 0x38 0x0>;
clocks = <0x2 0x10>;
linux,phandle = <0xd>;
phandle = <0xd>;
adi,channels {
#size-cells = <0x0>;
#address-cells = <0x1>;
dma-channel@0 {
reg = <0x0>;
adi,source-bus-width = <0x40>;
adi,source-bus-type = <0x0>;
adi,destination-bus-width = <0x40>;
adi,destination-bus-type = <0x2>;
};
};
};
cf-ad9361-lpc@79020000 {
compatible = "adi,axi-ad9361-6.00.a";
reg = <0x79020000 0x6000>;
dmas = <0xb 0x0>;
dma-names = "rx";
spibus-connected = <0xc>;
};
cf-ad9361-dds-core-lpc@79024000 {
compatible = "adi,axi-ad9361-dds-6.00.a";
reg = <0x79024000 0x1000>;
clocks = <0xc 0xd>;
clock-names = "sampl_clk";
dmas = <0xd 0x0>;
dma-names = "tx";
};
axi_ad9361_adc_dma1: dma@43c10000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x43c10000 0x10000>;
#dma-cells = <0x1>;
interrupts = <0x0 0x1e 0x0>;
clocks = <0x2 0x10>;
linux,phandle = <0xaa>;
phandle = <0xaa>;
adi,channels {
#size-cells = <0x0>;
#address-cells = <0x1>;
dma-channel@0 {
reg = <0x0>;
adi,length-width = <0x18>;
adi,source-bus-width = <0x40>;
adi,source-bus-type = <0x1>;
adi,destination-bus-width = <0x40>;
adi,destination-bus-type = <0x0>;
};
};
};
axi_to_lad_0: axi_to_lad@43c20000 {
compatible = "xlnx,axi-to-lad-1.0";
reg = <0x43c20000 0x10000>;
xlnx,s00-axi-addr-width = <0x5>;
xlnx,s00-axi-data-width = <0x20>;
};
axi_ad9361_adc_dma_FIFO_lb: dma@43c30000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x43c30000 0x10000>;
#dma-cells = <0x1>;
interrupts = <0x0 0x1f 0x0>;
clocks = <0x2 0x10>;
linux,phandle = <0xab>;
phandle = <0xab>;
adi,channels {
#size-cells = <0x0>;
#address-cells = <0x1>;
dma-channel@0 {
reg = <0x0>;
adi,length-width = <0x18>;
adi,source-bus-width = <0x40>;
adi,source-bus-type = <0x1>;
adi,destination-bus-width = <0x40>;
adi,destination-bus-type = <0x0>;
};
};
};
axi_ad9361_adc_dma_lb: dma@43c40000 {
compatible = "adi,axi-dmac-1.00.a";
reg = <0x43c40000 0x10000>;
#dma-cells = <0x1>;
interrupts = <0x0 0x20 0x0>;
clocks = <0x2 0x10>;
linux,phandle = <0xac>;
phandle = <0xac>;
adi,channels {
#size-cells = <0x0>;
#address-cells = <0x1>;
dma-channel@0 {
reg = <0x0>;
adi,length-width = <0x18>;
adi,source-bus-width = <0x40>;
adi,source-bus-type = <0x1>;
adi,destination-bus-width = <0x40>;
adi,destination-bus-type = <0x0>;
};
};
};
axi-dmac-rx@0 {
compatible = "adi,iio-rx-dma-1.00.a";
dmas = <0xaa 0x0>;
dma-names = "rx";
};
Added clarification to the device tree below.
[edited by: dkartis1 at 1:59 AM (GMT -5) on 21 Dec 2020]