xref: /freebsd/sys/contrib/device-tree/Bindings/sound/mediatek,mt8365-mt6357.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b2d2a78aSEmmanuel Vadot%YAML 1.2
3*b2d2a78aSEmmanuel Vadot---
4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mediatek,mt8365-mt6357.yaml#
5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadottitle: MediaTek MT8365 ASoC sound card
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadotmaintainers:
10*b2d2a78aSEmmanuel Vadot  - Alexandre Mergnat <amergnat@baylibre.com>
11*b2d2a78aSEmmanuel Vadot
12*b2d2a78aSEmmanuel Vadotproperties:
13*b2d2a78aSEmmanuel Vadot  compatible:
14*b2d2a78aSEmmanuel Vadot    const: mediatek,mt8365-mt6357
15*b2d2a78aSEmmanuel Vadot
16*b2d2a78aSEmmanuel Vadot  pinctrl-names:
17*b2d2a78aSEmmanuel Vadot    minItems: 1
18*b2d2a78aSEmmanuel Vadot    items:
19*b2d2a78aSEmmanuel Vadot      - const: default
20*b2d2a78aSEmmanuel Vadot      - const: dmic
21*b2d2a78aSEmmanuel Vadot      - const: miso_off
22*b2d2a78aSEmmanuel Vadot      - const: miso_on
23*b2d2a78aSEmmanuel Vadot      - const: mosi_off
24*b2d2a78aSEmmanuel Vadot      - const: mosi_on
25*b2d2a78aSEmmanuel Vadot
26*b2d2a78aSEmmanuel Vadot  mediatek,platform:
27*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
28*b2d2a78aSEmmanuel Vadot    description: The phandle of MT8365 ASoC platform.
29*b2d2a78aSEmmanuel Vadot
30*b2d2a78aSEmmanuel VadotpatternProperties:
31*b2d2a78aSEmmanuel Vadot  "^dai-link-[0-9]+$":
32*b2d2a78aSEmmanuel Vadot    type: object
33*b2d2a78aSEmmanuel Vadot    description:
34*b2d2a78aSEmmanuel Vadot      Container for dai-link level properties and CODEC sub-nodes.
35*b2d2a78aSEmmanuel Vadot
36*b2d2a78aSEmmanuel Vadot    properties:
37*b2d2a78aSEmmanuel Vadot      codec:
38*b2d2a78aSEmmanuel Vadot        type: object
39*b2d2a78aSEmmanuel Vadot        description: Holds subnode which indicates codec dai.
40*b2d2a78aSEmmanuel Vadot
41*b2d2a78aSEmmanuel Vadot        properties:
42*b2d2a78aSEmmanuel Vadot          sound-dai:
43*b2d2a78aSEmmanuel Vadot            maxItems: 1
44*b2d2a78aSEmmanuel Vadot            description: phandle of the codec DAI
45*b2d2a78aSEmmanuel Vadot
46*b2d2a78aSEmmanuel Vadot        additionalProperties: false
47*b2d2a78aSEmmanuel Vadot
48*b2d2a78aSEmmanuel Vadot      link-name:
49*b2d2a78aSEmmanuel Vadot        description: Indicates dai-link name and PCM stream name
50*b2d2a78aSEmmanuel Vadot        enum:
51*b2d2a78aSEmmanuel Vadot          - I2S_IN_BE
52*b2d2a78aSEmmanuel Vadot          - I2S_OUT_BE
53*b2d2a78aSEmmanuel Vadot          - PCM1_BE
54*b2d2a78aSEmmanuel Vadot          - PDM1_BE
55*b2d2a78aSEmmanuel Vadot          - PDM2_BE
56*b2d2a78aSEmmanuel Vadot          - PDM3_BE
57*b2d2a78aSEmmanuel Vadot          - PDM4_BE
58*b2d2a78aSEmmanuel Vadot          - SPDIF_IN_BE
59*b2d2a78aSEmmanuel Vadot          - SPDIF_OUT_BE
60*b2d2a78aSEmmanuel Vadot          - TDM_IN_BE
61*b2d2a78aSEmmanuel Vadot          - TDM_OUT_BE
62*b2d2a78aSEmmanuel Vadot
63*b2d2a78aSEmmanuel Vadot      sound-dai:
64*b2d2a78aSEmmanuel Vadot        maxItems: 1
65*b2d2a78aSEmmanuel Vadot        description: phandle of the CPU DAI
66*b2d2a78aSEmmanuel Vadot
67*b2d2a78aSEmmanuel Vadot    required:
68*b2d2a78aSEmmanuel Vadot      - link-name
69*b2d2a78aSEmmanuel Vadot      - sound-dai
70*b2d2a78aSEmmanuel Vadot
71*b2d2a78aSEmmanuel Vadot    additionalProperties: false
72*b2d2a78aSEmmanuel Vadot
73*b2d2a78aSEmmanuel Vadotrequired:
74*b2d2a78aSEmmanuel Vadot  - compatible
75*b2d2a78aSEmmanuel Vadot  - pinctrl-names
76*b2d2a78aSEmmanuel Vadot  - mediatek,platform
77*b2d2a78aSEmmanuel Vadot
78*b2d2a78aSEmmanuel VadotadditionalProperties: false
79*b2d2a78aSEmmanuel Vadot
80*b2d2a78aSEmmanuel Vadotexamples:
81*b2d2a78aSEmmanuel Vadot  - |
82*b2d2a78aSEmmanuel Vadot    sound {
83*b2d2a78aSEmmanuel Vadot        compatible = "mediatek,mt8365-mt6357";
84*b2d2a78aSEmmanuel Vadot        pinctrl-names = "default",
85*b2d2a78aSEmmanuel Vadot                        "dmic",
86*b2d2a78aSEmmanuel Vadot                        "miso_off",
87*b2d2a78aSEmmanuel Vadot                        "miso_on",
88*b2d2a78aSEmmanuel Vadot                        "mosi_off",
89*b2d2a78aSEmmanuel Vadot                        "mosi_on";
90*b2d2a78aSEmmanuel Vadot        pinctrl-0 = <&aud_default_pins>;
91*b2d2a78aSEmmanuel Vadot        pinctrl-1 = <&aud_dmic_pins>;
92*b2d2a78aSEmmanuel Vadot        pinctrl-2 = <&aud_miso_off_pins>;
93*b2d2a78aSEmmanuel Vadot        pinctrl-3 = <&aud_miso_on_pins>;
94*b2d2a78aSEmmanuel Vadot        pinctrl-4 = <&aud_mosi_off_pins>;
95*b2d2a78aSEmmanuel Vadot        pinctrl-5 = <&aud_mosi_on_pins>;
96*b2d2a78aSEmmanuel Vadot        mediatek,platform = <&afe>;
97*b2d2a78aSEmmanuel Vadot
98*b2d2a78aSEmmanuel Vadot        /* hdmi interface */
99*b2d2a78aSEmmanuel Vadot        dai-link-0 {
100*b2d2a78aSEmmanuel Vadot            link-name = "I2S_OUT_BE";
101*b2d2a78aSEmmanuel Vadot            sound-dai = <&afe>;
102*b2d2a78aSEmmanuel Vadot
103*b2d2a78aSEmmanuel Vadot            codec {
104*b2d2a78aSEmmanuel Vadot                sound-dai = <&it66121hdmitx>;
105*b2d2a78aSEmmanuel Vadot            };
106*b2d2a78aSEmmanuel Vadot        };
107*b2d2a78aSEmmanuel Vadot    };
108