요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Motorola CPCAP PMIC device tree binding
Required properties:
- compatible : One or both of "motorola,cpcap" or "ste,6556002"
- reg : SPI chip select
- interrupts : The interrupt line the device is connected to
- interrupt-controller : Marks the device node as an interrupt controller
- #interrupt-cells : The number of cells to describe an IRQ, should be 2
- #address-cells : Child device offset number of cells, should be 1
- #size-cells : Child device size number of cells, should be 0
- spi-max-frequency : Typically set to 3000000
- spi-cs-high : SPI chip select direction
Optional subnodes:
The sub-functions of CPCAP get their own node with their own compatible values,
which are described in the following files:
- Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml
- Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml
- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
- Documentation/devicetree/bindings/phy/motorola,cpcap-usb-phy.yaml
- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
- Documentation/devicetree/bindings/leds/leds-cpcap.txt
- Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
The only exception is the audio codec. Instead of a compatible value its
node must be named "audio-codec".
Required properties for the audio-codec subnode:
- #sound-dai-cells = <1>;
- interrupts : should contain jack detection interrupts, with headset
detect interrupt matching "hs" and microphone bias 2
detect interrupt matching "mb2" in interrupt-names.
- interrupt-names : Contains "hs", "mb2"
The audio-codec provides two DAIs. The first one is connected to the
Stereo HiFi DAC and the second one is connected to the Voice DAC.
Example:
&mcspi1 {
cpcap: pmic@0 {
compatible = "motorola,cpcap", "ste,6556002";
reg = <0>; /* cs0 */
interrupt-parent = <&gpio1>;
interrupts = <7 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <2>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <3000000>;
spi-cs-high;
audio-codec {
#sound-dai-cells = <1>;
interrupts-extended = <&cpcap 9 0>, <&cpcap 10 0>;
interrupt-names = "hs", "mb2";
/* HiFi */
port@0 {
endpoint {
remote-endpoint = <&cpu_dai1>;
};
};
/* Voice */
port@1 {
endpoint {
remote-endpoint = <&cpu_dai2>;
};
};
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Motorola CPCAP PMIC
1-2이 문서는 Motorola CPCAP PMIC의 장치 트리 바인딩을 정의합니다.
CPCAP의 두 DAI port를 각각 Stereo HiFi DAC와 Voice DAC의 CPU endpoint에 연결합니다.
필수 SPI·IRQ·주소 속성
3-13`compatible`은 `motorola,cpcap`, `ste,6556002` 중 하나 또는 둘 모두입니다. `reg`는 SPI chip select, `interrupts`는 연결된 interrupt line, `interrupt-controller`는 이 노드를 컨트롤러로 표시합니다. `#interrupt-cells`는 2입니다.
자식 offset의 `#address-cells`는 1, 자식 size의 `#size-cells`는 0입니다. `spi-max-frequency`는 보통 3000000이고 `spi-cs-high`는 SPI chip-select 방향을 지정합니다.
선택 하위 기능
14-30CPCAP 하위 기능은 각자의 `compatible`을 가진 노드이며 battery, charger, regulator, USB PHY, power button, RTC, LED, ADC 바인딩 문서를 따릅니다. source path는 각각 `power/supply/cpcap-battery.yaml`, `power/supply/cpcap-charger.yaml`, `regulator/cpcap-regulator.txt`, `phy/motorola,cpcap-usb-phy.yaml`, `input/cpcap-pwrbutton.txt`, `rtc/cpcap-rtc.txt`, `leds/leds-cpcap.txt`, `iio/adc/motorola,cpcap-adc.yaml`입니다.
유일한 예외는 audio codec이며 `compatible` 대신 노드 이름을 반드시 `audio-codec`으로 해야 합니다.
Audio codec IRQ와 두 DAI
31-41audio-codec 자식의 `#sound-dai-cells`는 1입니다. `interrupts`에는 jack detection interrupt를 넣고 `interrupt-names`의 `hs`는 headset detect, `mb2`는 microphone bias 2 detect interrupt에 대응해야 합니다.
audio codec은 DAI 두 개를 제공합니다. 첫 DAI는 Stereo HiFi DAC, 둘째 DAI는 Voice DAC에 연결됩니다.
HiFi·Voice endpoint 예제
42-78예제 CPCAP은 MCSPI1 chip-select 0, 3MHz, active-high CS와 GPIO1 pin 7 rising-edge interrupt를 사용합니다. 두 cell IRQ와 한 cell 자식 주소를 제공합니다.
audio codec의 CPCAP local IRQ 9와 10은 각각 `hs`, `mb2`입니다. port 0은 `cpu_dai1`, port 1은 `cpu_dai2`에 remote endpoint로 연결됩니다.
&mcspi1 {
cpcap: pmic@0 {
compatible = "motorola,cpcap", "ste,6556002";
reg = <0>; /* cs0 */
interrupt-parent = <&gpio1>;
interrupts = <7 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <2>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <3000000>;
spi-cs-high;
audio-codec {
#sound-dai-cells = <1>;
interrupts-extended = <&cpcap 9 0>, <&cpcap 10 0>;
interrupt-names = "hs", "mb2";
/* HiFi */
port@0 {
endpoint {
remote-endpoint = <&cpu_dai1>;
};
};
/* Voice */
port@1 {
endpoint {
remote-endpoint = <&cpu_dai2>;
};
};
};
};
};
요약과 해설
motorola-cpcap.txt:1-78audio-codec 이름 예외, hs·mb2 IRQ와 두 endpoint 연결을 설명합니다.