1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/mt8186-mt6366-rt1019-rt5682s.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Mediatek MT8186 with MT6366, RT1019 and RT5682S ASoC sound card driver
8
9maintainers:
10  - Jiaxin Yu <jiaxin.yu@mediatek.com>
11
12description:
13  This binding describes the MT8186 sound card.
14
15properties:
16  compatible:
17    enum:
18      - mediatek,mt8186-mt6366-rt1019-rt5682s-sound
19
20  mediatek,platform:
21    $ref: "/schemas/types.yaml#/definitions/phandle"
22    description: The phandle of MT8186 ASoC platform.
23
24  dmic-gpios:
25    maxItems: 1
26    description:
27      dmic-gpios optional prop for switching between two DMICs.
28      Ex, the GPIO can control a MUX HW component to select
29      dmic clk and data form a Front or Rear dmic.
30
31  headset-codec:
32    type: object
33    additionalProperties: false
34    properties:
35      sound-dai:
36        maxItems: 1
37    required:
38      - sound-dai
39
40  playback-codecs:
41    type: object
42    additionalProperties: false
43    properties:
44      sound-dai:
45        items:
46          - description: phandle of dp codec
47          - description: phandle of l channel speaker codec
48          - description: phandle of r channel speaker codec
49        minItems: 2
50    required:
51      - sound-dai
52
53  mediatek,adsp:
54    $ref: /schemas/types.yaml#/definitions/phandle
55    description: The phandle of MT8186 ADSP platform.
56
57  mediatek,dai-link:
58    $ref: /schemas/types.yaml#/definitions/string-array
59    description:
60      A list of the desired dai-links in the sound card. Each entry is a
61      name defined in the machine driver.
62
63additionalProperties: false
64
65required:
66  - compatible
67  - mediatek,platform
68  - headset-codec
69  - playback-codecs
70
71examples:
72  - |
73    #include <dt-bindings/gpio/gpio.h>
74
75    sound: mt8186-sound {
76        compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
77        mediatek,platform = <&afe>;
78        pinctrl-names = "aud_clk_mosi_off",
79                        "aud_clk_mosi_on",
80                        "aud_gpio_dmic_sec";
81        pinctrl-0 = <&aud_clk_mosi_off>;
82        pinctrl-1 = <&aud_clk_mosi_on>;
83        pinctrl-2 = <&aud_gpio_dmic_sec>;
84
85        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
86
87        headset-codec {
88            sound-dai = <&rt5682s>;
89        };
90
91        playback-codecs {
92             sound-dai = <&it6505dptx>,
93                         <&rt1019p>;
94        };
95    };
96
97...
98