11be5336bSPeter UjfalusiTexas Instruments eDMA 21be5336bSPeter Ujfalusi 31be5336bSPeter UjfalusiThe eDMA3 consists of two components: Channel controller (CC) and Transfer 41be5336bSPeter UjfalusiController(s) (TC). The CC is the main entry for DMA users since it is 51be5336bSPeter Ujfalusiresponsible for the DMA channel handling, while the TCs are responsible to 61be5336bSPeter Ujfalusiexecute the actual DMA tansfer. 71be5336bSPeter Ujfalusi 81be5336bSPeter Ujfalusi------------------------------------------------------------------------------ 91be5336bSPeter UjfalusieDMA3 Channel Controller 101be5336bSPeter Ujfalusi 111be5336bSPeter UjfalusiRequired properties: 12470bbff0SLokesh Vutla-------------------- 13470bbff0SLokesh Vutla- compatible: Should be: 14470bbff0SLokesh Vutla - "ti,edma3-tpcc" for the channel controller(s) on OMAP, 15470bbff0SLokesh Vutla AM33xx and AM43xx SoCs. 16470bbff0SLokesh Vutla - "ti,k2g-edma3-tpcc", "ti,edma3-tpcc" for the 17470bbff0SLokesh Vutla channel controller(s) on 66AK2G. 181be5336bSPeter Ujfalusi- #dma-cells: Should be set to <2>. The first number is the DMA request 191be5336bSPeter Ujfalusi number and the second is the TC the channel is serviced on. 201be5336bSPeter Ujfalusi- reg: Memory map of eDMA CC 211be5336bSPeter Ujfalusi- reg-names: "edma3_cc" 221be5336bSPeter Ujfalusi- interrupts: Interrupt lines for CCINT, MPERR and CCERRINT. 23a5206553SRobert P. J. Day- interrupt-names: "edma3_ccint", "edma3_mperr" and "edma3_ccerrint" 241be5336bSPeter Ujfalusi- ti,tptcs: List of TPTCs associated with the eDMA in the following form: 251be5336bSPeter Ujfalusi <&tptc_phandle TC_priority_number>. The highest priority is 0. 261be5336bSPeter Ujfalusi 27470bbff0SLokesh VutlaSoC-specific Required properties: 28470bbff0SLokesh Vutla-------------------------------- 29470bbff0SLokesh VutlaThe following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only: 30470bbff0SLokesh Vutla- ti,hwmods: Name of the hwmods associated to the eDMA CC. 31470bbff0SLokesh Vutla 32470bbff0SLokesh VutlaThe following are mandatory properties for 66AK2G SoCs only: 33470bbff0SLokesh Vutla- power-domains:Should contain a phandle to a PM domain provider node 34470bbff0SLokesh Vutla and an args specifier containing the device id 35470bbff0SLokesh Vutla value. This property is as per the binding, 36*f22145f1SMauro Carvalho Chehab Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml 37470bbff0SLokesh Vutla 381be5336bSPeter UjfalusiOptional properties: 39470bbff0SLokesh Vutla------------------- 401be5336bSPeter Ujfalusi- ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow 41ecb7deceSPeter Ujfalusi these channels will be SW triggered channels. See example. 421be5336bSPeter Ujfalusi- ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by 431be5336bSPeter Ujfalusi the driver, they are allocated to be used by for example the 441be5336bSPeter Ujfalusi DSP. See example. 45115b60a9SPeter Ujfalusi- dma-channel-mask: Mask of usable channels. 46115b60a9SPeter Ujfalusi Single uint32 for EDMA with 32 channels, array of two uint32 for 47115b60a9SPeter Ujfalusi EDMA with 64 channels. See example and 48115b60a9SPeter Ujfalusi Documentation/devicetree/bindings/dma/dma-common.yaml 49115b60a9SPeter Ujfalusi 501be5336bSPeter Ujfalusi 511be5336bSPeter Ujfalusi------------------------------------------------------------------------------ 521be5336bSPeter UjfalusieDMA3 Transfer Controller 531be5336bSPeter Ujfalusi 541be5336bSPeter UjfalusiRequired properties: 55470bbff0SLokesh Vutla-------------------- 56470bbff0SLokesh Vutla- compatible: Should be: 57470bbff0SLokesh Vutla - "ti,edma3-tptc" for the transfer controller(s) on OMAP, 58470bbff0SLokesh Vutla AM33xx and AM43xx SoCs. 59470bbff0SLokesh Vutla - "ti,k2g-edma3-tptc", "ti,edma3-tptc" for the 60470bbff0SLokesh Vutla transfer controller(s) on 66AK2G. 611be5336bSPeter Ujfalusi- reg: Memory map of eDMA TC 621be5336bSPeter Ujfalusi- interrupts: Interrupt number for TCerrint. 631be5336bSPeter Ujfalusi 64470bbff0SLokesh VutlaSoC-specific Required properties: 65470bbff0SLokesh Vutla-------------------------------- 66470bbff0SLokesh VutlaThe following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only: 67470bbff0SLokesh Vutla- ti,hwmods: Name of the hwmods associated to the eDMA TC. 68470bbff0SLokesh Vutla 69470bbff0SLokesh VutlaThe following are mandatory properties for 66AK2G SoCs only: 70470bbff0SLokesh Vutla- power-domains:Should contain a phandle to a PM domain provider node 71470bbff0SLokesh Vutla and an args specifier containing the device id 72470bbff0SLokesh Vutla value. This property is as per the binding, 73*f22145f1SMauro Carvalho Chehab Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml 74470bbff0SLokesh Vutla 751be5336bSPeter UjfalusiOptional properties: 76470bbff0SLokesh Vutla------------------- 771be5336bSPeter Ujfalusi- interrupt-names: "edma3_tcerrint" 781be5336bSPeter Ujfalusi 791be5336bSPeter Ujfalusi------------------------------------------------------------------------------ 80470bbff0SLokesh VutlaExamples: 811be5336bSPeter Ujfalusi 82470bbff0SLokesh Vutla1. 831be5336bSPeter Ujfalusiedma: edma@49000000 { 841be5336bSPeter Ujfalusi compatible = "ti,edma3-tpcc"; 851be5336bSPeter Ujfalusi ti,hwmods = "tpcc"; 861be5336bSPeter Ujfalusi reg = <0x49000000 0x10000>; 871be5336bSPeter Ujfalusi reg-names = "edma3_cc"; 881be5336bSPeter Ujfalusi interrupts = <12 13 14>; 89a5206553SRobert P. J. Day interrupt-names = "edma3_ccint", "edma3_mperr", "edma3_ccerrint"; 901be5336bSPeter Ujfalusi dma-requests = <64>; 911be5336bSPeter Ujfalusi #dma-cells = <2>; 921be5336bSPeter Ujfalusi 931be5336bSPeter Ujfalusi ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>; 941be5336bSPeter Ujfalusi 951be5336bSPeter Ujfalusi /* Channel 20 and 21 is allocated for memcpy */ 96ecb7deceSPeter Ujfalusi ti,edma-memcpy-channels = <20 21>; 97ae0add74SPeter Ujfalusi /* The following PaRAM slots are reserved: 35-44 and 100-109 */ 98ae0add74SPeter Ujfalusi ti,edma-reserved-slot-ranges = <35 10>, <100 10>; 99115b60a9SPeter Ujfalusi /* The following channels are reserved: 35-44 */ 100115b60a9SPeter Ujfalusi dma-channel-mask = <0xffffffff /* Channel 0-31 */ 101115b60a9SPeter Ujfalusi 0xffffe007>; /* Channel 32-63 */ 1021be5336bSPeter Ujfalusi}; 1031be5336bSPeter Ujfalusi 1041be5336bSPeter Ujfalusiedma_tptc0: tptc@49800000 { 1051be5336bSPeter Ujfalusi compatible = "ti,edma3-tptc"; 1061be5336bSPeter Ujfalusi ti,hwmods = "tptc0"; 1071be5336bSPeter Ujfalusi reg = <0x49800000 0x100000>; 1081be5336bSPeter Ujfalusi interrupts = <112>; 1091be5336bSPeter Ujfalusi interrupt-names = "edm3_tcerrint"; 1101be5336bSPeter Ujfalusi}; 1111be5336bSPeter Ujfalusi 1121be5336bSPeter Ujfalusiedma_tptc1: tptc@49900000 { 1131be5336bSPeter Ujfalusi compatible = "ti,edma3-tptc"; 1141be5336bSPeter Ujfalusi ti,hwmods = "tptc1"; 1151be5336bSPeter Ujfalusi reg = <0x49900000 0x100000>; 1161be5336bSPeter Ujfalusi interrupts = <113>; 1171be5336bSPeter Ujfalusi interrupt-names = "edm3_tcerrint"; 1181be5336bSPeter Ujfalusi}; 1191be5336bSPeter Ujfalusi 1201be5336bSPeter Ujfalusiedma_tptc2: tptc@49a00000 { 1211be5336bSPeter Ujfalusi compatible = "ti,edma3-tptc"; 1221be5336bSPeter Ujfalusi ti,hwmods = "tptc2"; 1231be5336bSPeter Ujfalusi reg = <0x49a00000 0x100000>; 1241be5336bSPeter Ujfalusi interrupts = <114>; 1251be5336bSPeter Ujfalusi interrupt-names = "edm3_tcerrint"; 1261be5336bSPeter Ujfalusi}; 1271be5336bSPeter Ujfalusi 1281be5336bSPeter Ujfalusisham: sham@53100000 { 1291be5336bSPeter Ujfalusi compatible = "ti,omap4-sham"; 1301be5336bSPeter Ujfalusi ti,hwmods = "sham"; 1311be5336bSPeter Ujfalusi reg = <0x53100000 0x200>; 1321be5336bSPeter Ujfalusi interrupts = <109>; 1331be5336bSPeter Ujfalusi /* DMA channel 36 executed on eDMA TC0 - low priority queue */ 1341be5336bSPeter Ujfalusi dmas = <&edma 36 0>; 1351be5336bSPeter Ujfalusi dma-names = "rx"; 1361be5336bSPeter Ujfalusi}; 1371be5336bSPeter Ujfalusi 1381be5336bSPeter Ujfalusimcasp0: mcasp@48038000 { 1391be5336bSPeter Ujfalusi compatible = "ti,am33xx-mcasp-audio"; 1401be5336bSPeter Ujfalusi ti,hwmods = "mcasp0"; 1411be5336bSPeter Ujfalusi reg = <0x48038000 0x2000>, 1421be5336bSPeter Ujfalusi <0x46000000 0x400000>; 1431be5336bSPeter Ujfalusi reg-names = "mpu", "dat"; 1441be5336bSPeter Ujfalusi interrupts = <80>, <81>; 1451be5336bSPeter Ujfalusi interrupt-names = "tx", "rx"; 1461be5336bSPeter Ujfalusi /* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */ 1471be5336bSPeter Ujfalusi dmas = <&edma 8 2>, 1481be5336bSPeter Ujfalusi <&edma 9 2>; 1491be5336bSPeter Ujfalusi dma-names = "tx", "rx"; 1501be5336bSPeter Ujfalusi}; 1511be5336bSPeter Ujfalusi 152470bbff0SLokesh Vutla2. 15348c926cdSMarco Franchiedma1: edma@2728000 { 154470bbff0SLokesh Vutla compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc"; 155470bbff0SLokesh Vutla reg = <0x02728000 0x8000>; 156470bbff0SLokesh Vutla reg-names = "edma3_cc"; 157470bbff0SLokesh Vutla interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>, 158470bbff0SLokesh Vutla <GIC_SPI 219 IRQ_TYPE_EDGE_RISING>, 159470bbff0SLokesh Vutla <GIC_SPI 220 IRQ_TYPE_EDGE_RISING>; 160470bbff0SLokesh Vutla interrupt-names = "edma3_ccint", "emda3_mperr", 161470bbff0SLokesh Vutla "edma3_ccerrint"; 162470bbff0SLokesh Vutla dma-requests = <64>; 163470bbff0SLokesh Vutla #dma-cells = <2>; 164470bbff0SLokesh Vutla 165470bbff0SLokesh Vutla ti,tptcs = <&edma1_tptc0 7>, <&edma1_tptc1 0>; 166470bbff0SLokesh Vutla 167470bbff0SLokesh Vutla /* 168470bbff0SLokesh Vutla * memcpy is disabled, can be enabled with: 169470bbff0SLokesh Vutla * ti,edma-memcpy-channels = <12 13 14 15>; 170470bbff0SLokesh Vutla * for example. 171470bbff0SLokesh Vutla */ 172470bbff0SLokesh Vutla 173470bbff0SLokesh Vutla power-domains = <&k2g_pds 0x4f>; 174470bbff0SLokesh Vutla}; 175470bbff0SLokesh Vutla 17648c926cdSMarco Franchiedma1_tptc0: tptc@27b0000 { 177470bbff0SLokesh Vutla compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc"; 178470bbff0SLokesh Vutla reg = <0x027b0000 0x400>; 179470bbff0SLokesh Vutla power-domains = <&k2g_pds 0x4f>; 180470bbff0SLokesh Vutla}; 181470bbff0SLokesh Vutla 18248c926cdSMarco Franchiedma1_tptc1: tptc@27b8000 { 183470bbff0SLokesh Vutla compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc"; 184470bbff0SLokesh Vutla reg = <0x027b8000 0x400>; 185470bbff0SLokesh Vutla power-domains = <&k2g_pds 0x4f>; 186470bbff0SLokesh Vutla}; 187470bbff0SLokesh Vutla 188470bbff0SLokesh Vutlammc0: mmc@23000000 { 189470bbff0SLokesh Vutla compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc"; 190470bbff0SLokesh Vutla reg = <0x23000000 0x400>; 191470bbff0SLokesh Vutla interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>; 192470bbff0SLokesh Vutla dmas = <&edma1 24 0>, <&edma1 25 0>; 193470bbff0SLokesh Vutla dma-names = "tx", "rx"; 194470bbff0SLokesh Vutla bus-width = <4>; 195470bbff0SLokesh Vutla ti,needs-special-reset; 196470bbff0SLokesh Vutla no-1-8-v; 197470bbff0SLokesh Vutla max-frequency = <96000000>; 198470bbff0SLokesh Vutla power-domains = <&k2g_pds 0xb>; 199470bbff0SLokesh Vutla clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>; 200470bbff0SLokesh Vutla clock-names = "fck", "mmchsdb_fck"; 201470bbff0SLokesh Vutla}; 202470bbff0SLokesh Vutla 2031be5336bSPeter Ujfalusi------------------------------------------------------------------------------ 2041be5336bSPeter UjfalusiDEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc 2051be5336bSPeter Ujfalusibinding. 206bf3156ddSMatt Porter 207bf3156ddSMatt PorterRequired properties: 208bf3156ddSMatt Porter- compatible : "ti,edma3" 209bf3156ddSMatt Porter- #dma-cells: Should be set to <1> 210bf3156ddSMatt Porter Clients should use a single channel number per DMA request. 211bf3156ddSMatt Porter- reg: Memory map for accessing module 212bf3156ddSMatt Porter- interrupts: Exactly 3 interrupts need to be specified in the order: 213bf3156ddSMatt Porter 1. Transfer completion interrupt. 214bf3156ddSMatt Porter 2. Memory protection interrupt. 215bf3156ddSMatt Porter 3. Error interrupt. 216bf3156ddSMatt PorterOptional properties: 217bf3156ddSMatt Porter- ti,hwmods: Name of the hwmods associated to the EDMA 218bf3156ddSMatt Porter- ti,edma-xbar-event-map: Crossbar event to channel map 219bf3156ddSMatt Porter 220efc24e14SPeter UjfalusiDeprecated properties: 221efc24e14SPeter UjfalusiListed here in case one wants to boot an old kernel with new DTB. These 222efc24e14SPeter Ujfalusiproperties might need to be added to the new DTS files. 223efc24e14SPeter Ujfalusi- ti,edma-regions: Number of regions 224efc24e14SPeter Ujfalusi- ti,edma-slots: Number of slots 225efc24e14SPeter Ujfalusi- dma-channels: Specify total DMA channels per CC 226efc24e14SPeter Ujfalusi 227bf3156ddSMatt PorterExample: 228bf3156ddSMatt Porter 229bf3156ddSMatt Porteredma: edma@49000000 { 230bf3156ddSMatt Porter reg = <0x49000000 0x10000>; 231bf3156ddSMatt Porter interrupt-parent = <&intc>; 232bf3156ddSMatt Porter interrupts = <12 13 14>; 233bf3156ddSMatt Porter compatible = "ti,edma3"; 234bf3156ddSMatt Porter ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; 235bf3156ddSMatt Porter #dma-cells = <1>; 236cf7eb979SThomas Gleixner ti,edma-xbar-event-map = /bits/ 16 <1 12 237bf3156ddSMatt Porter 2 13>; 238bf3156ddSMatt Porter}; 239