]>
Commit | Line | Data |
---|---|---|
53633a89 TR |
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: | |
53633a89 TR |
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 | }; |