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