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