← Documents Documentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Xilinx AXI DMA Engines

VDMA, AXI DMA, CDMA, MCDMA controller와 channel child-node 바인딩입니다.

Source pathDocumentation/devicetree/bindings/dma/xilinx/xilinx_dma.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

xilinx_dma.txt:1-111

Engine별 transfer 경로, clock, channel 방향과 AXI VDMA 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Xilinx AXI VDMA engine, it does transfers between memory and video devices.
2 It can be configured to have one channel or two channels. If configured
3 as two channels, one is to transmit to the video device and another is
4 to receive from the video device.
5
6 Xilinx AXI DMA engine, it does transfers between memory and AXI4 stream
7 target devices. It can be configured to have one channel or two channels.
8 If configured as two channels, one is to transmit to the device and another
9 is to receive from the device.
10
11 Xilinx AXI CDMA engine, it does transfers between memory-mapped source
12 address and a memory-mapped destination address.
13
14 Xilinx AXI MCDMA engine, it does transfer between memory and AXI4 stream
15 target devices. It can be configured to have up to 16 independent transmit
16 and receive channels.
17
18 Required properties:
19 - compatible: Should be one of-
20 "xlnx,axi-vdma-1.00.a"
21 "xlnx,axi-dma-1.00.a"
22 "xlnx,axi-cdma-1.00.a"
23 "xlnx,axi-mcdma-1.00.a"
24 - #dma-cells: Should be <1>, see "dmas" property below
25 - reg: Should contain VDMA registers location and length.
26 - xlnx,addrwidth: Should be the vdma addressing size in bits(ex: 32 bits).
27 - dma-ranges: Should be as the following <dma_addr cpu_addr max_len>.
28 - dma-channel child node: Should have at least one channel and can have up to
29 two channels per device. This node specifies the properties of each
30 DMA channel (see child node properties below).
31 - clocks: Input clock specifier. Refer to common clock bindings.
32 - clock-names: List of input clocks
33 For VDMA:
34 Required elements: "s_axi_lite_aclk"
35 Optional elements: "m_axi_mm2s_aclk" "m_axi_s2mm_aclk",
36 "m_axis_mm2s_aclk", "s_axis_s2mm_aclk"
37 For CDMA:
38 Required elements: "s_axi_lite_aclk", "m_axi_aclk"
39 For AXIDMA and MCDMA:
40 Required elements: "s_axi_lite_aclk"
41 Optional elements: "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
42 "m_axi_sg_aclk"
43
44 Required properties for VDMA:
45 - xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.
46
47 Optional properties for AXI DMA and MCDMA:
48 - xlnx,sg-length-width: Should be set to the width in bits of the length
49 register as configured in h/w. Takes values {8...26}. If the property
50 is missing or invalid then the default value 23 is used. This is the
51 maximum value that is supported by all IP versions.
52
53 Optional properties for AXI DMA:
54 - xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP.
55 - xlnx,irq-delay: Tells the interrupt delay timeout value. Valid range is from
56 0-255. Setting this value to zero disables the delay timer interrupt.
57 1 timeout interval = 125 * clock period of SG clock.
58 Optional properties for VDMA:
59 - xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
60 It takes following values:
61 {1}, flush both channels
62 {2}, flush mm2s channel
63 {3}, flush s2mm channel
64
65 Required child node properties:
66 - compatible:
67 For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
68 "xlnx,axi-vdma-s2mm-channel".
69 For CDMA: It should be "xlnx,axi-cdma-channel".
70 For AXIDMA and MCDMA: It should be either "xlnx,axi-dma-mm2s-channel"
71 or "xlnx,axi-dma-s2mm-channel".
72 - interrupts: Should contain per channel VDMA interrupts.
73 - xlnx,datawidth: Should contain the stream data width, take values
74 {32,64...1024}.
75
76 Optional child node properties:
77 - xlnx,include-dre: Tells hardware is configured for Data
78 Realignment Engine.
79 Optional child node properties for VDMA:
80 - xlnx,genlock-mode: Tells Genlock synchronization is
81 enabled/disabled in hardware.
82 - xlnx,enable-vert-flip: Tells vertical flip is
83 enabled/disabled in hardware(S2MM path).
84 Optional child node properties for MCDMA:
85 - dma-channels: Number of dma channels in child node.
86
87 Example:
88 ++++++++
89
90 axi_vdma_0: axivdma@40030000 {
91 compatible = "xlnx,axi-vdma-1.00.a";
92 #dma_cells = <1>;
93 reg = < 0x40030000 0x10000 >;
94 dma-ranges = <0x00000000 0x00000000 0x40000000>;
95 xlnx,num-fstores = <0x8>;
96 xlnx,flush-fsync = <0x1>;
97 xlnx,addrwidth = <0x20>;
98 clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
99 clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
100 "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
101 dma-channel@40030000 {
102 compatible = "xlnx,axi-vdma-mm2s-channel";
103 interrupts = < 0 54 4 >;
104 xlnx,datawidth = <0x40>;
105 } ;
106 dma-channel@40030030 {
107 compatible = "xlnx,axi-vdma-s2mm-channel";
108 interrupts = < 0 53 4 >;
109 xlnx,datawidth = <0x40>;
110 } ;
111 } ;
112

