요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Xilinx AXI VDMA engine, it does transfers between memory and video devices.
It can be configured to have one channel or two channels. If configured
as two channels, one is to transmit to the video device and another is
to receive from the video device.
Xilinx AXI DMA engine, it does transfers between memory and AXI4 stream
target devices. It can be configured to have one channel or two channels.
If configured as two channels, one is to transmit to the device and another
is to receive from the device.
Xilinx AXI CDMA engine, it does transfers between memory-mapped source
address and a memory-mapped destination address.
Xilinx AXI MCDMA engine, it does transfer between memory and AXI4 stream
target devices. It can be configured to have up to 16 independent transmit
and receive channels.
Required properties:
- compatible: Should be one of-
"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: Should be <1>, see "dmas" property below
- reg: Should contain VDMA registers location and length.
- xlnx,addrwidth: Should be the vdma addressing size in bits(ex: 32 bits).
- dma-ranges: Should be as the following <dma_addr cpu_addr max_len>.
- dma-channel child node: Should have at least one channel and can have up to
two channels per device. This node specifies the properties of each
DMA channel (see child node properties below).
- clocks: Input clock specifier. Refer to common clock bindings.
- clock-names: List of input clocks
For VDMA:
Required elements: "s_axi_lite_aclk"
Optional elements: "m_axi_mm2s_aclk" "m_axi_s2mm_aclk",
"m_axis_mm2s_aclk", "s_axis_s2mm_aclk"
For CDMA:
Required elements: "s_axi_lite_aclk", "m_axi_aclk"
For AXIDMA and MCDMA:
Required elements: "s_axi_lite_aclk"
Optional elements: "m_axi_mm2s_aclk", "m_axi_s2mm_aclk",
"m_axi_sg_aclk"
Required properties for VDMA:
- xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.
Optional properties for AXI DMA and MCDMA:
- xlnx,sg-length-width: Should be set to the width in bits of the length
register as configured in h/w. Takes values {8...26}. If the property
is missing or invalid then the default value 23 is used. This is the
maximum value that is supported by all IP versions.
Optional properties for AXI DMA:
- xlnx,axistream-connected: Tells whether DMA is connected to AXI stream IP.
- xlnx,irq-delay: Tells the interrupt delay timeout value. Valid range is from
0-255. Setting this value to zero disables the delay timer interrupt.
1 timeout interval = 125 * clock period of SG clock.
Optional properties for VDMA:
- xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
It takes following values:
{1}, flush both channels
{2}, flush mm2s channel
{3}, flush s2mm channel
Required child node properties:
- compatible:
For VDMA: It should be either "xlnx,axi-vdma-mm2s-channel" or
"xlnx,axi-vdma-s2mm-channel".
For CDMA: It should be "xlnx,axi-cdma-channel".
For AXIDMA and MCDMA: It should be either "xlnx,axi-dma-mm2s-channel"
or "xlnx,axi-dma-s2mm-channel".
- interrupts: Should contain per channel VDMA interrupts.
- xlnx,datawidth: Should contain the stream data width, take values
{32,64...1024}.
Optional child node properties:
- xlnx,include-dre: Tells hardware is configured for Data
Realignment Engine.
Optional child node properties for VDMA:
- xlnx,genlock-mode: Tells Genlock synchronization is
enabled/disabled in hardware.
- xlnx,enable-vert-flip: Tells vertical flip is
enabled/disabled in hardware(S2MM path).
Optional child node properties for MCDMA:
- dma-channels: Number of dma channels in child node.
Example:
++++++++
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>;
} ;
} ;
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Xilinx AXI DMA engine 종류
1-17Xilinx 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을 구성할 수 있습니다.
각 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합니다.
Memory-mapped 쪽과 stream/video endpoint 사이의 MM2S 및 S2MM 방향을 보여 줍니다.
DMA channel child 속성
65-86VDMA 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>;
} ;
} ;
요약과 해설
xilinx_dma.txt:1-111Engine별 transfer 경로, clock, channel 방향과 AXI VDMA 예제를 설명합니다.