Linux 6.7-rc7
[linux-modified.git] / Documentation / devicetree / bindings / sound / mediatek,mt8188-mt6359.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: MediaTek MT8188 ASoC sound card
8
9 maintainers:
10   - Trevor Wu <trevor.wu@mediatek.com>
11
12 allOf:
13   - $ref: sound-card-common.yaml#
14
15 properties:
16   compatible:
17     enum:
18       - mediatek,mt8188-mt6359-evb
19       - mediatek,mt8188-nau8825
20       - mediatek,mt8188-rt5682s
21
22   audio-routing:
23     description:
24       Valid names could be the input or output widgets of audio components,
25       power supplies, MicBias of codec and the software switch.
26
27   mediatek,platform:
28     $ref: /schemas/types.yaml#/definitions/phandle
29     description: The phandle of MT8188 ASoC platform.
30
31 patternProperties:
32   "^dai-link-[0-9]+$":
33     type: object
34     description:
35       Container for dai-link level properties and CODEC sub-nodes.
36
37     properties:
38       link-name:
39         description:
40           This property corresponds to the name of the BE dai-link to which
41           we are going to update parameters in this node.
42         items:
43           enum:
44             - DPTX_BE
45             - ETDM1_IN_BE
46             - ETDM2_IN_BE
47             - ETDM1_OUT_BE
48             - ETDM2_OUT_BE
49             - ETDM3_OUT_BE
50             - PCM1_BE
51
52       codec:
53         description: Holds subnode which indicates codec dai.
54         type: object
55         additionalProperties: false
56         properties:
57           sound-dai:
58             minItems: 1
59             maxItems: 2
60         required:
61           - sound-dai
62
63       dai-format:
64         description: audio format.
65         items:
66           enum:
67             - i2s
68             - right_j
69             - left_j
70             - dsp_a
71             - dsp_b
72
73       mediatek,clk-provider:
74         $ref: /schemas/types.yaml#/definitions/string
75         description: Indicates dai-link clock master.
76         items:
77           enum:
78             - cpu
79             - codec
80
81     additionalProperties: false
82
83     required:
84       - link-name
85
86 unevaluatedProperties: false
87
88 required:
89   - compatible
90   - mediatek,platform
91
92 examples:
93   - |
94     sound {
95         compatible = "mediatek,mt8188-mt6359-evb";
96         model = "MT6359-EVB";
97         mediatek,platform = <&afe>;
98         pinctrl-names = "default";
99         pinctrl-0 = <&aud_pins_default>;
100         audio-routing =
101             "Headphone", "Headphone L",
102             "Headphone", "Headphone R",
103             "AIN1", "Headset Mic";
104         dai-link-0 {
105             link-name = "ETDM3_OUT_BE";
106             dai-format = "i2s";
107             mediatek,clk-provider = "cpu";
108             codec {
109                 sound-dai = <&hdmi0>;
110             };
111         };
112     };
113
114 ...