← Documents Documentation/devicetree/bindings/dma/ti-edma.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Texas Instruments eDMA3

eDMA3 Channel Controller, Transfer Controller와 폐기된 단일-node 형식의 바인딩입니다.

Source pathDocumentation/devicetree/bindings/dma/ti-edma.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

ti-edma.txt:1-238

CC/TC 분리 구조, channel/PaRAM 예약, OMAP 및 K2G client 예제를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Texas Instruments eDMA
2
3 The eDMA3 consists of two components: Channel controller (CC) and Transfer
4 Controller(s) (TC). The CC is the main entry for DMA users since it is
5 responsible for the DMA channel handling, while the TCs are responsible to
6 execute the actual DMA tansfer.
7
8 ------------------------------------------------------------------------------
9 eDMA3 Channel Controller
10
11 Required properties:
12 --------------------
13 - compatible: Should be:
14 - "ti,edma3-tpcc" for the channel controller(s) on OMAP,
15 AM33xx and AM43xx SoCs.
16 - "ti,k2g-edma3-tpcc", "ti,edma3-tpcc" for the
17 channel controller(s) on 66AK2G.
18 - #dma-cells: Should be set to <2>. The first number is the DMA request
19 number and the second is the TC the channel is serviced on.
20 - reg: Memory map of eDMA CC
21 - reg-names: "edma3_cc"
22 - interrupts: Interrupt lines for CCINT, MPERR and CCERRINT.
23 - interrupt-names: "edma3_ccint", "edma3_mperr" and "edma3_ccerrint"
24 - ti,tptcs: List of TPTCs associated with the eDMA in the following form:
25 <&tptc_phandle TC_priority_number>. The highest priority is 0.
26
27 SoC-specific Required properties:
28 --------------------------------
29 The following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:
30 - ti,hwmods: Name of the hwmods associated to the eDMA CC.
31
32 The following are mandatory properties for 66AK2G SoCs only:
33 - power-domains:Should contain a phandle to a PM domain provider node
34 and an args specifier containing the device id
35 value. This property is as per the binding,
36 Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
37
38 Optional properties:
39 -------------------
40 - ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow
41 these channels will be SW triggered channels. See example.
42 - ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by
43 the driver, they are allocated to be used by for example the
44 DSP. See example.
45 - dma-channel-mask: Mask of usable channels.
46 Single uint32 for EDMA with 32 channels, array of two uint32 for
47 EDMA with 64 channels. See example and
48 Documentation/devicetree/bindings/dma/dma-common.yaml
49
50
51 ------------------------------------------------------------------------------
52 eDMA3 Transfer Controller
53
54 Required properties:
55 --------------------
56 - compatible: Should be:
57 - "ti,edma3-tptc" for the transfer controller(s) on OMAP,
58 AM33xx and AM43xx SoCs.
59 - "ti,k2g-edma3-tptc", "ti,edma3-tptc" for the
60 transfer controller(s) on 66AK2G.
61 - reg: Memory map of eDMA TC
62 - interrupts: Interrupt number for TCerrint.
63
64 SoC-specific Required properties:
65 --------------------------------
66 The following are mandatory properties for OMAP, AM33xx and AM43xx SoCs only:
67 - ti,hwmods: Name of the hwmods associated to the eDMA TC.
68
69 The following are mandatory properties for 66AK2G SoCs only:
70 - power-domains:Should contain a phandle to a PM domain provider node
71 and an args specifier containing the device id
72 value. This property is as per the binding,
73 Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml
74
75 Optional properties:
76 -------------------
77 - interrupt-names: "edma3_tcerrint"
78
79 ------------------------------------------------------------------------------
80 Examples:
81
82 1.
83 edma: edma@49000000 {
84 compatible = "ti,edma3-tpcc";
85 ti,hwmods = "tpcc";
86 reg = <0x49000000 0x10000>;
87 reg-names = "edma3_cc";
88 interrupts = <12 13 14>;
89 interrupt-names = "edma3_ccint", "edma3_mperr", "edma3_ccerrint";
90 dma-requests = <64>;
91 #dma-cells = <2>;
92
93 ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;
94
95 /* Channel 20 and 21 is allocated for memcpy */
96 ti,edma-memcpy-channels = <20 21>;
97 /* The following PaRAM slots are reserved: 35-44 and 100-109 */
98 ti,edma-reserved-slot-ranges = <35 10>, <100 10>;
99 /* The following channels are reserved: 35-44 */
100 dma-channel-mask = <0xffffffff /* Channel 0-31 */
101 0xffffe007>; /* Channel 32-63 */
102 };
103
104 edma_tptc0: tptc@49800000 {
105 compatible = "ti,edma3-tptc";
106 ti,hwmods = "tptc0";
107 reg = <0x49800000 0x100000>;
108 interrupts = <112>;
109 interrupt-names = "edm3_tcerrint";
110 };
111
112 edma_tptc1: tptc@49900000 {
113 compatible = "ti,edma3-tptc";
114 ti,hwmods = "tptc1";
115 reg = <0x49900000 0x100000>;
116 interrupts = <113>;
117 interrupt-names = "edm3_tcerrint";
118 };
119
120 edma_tptc2: tptc@49a00000 {
121 compatible = "ti,edma3-tptc";
122 ti,hwmods = "tptc2";
123 reg = <0x49a00000 0x100000>;
124 interrupts = <114>;
125 interrupt-names = "edm3_tcerrint";
126 };
127
128 sham: sham@53100000 {
129 compatible = "ti,omap4-sham";
130 ti,hwmods = "sham";
131 reg = <0x53100000 0x200>;
132 interrupts = <109>;
133 /* DMA channel 36 executed on eDMA TC0 - low priority queue */
134 dmas = <&edma 36 0>;
135 dma-names = "rx";
136 };
137
138 mcasp0: mcasp@48038000 {
139 compatible = "ti,am33xx-mcasp-audio";
140 ti,hwmods = "mcasp0";
141 reg = <0x48038000 0x2000>,
142 <0x46000000 0x400000>;
143 reg-names = "mpu", "dat";
144 interrupts = <80>, <81>;
145 interrupt-names = "tx", "rx";
146 /* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */
147 dmas = <&edma 8 2>,
148 <&edma 9 2>;
149 dma-names = "tx", "rx";
150 };
151
152 2.
153 edma1: edma@2728000 {
154 compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc";
155 reg = <0x02728000 0x8000>;
156 reg-names = "edma3_cc";
157 interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
158 <GIC_SPI 219 IRQ_TYPE_EDGE_RISING>,
159 <GIC_SPI 220 IRQ_TYPE_EDGE_RISING>;
160 interrupt-names = "edma3_ccint", "emda3_mperr",
161 "edma3_ccerrint";
162 dma-requests = <64>;
163 #dma-cells = <2>;
164
165 ti,tptcs = <&edma1_tptc0 7>, <&edma1_tptc1 0>;
166
167 /*
168 * memcpy is disabled, can be enabled with:
169 * ti,edma-memcpy-channels = <12 13 14 15>;
170 * for example.
171 */
172
173 power-domains = <&k2g_pds 0x4f>;
174 };
175
176 edma1_tptc0: tptc@27b0000 {
177 compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
178 reg = <0x027b0000 0x400>;
179 power-domains = <&k2g_pds 0x4f>;
180 };
181
182 edma1_tptc1: tptc@27b8000 {
183 compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
184 reg = <0x027b8000 0x400>;
185 power-domains = <&k2g_pds 0x4f>;
186 };
187
188 mmc0: mmc@23000000 {
189 compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
190 reg = <0x23000000 0x400>;
191 interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>;
192 dmas = <&edma1 24 0>, <&edma1 25 0>;
193 dma-names = "tx", "rx";
194 bus-width = <4>;
195 ti,needs-special-reset;
196 no-1-8-v;
197 max-frequency = <96000000>;
198 power-domains = <&k2g_pds 0xb>;
199 clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>;
200 clock-names = "fck", "mmchsdb_fck";
201 };
202
203 ------------------------------------------------------------------------------
204 DEPRECATED binding, new DTS files must use the ti,edma3-tpcc/ti,edma3-tptc
205 binding.
206
207 Required properties:
208 - compatible : "ti,edma3"
209 - #dma-cells: Should be set to <1>
210 Clients should use a single channel number per DMA request.
211 - reg: Memory map for accessing module
212 - interrupts: Exactly 3 interrupts need to be specified in the order:
213 1. Transfer completion interrupt.
214 2. Memory protection interrupt.
215 3. Error interrupt.
216 Optional properties:
217 - ti,hwmods: Name of the hwmods associated to the EDMA
218 - ti,edma-xbar-event-map: Crossbar event to channel map
219
220 Deprecated properties:
221 Listed here in case one wants to boot an old kernel with new DTB. These
222 properties might need to be added to the new DTS files.
223 - ti,edma-regions: Number of regions
224 - ti,edma-slots: Number of slots
225 - dma-channels: Specify total DMA channels per CC
226
227 Example:
228
229 edma: edma@49000000 {
230 reg = <0x49000000 0x10000>;
231 interrupt-parent = <&intc>;
232 interrupts = <12 13 14>;
233 compatible = "ti,edma3";
234 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
235 #dma-cells = <1>;
236 ti,edma-xbar-event-map = /bits/ 16 <1 12
237 2 13>;
238 };
239

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

