xref: /freebsd-src/sys/contrib/device-tree/Bindings/dma/fsl-edma.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Freescale enhanced Direct Memory Access(eDMA) Controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel Vadot  The eDMA channels have multiplex capability by programmble memory-mapped
4*c66ec88fSEmmanuel Vadotregisters. channels are split into two groups, called DMAMUX0 and DMAMUX1,
5*c66ec88fSEmmanuel Vadotspecific DMA request source can only be multiplexed by any channel of certain
6*c66ec88fSEmmanuel Vadotgroup, DMAMUX0 or DMAMUX1, but not both.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel Vadot* eDMA Controller
9*c66ec88fSEmmanuel VadotRequired properties:
10*c66ec88fSEmmanuel Vadot- compatible :
11*c66ec88fSEmmanuel Vadot	- "fsl,vf610-edma" for eDMA used similar to that on Vybrid vf610 SoC
12*c66ec88fSEmmanuel Vadot	- "fsl,imx7ulp-edma" for eDMA2 used similar to that on i.mx7ulp
13*c66ec88fSEmmanuel Vadot	- "fsl,ls1028a-edma" followed by "fsl,vf610-edma" for eDMA used on the
14*c66ec88fSEmmanuel Vadot	  LS1028A SoC.
15*c66ec88fSEmmanuel Vadot- reg : Specifies base physical address(s) and size of the eDMA registers.
16*c66ec88fSEmmanuel Vadot	The 1st region is eDMA control register's address and size.
17*c66ec88fSEmmanuel Vadot	The 2nd and the 3rd regions are programmable channel multiplexing
18*c66ec88fSEmmanuel Vadot	control register's address and size.
19*c66ec88fSEmmanuel Vadot- interrupts : A list of interrupt-specifiers, one for each entry in
20*c66ec88fSEmmanuel Vadot	interrupt-names on vf610 similar SoC. But for i.mx7ulp per channel
21*c66ec88fSEmmanuel Vadot	per transmission interrupt, total 16 channel interrupt and 1
22*c66ec88fSEmmanuel Vadot	error interrupt(located in the last), no interrupt-names list on
23*c66ec88fSEmmanuel Vadot	i.mx7ulp for clean on dts.
24*c66ec88fSEmmanuel Vadot- #dma-cells : Must be <2>.
25*c66ec88fSEmmanuel Vadot	The 1st cell specifies the DMAMUX(0 for DMAMUX0 and 1 for DMAMUX1).
26*c66ec88fSEmmanuel Vadot	Specific request source can only be multiplexed by specific channels
27*c66ec88fSEmmanuel Vadot	group called DMAMUX.
28*c66ec88fSEmmanuel Vadot	The 2nd cell specifies the request source(slot) ID.
29*c66ec88fSEmmanuel Vadot	See the SoC's reference manual for all the supported request sources.
30*c66ec88fSEmmanuel Vadot- dma-channels : Number of channels supported by the controller
31*c66ec88fSEmmanuel Vadot- clock-names : A list of channel group clock names. Should contain:
32*c66ec88fSEmmanuel Vadot	"dmamux0" - clock name of mux0 group
33*c66ec88fSEmmanuel Vadot	"dmamux1" - clock name of mux1 group
34*c66ec88fSEmmanuel Vadot	Note: No dmamux0 on i.mx7ulp, but another 'dma' clk added on i.mx7ulp.
35*c66ec88fSEmmanuel Vadot- clocks : A list of phandle and clock-specifier pairs, one for each entry in
36*c66ec88fSEmmanuel Vadot	clock-names.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel VadotOptional properties:
39*c66ec88fSEmmanuel Vadot- big-endian: If present registers and hardware scatter/gather descriptors
40*c66ec88fSEmmanuel Vadot	of the eDMA are implemented in big endian mode, otherwise in little
41*c66ec88fSEmmanuel Vadot	mode.
42*c66ec88fSEmmanuel Vadot- interrupt-names : Should contain the below on vf610 similar SoC but not used
43*c66ec88fSEmmanuel Vadot	on i.mx7ulp similar SoC:
44*c66ec88fSEmmanuel Vadot	"edma-tx" - the transmission interrupt
45*c66ec88fSEmmanuel Vadot	"edma-err" - the error interrupt
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel VadotExamples:
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadotedma0: dma-controller@40018000 {
51*c66ec88fSEmmanuel Vadot	#dma-cells = <2>;
52*c66ec88fSEmmanuel Vadot	compatible = "fsl,vf610-edma";
53*c66ec88fSEmmanuel Vadot	reg = <0x40018000 0x2000>,
54*c66ec88fSEmmanuel Vadot		<0x40024000 0x1000>,
55*c66ec88fSEmmanuel Vadot		<0x40025000 0x1000>;
56*c66ec88fSEmmanuel Vadot	interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>,
57*c66ec88fSEmmanuel Vadot		<0 9 IRQ_TYPE_LEVEL_HIGH>;
58*c66ec88fSEmmanuel Vadot	interrupt-names = "edma-tx", "edma-err";
59*c66ec88fSEmmanuel Vadot	dma-channels = <32>;
60*c66ec88fSEmmanuel Vadot	clock-names = "dmamux0", "dmamux1";
61*c66ec88fSEmmanuel Vadot	clocks = <&clks VF610_CLK_DMAMUX0>,
62*c66ec88fSEmmanuel Vadot		<&clks VF610_CLK_DMAMUX1>;
63*c66ec88fSEmmanuel Vadot}; /* vf610 */
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel Vadotedma1: dma-controller@40080000 {
66*c66ec88fSEmmanuel Vadot	#dma-cells = <2>;
67*c66ec88fSEmmanuel Vadot	compatible = "fsl,imx7ulp-edma";
68*c66ec88fSEmmanuel Vadot	reg = <0x40080000 0x2000>,
69*c66ec88fSEmmanuel Vadot		<0x40210000 0x1000>;
70*c66ec88fSEmmanuel Vadot	dma-channels = <32>;
71*c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
72*c66ec88fSEmmanuel Vadot		     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
73*c66ec88fSEmmanuel Vadot		     <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
74*c66ec88fSEmmanuel Vadot		     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
75*c66ec88fSEmmanuel Vadot		     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
76*c66ec88fSEmmanuel Vadot		     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
77*c66ec88fSEmmanuel Vadot		     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
78*c66ec88fSEmmanuel Vadot		     <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
79*c66ec88fSEmmanuel Vadot		     <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
80*c66ec88fSEmmanuel Vadot		     <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
81*c66ec88fSEmmanuel Vadot		     <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
82*c66ec88fSEmmanuel Vadot		     <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
83*c66ec88fSEmmanuel Vadot		     <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
84*c66ec88fSEmmanuel Vadot		     <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
85*c66ec88fSEmmanuel Vadot		     <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
86*c66ec88fSEmmanuel Vadot		     <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
87*c66ec88fSEmmanuel Vadot		     /* last is eDMA2-ERR interrupt */
88*c66ec88fSEmmanuel Vadot		     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
89*c66ec88fSEmmanuel Vadot	clock-names = "dma", "dmamux0";
90*c66ec88fSEmmanuel Vadot	clocks = <&pcc2 IMX7ULP_CLK_DMA1>,
91*c66ec88fSEmmanuel Vadot		 <&pcc2 IMX7ULP_CLK_DMA_MUX1>;
92*c66ec88fSEmmanuel Vadot}; /* i.mx7ulp */
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot* DMA clients
95*c66ec88fSEmmanuel VadotDMA client drivers that uses the DMA function must use the format described
96*c66ec88fSEmmanuel Vadotin the dma.txt file, using a two-cell specifier for each channel: the 1st
97*c66ec88fSEmmanuel Vadotspecifies the channel group(DMAMUX) in which this request can be multiplexed,
98*c66ec88fSEmmanuel Vadotand the 2nd specifies the request source.
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel VadotExamples:
101*c66ec88fSEmmanuel Vadot
102*c66ec88fSEmmanuel Vadotsai2: sai@40031000 {
103*c66ec88fSEmmanuel Vadot	compatible = "fsl,vf610-sai";
104*c66ec88fSEmmanuel Vadot	reg = <0x40031000 0x1000>;
105*c66ec88fSEmmanuel Vadot	interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
106*c66ec88fSEmmanuel Vadot	clock-names = "sai";
107*c66ec88fSEmmanuel Vadot	clocks = <&clks VF610_CLK_SAI2>;
108*c66ec88fSEmmanuel Vadot	dma-names = "tx", "rx";
109*c66ec88fSEmmanuel Vadot	dmas = <&edma0 0 21>,
110*c66ec88fSEmmanuel Vadot		<&edma0 0 20>;
111*c66ec88fSEmmanuel Vadot};
112