xref: /linux/Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt (revision 94afcfb819b3a07e55d463c29e2d594316f40b4a)
1fde57a7cSKedareswara rao AppanaXilinx AXI VDMA engine, it does transfers between memory and video devices.
2fde57a7cSKedareswara rao AppanaIt can be configured to have one channel or two channels. If configured
3fde57a7cSKedareswara rao Appanaas two channels, one is to transmit to the video device and another is
4fde57a7cSKedareswara rao Appanato receive from the video device.
5fde57a7cSKedareswara rao Appana
6fde57a7cSKedareswara rao AppanaXilinx AXI DMA engine, it does transfers between memory and AXI4 stream
7fde57a7cSKedareswara rao Appanatarget devices. It can be configured to have one channel or two channels.
8fde57a7cSKedareswara rao AppanaIf configured as two channels, one is to transmit to the device and another
9fde57a7cSKedareswara rao Appanais to receive from the device.
10fde57a7cSKedareswara rao Appana
11fde57a7cSKedareswara rao AppanaXilinx AXI CDMA engine, it does transfers between memory-mapped source
12fde57a7cSKedareswara rao Appanaaddress and a memory-mapped destination address.
13fde57a7cSKedareswara rao Appana
147cb1e575SRadhey Shyam PandeyXilinx AXI MCDMA engine, it does transfer between memory and AXI4 stream
157cb1e575SRadhey Shyam Pandeytarget devices. It can be configured to have up to 16 independent transmit
167cb1e575SRadhey Shyam Pandeyand receive channels.
177cb1e575SRadhey Shyam Pandey
18fde57a7cSKedareswara rao AppanaRequired properties:
19535b4b0cSRadhey Shyam Pandey- compatible: Should be one of-
20535b4b0cSRadhey Shyam Pandey		"xlnx,axi-vdma-1.00.a"
21535b4b0cSRadhey Shyam Pandey		"xlnx,axi-dma-1.00.a"
22535b4b0cSRadhey Shyam Pandey		"xlnx,axi-cdma-1.00.a"
237cb1e575SRadhey Shyam Pandey		"xlnx,axi-mcdma-1.00.a"
24fde57a7cSKedareswara rao Appana- #dma-cells: Should be <1>, see "dmas" property below
25fde57a7cSKedareswara rao Appana- reg: Should contain VDMA registers location and length.
26fde57a7cSKedareswara rao Appana- xlnx,addrwidth: Should be the vdma addressing size in bits(ex: 32 bits).
27fde57a7cSKedareswara rao Appana- dma-ranges: Should be as the following <dma_addr cpu_addr max_len>.
28fde57a7cSKedareswara rao Appana- dma-channel child node: Should have at least one channel and can have up to
29fde57a7cSKedareswara rao Appana	two channels per device. This node specifies the properties of each
30fde57a7cSKedareswara rao Appana	DMA channel (see child node properties below).
31fde57a7cSKedareswara rao Appana- clocks: Input clock specifier. Refer to common clock bindings.
32fde57a7cSKedareswara rao Appana- clock-names: List of input clocks
33fde57a7cSKedareswara rao Appana	For VDMA:
34fde57a7cSKedareswara rao Appana	Required elements: "s_axi_lite_aclk"
35fde57a7cSKedareswara rao Appana	Optional elements: "m_axi_mm2s_aclk" "m_axi_s2mm_aclk",
36fde57a7cSKedareswara rao Appana			   "m_axis_mm2s_aclk", "s_axis_s2mm_aclk"
37fde57a7cSKedareswara rao Appana	For CDMA:
38fde57a7cSKedareswara rao Appana	Required elements: "s_axi_lite_aclk", "m_axi_aclk"
397cb1e575SRadhey Shyam Pandey	For AXIDMA and MCDMA:
40fde57a7cSKedareswara rao Appana	Required elements: "s_axi_lite_aclk"
41fde57a7cSKedareswara rao Appana	Optional elements: "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
42fde57a7cSKedareswara rao Appana			   "m_axi_sg_aclk"
43fde57a7cSKedareswara rao Appana
44fde57a7cSKedareswara rao AppanaRequired properties for VDMA:
45fde57a7cSKedareswara rao Appana- xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.
46fde57a7cSKedareswara rao Appana
477cb1e575SRadhey Shyam PandeyOptional properties for AXI DMA and MCDMA:
487df54dbeSAndrea Merello- xlnx,sg-length-width: Should be set to the width in bits of the length
497df54dbeSAndrea Merello	register as configured in h/w. Takes values {8...26}. If the property
507df54dbeSAndrea Merello	is missing or invalid then the default value 23 is used. This is the
517df54dbeSAndrea Merello	maximum value that is supported by all IP versions.
52*94afcfb8SRadhey Shyam Pandey
53*94afcfb8SRadhey Shyam PandeyOptional properties for AXI DMA:
54*94afcfb8SRadhey Shyam Pandey- xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP.
55*94afcfb8SRadhey Shyam Pandey
56fde57a7cSKedareswara rao AppanaOptional properties for VDMA:
57fde57a7cSKedareswara rao Appana- xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
58fde57a7cSKedareswara rao Appana	It takes following values:
59fde57a7cSKedareswara rao Appana	{1}, flush both channels
60fde57a7cSKedareswara rao Appana	{2}, flush mm2s channel
61fde57a7cSKedareswara rao Appana	{3}, flush s2mm channel
62fde57a7cSKedareswara rao Appana
63fde57a7cSKedareswara rao AppanaRequired child node properties:
64e131f1baSKedareswara rao Appana- compatible:
65e131f1baSKedareswara rao Appana	For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
66fde57a7cSKedareswara rao Appana	"xlnx,axi-vdma-s2mm-channel".
67e131f1baSKedareswara rao Appana	For CDMA: It should be "xlnx,axi-cdma-channel".
687cb1e575SRadhey Shyam Pandey	For AXIDMA and MCDMA: It should be either "xlnx,axi-dma-mm2s-channel"
697cb1e575SRadhey Shyam Pandey	or "xlnx,axi-dma-s2mm-channel".
70fde57a7cSKedareswara rao Appana- interrupts: Should contain per channel VDMA interrupts.
71fde57a7cSKedareswara rao Appana- xlnx,datawidth: Should contain the stream data width, take values
72fde57a7cSKedareswara rao Appana	{32,64...1024}.
73fde57a7cSKedareswara rao Appana
74fde57a7cSKedareswara rao AppanaOptional child node properties:
75fde57a7cSKedareswara rao Appana- xlnx,include-dre: Tells hardware is configured for Data
76fde57a7cSKedareswara rao Appana	Realignment Engine.
77fde57a7cSKedareswara rao AppanaOptional child node properties for VDMA:
78fde57a7cSKedareswara rao Appana- xlnx,genlock-mode: Tells Genlock synchronization is
79fde57a7cSKedareswara rao Appana	enabled/disabled in hardware.
80714b8392SRadhey Shyam Pandey- xlnx,enable-vert-flip: Tells vertical flip is
81714b8392SRadhey Shyam Pandey	enabled/disabled in hardware(S2MM path).
827cb1e575SRadhey Shyam PandeyOptional child node properties for MCDMA:
837cb1e575SRadhey Shyam Pandey- dma-channels: Number of dma channels in child node.
84fde57a7cSKedareswara rao Appana
85fde57a7cSKedareswara rao AppanaExample:
86fde57a7cSKedareswara rao Appana++++++++
87fde57a7cSKedareswara rao Appana
88fde57a7cSKedareswara rao Appanaaxi_vdma_0: axivdma@40030000 {
89fde57a7cSKedareswara rao Appana	compatible = "xlnx,axi-vdma-1.00.a";
90fde57a7cSKedareswara rao Appana	#dma_cells = <1>;
91fde57a7cSKedareswara rao Appana	reg = < 0x40030000 0x10000 >;
92fde57a7cSKedareswara rao Appana	dma-ranges = <0x00000000 0x00000000 0x40000000>;
93fde57a7cSKedareswara rao Appana	xlnx,num-fstores = <0x8>;
94fde57a7cSKedareswara rao Appana	xlnx,flush-fsync = <0x1>;
95fde57a7cSKedareswara rao Appana	xlnx,addrwidth = <0x20>;
96fde57a7cSKedareswara rao Appana	clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
97fde57a7cSKedareswara rao Appana	clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
98fde57a7cSKedareswara rao Appana		      "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
99fde57a7cSKedareswara rao Appana	dma-channel@40030000 {
100fde57a7cSKedareswara rao Appana		compatible = "xlnx,axi-vdma-mm2s-channel";
101fde57a7cSKedareswara rao Appana		interrupts = < 0 54 4 >;
102fde57a7cSKedareswara rao Appana		xlnx,datawidth = <0x40>;
103fde57a7cSKedareswara rao Appana	} ;
104fde57a7cSKedareswara rao Appana	dma-channel@40030030 {
105fde57a7cSKedareswara rao Appana		compatible = "xlnx,axi-vdma-s2mm-channel";
106fde57a7cSKedareswara rao Appana		interrupts = < 0 53 4 >;
107fde57a7cSKedareswara rao Appana		xlnx,datawidth = <0x40>;
108fde57a7cSKedareswara rao Appana	} ;
109fde57a7cSKedareswara rao Appana} ;
110fde57a7cSKedareswara rao Appana
111fde57a7cSKedareswara rao Appana
112fde57a7cSKedareswara rao Appana* DMA client
113fde57a7cSKedareswara rao Appana
114fde57a7cSKedareswara rao AppanaRequired properties:
115fde57a7cSKedareswara rao Appana- dmas: a list of <[Video DMA device phandle] [Channel ID]> pairs,
116fde57a7cSKedareswara rao Appana	where Channel ID is '0' for write/tx and '1' for read/rx
117766b540dSRadhey Shyam Pandey	channel. For MCMDA, MM2S channel(write/tx) ID start from
118766b540dSRadhey Shyam Pandey	'0' and is in [0-15] range. S2MM channel(read/rx) ID start
119766b540dSRadhey Shyam Pandey	from '16' and is in [16-31] range. These channels ID are
120766b540dSRadhey Shyam Pandey	fixed irrespective of IP configuration.
121766b540dSRadhey Shyam Pandey
122fde57a7cSKedareswara rao Appana- dma-names: a list of DMA channel names, one per "dmas" entry
123fde57a7cSKedareswara rao Appana
124fde57a7cSKedareswara rao AppanaExample:
125fde57a7cSKedareswara rao Appana++++++++
126fde57a7cSKedareswara rao Appana
127fde57a7cSKedareswara rao Appanavdmatest_0: vdmatest@0 {
128fde57a7cSKedareswara rao Appana	compatible ="xlnx,axi-vdma-test-1.00.a";
129fde57a7cSKedareswara rao Appana	dmas = <&axi_vdma_0 0
130fde57a7cSKedareswara rao Appana		&axi_vdma_0 1>;
131fde57a7cSKedareswara rao Appana	dma-names = "vdma0", "vdma1";
132fde57a7cSKedareswara rao Appana} ;
133