요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Dialog Semiconductor DA7218 Audio Codec bindings
DA7218 is an audio codec with HP detect feature.
======
Required properties:
- compatible : Should be "dlg,da7217" or "dlg,da7218"
- reg: Specifies the I2C slave address
- VDD-supply: VDD power supply for the device
- VDDMIC-supply: VDDMIC power supply for the device
- VDDIO-supply: VDDIO power supply for the device
(See Documentation/devicetree/bindings/regulator/regulator.txt for further
information relating to regulators)
Optional properties:
- interrupts: IRQ line info for DA7218 chip.
(See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
further information relating to interrupt properties)
- interrupt-names : Name associated with interrupt line. Should be "wakeup" if
interrupt is to be used to wake system, otherwise "irq" should be used.
- wakeup-source: Flag to indicate this device can wake system (suspend/resume).
- clocks : phandle and clock specifier for codec MCLK.
- clock-names : Clock name string for 'clocks' attribute, should be "mclk".
- dlg,micbias1-lvl-millivolt : Voltage (mV) for Mic Bias 1
[<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
- dlg,micbias2-lvl-millivolt : Voltage (mV) for Mic Bias 2
[<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
- dlg,mic1-amp-in-sel : Mic1 input source type
["diff", "se_p", "se_n"]
- dlg,mic2-amp-in-sel : Mic2 input source type
["diff", "se_p", "se_n"]
- dlg,dmic1-data-sel : DMIC1 channel select based on clock edge.
["lrise_rfall", "lfall_rrise"]
- dlg,dmic1-samplephase : When to sample audio from DMIC1.
["on_clkedge", "between_clkedge"]
- dlg,dmic1-clkrate-hz : DMic1 clock frequency (Hz).
[<1500000>, <3000000>]
- dlg,dmic2-data-sel : DMic2 channel select based on clock edge.
["lrise_rfall", "lfall_rrise"]
- dlg,dmic2-samplephase : When to sample audio from DMic2.
["on_clkedge", "between_clkedge"]
- dlg,dmic2-clkrate-hz : DMic2 clock frequency (Hz).
[<1500000>, <3000000>]
- dlg,hp-diff-single-supply : Boolean flag, use single supply for HP
(DA7217 only)
======
Optional Child node - 'da7218_hpldet' (DA7218 only):
Optional properties:
- dlg,jack-rate-us : Time between jack detect measurements (us)
[<5>, <10>, <20>, <40>, <80>, <160>, <320>, <640>]
- dlg,jack-debounce : Number of debounce measurements taken for jack detect
[<0>, <2>, <3>, <4>]
- dlg,jack-threshold-pct : Threshold level for jack detection (% of VDD)
[<84>, <88>, <92>, <96>]
- dlg,comp-inv : Boolean flag, invert comparator output
- dlg,hyst : Boolean flag, enable hysteresis
- dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal
======
Example:
codec: da7218@1a {
compatible = "dlg,da7218";
reg = <0x1a>;
interrupt-parent = <&gpio6>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
wakeup-source;
VDD-supply = <®_audio>;
VDDMIC-supply = <®_audio>;
VDDIO-supply = <®_audio>;
clocks = <&clks 201>;
clock-names = "mclk";
dlg,micbias1-lvl-millivolt = <2600>;
dlg,micbias2-lvl-millivolt = <2600>;
dlg,mic1-amp-in-sel = "diff";
dlg,mic2-amp-in-sel = "diff";
dlg,dmic1-data-sel = "lrise_rfall";
dlg,dmic1-samplephase = "on_clkedge";
dlg,dmic1-clkrate-hz = <3000000>;
dlg,dmic2-data-sel = "lrise_rfall";
dlg,dmic2-samplephase = "on_clkedge";
dlg,dmic2-clkrate-hz = <3000000>;
da7218_hpldet {
dlg,jack-rate-us = <40>;
dlg,jack-debounce = <2>;
dlg,jack-threshold-pct = <84>;
dlg,hyst;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
DA7217/DA7218 필수 속성
1-16Dialog Semiconductor DA7218은 headphone detect 기능을 갖춘 audio codec입니다. `compatible` 값은 `dlg,da7217` 또는 `dlg,da7218`이고 `reg`에는 I2C slave address를 지정합니다.
`VDD-supply`, `VDDMIC-supply`, `VDDIO-supply`는 장치의 세 전원 공급 장치입니다. Regulator 관련 규칙은 `Documentation/devicetree/bindings/regulator/regulator.txt`를 참조합니다.
Interrupt, wakeup과 MCLK
17-27`interrupts`는 DA7218 IRQ 선 정보이며 자세한 규칙은 `Documentation/devicetree/bindings/interrupt-controller/interrupts.txt`를 참조합니다. `interrupt-names`는 system wakeup에 쓰는 경우 `wakeup`, 그렇지 않으면 `irq`입니다.
`wakeup-source`는 이 장치가 suspend/resume 중 system을 깨울 수 있음을 나타냅니다.
`clocks`는 codec MCLK의 phandle과 clock specifier이고 `clock-names`는 `mclk`여야 합니다.
Mic bias와 analog microphone input
28-35`dlg,micbias1-lvl-millivolt`와 `dlg,micbias2-lvl-millivolt`는 Mic Bias 1·2 전압을 mV 단위로 정하며 허용값은 1200, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000입니다.
`dlg,mic1-amp-in-sel`과 `dlg,mic2-amp-in-sel`은 microphone input source type을 `diff`, `se_p`, `se_n` 중에서 선택합니다.
Digital microphone과 headphone supply
36-50`dlg,dmic1-data-sel`과 `dlg,dmic2-data-sel`은 clock edge에 따른 channel 선택을 `lrise_rfall` 또는 `lfall_rrise`로 정합니다. `dlg,dmic1-samplephase`와 `dlg,dmic2-samplephase`는 `on_clkedge` 또는 `between_clkedge`에서 audio를 sample하도록 합니다.
`dlg,dmic1-clkrate-hz`와 `dlg,dmic2-clkrate-hz`는 각각 1500000Hz 또는 3000000Hz를 선택합니다.
DA7217 전용 Boolean `dlg,hp-diff-single-supply`는 headphone output에 single supply를 사용하도록 합니다.
DA7218 headphone detect 하위 노드
51-65DA7218 전용 `da7218_hpldet` 하위 노드는 headphone jack detection을 조정합니다. `dlg,jack-rate-us`는 측정 간격으로 5, 10, 20, 40, 80, 160, 320, 640us를 허용합니다.
`dlg,jack-debounce`는 debounce 측정 횟수 0, 2, 3, 4 중 하나이고, `dlg,jack-threshold-pct`는 VDD 대비 threshold 84%, 88%, 92%, 96% 중 하나입니다.
Boolean `dlg,comp-inv`는 comparator output을 반전하고 `dlg,hyst`는 hysteresis를 활성화하며 `dlg,discharge`는 jack 제거 시 Mic Bias를 자동 방전합니다.
DA7218 codec 예제
66-95예제는 주소 `0x1a`, level-low interrupt와 wakeup capability, 세 regulator와 MCLK를 지정합니다. 두 mic bias를 2600mV, analog mic input을 differential로 구성하고 두 DMIC를 `lrise_rfall`, `on_clkedge`, 3MHz로 설정합니다.
codec: da7218@1a {
compatible = "dlg,da7218";
reg = <0x1a>;
interrupt-parent = <&gpio6>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
wakeup-source;
VDD-supply = <®_audio>;
VDDMIC-supply = <®_audio>;
VDDIO-supply = <®_audio>;
clocks = <&clks 201>;
clock-names = "mclk";
dlg,micbias1-lvl-millivolt = <2600>;
dlg,micbias2-lvl-millivolt = <2600>;
dlg,mic1-amp-in-sel = "diff";
dlg,mic2-amp-in-sel = "diff";
dlg,dmic1-data-sel = "lrise_rfall";
dlg,dmic1-samplephase = "on_clkedge";
dlg,dmic1-clkrate-hz = <3000000>;
dlg,dmic2-data-sel = "lrise_rfall";
dlg,dmic2-samplephase = "on_clkedge";
dlg,dmic2-clkrate-hz = <3000000>;
DA7218 jack detect 예제
96-102`da7218_hpldet` 예제는 jack 측정 간격 40us, debounce 2회, VDD의 84% threshold와 hysteresis를 지정합니다.
da7218_hpldet {
dlg,jack-rate-us = <40>;
dlg,jack-debounce = <2>;
dlg,jack-threshold-pct = <84>;
dlg,hyst;
};
};
요약과 해설
da7218.txt:1-102Audio codec의 bus·전원·clock·microphone·jack detection 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.