1*4882a593Smuzhiyun* Freescale Smart Direct Memory Access (SDMA) Controller for i.MX 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun- compatible : Should be one of 5*4882a593Smuzhiyun "fsl,imx25-sdma" 6*4882a593Smuzhiyun "fsl,imx31-sdma", "fsl,imx31-to1-sdma", "fsl,imx31-to2-sdma" 7*4882a593Smuzhiyun "fsl,imx35-sdma", "fsl,imx35-to1-sdma", "fsl,imx35-to2-sdma" 8*4882a593Smuzhiyun "fsl,imx51-sdma" 9*4882a593Smuzhiyun "fsl,imx53-sdma" 10*4882a593Smuzhiyun "fsl,imx6q-sdma" 11*4882a593Smuzhiyun "fsl,imx7d-sdma" 12*4882a593Smuzhiyun "fsl,imx8mq-sdma" 13*4882a593Smuzhiyun "fsl,imx8mm-sdma" 14*4882a593Smuzhiyun "fsl,imx8mn-sdma" 15*4882a593Smuzhiyun "fsl,imx8mp-sdma" 16*4882a593Smuzhiyun The -to variants should be preferred since they allow to determine the 17*4882a593Smuzhiyun correct ROM script addresses needed for the driver to work without additional 18*4882a593Smuzhiyun firmware. 19*4882a593Smuzhiyun- reg : Should contain SDMA registers location and length 20*4882a593Smuzhiyun- interrupts : Should contain SDMA interrupt 21*4882a593Smuzhiyun- #dma-cells : Must be <3>. 22*4882a593Smuzhiyun The first cell specifies the DMA request/event ID. See details below 23*4882a593Smuzhiyun about the second and third cell. 24*4882a593Smuzhiyun- fsl,sdma-ram-script-name : Should contain the full path of SDMA RAM 25*4882a593Smuzhiyun scripts firmware 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunThe second cell of dma phandle specifies the peripheral type of DMA transfer. 28*4882a593SmuzhiyunThe full ID of peripheral types can be found below. 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun ID transfer type 31*4882a593Smuzhiyun --------------------- 32*4882a593Smuzhiyun 0 MCU domain SSI 33*4882a593Smuzhiyun 1 Shared SSI 34*4882a593Smuzhiyun 2 MMC 35*4882a593Smuzhiyun 3 SDHC 36*4882a593Smuzhiyun 4 MCU domain UART 37*4882a593Smuzhiyun 5 Shared UART 38*4882a593Smuzhiyun 6 FIRI 39*4882a593Smuzhiyun 7 MCU domain CSPI 40*4882a593Smuzhiyun 8 Shared CSPI 41*4882a593Smuzhiyun 9 SIM 42*4882a593Smuzhiyun 10 ATA 43*4882a593Smuzhiyun 11 CCM 44*4882a593Smuzhiyun 12 External peripheral 45*4882a593Smuzhiyun 13 Memory Stick Host Controller 46*4882a593Smuzhiyun 14 Shared Memory Stick Host Controller 47*4882a593Smuzhiyun 15 DSP 48*4882a593Smuzhiyun 16 Memory 49*4882a593Smuzhiyun 17 FIFO type Memory 50*4882a593Smuzhiyun 18 SPDIF 51*4882a593Smuzhiyun 19 IPU Memory 52*4882a593Smuzhiyun 20 ASRC 53*4882a593Smuzhiyun 21 ESAI 54*4882a593Smuzhiyun 22 SSI Dual FIFO (needs firmware ver >= 2) 55*4882a593Smuzhiyun 23 Shared ASRC 56*4882a593Smuzhiyun 24 SAI 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunThe third cell specifies the transfer priority as below. 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun ID transfer priority 61*4882a593Smuzhiyun ------------------------- 62*4882a593Smuzhiyun 0 High 63*4882a593Smuzhiyun 1 Medium 64*4882a593Smuzhiyun 2 Low 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunOptional properties: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun- gpr : The phandle to the General Purpose Register (GPR) node. 69*4882a593Smuzhiyun- fsl,sdma-event-remap : Register bits of sdma event remap, the format is 70*4882a593Smuzhiyun <reg shift val>. 71*4882a593Smuzhiyun reg is the GPR register offset. 72*4882a593Smuzhiyun shift is the bit position inside the GPR register. 73*4882a593Smuzhiyun val is the value of the bit (0 or 1). 74*4882a593Smuzhiyun 75*4882a593SmuzhiyunExamples: 76*4882a593Smuzhiyun 77*4882a593Smuzhiyunsdma@83fb0000 { 78*4882a593Smuzhiyun compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; 79*4882a593Smuzhiyun reg = <0x83fb0000 0x4000>; 80*4882a593Smuzhiyun interrupts = <6>; 81*4882a593Smuzhiyun #dma-cells = <3>; 82*4882a593Smuzhiyun fsl,sdma-ram-script-name = "sdma-imx51.bin"; 83*4882a593Smuzhiyun}; 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunDMA clients connected to the i.MX SDMA controller must use the format 86*4882a593Smuzhiyundescribed in the dma.txt file. 87*4882a593Smuzhiyun 88*4882a593SmuzhiyunExamples: 89*4882a593Smuzhiyun 90*4882a593Smuzhiyunssi2: ssi@70014000 { 91*4882a593Smuzhiyun compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; 92*4882a593Smuzhiyun reg = <0x70014000 0x4000>; 93*4882a593Smuzhiyun interrupts = <30>; 94*4882a593Smuzhiyun clocks = <&clks 49>; 95*4882a593Smuzhiyun dmas = <&sdma 24 1 0>, 96*4882a593Smuzhiyun <&sdma 25 1 0>; 97*4882a593Smuzhiyun dma-names = "rx", "tx"; 98*4882a593Smuzhiyun fsl,fifo-depth = <15>; 99*4882a593Smuzhiyun}; 100*4882a593Smuzhiyun 101*4882a593SmuzhiyunUsing the fsl,sdma-event-remap property: 102*4882a593Smuzhiyun 103*4882a593SmuzhiyunIf we want to use SDMA on the SAI1 port on a MX6SX: 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun&sdma { 106*4882a593Smuzhiyun gpr = <&gpr>; 107*4882a593Smuzhiyun /* SDMA events remap for SAI1_RX and SAI1_TX */ 108*4882a593Smuzhiyun fsl,sdma-event-remap = <0 15 1>, <0 16 1>; 109*4882a593Smuzhiyun}; 110*4882a593Smuzhiyun 111*4882a593SmuzhiyunThe fsl,sdma-event-remap property in this case has two values: 112*4882a593Smuzhiyun- <0 15 1> means that the offset is 0, so GPR0 is the register of the 113*4882a593SmuzhiyunSDMA remap. Bit 15 of GPR0 selects between UART4_RX and SAI1_RX. 114*4882a593SmuzhiyunSetting bit 15 to 1 selects SAI1_RX. 115*4882a593Smuzhiyun- <0 16 1> means that the offset is 0, so GPR0 is the register of the 116*4882a593SmuzhiyunSDMA remap. Bit 16 of GPR0 selects between UART4_TX and SAI1_TX. 117*4882a593SmuzhiyunSetting bit 16 to 1 selects SAI1_TX. 118