xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/dma/ti-edma.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunTexas Instruments eDMA
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe eDMA3 consists of two components: Channel controller (CC) and Transfer
4*4882a593SmuzhiyunController(s) (TC). The CC is the main entry for DMA users since it is
5*4882a593Smuzhiyunresponsible for the DMA channel handling, while the TCs are responsible to
6*4882a593Smuzhiyunexecute the actual DMA tansfer.
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun------------------------------------------------------------------------------
9*4882a593SmuzhiyuneDMA3 Channel Controller
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunRequired properties:
12*4882a593Smuzhiyun--------------------
13*4882a593Smuzhiyun- compatible:	Should be:
14*4882a593Smuzhiyun		- "ti,edma3-tpcc" for the channel controller(s) on OMAP,
15*4882a593Smuzhiyun		  AM33xx and AM43xx SoCs.
16*4882a593Smuzhiyun		- "ti,k2g-edma3-tpcc", "ti,edma3-tpcc" for the
17*4882a593Smuzhiyun		  channel controller(s) on 66AK2G.
18*4882a593Smuzhiyun- #dma-cells:	Should be set to <2>. The first number is the DMA request
19*4882a593Smuzhiyun		number and the second is the TC the channel is serviced on.
20*4882a593Smuzhiyun- reg:		Memory map of eDMA CC
21*4882a593Smuzhiyun- reg-names:	"edma3_cc"
22*4882a593Smuzhiyun- interrupts:	Interrupt lines for CCINT, MPERR and CCERRINT.
23*4882a593Smuzhiyun- interrupt-names: "edma3_ccint", "edma3_mperr" and "edma3_ccerrint"
24*4882a593Smuzhiyun- ti,tptcs:	List of TPTCs associated with the eDMA in the following form:
25*4882a593Smuzhiyun		<&tptc_phandle TC_priority_number>. The highest priority is 0.
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunSoC-specific Required properties:
28*4882a593Smuzhiyun--------------------------------
29*4882a593SmuzhiyunThe following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:
30*4882a593Smuzhiyun- ti,hwmods:	Name of the hwmods associated to the eDMA CC.
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunThe following are mandatory properties for 66AK2G SoCs only:
33*4882a593Smuzhiyun- power-domains:Should contain a phandle to a PM domain provider node
34*4882a593Smuzhiyun		and an args specifier containing the device id
35*4882a593Smuzhiyun		value. This property is as per the binding,
36*4882a593Smuzhiyun		Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunOptional properties:
39*4882a593Smuzhiyun-------------------
40*4882a593Smuzhiyun- ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow
41*4882a593Smuzhiyun		these channels will be SW triggered channels. See example.
42*4882a593Smuzhiyun- ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by
43*4882a593Smuzhiyun		the driver, they are allocated to be used by for example the
44*4882a593Smuzhiyun		DSP. See example.
45*4882a593Smuzhiyun- dma-channel-mask: Mask of usable channels.
46*4882a593Smuzhiyun		Single uint32 for EDMA with 32 channels, array of two uint32 for
47*4882a593Smuzhiyun		EDMA with 64 channels. See example and
48*4882a593Smuzhiyun		Documentation/devicetree/bindings/dma/dma-common.yaml
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun------------------------------------------------------------------------------
52*4882a593SmuzhiyuneDMA3 Transfer Controller
53*4882a593Smuzhiyun
54*4882a593SmuzhiyunRequired properties:
55*4882a593Smuzhiyun--------------------
56*4882a593Smuzhiyun- compatible:	Should be:
57*4882a593Smuzhiyun		- "ti,edma3-tptc" for the transfer controller(s) on OMAP,
58*4882a593Smuzhiyun		  AM33xx and AM43xx SoCs.
59*4882a593Smuzhiyun		- "ti,k2g-edma3-tptc", "ti,edma3-tptc" for the
60*4882a593Smuzhiyun		  transfer controller(s) on 66AK2G.
61*4882a593Smuzhiyun- reg:		Memory map of eDMA TC
62*4882a593Smuzhiyun- interrupts:	Interrupt number for TCerrint.
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunSoC-specific Required properties:
65*4882a593Smuzhiyun--------------------------------
66*4882a593SmuzhiyunThe following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:
67*4882a593Smuzhiyun- ti,hwmods:	Name of the hwmods associated to the eDMA TC.
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunThe following are mandatory properties for 66AK2G SoCs only:
70*4882a593Smuzhiyun- power-domains:Should contain a phandle to a PM domain provider node
71*4882a593Smuzhiyun		and an args specifier containing the device id
72*4882a593Smuzhiyun		value. This property is as per the binding,
73*4882a593Smuzhiyun		Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunOptional properties:
76*4882a593Smuzhiyun-------------------
77*4882a593Smuzhiyun- interrupt-names: "edma3_tcerrint"
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun------------------------------------------------------------------------------
80*4882a593SmuzhiyunExamples:
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun1.
83*4882a593Smuzhiyunedma: edma@49000000 {
84*4882a593Smuzhiyun	compatible = "ti,edma3-tpcc";
85*4882a593Smuzhiyun	ti,hwmods = "tpcc";
86*4882a593Smuzhiyun	reg =	<0x49000000 0x10000>;
87*4882a593Smuzhiyun	reg-names = "edma3_cc";
88*4882a593Smuzhiyun	interrupts = <12 13 14>;
89*4882a593Smuzhiyun	interrupt-names = "edma3_ccint", "edma3_mperr", "edma3_ccerrint";
90*4882a593Smuzhiyun	dma-requests = <64>;
91*4882a593Smuzhiyun	#dma-cells = <2>;
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun	/* Channel 20 and 21 is allocated for memcpy */
96*4882a593Smuzhiyun	ti,edma-memcpy-channels = <20 21>;
97*4882a593Smuzhiyun	/* The following PaRAM slots are reserved: 35-44 and 100-109 */
98*4882a593Smuzhiyun	ti,edma-reserved-slot-ranges = <35 10>, <100 10>;
99*4882a593Smuzhiyun	/* The following channels are reserved: 35-44 */
100*4882a593Smuzhiyun	dma-channel-mask = <0xffffffff /* Channel 0-31 */
101*4882a593Smuzhiyun			    0xffffe007>; /* Channel 32-63 */
102*4882a593Smuzhiyun};
103*4882a593Smuzhiyun
104*4882a593Smuzhiyunedma_tptc0: tptc@49800000 {
105*4882a593Smuzhiyun	compatible = "ti,edma3-tptc";
106*4882a593Smuzhiyun	ti,hwmods = "tptc0";
107*4882a593Smuzhiyun	reg =	<0x49800000 0x100000>;
108*4882a593Smuzhiyun	interrupts = <112>;
109*4882a593Smuzhiyun	interrupt-names = "edm3_tcerrint";
110*4882a593Smuzhiyun};
111*4882a593Smuzhiyun
112*4882a593Smuzhiyunedma_tptc1: tptc@49900000 {
113*4882a593Smuzhiyun	compatible = "ti,edma3-tptc";
114*4882a593Smuzhiyun	ti,hwmods = "tptc1";
115*4882a593Smuzhiyun	reg =	<0x49900000 0x100000>;
116*4882a593Smuzhiyun	interrupts = <113>;
117*4882a593Smuzhiyun	interrupt-names = "edm3_tcerrint";
118*4882a593Smuzhiyun};
119*4882a593Smuzhiyun
120*4882a593Smuzhiyunedma_tptc2: tptc@49a00000 {
121*4882a593Smuzhiyun	compatible = "ti,edma3-tptc";
122*4882a593Smuzhiyun	ti,hwmods = "tptc2";
123*4882a593Smuzhiyun	reg =	<0x49a00000 0x100000>;
124*4882a593Smuzhiyun	interrupts = <114>;
125*4882a593Smuzhiyun	interrupt-names = "edm3_tcerrint";
126*4882a593Smuzhiyun};
127*4882a593Smuzhiyun
128*4882a593Smuzhiyunsham: sham@53100000 {
129*4882a593Smuzhiyun	compatible = "ti,omap4-sham";
130*4882a593Smuzhiyun	ti,hwmods = "sham";
131*4882a593Smuzhiyun	reg = <0x53100000 0x200>;
132*4882a593Smuzhiyun	interrupts = <109>;
133*4882a593Smuzhiyun	/* DMA channel 36 executed on eDMA TC0 - low priority queue */
134*4882a593Smuzhiyun	dmas = <&edma 36 0>;
135*4882a593Smuzhiyun	dma-names = "rx";
136*4882a593Smuzhiyun};
137*4882a593Smuzhiyun
138*4882a593Smuzhiyunmcasp0: mcasp@48038000 {
139*4882a593Smuzhiyun	compatible = "ti,am33xx-mcasp-audio";
140*4882a593Smuzhiyun	ti,hwmods = "mcasp0";
141*4882a593Smuzhiyun	reg = <0x48038000 0x2000>,
142*4882a593Smuzhiyun		<0x46000000 0x400000>;
143*4882a593Smuzhiyun	reg-names = "mpu", "dat";
144*4882a593Smuzhiyun	interrupts = <80>, <81>;
145*4882a593Smuzhiyun	interrupt-names = "tx", "rx";
146*4882a593Smuzhiyun	/* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */
147*4882a593Smuzhiyun	dmas = <&edma 8 2>,
148*4882a593Smuzhiyun	       <&edma 9 2>;
149*4882a593Smuzhiyun	dma-names = "tx", "rx";
150*4882a593Smuzhiyun};
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun2.
153*4882a593Smuzhiyunedma1: edma@2728000 {
154*4882a593Smuzhiyun	compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc";
155*4882a593Smuzhiyun	reg =	<0x02728000 0x8000>;
156*4882a593Smuzhiyun	reg-names = "edma3_cc";
157*4882a593Smuzhiyun	interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
158*4882a593Smuzhiyun			<GIC_SPI 219 IRQ_TYPE_EDGE_RISING>,
159*4882a593Smuzhiyun			<GIC_SPI 220 IRQ_TYPE_EDGE_RISING>;
160*4882a593Smuzhiyun	interrupt-names = "edma3_ccint", "emda3_mperr",
161*4882a593Smuzhiyun			  "edma3_ccerrint";
162*4882a593Smuzhiyun	dma-requests = <64>;
163*4882a593Smuzhiyun	#dma-cells = <2>;
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun	ti,tptcs = <&edma1_tptc0 7>, <&edma1_tptc1 0>;
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun	/*
168*4882a593Smuzhiyun	 * memcpy is disabled, can be enabled with:
169*4882a593Smuzhiyun	 * ti,edma-memcpy-channels = <12 13 14 15>;
170*4882a593Smuzhiyun	 * for example.
171*4882a593Smuzhiyun	 */
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun	power-domains = <&k2g_pds 0x4f>;
174*4882a593Smuzhiyun};
175*4882a593Smuzhiyun
176*4882a593Smuzhiyunedma1_tptc0: tptc@27b0000 {
177*4882a593Smuzhiyun	compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
178*4882a593Smuzhiyun	reg =	<0x027b0000 0x400>;
179*4882a593Smuzhiyun	power-domains = <&k2g_pds 0x4f>;
180*4882a593Smuzhiyun};
181*4882a593Smuzhiyun
182*4882a593Smuzhiyunedma1_tptc1: tptc@27b8000 {
183*4882a593Smuzhiyun	compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
184*4882a593Smuzhiyun	reg =	<0x027b8000 0x400>;
185*4882a593Smuzhiyun	power-domains = <&k2g_pds 0x4f>;
186*4882a593Smuzhiyun};
187*4882a593Smuzhiyun
188*4882a593Smuzhiyunmmc0: mmc@23000000 {
189*4882a593Smuzhiyun	compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
190*4882a593Smuzhiyun	reg = <0x23000000 0x400>;
191*4882a593Smuzhiyun	interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>;
192*4882a593Smuzhiyun	dmas = <&edma1 24 0>, <&edma1 25 0>;
193*4882a593Smuzhiyun	dma-names = "tx", "rx";
194*4882a593Smuzhiyun	bus-width = <4>;
195*4882a593Smuzhiyun	ti,needs-special-reset;
196*4882a593Smuzhiyun	no-1-8-v;
197*4882a593Smuzhiyun	max-frequency = <96000000>;
198*4882a593Smuzhiyun	power-domains = <&k2g_pds 0xb>;
199*4882a593Smuzhiyun	clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>;
200*4882a593Smuzhiyun	clock-names = "fck", "mmchsdb_fck";
201*4882a593Smuzhiyun};
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun------------------------------------------------------------------------------
204*4882a593SmuzhiyunDEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc
205*4882a593Smuzhiyunbinding.
206*4882a593Smuzhiyun
207*4882a593SmuzhiyunRequired properties:
208*4882a593Smuzhiyun- compatible : "ti,edma3"
209*4882a593Smuzhiyun- #dma-cells: Should be set to <1>
210*4882a593Smuzhiyun              Clients should use a single channel number per DMA request.
211*4882a593Smuzhiyun- reg: Memory map for accessing module
212*4882a593Smuzhiyun- interrupts: Exactly 3 interrupts need to be specified in the order:
213*4882a593Smuzhiyun              1. Transfer completion interrupt.
214*4882a593Smuzhiyun              2. Memory protection interrupt.
215*4882a593Smuzhiyun              3. Error interrupt.
216*4882a593SmuzhiyunOptional properties:
217*4882a593Smuzhiyun- ti,hwmods: Name of the hwmods associated to the EDMA
218*4882a593Smuzhiyun- ti,edma-xbar-event-map: Crossbar event to channel map
219*4882a593Smuzhiyun
220*4882a593SmuzhiyunDeprecated properties:
221*4882a593SmuzhiyunListed here in case one wants to boot an old kernel with new DTB. These
222*4882a593Smuzhiyunproperties might need to be added to the new DTS files.
223*4882a593Smuzhiyun- ti,edma-regions: Number of regions
224*4882a593Smuzhiyun- ti,edma-slots: Number of slots
225*4882a593Smuzhiyun- dma-channels: Specify total DMA channels per CC
226*4882a593Smuzhiyun
227*4882a593SmuzhiyunExample:
228*4882a593Smuzhiyun
229*4882a593Smuzhiyunedma: edma@49000000 {
230*4882a593Smuzhiyun	reg = <0x49000000 0x10000>;
231*4882a593Smuzhiyun	interrupt-parent = <&intc>;
232*4882a593Smuzhiyun	interrupts = <12 13 14>;
233*4882a593Smuzhiyun	compatible = "ti,edma3";
234*4882a593Smuzhiyun	ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
235*4882a593Smuzhiyun	#dma-cells = <1>;
236*4882a593Smuzhiyun	ti,edma-xbar-event-map = /bits/ 16 <1 12
237*4882a593Smuzhiyun					    2 13>;
238*4882a593Smuzhiyun};
239