eDMA3 Channel Controller

1-49

Texas Instruments eDMA3는 Channel Controller(CC)와 하나 이상의 Transfer Controller(TC)로 구성됩니다. CC는 DMA channel을 관리하므로 DMA 사용자의 주 진입점이고, TC는 실제 DMA transfer를 수행합니다.

eDMA3 Channel Controller의 `compatible`은 OMAP, AM33xx, AM43xx에서 `ti,edma3-tpcc`이고, 66AK2G에서는 `ti,k2g-edma3-tpcc`, `ti,edma3-tpcc` 조합입니다. `#dma-cells = <2>`에서 첫 번째 수는 DMA request 번호, 두 번째 수는 channel을 처리할 TC입니다.

`reg`는 eDMA CC memory map, `reg-names`는 `edma3_cc`입니다. `interrupts`에는 CCINT, MPERR, CCERRINT line을 넣고 `interrupt-names`는 각각 `edma3_ccint`, `edma3_mperr`, `edma3_ccerrint`입니다. `ti,tptcs`는 `<&tptc_phandle TC_priority_number>` 형식으로 연결된 TPTC를 나열하며 가장 높은 priority는 0입니다.

OMAP, AM33xx, AM43xx에서는 CC에 연결된 hwmod 이름인 `ti,hwmods`가 필수입니다. 66AK2G에서는 PM domain provider phandle과 device ID argument를 담는 `power-domains`가 필수이며 형식은 `Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml`을 따릅니다.

