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