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