UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer leroyworld1
Observer
11,198 Views
Registered: ‎09-11-2014

DMA: unable to read dma-channels property

Jump to solution

Hello,


I'm trying to get DMA working and I'm getting the following error message when Linux boots up:

xilinx-dma 40400000.dma: unable to read dma-channels property
xilinx-dma 40400000.dma: Probing channels failed
xilinx-dma: probe of 40400000.dma failed with error -22

I'm using:

> Vivado 2015.2

> Device-tree-xlnx-xilinx-v2015.2 (also tried last version and the same happens)

> Last linux-xlnx repository (Kernel version: Linux 4.4.0-xilinx-34440-g5c4698a-dirty)
> PL design is a looped DMA.

When SDK autogenerates the device tree, the file pl.dtsi looks like:

/ {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		axi_dma_0: dma@40400000 {
			compatible = "xlnx,axi-dma";
			interrupt-parent = <&intc>;
			interrupts = <0 29 4 0 30 4>;
			reg = <0x40400000 0x10000>;
			dma-channel@40400000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				interrupts = <0 29 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
			dma-channel@40400030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				interrupts = <0 30 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
		};
	};
};

Any idea? Shouldn't the device-tree generator do this right?

Regards.

 

0 Kudos
1 Solution

Accepted Solutions
19,975 Views
Registered: ‎01-29-2016

Re: DMA: unable to read dma-channels property

Jump to solution

The devicetree below works for me. I am using the master xilinx kernel from their Git repository. The last part (dmatest_0) is the trick to make it work.

/ {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		axi_dma_0: dma@40400000 {
			compatible = "xlnx,axi-dma-1.00.a";
			#dma-cells = <1>;
			interrupt-parent = <&intc>;
			interrupts = <0 29 4 0 30 4>;
			reg = <0x40400000 0x10000>;
			dma-channel@40400000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				interrupts = <0 29 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
			dma-channel@40400030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				interrupts = <0 30 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
		};

		dmatest_0: dmatest@0 {
			compatible ="xlnx,axi-dma-test-1.00.a";
			dmas = <&axi_dma_0 0
				&axi_dma_0 1>;
			dma-names = "axidma0", "axidma1";
		} ;
	};


};
9 Replies
Scholar sampatd
Scholar
11,144 Views
Registered: ‎09-05-2011

Re: DMA: unable to read dma-channels property

Jump to solution
I suggest that you try with 2015.4 tag of device tree.

Also, you can verify the axi dma node entry here:
http://www.wiki.xilinx.com/DMA+Drivers+-+Soft+IPs
0 Kudos
Observer leroyworld1
Observer
11,139 Views
Registered: ‎09-11-2014

Re: DMA: unable to read dma-channels property

Jump to solution

If I use the axi dma node entry from the wiki or the autogenerated one, with: compatible = "xlnx,axi-dma";      --> nothing happens.
When I change to: compatible = "xlnx,axi-dma-1.00.a";  ---> The output error from my previous post appears.

I enabled dmatest in linux kernel config:

dmadriver.JPG
And my design is:
design.JPG

I almost got it. Just something is missing and I don't know what :(

PS: I think there is a typo in device tree node from the WIKI:

dma-channel@40030030   # should be @40400030

 

0 Kudos
Observer leroyworld1
Observer
11,116 Views
Registered: ‎09-11-2014

Re: DMA: unable to read dma-channels property

Jump to solution

Update:

After I read this thread, I decided to downgrade my kernel to 3.17 and I think it finally worked:

xilinx-dma 40400000.axidma: Probing xilinx axi dma engine...Successful
dmatest: Started 1 threads using dma1chan0 dma1chan1
xilinx_dma_start_transfer::simple DMA mode
dma1chan0-dma1c: terminating after 5 tests, 0 failures (status 0)

Now I guess I'll use one of the axidma driver wrappers or create my own.

It'd be great to work with kernel 4.4. But I can't get the suggestions given on that thread to work.
Could @dirk_intersoft, @fanat9 or any other user share a working device-tree for a kernel over 4.0? I'd really appreciate it. :)

Regards

0 Kudos
Explorer
Explorer
11,109 Views
Registered: ‎02-16-2014

Re: DMA: unable to read dma-channels property

Jump to solution

Node below works for me for xlnx-4.0. I'm using only one channel in this case, SG mode enabled in hardware design and address not typical:

 

x0_dma: dma@42e00000 {
	compatible = "xlnx,axi-dma-1.00.a";
	interrupt-parent = <&intc>;
	interrupts = <0 30 4>;
	#dma-cells = <1>;
	reg = <0x42e00000 0x10000>;
	xlnx,include-sg = <1>;
	dma-channel@42e00030 {
		compatible = "xlnx,axi-dma-s2mm-channel";
		interrupts = <0 30 4>;
		xlnx,include-dre = <0>;
		xlnx,datawidth = <32>;
	};
};

 

Observer leroyworld1
Observer
11,099 Views
Registered: ‎09-11-2014

Re: DMA: unable to read dma-channels property

Jump to solution

Thanks for your answer fanat9,

I'm still getting the error with kernel 4.4 though:

xilinx-dma 40400000.dma: unable to read dma-channels property
xilinx-dma 40400000.dma: Probing channels failed
xilinx-dma: probe of 40400000.dma failed with error -22

 

I'll try to work with v3.17 as long as I don't find a solution for this.
Regards.

0 Kudos
Explorer
Explorer
11,095 Views
Registered: ‎02-16-2014

Re: DMA: unable to read dma-channels property

Jump to solution

Try with 4.0 first.  Btw I'm using Vivado 2015.4 for my hardware design.

 

And why u have to use 4.4 ?

Explorer
Explorer
11,082 Views
Registered: ‎02-16-2014

Re: DMA: unable to read dma-channels property

Jump to solution

Yeah, where is a recent patch in xilinx kernel tree which adds multi-channel support and device-tree well be different. Not sure if changes complete and well tested. Use on your own or stick to xlnx 4.0

 

https://github.com/Xilinx/linux-xlnx/commit/36f9f5546ee2897e20448ae182ae80f1bd689289

 

 

0 Kudos
Observer leroyworld1
Observer
11,074 Views
Registered: ‎09-11-2014

Re: DMA: unable to read dma-channels property

Jump to solution

@fanat9 wrote:
And why u have to use 4.4 ?

Until you asked I didn't know why. I guess just a matter of self-pride, lol. You are right, I don't need it.
Thanks for the patch, but one channel should do for our application, we just need 32 MBytes/s from PL to PS.

As developing my own drivers sounds difficult (I'm a noob with Linux), I'm going to start trying bmartini wrapper for axidma driver, but I gladly accept any other easier suggestions, if any.


Regards.

0 Kudos
19,976 Views
Registered: ‎01-29-2016

Re: DMA: unable to read dma-channels property

Jump to solution

The devicetree below works for me. I am using the master xilinx kernel from their Git repository. The last part (dmatest_0) is the trick to make it work.

/ {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		axi_dma_0: dma@40400000 {
			compatible = "xlnx,axi-dma-1.00.a";
			#dma-cells = <1>;
			interrupt-parent = <&intc>;
			interrupts = <0 29 4 0 30 4>;
			reg = <0x40400000 0x10000>;
			dma-channel@40400000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				interrupts = <0 29 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
			dma-channel@40400030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				interrupts = <0 30 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
			};
		};

		dmatest_0: dmatest@0 {
			compatible ="xlnx,axi-dma-test-1.00.a";
			dmas = <&axi_dma_0 0
				&axi_dma_0 1>;
			dma-names = "axidma0", "axidma1";
		} ;
	};


};