3. 한국어 전문 번역

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

Xilinx AXI DMA engine 종류

1-17

Xilinx AXI VDMA engine은 memory와 video device 사이에서 전송합니다. 한 channel 또는 두 channel로 구성할 수 있으며, 두 channel 구성에서는 하나가 video device로 송신하고 다른 하나가 video device에서 수신합니다.

Xilinx AXI DMA engine은 memory와 AXI4 stream target device 사이에서 전송합니다. 한 channel 또는 두 channel로 구성할 수 있고, 두 channel일 때 하나는 device로 송신하고 다른 하나는 device에서 수신합니다.

Xilinx AXI CDMA engine은 memory-mapped source address와 memory-mapped destination address 사이에서 전송합니다. Xilinx AXI MCDMA engine은 memory와 AXI4 stream target device 사이에서 전송하며 최대 16개의 독립적인 transmit/receive channel을 구성할 수 있습니다.

Xilinx AXI DMA engine 비교
Engine전송 경로Channel 구성
VDMAMemory ↔ video device최대 MM2S/S2MM 2개
AXI DMAMemory ↔ AXI4 stream최대 MM2S/S2MM 2개
CDMAMemory-mapped ↔ memory-mapped단일 copy channel
MCDMAMemory ↔ AXI4 stream최대 16개 TX/RX

각 engine의 endpoint와 channel 구성을 비교합니다.

Controller 속성과 clock

18-64

필수 `compatible`은 `xlnx,axi-vdma-1.00.a`, `xlnx,axi-dma-1.00.a`, `xlnx,axi-cdma-1.00.a`, `xlnx,axi-mcdma-1.00.a` 중 하나입니다. `#dma-cells`는 1이며 아래의 `dmas` 속성에서 사용합니다. `reg`는 VDMA register 위치와 길이, `xlnx,addrwidth`는 bit 단위 addressing 크기, `dma-ranges`는 `<dma_addr cpu_addr max_len>` 형식입니다.

`dma-channel` child node는 적어도 하나가 필요하고 device당 최대 두 개를 둘 수 있으며 각 DMA channel 속성을 기술합니다. `clocks`는 공통 clock 바인딩을 따르는 input clock specifier이고 `clock-names`는 input clock 이름 목록입니다.

VDMA에서 `s_axi_lite_aclk`는 필수이고 `m_axi_mm2s_aclk`, `m_axi_s2mm_aclk`, `m_axis_mm2s_aclk`, `s_axis_s2mm_aclk`는 선택입니다. CDMA에서는 `s_axi_lite_aclk`와 `m_axi_aclk`가 필수입니다. AXI DMA와 MCDMA에서는 `s_axi_lite_aclk`가 필수이고 `m_axi_mm2s_aclk`, `m_axi_s2mm_aclk`, `m_axi_sg_aclk`는 선택입니다.

