xref: /freebsd/sys/contrib/device-tree/Bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml (revision 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
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      - mediatek,mt8186-mt6366-rt5682s-max98360-sound
20      - mediatek,mt8186-mt6366-rt5650-sound
21
22  mediatek,platform:
23    $ref: /schemas/types.yaml#/definitions/phandle
24    description: The phandle of MT8186 ASoC platform.
25
26  dmic-gpios:
27    maxItems: 1
28    description:
29      dmic-gpios optional prop for switching between two DMICs.
30      Ex, the GPIO can control a MUX HW component to select
31      dmic clk and data form a Front or Rear dmic.
32
33  headset-codec:
34    type: object
35    additionalProperties: false
36    properties:
37      sound-dai:
38        maxItems: 1
39    required:
40      - sound-dai
41
42  playback-codecs:
43    type: object
44    additionalProperties: false
45    properties:
46      sound-dai:
47        items:
48          - description: phandle of dp codec
49          - description: phandle of l channel speaker codec
50          - description: phandle of r channel speaker codec
51        minItems: 2
52    required:
53      - sound-dai
54
55  mediatek,adsp:
56    $ref: /schemas/types.yaml#/definitions/phandle
57    description: The phandle of MT8186 ADSP platform.
58
59  mediatek,dai-link:
60    $ref: /schemas/types.yaml#/definitions/string-array
61    description:
62      A list of the desired dai-links in the sound card. Each entry is a
63      name defined in the machine driver.
64
65additionalProperties: false
66
67required:
68  - compatible
69  - mediatek,platform
70  - headset-codec
71  - playback-codecs
72
73examples:
74  - |
75    #include <dt-bindings/gpio/gpio.h>
76
77    sound: mt8186-sound {
78        compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
79        mediatek,platform = <&afe>;
80        pinctrl-names = "aud_clk_mosi_off",
81                        "aud_clk_mosi_on",
82                        "aud_gpio_dmic_sec";
83        pinctrl-0 = <&aud_clk_mosi_off>;
84        pinctrl-1 = <&aud_clk_mosi_on>;
85        pinctrl-2 = <&aud_gpio_dmic_sec>;
86
87        dmic-gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
88
89        headset-codec {
90            sound-dai = <&rt5682s>;
91        };
92
93        playback-codecs {
94             sound-dai = <&it6505dptx>,
95                         <&rt1019p>;
96        };
97    };
98
99...
100