요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/davinci-mcasp-audio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: McASP Controller for TI SoCs
maintainers:
- Jayesh Choudhary <[email protected]>
properties:
compatible:
enum:
- ti,dm646x-mcasp-audio
- ti,da830-mcasp-audio
- ti,am33xx-mcasp-audio
- ti,dra7-mcasp-audio
- ti,omap4-mcasp-audio
reg:
minItems: 1
items:
- description: CFG registers
- description: data registers
reg-names:
minItems: 1
items:
- const: mpu
- const: dat
op-mode:
$ref: /schemas/types.yaml#/definitions/uint32
description: 0 - I2S or 1 - DIT operation mode
enum:
- 0
- 1
tdm-slots:
$ref: /schemas/types.yaml#/definitions/uint32
description:
number of channels over one serializer
the property is ignored in DIT mode
minimum: 2
maximum: 32
serial-dir:
description:
A list of serializer configuration
Entry is indication for serializer pin direction
0 - Inactive, 1 - TX, 2 - RX
All AXR pins should be present in the array even if inactive
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 25
items:
minimum: 0
maximum: 2
dmas:
minItems: 1
items:
- description: transmission DMA channel
- description: reception DMA channel
dma-names:
minItems: 1
items:
- const: tx
- const: rx
ti,hwmods:
$ref: /schemas/types.yaml#/definitions/string
description: Name of hwmod associated with McASP
maxItems: 1
deprecated: true
tx-num-evt:
$ref: /schemas/types.yaml#/definitions/uint32
description:
configures WFIFO threshold
0 disables the FIFO use
if property is missing, then also FIFO use is disabled
rx-num-evt:
$ref: /schemas/types.yaml#/definitions/uint32
description:
configures RFIFO threshold
0 disables the FIFO use
if property is missing, then also FIFO use is disabled
dismod:
$ref: /schemas/types.yaml#/definitions/uint32
description:
specify the drive on TX pin during inactive time slots
0 - 3-state, 2 - logic low, 3 - logic high
enum:
- 0
- 2
- 3
default: 2
interrupts:
minItems: 1
maxItems: 2
interrupt-names:
oneOf:
- description: TX interrupt
const: tx
- description: RX interrupt
const: rx
- description: TX and RX interrupts
items:
- const: tx
- const: rx
- description: Common/combined interrupt
const: common
fck_parent:
$ref: /schemas/types.yaml#/definitions/string
description: parent clock name for McASP fck
maxItems: 1
auxclk-fs-ratio:
$ref: /schemas/types.yaml#/definitions/uint32
description: ratio of AUCLK and FS rate if applicable
gpio-controller: true
"#gpio-cells":
const: 2
clocks:
minItems: 1
items:
- description: functional clock
- description: module specific optional ahclkx clock
- description: module specific optional ahclkr clock
clock-names:
minItems: 1
items:
- const: fck
- const: ahclkx
- const: ahclkr
power-domains:
description: phandle to the corresponding power-domain
maxItems: 1
"#sound-dai-cells":
const: 0
port:
description: connection for when McASP is used via graph card
type: object
required:
- compatible
- reg
- reg-names
- dmas
- dma-names
- interrupts
- interrupt-names
allOf:
- $ref: dai-common.yaml#
- if:
properties:
opmode:
enum:
- 0
then:
required:
- tdm-slots
unevaluatedProperties: false
examples:
- |
mcasp0: mcasp0@1d00000 {
compatible = "ti,da830-mcasp-audio";
reg = <0x100000 0x3000>;
reg-names = "mpu";
interrupts = <82>, <83>;
interrupt-names = "tx", "rx";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
dma-names = "tx", "rx";
serial-dir = <
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
0 0 0 0
0 0 0 1
2 0 0 0 >;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
TI McASP controller schema
1-11이 YAML binding은 TI SoC용 McASP controller를 정의합니다. Schema ID는 `http://devicetree.org/schemas/sound/davinci-mcasp-audio.yaml#`이고 maintainer는 Jayesh Choudhary입니다.
Compatible과 register 영역
12-32`compatible`은 `ti,dm646x-mcasp-audio`, `ti,da830-mcasp-audio`, `ti,am33xx-mcasp-audio`, `ti,dra7-mcasp-audio`, `ti,omap4-mcasp-audio` 중 하나입니다.
`reg`는 최소 한 영역을 가지며 첫 항목은 CFG register, 선택적인 둘째 항목은 data register입니다. `reg-names`는 이에 대응해 최소 `mpu`, 선택적으로 `dat`를 사용합니다.
Operation mode, TDM과 serializer
33-60`op-mode`는 `uint32`이며 값 0은 I2S, 값 1은 DIT operation mode입니다.
`tdm-slots`는 serializer 하나가 운반하는 channel 수로 2~32 범위이며 DIT mode에서는 무시됩니다.
`serial-dir`은 모든 AXR pin의 serializer 방향 배열입니다. 비활성 pin도 배열에 포함해야 하며 값 0은 inactive, 1은 TX, 2는 RX입니다. 항목 수는 1~25개이고 각 값 범위는 0~2입니다.
DMA와 deprecated hwmod
61-78`dmas`는 최소 transmission DMA channel을, 선택적으로 reception DMA channel을 둘째 항목에 지정합니다. `dma-names`는 같은 순서로 `tx`, `rx`입니다.
`ti,hwmods`는 McASP와 연관된 hwmod 이름 문자열 하나를 지정하지만 deprecated 속성입니다.
FIFO threshold와 inactive TX drive
79-103`tx-num-evt`는 WFIFO threshold, `rx-num-evt`는 RFIFO threshold를 설정합니다. 값 0 또는 속성 생략은 해당 FIFO 사용을 비활성화합니다.
`dismod`는 inactive time slot에서 TX pin을 어떻게 구동할지 정합니다. 값 0은 3-state, 2는 logic low, 3은 logic high이며 기본값은 2입니다.
Interrupt 이름 조합
104-120`interrupts`는 1~2개 interrupt를 허용합니다. `interrupt-names`는 TX 하나면 `tx`, RX 하나면 `rx`, 둘 모두면 `tx`, `rx` 순서, common/combined interrupt이면 `common`입니다.
Clock, GPIO, power domain과 graph port
121-159`fck_parent`는 McASP functional clock의 parent clock 이름이고 `auxclk-fs-ratio`는 적용 가능한 경우 AUCLK와 FS rate 비율입니다.
McASP는 GPIO controller가 될 수 있으며 `#gpio-cells`는 2입니다.
`clocks`는 최소 functional clock을 지정하고 선택적으로 module-specific `ahclkx`, `ahclkr` clock을 추가합니다. `clock-names`는 같은 순서로 `fck`, `ahclkx`, `ahclkr`입니다.
`power-domains`는 대응 power domain phandle 하나를, `#sound-dai-cells`는 0을 사용합니다. `port` object는 graph card를 통해 McASP를 연결할 때 사용합니다.
필수 속성과 I2S 조건
160-181필수 속성은 `compatible`, `reg`, `reg-names`, `dmas`, `dma-names`, `interrupts`, `interrupt-names`입니다. 이 schema는 `dai-common.yaml#`도 참조하며 정의되지 않은 속성은 허용하지 않습니다.
조건부 schema는 operation mode가 0일 때 `tdm-slots`를 요구하려는 구조입니다.
속성 선언은 `op-mode`이지만 조건부 `if`에서는 `opmode`로 적혀 있습니다. 이 표기 차이를 원문 그대로 보존했습니다.
DA830 McASP 예제
182-202예제는 DA830 McASP의 `mpu` register, TX·RX interrupt와 DMA, I2S mode의 2 TDM slot을 구성합니다. 16개 serializer 중 하나를 TX, 하나를 RX로 두고 TX·RX FIFO event threshold를 1로 설정합니다.
- |
mcasp0: mcasp0@1d00000 {
compatible = "ti,da830-mcasp-audio";
reg = <0x100000 0x3000>;
reg-names = "mpu";
interrupts = <82>, <83>;
interrupt-names = "tx", "rx";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
dma-names = "tx", "rx";
serial-dir = <
0 0 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
0 0 0 0
0 0 0 1
2 0 0 0 >;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
요약과 해설
davinci-mcasp-audio.yaml:1-202DAI stream과 TI McASP의 schema 구조, clock·DMA·routing 조건을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.