VDMA의 필수 `xlnx,num-fstores`는 hardware에 구성된 framebuffer 수입니다. AXI DMA와 MCDMA의 선택 `xlnx,sg-length-width`는 hardware의 length register bit width이며 8~26을 허용합니다. 누락되거나 잘못되면 모든 IP version이 지원하는 최대 공통값 23을 기본값으로 사용합니다.

AXI DMA의 선택 `xlnx,axistream-connected`는 DMA가 AXI stream IP에 연결되었는지 나타냅니다. `xlnx,irq-delay`는 0~255의 interrupt delay timeout이며 0은 delay timer interrupt를 끕니다. 한 timeout interval은 SG clock period의 125배입니다.

VDMA의 선택 `xlnx,flush-fsync`는 frame sync 때 flush할 channel을 지정합니다. 값 1은 두 channel 모두, 2는 MM2S channel, 3은 S2MM channel을 flush합니다.

Xilinx DMA channel directions
MemoryMemory-mapped source/destination
MM2S channelMemory to stream/device
AXI stream or videoTarget/source endpoint
S2MM channelStream/device to memory

Memory-mapped 쪽과 stream/video endpoint 사이의 MM2S 및 S2MM 방향을 보여 줍니다.

DMA channel child 속성

65-86

VDMA child `compatible`은 `xlnx,axi-vdma-mm2s-channel` 또는 `xlnx,axi-vdma-s2mm-channel`, CDMA는 `xlnx,axi-cdma-channel`, AXI DMA와 MCDMA는 `xlnx,axi-dma-mm2s-channel` 또는 `xlnx,axi-dma-s2mm-channel`이어야 합니다.

필수 `interrupts`는 channel별 VDMA interrupt이고, `xlnx,datawidth`는 32, 64, …, 1024 가운데 stream data width입니다. 선택 `xlnx,include-dre`는 hardware에 Data Realignment Engine이 구성되었음을 나타냅니다.

VDMA child의 선택 `xlnx,genlock-mode`는 hardware Genlock synchronization 활성 여부, `xlnx,enable-vert-flip`은 S2MM path의 vertical flip 활성 여부입니다. MCDMA child의 선택 `dma-channels`는 child node의 DMA channel 수입니다.

AXI VDMA 예제

87-111

예제 AXI VDMA는 register 영역 `0x40030000`/`0x10000`, 1-cell DMA specifier, 1 GiB DMA range, framebuffer 8개, 양방향 flush, 32-bit address와 다섯 clock을 선언합니다. MM2S와 S2MM child channel은 각각 interrupt 54와 53, 64-bit data width를 사용합니다.

axi_vdma_0: axivdma@40030000 {
        compatible = "xlnx,axi-vdma-1.00.a";
        #dma_cells = <1>;
        reg = < 0x40030000 0x10000 >;
        dma-ranges = <0x00000000 0x00000000 0x40000000>;
        xlnx,num-fstores = <0x8>;
        xlnx,flush-fsync = <0x1>;
        xlnx,addrwidth = <0x20>;
        clocks = <&clk 0>, <&clk 1>, <&clk 2>, <&clk 3>, <&clk 4>;
        clock-names = "s_axi_lite_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
                      "m_axis_mm2s_aclk", "s_axis_s2mm_aclk";
        dma-channel@40030000 {
                compatible = "xlnx,axi-vdma-mm2s-channel";
                interrupts = < 0 54 4 >;
                xlnx,datawidth = <0x40>;
        } ;
        dma-channel@40030030 {
                compatible = "xlnx,axi-vdma-s2mm-channel";
                interrupts = < 0 53 4 >;
                xlnx,datawidth = <0x40>;
        } ;
} ;