선택 `ti,edma-memcpy-channels`는 software-triggered `memcpy`에 할당할 channel 목록입니다. `ti,edma-reserved-slot-ranges`는 DSP 등의 다른 사용자가 차지하여 driver가 쓰면 안 되는 PaRAM slot range입니다. `dma-channel-mask`는 사용 가능한 channel mask로, 32-channel EDMA에서는 uint32 하나, 64-channel EDMA에서는 uint32 두 개를 사용하며 `Documentation/devicetree/bindings/dma/dma-common.yaml`도 참조합니다.

eDMA3 controller pipeline
DMA clientRequest number + TC index
Channel ControllerChannel and PaRAM management
Transfer ControllerPriority-selected execution
Memory or peripheralActual data transfer

DMA request가 CC의 channel 선택과 TC priority queue를 거쳐 실제 transfer로 이어집니다.

eDMA3 CC resource controls
Property대상효과
ti,edma-memcpy-channelsDMA channelsSoftware-triggered memcpy 전용
ti,edma-reserved-slot-rangesPaRAM slotsDSP 등 외부 사용자를 위해 제외
dma-channel-maskDMA channelsDriver가 사용할 수 있는 channel 표시

Driver가 사용할 channel과 PaRAM slot을 제한하는 선택 속성을 정리합니다.

