Path: blob/main/sys/contrib/device-tree/Bindings/dma/fsl,edma.yaml
48376 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- items:29- const: fsl,ls1028a-edma30- const: fsl,vf610-edma3132reg:33minItems: 134maxItems: 33536interrupts:37minItems: 138maxItems: 643940interrupt-names:41minItems: 142maxItems: 644344"#dma-cells":45description: |46Specifies the number of cells needed to encode an DMA channel.4748Encode for cells number 2:49cell 0: index of dma channel mux instance.50cell 1: peripheral dma request id.5152Encode for cells number 3:53cell 0: peripheral dma request id.54cell 1: dma channel priority.55cell 2: bitmask, defined at include/dt-bindings/dma/fsl-edma.h56enum:57- 258- 35960dma-channels:61minimum: 162maximum: 646364clocks:65minItems: 166maxItems: 336768clock-names:69minItems: 170maxItems: 337172power-domains:73description:74The number of power domains matches the number of channels, arranged75in ascending order according to their associated DMA channels.76minItems: 177maxItems: 647879big-endian:80description: |81If present registers and hardware scatter/gather descriptors of the82eDMA are implemented in big endian mode, otherwise in little mode.83type: boolean8485required:86- "#dma-cells"87- compatible88- reg89- interrupts90- dma-channels9192allOf:93- $ref: dma-controller.yaml#94- if:95properties:96compatible:97contains:98enum:99- fsl,imx8qm-edma100- fsl,imx93-edma3101- fsl,imx93-edma4102- fsl,imx95-edma5103then:104properties:105"#dma-cells":106const: 3107# It is not necessary to write the interrupt name for each channel.108# instead, you can simply maintain the sequential IRQ numbers as109# defined for the DMA channels.110interrupt-names: false111clock-names:112items:113- const: dma114clocks:115maxItems: 1116117- if:118properties:119compatible:120contains:121const: fsl,vf610-edma122then:123properties:124clocks:125minItems: 2126maxItems: 2127clock-names:128items:129- const: dmamux0130- const: dmamux1131interrupts:132minItems: 2133maxItems: 2134interrupt-names:135items:136- const: edma-tx137- const: edma-err138reg:139minItems: 2140maxItems: 3141"#dma-cells":142const: 2143dma-channels:144const: 32145146- if:147properties:148compatible:149contains:150const: fsl,imx7ulp-edma151then:152properties:153clock:154minItems: 2155maxItems: 2156clock-names:157items:158- const: dma159- const: dmamux0160interrupts:161minItems: 2162maxItems: 17163reg:164minItems: 2165maxItems: 2166"#dma-cells":167const: 2168dma-channels:169const: 32170171- if:172properties:173compatible:174contains:175const: fsl,imx8ulp-edma176then:177properties:178clocks:179minItems: 33180clock-names:181minItems: 33182items:183oneOf:184- const: dma185- pattern: "^ch(0[0-9]|[1-2][0-9]|3[01])$"186187interrupt-names: false188interrupts:189minItems: 32190"#dma-cells":191const: 3192193- if:194properties:195compatible:196contains:197enum:198- fsl,vf610-edma199- fsl,imx7ulp-edma200- fsl,imx93-edma3201- fsl,imx93-edma4202- fsl,imx95-edma5203- fsl,imx8ulp-edma204- fsl,ls1028a-edma205then:206required:207- clocks208209- if:210properties:211compatible:212contains:213enum:214- fsl,imx8qm-adma215- fsl,imx8qm-edma216then:217required:218- power-domains219else:220properties:221power-domains: false222223unevaluatedProperties: false224225examples:226- |227#include <dt-bindings/interrupt-controller/arm-gic.h>228#include <dt-bindings/clock/vf610-clock.h>229230edma0: dma-controller@40018000 {231#dma-cells = <2>;232compatible = "fsl,vf610-edma";233reg = <0x40018000 0x2000>,234<0x40024000 0x1000>,235<0x40025000 0x1000>;236interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>,237<0 9 IRQ_TYPE_LEVEL_HIGH>;238interrupt-names = "edma-tx", "edma-err";239dma-channels = <32>;240clock-names = "dmamux0", "dmamux1";241clocks = <&clks VF610_CLK_DMAMUX0>, <&clks VF610_CLK_DMAMUX1>;242};243244- |245#include <dt-bindings/interrupt-controller/arm-gic.h>246#include <dt-bindings/clock/imx7ulp-clock.h>247248edma1: dma-controller@40080000 {249#dma-cells = <2>;250compatible = "fsl,imx7ulp-edma";251reg = <0x40080000 0x2000>,252<0x40210000 0x1000>;253dma-channels = <32>;254interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,255<GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,256<GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,257<GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,258<GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,259<GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,260<GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,261<GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,262<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,263<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,264<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,265<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,266<GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,267<GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,268<GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,269<GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,270/* last is eDMA2-ERR interrupt */271<GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;272clock-names = "dma", "dmamux0";273clocks = <&pcc2 IMX7ULP_CLK_DMA1>, <&pcc2 IMX7ULP_CLK_DMA_MUX1>;274};275276- |277#include <dt-bindings/interrupt-controller/arm-gic.h>278#include <dt-bindings/firmware/imx/rsrc.h>279280dma-controller@5a9f0000 {281compatible = "fsl,imx8qm-edma";282reg = <0x5a9f0000 0x90000>;283#dma-cells = <3>;284dma-channels = <8>;285interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,286<GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,287<GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH>,288<GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH>,289<GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH>,290<GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,291<GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>,292<GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH>;293power-domains = <&pd IMX_SC_R_DMA_3_CH0>,294<&pd IMX_SC_R_DMA_3_CH1>,295<&pd IMX_SC_R_DMA_3_CH2>,296<&pd IMX_SC_R_DMA_3_CH3>,297<&pd IMX_SC_R_DMA_3_CH4>,298<&pd IMX_SC_R_DMA_3_CH5>,299<&pd IMX_SC_R_DMA_3_CH6>,300<&pd IMX_SC_R_DMA_3_CH7>;301};302303304