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,sc7180-trogdor.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Google SC7180-Trogdor ASoC sound card driver
8
9maintainers:
10  - Rohit kumar <rohitkr@codeaurora.org>
11  - Cheng-Yi Chiang <cychiang@chromium.org>
12
13description:
14  This binding describes the SC7180 sound card which uses LPASS for audio.
15
16properties:
17  compatible:
18    enum:
19      - google,sc7180-trogdor
20      - google,sc7180-coachz
21
22  audio-routing:
23    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
24    description:
25      A list of the connections between audio components. Each entry is a
26      pair of strings, the first being the connection's sink, the second
27      being the connection's source.
28
29  model:
30    $ref: /schemas/types.yaml#/definitions/string
31    description: User specified audio sound card name
32
33  "#address-cells":
34    const: 1
35
36  "#size-cells":
37    const: 0
38
39  dmic-gpios:
40    maxItems: 1
41    description: GPIO for switching between DMICs
42
43patternProperties:
44  "^dai-link(@[0-9])?$":
45    description:
46      Each subnode represents a dai link. Subnodes of each dai links would be
47      cpu/codec dais.
48
49    type: object
50
51    properties:
52      link-name:
53        description: Indicates dai-link name and PCM stream name.
54        $ref: /schemas/types.yaml#/definitions/string
55        maxItems: 1
56
57      reg:
58        description: dai link address.
59
60      cpu:
61        description: Holds subnode which indicates cpu dai.
62        type: object
63        properties:
64          sound-dai: true
65
66      codec:
67        description: Holds subnode which indicates codec dai.
68        type: object
69        properties:
70          sound-dai: true
71
72    required:
73      - link-name
74      - cpu
75      - codec
76
77    additionalProperties: false
78
79required:
80  - compatible
81  - model
82  - "#address-cells"
83  - "#size-cells"
84
85additionalProperties: false
86
87examples:
88
89  - |
90    sound {
91        compatible = "google,sc7180-trogdor";
92        model = "sc7180-rt5682-max98357a-2mic";
93
94        audio-routing =
95                    "Headphone Jack", "HPOL",
96                    "Headphone Jack", "HPOR";
97
98        #address-cells = <1>;
99        #size-cells = <0>;
100
101        dmic-gpios = <&tlmm 86 0>;
102
103        dai-link@0 {
104            link-name = "MultiMedia0";
105            reg = <0>;
106            cpu {
107                sound-dai = <&lpass_cpu 0>;
108            };
109
110            codec {
111                sound-dai = <&alc5682 0>;
112            };
113        };
114
115        dai-link@1 {
116            link-name = "MultiMedia1";
117            reg = <1>;
118            cpu {
119                sound-dai = <&lpass_cpu 1>;
120            };
121
122            codec {
123                sound-dai = <&max98357a>;
124            };
125        };
126
127        dai-link@2 {
128            link-name = "MultiMedia2";
129            reg = <2>;
130            cpu {
131                sound-dai = <&lpass_hdmi 0>;
132            };
133
134            codec {
135                sound-dai = <&msm_dp>;
136            };
137        };
138    };
139