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