← Documents Documentation/devicetree/bindings/mfd/motorola-cpcap.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Motorola CPCAP PMIC

CPCAP의 SPI·IRQ domain, 전력 하위 기능과 HiFi·Voice audio DAI 바인딩입니다.

Source pathDocumentation/devicetree/bindings/mfd/motorola-cpcap.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

motorola-cpcap.txt:1-78

audio-codec 이름 예외, hs·mb2 IRQ와 두 endpoint 연결을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Motorola CPCAP PMIC device tree binding
2
3 Required properties:
4 - compatible : One or both of "motorola,cpcap" or "ste,6556002"
5 - reg : SPI chip select
6 - interrupts : The interrupt line the device is connected to
7 - interrupt-controller : Marks the device node as an interrupt controller
8 - #interrupt-cells : The number of cells to describe an IRQ, should be 2
9 - #address-cells : Child device offset number of cells, should be 1
10 - #size-cells : Child device size number of cells, should be 0
11 - spi-max-frequency : Typically set to 3000000
12 - spi-cs-high : SPI chip select direction
13
14 Optional subnodes:
15
16 The sub-functions of CPCAP get their own node with their own compatible values,
17 which are described in the following files:
18
19 - Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml
20 - Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml
21 - Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
22 - Documentation/devicetree/bindings/phy/motorola,cpcap-usb-phy.yaml
23 - Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
24 - Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
25 - Documentation/devicetree/bindings/leds/leds-cpcap.txt
26 - Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
27
28 The only exception is the audio codec. Instead of a compatible value its
29 node must be named "audio-codec".
30
31 Required properties for the audio-codec subnode:
32
33 - #sound-dai-cells = <1>;
34 - interrupts : should contain jack detection interrupts, with headset
35 detect interrupt matching "hs" and microphone bias 2
36 detect interrupt matching "mb2" in interrupt-names.
37 - interrupt-names : Contains "hs", "mb2"
38
39 The audio-codec provides two DAIs. The first one is connected to the
40 Stereo HiFi DAC and the second one is connected to the Voice DAC.
41
42 Example:
43
44 &mcspi1 {
45 cpcap: pmic@0 {
46 compatible = "motorola,cpcap", "ste,6556002";
47 reg = <0>; /* cs0 */
48 interrupt-parent = <&gpio1>;
49 interrupts = <7 IRQ_TYPE_EDGE_RISING>;
50 interrupt-controller;
51 #interrupt-cells = <2>;
52 #address-cells = <1>;
53 #size-cells = <0>;
54 spi-max-frequency = <3000000>;
55 spi-cs-high;
56
57 audio-codec {
58 #sound-dai-cells = <1>;
59 interrupts-extended = <&cpcap 9 0>, <&cpcap 10 0>;
60 interrupt-names = "hs", "mb2";
61
62 /* HiFi */
63 port@0 {
64 endpoint {
65 remote-endpoint = <&cpu_dai1>;
66 };
67 };
68
69 /* Voice */
70 port@1 {
71 endpoint {
72 remote-endpoint = <&cpu_dai2>;
73 };
74 };
75 };
76 };
77 };
78
79

3. 한국어 전문 번역

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

Motorola CPCAP PMIC

1-2

이 문서는 Motorola CPCAP PMIC의 장치 트리 바인딩을 정의합니다.

CPCAP audio DAI 연결
CPCAP port0Stereo HiFi DAC
Stereo HiFi DACcpu_dai1
CPCAP port1Voice DAC
Voice DACcpu_dai2

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-30

CPCAP 하위 기능은 각자의 `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-41

audio-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>;
                                };
                        };
                };
        };
};