Path: blob/master/Documentation/devicetree/bindings/dma/fsl,edma.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/dma/fsl,edma.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Freescale enhanced Direct Memory Access(eDMA) Controller78description: |9The eDMA channels have multiplex capability by programmable10memory-mapped registers. channels are split into two groups, called11DMAMUX0 and DMAMUX1, specific DMA request source can only be multiplexed12by any channel of certain group, DMAMUX0 or DMAMUX1, but not both.1314maintainers:15- Peng Fan <peng.fan@nxp.com>1617properties:18compatible:19oneOf:20- enum:21- fsl,vf610-edma22- fsl,imx7ulp-edma23- fsl,imx8qm-edma24- fsl,imx8ulp-edma25- fsl,imx93-edma326- fsl,imx93-edma427- fsl,imx95-edma528- nxp,s32g2-edma29- items:30- enum:31- fsl,imx94-edma332- const: fsl,imx93-edma333- items:34- enum:35- fsl,imx94-edma536- const: fsl,imx95-edma537- items:38- const: fsl,ls1028a-edma39- const: fsl,vf610-edma40- items:41- const: nxp,s32g3-edma42- const: nxp,s32g2-edma4344reg:45minItems: 146maxItems: 34748interrupts:49minItems: 150maxItems: 655152interrupt-names:53minItems: 154maxItems: 655556"#dma-cells":57description: |58Specifies the number of cells needed to encode an DMA channel.5960Encode for cells number 2:61cell 0: index of dma channel mux instance.62cell 1: peripheral dma request id.6364Encode for cells number 3:65cell 0: peripheral dma request id.66cell 1: dma channel priority.67cell 2: bitmask, defined at include/dt-bindings/dma/fsl-edma.h68enum:69- 270- 37172dma-channels:73minimum: 174maximum: 647576clocks:77minItems: 178maxItems: 337980clock-names:81minItems: 182maxItems: 338384power-domains:85description:86The number of power domains matches the number of channels, arranged87in ascending order according to their associated DMA channels.88minItems: 189maxItems: 649091big-endian:92description: |93If present registers and hardware scatter/gather descriptors of the94eDMA are implemented in big endian mode, otherwise in little mode.95type: boolean9697required:98- "#dma-cells"99- compatible100- reg101- interrupts102- dma-channels103104allOf:105- $ref: dma-controller.yaml#106- if:107properties:108compatible:109contains:110enum:111- fsl,imx8qm-edma112- fsl,imx93-edma3113- fsl,imx93-edma4114- fsl,imx95-edma5115then:116properties:117"#dma-cells":118const: 3119# It is not necessary to write the interrupt name for each channel.120# instead, you can simply maintain the sequential IRQ numbers as121# defined for the DMA channels.122interrupt-names: false123clock-names:124items:125- const: dma126clocks:127maxItems: 1128129- if:130properties:131compatible:132contains:133const: fsl,vf610-edma134then:135properties:136clocks:137minItems: 2138maxItems: 2139clock-names:140items:141- const: dmamux0142- const: dmamux1143interrupts:144minItems: 2145maxItems: 2146interrupt-names:147items:148- const: edma-tx149- const: edma-err150reg:151minItems: 2152maxItems: 3153"#dma-cells":154const: 2155dma-channels:156const: 32157158- if:159properties:160compatible:161contains:162const: fsl,imx7ulp-edma163then:164properties:165clock:166minItems: 2167maxItems: 2168clock-names:169items:170- const: dma171- const: dmamux0172interrupts:173minItems: 2174maxItems: 17175reg:176minItems: 2177maxItems: 2178"#dma-cells":179const: 2180dma-channels:181const: 32182183- if:184properties:185compatible:186contains:187const: fsl,imx8ulp-edma188then:189properties:190clocks:191minItems: 33192clock-names:193minItems: 33194items:195oneOf:196- const: dma197- pattern: "^ch(0[0-9]|[1-2][0-9]|3[01])$"198199interrupt-names: false200interrupts:201minItems: 32202"#dma-cells":203const: 3204205- if:206properties:207compatible:208contains:209enum:210- fsl,vf610-edma211- fsl,imx7ulp-edma212- fsl,imx93-edma3213- fsl,imx93-edma4214- fsl,imx95-edma5215- fsl,imx8ulp-edma216- fsl,ls1028a-edma217then:218required:219- clocks220221- if:222properties:223compatible:224contains:225enum:226- fsl,imx8qm-adma227- fsl,imx8qm-edma228then:229required:230- power-domains231else:232properties:233power-domains: false234235- if:236properties:237compatible:238contains:239const: nxp,s32g2-edma240then:241properties:242clocks:243minItems: 2244maxItems: 2245clock-names:246items:247- const: dmamux0248- const: dmamux1249interrupts:250minItems: 3251maxItems: 3252interrupt-names:253items:254- const: tx-0-15255- const: tx-16-31256- const: err257reg:258minItems: 3259maxItems: 3260"#dma-cells":261const: 2262dma-channels:263const: 32264265unevaluatedProperties: false266267examples:268- |269#include <dt-bindings/interrupt-controller/arm-gic.h>270#include <dt-bindings/clock/vf610-clock.h>271272edma0: dma-controller@40018000 {273#dma-cells = <2>;274compatible = "fsl,vf610-edma";275reg = <0x40018000 0x2000>,276<0x40024000 0x1000>,277<0x40025000 0x1000>;278interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>,279<0 9 IRQ_TYPE_LEVEL_HIGH>;280interrupt-names = "edma-tx", "edma-err";281dma-channels = <32>;282clock-names = "dmamux0", "dmamux1";283clocks = <&clks VF610_CLK_DMAMUX0>, <&clks VF610_CLK_DMAMUX1>;284};285286- |287#include <dt-bindings/interrupt-controller/arm-gic.h>288#include <dt-bindings/clock/imx7ulp-clock.h>289290edma1: dma-controller@40080000 {291#dma-cells = <2>;292compatible = "fsl,imx7ulp-edma";293reg = <0x40080000 0x2000>,294<0x40210000 0x1000>;295dma-channels = <32>;296interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,297<GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,298<GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,299<GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,300<GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,301<GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,302<GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,303<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,304<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,305<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,306<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,307<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,308<GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,309<GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,310<GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,311<GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,312/* last is eDMA2-ERR interrupt */313<GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;314clock-names = "dma", "dmamux0";315clocks = <&pcc2 IMX7ULP_CLK_DMA1>, <&pcc2 IMX7ULP_CLK_DMA_MUX1>;316};317318- |319#include <dt-bindings/interrupt-controller/arm-gic.h>320#include <dt-bindings/firmware/imx/rsrc.h>321322dma-controller@5a9f0000 {323compatible = "fsl,imx8qm-edma";324reg = <0x5a9f0000 0x90000>;325#dma-cells = <3>;326dma-channels = <8>;327interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,328<GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,329<GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,330<GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,331<GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,332<GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,333<GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,334<GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;335power-domains = <&pd IMX_SC_R_DMA_3_CH0>,336<&pd IMX_SC_R_DMA_3_CH1>,337<&pd IMX_SC_R_DMA_3_CH2>,338<&pd IMX_SC_R_DMA_3_CH3>,339<&pd IMX_SC_R_DMA_3_CH4>,340<&pd IMX_SC_R_DMA_3_CH5>,341<&pd IMX_SC_R_DMA_3_CH6>,342<&pd IMX_SC_R_DMA_3_CH7>;343};344345346