← Documents Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

ChromeOS EC audio codec

EC digital microphone codec의 shared-memory 주소 형식과 reserved DMA pool을 설명합니다.

Source pathDocumentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

google,cros-ec-codec.yaml:1-78

NXP XCVR와 Google Chameleon·ChromeOS EC·SC7180 audio 구성의 memory, interrupt, DAI graph를 먼저 해설하고, 접을 수 있는 영어 원문 전체와 source path·symbol·줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0-only
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/google,cros-ec-codec.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Audio codec controlled by ChromeOS EC
8
9 maintainers:
10 - Cheng-Yi Chiang <[email protected]>
11 - Tzung-Bi Shih <[email protected]>
12
13 description: |
14 Google's ChromeOS EC codec is a digital mic codec provided by the
15 Embedded Controller (EC) and is controlled via a host-command
16 interface. An EC codec node should only be found inside the "codecs"
17 subnode of a cros-ec node.
18 (see Documentation/devicetree/bindings/embedded-controller/google,cros-ec.yaml).
19
20 allOf:
21 - $ref: dai-common.yaml#
22
23 properties:
24 compatible:
25 const: google,cros-ec-codec
26
27 "#sound-dai-cells":
28 const: 1
29
30 reg:
31 items:
32 - description: |
33 Physical base address and length of shared memory region from EC.
34 It contains 3 unsigned 32-bit integer. The first 2 integers
35 combine to become an unsigned 64-bit physical address.
36 The last one integer is the length of the shared memory.
37
38 memory-region:
39 maxItems: 1
40 description: |
41 Shared memory region to EC. A "shared-dma-pool".
42 See ../reserved-memory/reserved-memory.txt for details.
43
44 required:
45 - compatible
46 - '#sound-dai-cells'
47
48 unevaluatedProperties: false
49
50 examples:
51 - |
52 reserved_mem: reserved-mem@52800000 {
53 compatible = "shared-dma-pool";
54 reg = <0x52800000 0x100000>;
55 no-map;
56 };
57 spi {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 cros-ec@0 {
61 compatible = "google,cros-ec-spi";
62 reg = <0>;
63 interrupts = <93 0>;
64
65 codecs {
66 #address-cells = <2>;
67 #size-cells = <1>;
68
69 cros_ec_codec: ec-codec@10500000 {
70 compatible = "google,cros-ec-codec";
71 #sound-dai-cells = <1>;
72 reg = <0x0 0x10500000 0x80000>;
73 memory-region = <&reserved_mem>;
74 };
75
76 };
77 };
78 };
79

3. 한국어 전문 번역

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

ChromeOS EC digital microphone codec

1-22

Google ChromeOS EC codec은 Embedded Controller(EC)가 제공하고 host-command interface로 제어하는 digital microphone codec입니다. EC codec node는 cros-ec node의 `codecs` subnode 안에만 있어야 합니다.

원문은 `Documentation/devicetree/bindings/embedded-controller/google,cros-ec.yaml`을 참조합니다. Binding은 `dai-common.yaml#`을 상속하며 maintainer는 Cheng-Yi Chiang과 Tzung-Bi Shih입니다.

DAI cell과 EC shared memory

23-43

`compatible`은 `google,cros-ec-codec`, `#sound-dai-cells`는 1입니다.

`reg` 한 항목은 EC shared-memory region의 physical base와 length를 나타내는 unsigned 32-bit integer 3개입니다. 앞의 두 integer를 결합해 unsigned 64-bit physical address를 만들고 마지막 integer가 길이입니다.

`memory-region`은 EC와 공유하는 `shared-dma-pool` 하나를 가리키며 `../reserved-memory/reserved-memory.txt`를 참조합니다.

필수 속성과 확장 제한

44-49

필수 속성은 `compatible`과 `#sound-dai-cells`입니다. 공통 DAI schema 평가 뒤 남는 추가 속성은 허용하지 않습니다.

Reserved DMA pool 예제

50-56

예제 reserved memory는 address `0x52800000`, size `0x100000`의 `shared-dma-pool`이며 `no-map`으로 지정됩니다.

reserved_mem: reserved-mem@52800000 {
    compatible = "shared-dma-pool";
    reg = <0x52800000 0x100000>;
    no-map;
};

Cros-EC codecs subnode 예제

57-78

SPI cros-ec의 `codecs` subnode는 2-cell address와 1-cell size를 사용합니다. EC codec은 64-bit address `0x0000000010500000`, length `0x80000`을 `reg`에 적고 앞서 정의한 `reserved_mem`을 `memory-region`으로 연결합니다.

spi {
    #address-cells = <1>;
    #size-cells = <0>;
    cros-ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;
        interrupts = <93 0>;

        codecs {
            #address-cells = <2>;
            #size-cells = <1>;

            cros_ec_codec: ec-codec@10500000 {
                compatible = "google,cros-ec-codec";
                #sound-dai-cells = <1>;
                reg = <0x0 0x10500000 0x80000>;
                memory-region = <&reserved_mem>;
            };

        };
    };
};