Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: dma: fsl-edma: Convert to DT schema

Convert the eDMA controller binding to DT schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220620020002.3966343-1-peng.fan@oss.nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Peng Fan and committed by
Vinod Koul
cfa1927f a7a5c1a9

+155 -111
+155
Documentation/devicetree/bindings/dma/fsl,edma.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/dma/fsl,edma.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale enhanced Direct Memory Access(eDMA) Controller 8 + 9 + description: | 10 + The eDMA channels have multiplex capability by programmable 11 + memory-mapped registers. channels are split into two groups, called 12 + DMAMUX0 and DMAMUX1, specific DMA request source can only be multiplexed 13 + by any channel of certain group, DMAMUX0 or DMAMUX1, but not both. 14 + 15 + maintainers: 16 + - Peng Fan <peng.fan@nxp.com> 17 + 18 + properties: 19 + compatible: 20 + oneOf: 21 + - enum: 22 + - fsl,vf610-edma 23 + - fsl,imx7ulp-edma 24 + - items: 25 + - const: fsl,ls1028a-edma 26 + - const: fsl,vf610-edma 27 + 28 + reg: 29 + minItems: 2 30 + maxItems: 3 31 + 32 + interrupts: 33 + minItems: 2 34 + maxItems: 17 35 + 36 + interrupt-names: 37 + minItems: 2 38 + maxItems: 17 39 + 40 + "#dma-cells": 41 + const: 2 42 + 43 + dma-channels: 44 + const: 32 45 + 46 + clocks: 47 + maxItems: 2 48 + 49 + clock-names: 50 + maxItems: 2 51 + 52 + big-endian: 53 + description: | 54 + If present registers and hardware scatter/gather descriptors of the 55 + eDMA are implemented in big endian mode, otherwise in little mode. 56 + type: boolean 57 + 58 + required: 59 + - "#dma-cells" 60 + - compatible 61 + - reg 62 + - interrupts 63 + - clocks 64 + - dma-channels 65 + 66 + allOf: 67 + - $ref: "dma-controller.yaml#" 68 + - if: 69 + properties: 70 + compatible: 71 + contains: 72 + const: fsl,vf610-edma 73 + then: 74 + properties: 75 + clock-names: 76 + items: 77 + - const: dmamux0 78 + - const: dmamux1 79 + interrupts: 80 + maxItems: 2 81 + interrupt-names: 82 + items: 83 + - const: edma-tx 84 + - const: edma-err 85 + reg: 86 + maxItems: 3 87 + 88 + - if: 89 + properties: 90 + compatible: 91 + contains: 92 + const: fsl,imx7ulp-edma 93 + then: 94 + properties: 95 + clock-names: 96 + items: 97 + - const: dma 98 + - const: dmamux0 99 + interrupts: 100 + maxItems: 17 101 + reg: 102 + maxItems: 2 103 + 104 + unevaluatedProperties: false 105 + 106 + examples: 107 + - | 108 + #include <dt-bindings/interrupt-controller/arm-gic.h> 109 + #include <dt-bindings/clock/vf610-clock.h> 110 + 111 + edma0: dma-controller@40018000 { 112 + #dma-cells = <2>; 113 + compatible = "fsl,vf610-edma"; 114 + reg = <0x40018000 0x2000>, 115 + <0x40024000 0x1000>, 116 + <0x40025000 0x1000>; 117 + interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>, 118 + <0 9 IRQ_TYPE_LEVEL_HIGH>; 119 + interrupt-names = "edma-tx", "edma-err"; 120 + dma-channels = <32>; 121 + clock-names = "dmamux0", "dmamux1"; 122 + clocks = <&clks VF610_CLK_DMAMUX0>, <&clks VF610_CLK_DMAMUX1>; 123 + }; 124 + 125 + - | 126 + #include <dt-bindings/interrupt-controller/arm-gic.h> 127 + #include <dt-bindings/clock/imx7ulp-clock.h> 128 + 129 + edma1: dma-controller@40080000 { 130 + #dma-cells = <2>; 131 + compatible = "fsl,imx7ulp-edma"; 132 + reg = <0x40080000 0x2000>, 133 + <0x40210000 0x1000>; 134 + dma-channels = <32>; 135 + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, 136 + <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, 137 + <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, 138 + <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, 139 + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, 140 + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, 141 + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 142 + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 143 + <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, 144 + <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 145 + <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, 146 + <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 147 + <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, 148 + <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, 149 + <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, 150 + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 151 + /* last is eDMA2-ERR interrupt */ 152 + <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 153 + clock-names = "dma", "dmamux0"; 154 + clocks = <&pcc2 IMX7ULP_CLK_DMA1>, <&pcc2 IMX7ULP_CLK_DMA_MUX1>; 155 + };
-111
Documentation/devicetree/bindings/dma/fsl-edma.txt
··· 1 - * Freescale enhanced Direct Memory Access(eDMA) Controller 2 - 3 - The eDMA channels have multiplex capability by programmble memory-mapped 4 - registers. channels are split into two groups, called DMAMUX0 and DMAMUX1, 5 - specific DMA request source can only be multiplexed by any channel of certain 6 - group, DMAMUX0 or DMAMUX1, but not both. 7 - 8 - * eDMA Controller 9 - Required properties: 10 - - compatible : 11 - - "fsl,vf610-edma" for eDMA used similar to that on Vybrid vf610 SoC 12 - - "fsl,imx7ulp-edma" for eDMA2 used similar to that on i.mx7ulp 13 - - "fsl,ls1028a-edma" followed by "fsl,vf610-edma" for eDMA used on the 14 - LS1028A SoC. 15 - - reg : Specifies base physical address(s) and size of the eDMA registers. 16 - The 1st region is eDMA control register's address and size. 17 - The 2nd and the 3rd regions are programmable channel multiplexing 18 - control register's address and size. 19 - - interrupts : A list of interrupt-specifiers, one for each entry in 20 - interrupt-names on vf610 similar SoC. But for i.mx7ulp per channel 21 - per transmission interrupt, total 16 channel interrupt and 1 22 - error interrupt(located in the last), no interrupt-names list on 23 - i.mx7ulp for clean on dts. 24 - - #dma-cells : Must be <2>. 25 - The 1st cell specifies the DMAMUX(0 for DMAMUX0 and 1 for DMAMUX1). 26 - Specific request source can only be multiplexed by specific channels 27 - group called DMAMUX. 28 - The 2nd cell specifies the request source(slot) ID. 29 - See the SoC's reference manual for all the supported request sources. 30 - - dma-channels : Number of channels supported by the controller 31 - - clock-names : A list of channel group clock names. Should contain: 32 - "dmamux0" - clock name of mux0 group 33 - "dmamux1" - clock name of mux1 group 34 - Note: No dmamux0 on i.mx7ulp, but another 'dma' clk added on i.mx7ulp. 35 - - clocks : A list of phandle and clock-specifier pairs, one for each entry in 36 - clock-names. 37 - 38 - Optional properties: 39 - - big-endian: If present registers and hardware scatter/gather descriptors 40 - of the eDMA are implemented in big endian mode, otherwise in little 41 - mode. 42 - - interrupt-names : Should contain the below on vf610 similar SoC but not used 43 - on i.mx7ulp similar SoC: 44 - "edma-tx" - the transmission interrupt 45 - "edma-err" - the error interrupt 46 - 47 - 48 - Examples: 49 - 50 - edma0: dma-controller@40018000 { 51 - #dma-cells = <2>; 52 - compatible = "fsl,vf610-edma"; 53 - reg = <0x40018000 0x2000>, 54 - <0x40024000 0x1000>, 55 - <0x40025000 0x1000>; 56 - interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>, 57 - <0 9 IRQ_TYPE_LEVEL_HIGH>; 58 - interrupt-names = "edma-tx", "edma-err"; 59 - dma-channels = <32>; 60 - clock-names = "dmamux0", "dmamux1"; 61 - clocks = <&clks VF610_CLK_DMAMUX0>, 62 - <&clks VF610_CLK_DMAMUX1>; 63 - }; /* vf610 */ 64 - 65 - edma1: dma-controller@40080000 { 66 - #dma-cells = <2>; 67 - compatible = "fsl,imx7ulp-edma"; 68 - reg = <0x40080000 0x2000>, 69 - <0x40210000 0x1000>; 70 - dma-channels = <32>; 71 - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, 72 - <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, 73 - <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, 74 - <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, 75 - <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, 76 - <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, 77 - <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 78 - <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 79 - <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, 80 - <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 81 - <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, 82 - <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 83 - <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, 84 - <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, 85 - <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, 86 - <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 87 - /* last is eDMA2-ERR interrupt */ 88 - <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 89 - clock-names = "dma", "dmamux0"; 90 - clocks = <&pcc2 IMX7ULP_CLK_DMA1>, 91 - <&pcc2 IMX7ULP_CLK_DMA_MUX1>; 92 - }; /* i.mx7ulp */ 93 - 94 - * DMA clients 95 - DMA client drivers that uses the DMA function must use the format described 96 - in the dma.txt file, using a two-cell specifier for each channel: the 1st 97 - specifies the channel group(DMAMUX) in which this request can be multiplexed, 98 - and the 2nd specifies the request source. 99 - 100 - Examples: 101 - 102 - sai2: sai@40031000 { 103 - compatible = "fsl,vf610-sai"; 104 - reg = <0x40031000 0x1000>; 105 - interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; 106 - clock-names = "sai"; 107 - clocks = <&clks VF610_CLK_SAI2>; 108 - dma-names = "tx", "rx"; 109 - dmas = <&edma0 0 21>, 110 - <&edma0 0 20>; 111 - };