18c2ecf20Sopenharmony_ci* SHDMA Device Tree bindings 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciSh-/r-mobile and R-Car systems often have multiple identical DMA controller 48c2ecf20Sopenharmony_ciinstances, capable of serving any of a common set of DMA slave devices, using 58c2ecf20Sopenharmony_cithe same configuration. To describe this topology we require all compatible 68c2ecf20Sopenharmony_ciSHDMA DT nodes to be placed under a DMA multiplexer node. All such compatible 78c2ecf20Sopenharmony_ciDMAC instances have the same number of channels and use the same DMA 88c2ecf20Sopenharmony_cidescriptors. Therefore respective DMA DT bindings can also all be placed in the 98c2ecf20Sopenharmony_cimultiplexer node. Even if there is only one such DMAC instance on a system, it 108c2ecf20Sopenharmony_cistill has to be placed under such a multiplexer node. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci* DMA multiplexer 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciRequired properties: 158c2ecf20Sopenharmony_ci- compatible: should be "renesas,shdma-mux" 168c2ecf20Sopenharmony_ci- #dma-cells: should be <1>, see "dmas" property below 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciOptional properties (currently unused): 198c2ecf20Sopenharmony_ci- dma-channels: number of DMA channels 208c2ecf20Sopenharmony_ci- dma-requests: number of DMA request signals 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci* DMA controller 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciRequired properties: 258c2ecf20Sopenharmony_ci- compatible: should be of the form "renesas,shdma-<soc>", where <soc> should 268c2ecf20Sopenharmony_ci be replaced with the desired SoC model, e.g. 278c2ecf20Sopenharmony_ci "renesas,shdma-r8a73a4" for the system DMAC on r8a73a4 SoC 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciExample: 308c2ecf20Sopenharmony_ci dmac: dma-multiplexer@0 { 318c2ecf20Sopenharmony_ci compatible = "renesas,shdma-mux"; 328c2ecf20Sopenharmony_ci #dma-cells = <1>; 338c2ecf20Sopenharmony_ci dma-channels = <20>; 348c2ecf20Sopenharmony_ci dma-requests = <256>; 358c2ecf20Sopenharmony_ci #address-cells = <2>; 368c2ecf20Sopenharmony_ci #size-cells = <2>; 378c2ecf20Sopenharmony_ci ranges; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci dma0: dma-controller@e6700020 { 408c2ecf20Sopenharmony_ci compatible = "renesas,shdma-r8a73a4"; 418c2ecf20Sopenharmony_ci reg = <0 0xe6700020 0 0x89e0>; 428c2ecf20Sopenharmony_ci interrupt-parent = <&gic>; 438c2ecf20Sopenharmony_ci interrupts = <0 220 4 448c2ecf20Sopenharmony_ci 0 200 4 458c2ecf20Sopenharmony_ci 0 201 4 468c2ecf20Sopenharmony_ci 0 202 4 478c2ecf20Sopenharmony_ci 0 203 4 488c2ecf20Sopenharmony_ci 0 204 4 498c2ecf20Sopenharmony_ci 0 205 4 508c2ecf20Sopenharmony_ci 0 206 4 518c2ecf20Sopenharmony_ci 0 207 4 528c2ecf20Sopenharmony_ci 0 208 4 538c2ecf20Sopenharmony_ci 0 209 4 548c2ecf20Sopenharmony_ci 0 210 4 558c2ecf20Sopenharmony_ci 0 211 4 568c2ecf20Sopenharmony_ci 0 212 4 578c2ecf20Sopenharmony_ci 0 213 4 588c2ecf20Sopenharmony_ci 0 214 4 598c2ecf20Sopenharmony_ci 0 215 4 608c2ecf20Sopenharmony_ci 0 216 4 618c2ecf20Sopenharmony_ci 0 217 4 628c2ecf20Sopenharmony_ci 0 218 4 638c2ecf20Sopenharmony_ci 0 219 4>; 648c2ecf20Sopenharmony_ci interrupt-names = "error", 658c2ecf20Sopenharmony_ci "ch0", "ch1", "ch2", "ch3", 668c2ecf20Sopenharmony_ci "ch4", "ch5", "ch6", "ch7", 678c2ecf20Sopenharmony_ci "ch8", "ch9", "ch10", "ch11", 688c2ecf20Sopenharmony_ci "ch12", "ch13", "ch14", "ch15", 698c2ecf20Sopenharmony_ci "ch16", "ch17", "ch18", "ch19"; 708c2ecf20Sopenharmony_ci }; 718c2ecf20Sopenharmony_ci }; 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci* DMA client 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ciRequired properties: 768c2ecf20Sopenharmony_ci- dmas: a list of <[DMA multiplexer phandle] [MID/RID value]> pairs, 778c2ecf20Sopenharmony_ci where MID/RID values are fixed handles, specified in the SoC 788c2ecf20Sopenharmony_ci manual 798c2ecf20Sopenharmony_ci- dma-names: a list of DMA channel names, one per "dmas" entry 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ciExample: 828c2ecf20Sopenharmony_ci dmas = <&dmac 0xd1 838c2ecf20Sopenharmony_ci &dmac 0xd2>; 848c2ecf20Sopenharmony_ci dma-names = "tx", "rx"; 85