← Documents Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Sound

Google SC7280 Herobrine sound card

LPASS 기반 Herobrine card의 WCD·MI2S·DMIC·DP DAI link 구조를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

google,sc7280-herobrine.yaml:1-182

Google SC7280 LPASS card와 Hisilicon·Imagination audio controller의 DAI, DMA, clock, reset 계약을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 legacy TXT의 property·code·줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/google,sc7280-herobrine.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Google SC7280-Herobrine ASoC sound card driver
8
9 maintainers:
10 - Judy Hsiao <judyhsiao@chromium.org>
11
12 description:
13 This binding describes the SC7280 sound card which uses LPASS for audio.
14
15 allOf:
16 - $ref: sound-card-common.yaml#
17
18 properties:
19 compatible:
20 enum:
21 - google,sc7280-herobrine
22
23 "#address-cells":
24 const: 1
25
26 "#size-cells":
27 const: 0
28
29 patternProperties:
30 "^dai-link@[0-9a-f]$":
31 description:
32 Each subnode represents a dai link. Subnodes of each dai links would be
33 cpu/codec dais.
34
35 type: object
36
37 properties:
38 link-name:
39 description: Indicates dai-link name and PCM stream name.
40 $ref: /schemas/types.yaml#/definitions/string
41 maxItems: 1
42
43 reg:
44 maxItems: 1
45 description: dai link address.
46
47 cpu:
48 description: Holds subnode which indicates cpu dai.
49 type: object
50 properties:
51 sound-dai: true
52
53 required:
54 - sound-dai
55
56 additionalProperties: false
57
58 codec:
59 description: Holds subnode which indicates codec dai.
60 type: object
61 properties:
62 sound-dai: true
63
64 required:
65 - sound-dai
66
67 additionalProperties: false
68
69 platform:
70 description: Holds subnode which includes the phandle of q6apm platform device.
71 type: object
72 properties:
73 sound-dai:
74 maxItems: 1
75
76 required:
77 - sound-dai
78
79 additionalProperties: false
80
81 required:
82 - link-name
83 - cpu
84 - codec
85 - reg
86
87 additionalProperties: false
88
89 required:
90 - compatible
91 - "#address-cells"
92 - "#size-cells"
93
94 unevaluatedProperties: false
95
96 examples:
97
98 - |
99 #include <dt-bindings/sound/qcom,lpass.h>
100 sound {
101 compatible = "google,sc7280-herobrine";
102 model = "sc7280-wcd938x-max98360a-4dmic";
103
104 audio-routing =
105 "IN1_HPHL", "HPHL_OUT",
106 "IN2_HPHR", "HPHR_OUT",
107 "AMIC1", "MIC BIAS1",
108 "AMIC2", "MIC BIAS2",
109 "VA DMIC0", "MIC BIAS3",
110 "VA DMIC1", "MIC BIAS3",
111 "VA DMIC2", "MIC BIAS4",
112 "VA DMIC3", "MIC BIAS4",
113 "TX SWR_ADC0", "ADC1_OUTPUT",
114 "TX SWR_ADC1", "ADC2_OUTPUT",
115 "TX SWR_ADC2", "ADC3_OUTPUT",
116 "TX SWR_DMIC0", "DMIC1_OUTPUT",
117 "TX SWR_DMIC1", "DMIC2_OUTPUT",
118 "TX SWR_DMIC2", "DMIC3_OUTPUT",
119 "TX SWR_DMIC3", "DMIC4_OUTPUT";
120
121 #address-cells = <1>;
122 #size-cells = <0>;
123
124 dai-link@0 {
125 link-name = "WCD Playback";
126 reg = <LPASS_CDC_DMA_RX0>;
127 cpu {
128 sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>;
129 };
130
131 codec {
132 sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>;
133 };
134 };
135 dai-link@1 {
136 link-name = "WCD Capture";
137 reg = <LPASS_CDC_DMA_TX3>;
138 cpu {
139 sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>;
140 };
141
142 codec {
143 sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>;
144 };
145 };
146
147 dai-link@2 {
148 link-name = "MI2S Playback";
149 reg = <MI2S_SECONDARY>;
150 cpu {
151 sound-dai = <&lpass_cpu MI2S_SECONDARY>;
152 };
153
154 codec {
155 sound-dai = <&max98360a>;
156 };
157 };
158
159 dai-link@3 {
160 link-name = "DMIC Capture";
161 reg = <LPASS_CDC_DMA_VA_TX0>;
162 cpu {
163 sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>;
164 };
165
166 codec {
167 sound-dai = <&vamacro 0>;
168 };
169 };
170
171 dai-link@5 {
172 link-name = "DP Playback";
173 reg = <LPASS_DP_RX>;
174 cpu {
175 sound-dai = <&lpass_cpu LPASS_DP_RX>;
176 };
177
178 codec {
179 sound-dai = <&mdss_dp>;
180 };
181 };
182 };
183

3. 한국어 전문 번역

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

