xref: /freebsd/sys/contrib/device-tree/Bindings/sound/google,sc7180-trogdor.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,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        maxItems: 1
59        description: dai link address.
60
61      cpu:
62        description: Holds subnode which indicates cpu dai.
63        type: object
64        additionalProperties: false
65
66        properties:
67          sound-dai:
68            maxItems: 1
69
70      codec:
71        description: Holds subnode which indicates codec dai.
72        type: object
73        additionalProperties: false
74
75        properties:
76          sound-dai:
77            maxItems: 1
78
79    required:
80      - link-name
81      - cpu
82      - codec
83
84    additionalProperties: false
85
86required:
87  - compatible
88  - model
89  - "#address-cells"
90  - "#size-cells"
91
92additionalProperties: false
93
94examples:
95
96  - |
97    sound {
98        compatible = "google,sc7180-trogdor";
99        model = "sc7180-rt5682-max98357a-2mic";
100
101        audio-routing =
102                    "Headphone Jack", "HPOL",
103                    "Headphone Jack", "HPOR";
104
105        #address-cells = <1>;
106        #size-cells = <0>;
107
108        dmic-gpios = <&tlmm 86 0>;
109
110        dai-link@0 {
111            link-name = "MultiMedia0";
112            reg = <0>;
113            cpu {
114                sound-dai = <&lpass_cpu 0>;
115            };
116
117            codec {
118                sound-dai = <&alc5682 0>;
119            };
120        };
121
122        dai-link@1 {
123            link-name = "MultiMedia1";
124            reg = <1>;
125            cpu {
126                sound-dai = <&lpass_cpu 1>;
127            };
128
129            codec {
130                sound-dai = <&max98357a>;
131            };
132        };
133
134        dai-link@2 {
135            link-name = "MultiMedia2";
136            reg = <2>;
137            cpu {
138                sound-dai = <&lpass_hdmi 0>;
139            };
140
141            codec {
142                sound-dai = <&msm_dp>;
143            };
144        };
145    };
146