eDMA3 Transfer Controller

50-78

eDMA3 Transfer Controller의 `compatible`은 OMAP, AM33xx, AM43xx에서 `ti,edma3-tptc`이고, 66AK2G에서는 `ti,k2g-edma3-tptc`, `ti,edma3-tptc` 조합입니다. `reg`는 eDMA TC memory map, `interrupts`는 TCerrint interrupt 번호입니다.

OMAP, AM33xx, AM43xx에서는 TC에 연결된 hwmod 이름인 `ti,hwmods`가 필수입니다. 66AK2G에서는 `Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml` 형식의 `power-domains`가 필수이며 provider phandle과 device ID argument를 포함합니다.

선택 `interrupt-names`는 `edma3_tcerrint`입니다.

OMAP/AM eDMA3 예제

79-151

첫 번째 예제 CC는 64개 request와 2-cell DMA specifier를 선언합니다. 세 TPTC의 priority는 각각 7, 7, 0이며 channel 20과 21은 `memcpy`에 할당합니다. PaRAM slot 35~44와 100~109를 예약하고 `dma-channel-mask`로 channel 35~44도 제외합니다.

세 TPTC node는 각 memory map과 error interrupt를 선언합니다. SHAM client의 `dmas = <&edma 36 0>`은 DMA channel 36을 TC0의 low-priority queue에서 실행합니다. McASP client는 channel 8과 9를 TC2의 high-priority queue에서 TX/RX 용도로 실행합니다.

edma: edma@49000000 {
        compatible = "ti,edma3-tpcc";
        ti,hwmods = "tpcc";
        reg =        <0x49000000 0x10000>;
        reg-names = "edma3_cc";
        interrupts = <12 13 14>;
        interrupt-names = "edma3_ccint", "edma3_mperr", "edma3_ccerrint";
        dma-requests = <64>;
        #dma-cells = <2>;

        ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;

        /* Channel 20 and 21 is allocated for memcpy */
        ti,edma-memcpy-channels = <20 21>;
        /* The following PaRAM slots are reserved: 35-44 and 100-109 */
        ti,edma-reserved-slot-ranges = <35 10>, <100 10>;
        /* The following channels are reserved: 35-44 */
        dma-channel-mask = <0xffffffff /* Channel 0-31 */
                            0xffffe007>; /* Channel 32-63 */
};

edma_tptc0: tptc@49800000 {
        compatible = "ti,edma3-tptc";
        ti,hwmods = "tptc0";
        reg =        <0x49800000 0x100000>;
        interrupts = <112>;
        interrupt-names = "edm3_tcerrint";
};

edma_tptc1: tptc@49900000 {
        compatible = "ti,edma3-tptc";
        ti,hwmods = "tptc1";
        reg =        <0x49900000 0x100000>;
        interrupts = <113>;
        interrupt-names = "edm3_tcerrint";
};

edma_tptc2: tptc@49a00000 {
        compatible = "ti,edma3-tptc";
        ti,hwmods = "tptc2";
        reg =        <0x49a00000 0x100000>;
        interrupts = <114>;
        interrupt-names = "edm3_tcerrint";
};

sham: sham@53100000 {
        compatible = "ti,omap4-sham";
        ti,hwmods = "sham";
        reg = <0x53100000 0x200>;
        interrupts = <109>;
        /* DMA channel 36 executed on eDMA TC0 - low priority queue */
        dmas = <&edma 36 0>;
        dma-names = "rx";
};