SC7280 Herobrine ASoC card

1-17

이 binding은 audio에 LPASS를 사용하는 Google SC7280 sound card를 설명합니다. `sound-card-common.yaml#`을 상속하며 schema ID는 `http://devicetree.org/schemas/sound/google,sc7280-herobrine.yaml#`, maintainer는 Judy Hsiao입니다.

Card compatible과 child addressing

18-28

`compatible`은 `google,sc7280-herobrine`, `#address-cells`는 1, `#size-cells`는 0입니다.

DAI link와 CPU subnode

29-57

각 `^dai-link@[0-9a-f]$` subnode는 하나의 DAI link이며 CPU와 codec DAI를 child로 둡니다. `link-name`은 DAI-link와 PCM stream 이름이고 `reg`는 link address로 각각 최대 한 항목입니다.

`cpu` subnode는 CPU DAI를 나타내며 `sound-dai`가 필수입니다. `additionalProperties: false`이므로 다른 속성은 허용하지 않습니다.

Codec·platform DAI와 link 계약

58-88

`codec` subnode도 `sound-dai`가 필수이고 추가 속성을 허용하지 않습니다. `platform` subnode는 Q6APM platform device의 phandle을 포함하며 `sound-dai`는 최대 한 항목이면서 필수입니다.

각 link에는 `link-name`, `cpu`, `codec`, `reg`가 필수입니다. Link node 자체도 `additionalProperties: false`입니다.

Card 필수 속성과 확장 제한

89-95

Card에 필요한 속성은 `compatible`, `#address-cells`, `#size-cells`입니다. `unevaluatedProperties: false`이므로 공통 sound-card schema 평가 뒤 정의되지 않은 속성은 허용하지 않습니다.

Herobrine WCD938x·MAX98360A 예제

96-182

예제 `sc7280-wcd938x-max98360a-4dmic` card는 WCD playback/capture, secondary MI2S speaker playback, 4-DMIC capture, DisplayPort playback의 다섯 link를 정의합니다. 각 link는 `LPASS_CDC_DMA_RX0`, `LPASS_CDC_DMA_TX3`, `MI2S_SECONDARY`, `LPASS_CDC_DMA_VA_TX0`, `LPASS_DP_RX` ID로 CPU와 해당 codec을 연결합니다.

- |
  #include <dt-bindings/sound/qcom,lpass.h>
  sound {
      compatible = "google,sc7280-herobrine";
      model = "sc7280-wcd938x-max98360a-4dmic";

      audio-routing =
          "IN1_HPHL", "HPHL_OUT",
          "IN2_HPHR", "HPHR_OUT",
          "AMIC1", "MIC BIAS1",
          "AMIC2", "MIC BIAS2",
          "VA DMIC0", "MIC BIAS3",
          "VA DMIC1", "MIC BIAS3",
          "VA DMIC2", "MIC BIAS4",
          "VA DMIC3", "MIC BIAS4",
          "TX SWR_ADC0", "ADC1_OUTPUT",
          "TX SWR_ADC1", "ADC2_OUTPUT",
          "TX SWR_ADC2", "ADC3_OUTPUT",
          "TX SWR_DMIC0", "DMIC1_OUTPUT",
          "TX SWR_DMIC1", "DMIC2_OUTPUT",
          "TX SWR_DMIC2", "DMIC3_OUTPUT",
          "TX SWR_DMIC3", "DMIC4_OUTPUT";

      #address-cells = <1>;
      #size-cells = <0>;

      dai-link@0 {
          link-name = "WCD Playback";
          reg = <LPASS_CDC_DMA_RX0>;
          cpu {
              sound-dai = <&lpass_cpu LPASS_CDC_DMA_RX0>;
          };

          codec {
              sound-dai = <&wcd938x 0>, <&swr0 0>, <&rxmacro 0>;
          };
      };
      dai-link@1 {
          link-name = "WCD Capture";
          reg = <LPASS_CDC_DMA_TX3>;
          cpu {
              sound-dai = <&lpass_cpu LPASS_CDC_DMA_TX3>;
          };

          codec {
              sound-dai = <&wcd938x 1>, <&swr1 0>, <&txmacro 0>;
          };
      };

      dai-link@2 {
          link-name = "MI2S Playback";
          reg = <MI2S_SECONDARY>;
          cpu {
              sound-dai = <&lpass_cpu MI2S_SECONDARY>;
          };

          codec {
              sound-dai = <&max98360a>;
          };
      };

      dai-link@3 {
          link-name = "DMIC Capture";
          reg = <LPASS_CDC_DMA_VA_TX0>;
          cpu {
              sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>;
          };

          codec {
              sound-dai = <&vamacro 0>;
          };
      };

      dai-link@5 {
          link-name = "DP Playback";
          reg = <LPASS_DP_RX>;
          cpu {
              sound-dai = <&lpass_cpu LPASS_DP_RX>;
          };

          codec {
              sound-dai = <&mdss_dp>;
          };
      };
  };