mcasp0: mcasp@48038000 {
        compatible = "ti,am33xx-mcasp-audio";
        ti,hwmods = "mcasp0";
        reg = <0x48038000 0x2000>,
                <0x46000000 0x400000>;
        reg-names = "mpu", "dat";
        interrupts = <80>, <81>;
        interrupt-names = "tx", "rx";
        /* DMA channels 8 and 9 executed on eDMA TC2 - high priority queue */
        dmas = <&edma 8 2>,
               <&edma 9 2>;
        dma-names = "tx", "rx";
};

66AK2G eDMA3 예제

152-202

두 번째 예제의 K2G CC는 `ti,k2g-edma3-tpcc`, `ti,edma3-tpcc` compatible 조합, 세 GIC interrupt, 64개 request와 두 TPTC를 사용합니다. TPTC priority는 7과 0이고 `memcpy` channel 12~15 설정은 주석 처리되어 비활성입니다.

CC와 두 TPTC는 모두 power domain `<&k2g_pds 0x4f>`에 속합니다. MMC client는 EDMA1 channel 24와 25를 TC0에서 TX/RX로 사용하며 별도의 device power domain, clock, bus width와 최대 주파수를 선언합니다.

edma1: edma@2728000 {
        compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc";
        reg =        <0x02728000 0x8000>;
        reg-names = "edma3_cc";
        interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
                        <GIC_SPI 219 IRQ_TYPE_EDGE_RISING>,
                        <GIC_SPI 220 IRQ_TYPE_EDGE_RISING>;
        interrupt-names = "edma3_ccint", "emda3_mperr",
                          "edma3_ccerrint";
        dma-requests = <64>;
        #dma-cells = <2>;

        ti,tptcs = <&edma1_tptc0 7>, <&edma1_tptc1 0>;

        /*
         * memcpy is disabled, can be enabled with:
         * ti,edma-memcpy-channels = <12 13 14 15>;
         * for example.
         */

        power-domains = <&k2g_pds 0x4f>;
};

edma1_tptc0: tptc@27b0000 {
        compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
        reg =        <0x027b0000 0x400>;
        power-domains = <&k2g_pds 0x4f>;
};

edma1_tptc1: tptc@27b8000 {
        compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
        reg =        <0x027b8000 0x400>;
        power-domains = <&k2g_pds 0x4f>;
};

mmc0: mmc@23000000 {
        compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
        reg = <0x23000000 0x400>;
        interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>;
        dmas = <&edma1 24 0>, <&edma1 25 0>;
        dma-names = "tx", "rx";
        bus-width = <4>;
        ti,needs-special-reset;
        no-1-8-v;
        max-frequency = <96000000>;
        power-domains = <&k2g_pds 0xb>;
        clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>;
        clock-names = "fck", "mmchsdb_fck";
};

폐기된 단일-node 바인딩

203-238

이전 `ti,edma3` 바인딩은 폐기되었습니다. 새 DTS 파일은 `ti,edma3-tpcc`/`ti,edma3-tptc` 바인딩을 사용해야 합니다.

폐기된 형식의 필수 속성은 `compatible = "ti,edma3"`, `#dma-cells = <1>`, module memory map인 `reg`, 그리고 transfer completion, memory protection, error 순서의 정확히 세 `interrupts`입니다. Client는 DMA request마다 channel 번호 하나를 사용합니다.

선택 `ti,hwmods`는 EDMA hwmod 이름이고 `ti,edma-xbar-event-map`은 crossbar event-to-channel map입니다. 새 DTB로 오래된 kernel을 boot해야 할 때 추가할 수 있는 폐기 속성은 region 수를 나타내는 `ti,edma-regions`, slot 수를 나타내는 `ti,edma-slots`, CC당 총 channel 수를 나타내는 `dma-channels`입니다.

edma: edma@49000000 {
        reg = <0x49000000 0x10000>;
        interrupt-parent = <&intc>;
        interrupts = <12 13 14>;
        compatible = "ti,edma3";
        ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
        #dma-cells = <1>;
        ti,edma-xbar-event-map = /bits/ 16 <1 12
                                            2 13>;
};