xref: /freebsd/sys/contrib/device-tree/Bindings/sound/mediatek,mt7986-afe.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*aa1a8ff2SEmmanuel Vadot%YAML 1.2
3*aa1a8ff2SEmmanuel Vadot---
4*aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml#
5*aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*aa1a8ff2SEmmanuel Vadot
7*aa1a8ff2SEmmanuel Vadottitle: MediaTek AFE PCM controller for MT7986
8*aa1a8ff2SEmmanuel Vadot
9*aa1a8ff2SEmmanuel Vadotmaintainers:
10*aa1a8ff2SEmmanuel Vadot  - Maso Huang <maso.huang@mediatek.com>
11*aa1a8ff2SEmmanuel Vadot
12*aa1a8ff2SEmmanuel Vadotproperties:
13*aa1a8ff2SEmmanuel Vadot  compatible:
14*aa1a8ff2SEmmanuel Vadot    oneOf:
15*aa1a8ff2SEmmanuel Vadot      - const: mediatek,mt7986-afe
16*aa1a8ff2SEmmanuel Vadot      - items:
17*aa1a8ff2SEmmanuel Vadot          - enum:
18*aa1a8ff2SEmmanuel Vadot              - mediatek,mt7981-afe
19*aa1a8ff2SEmmanuel Vadot              - mediatek,mt7988-afe
20*aa1a8ff2SEmmanuel Vadot          - const: mediatek,mt7986-afe
21*aa1a8ff2SEmmanuel Vadot
22*aa1a8ff2SEmmanuel Vadot  reg:
23*aa1a8ff2SEmmanuel Vadot    maxItems: 1
24*aa1a8ff2SEmmanuel Vadot
25*aa1a8ff2SEmmanuel Vadot  interrupts:
26*aa1a8ff2SEmmanuel Vadot    maxItems: 1
27*aa1a8ff2SEmmanuel Vadot
28*aa1a8ff2SEmmanuel Vadot  clocks:
29*aa1a8ff2SEmmanuel Vadot    minItems: 5
30*aa1a8ff2SEmmanuel Vadot    items:
31*aa1a8ff2SEmmanuel Vadot      - description: audio bus clock
32*aa1a8ff2SEmmanuel Vadot      - description: audio 26M clock
33*aa1a8ff2SEmmanuel Vadot      - description: audio intbus clock
34*aa1a8ff2SEmmanuel Vadot      - description: audio hopping clock
35*aa1a8ff2SEmmanuel Vadot      - description: audio pll clock
36*aa1a8ff2SEmmanuel Vadot      - description: mux for pcm_mck
37*aa1a8ff2SEmmanuel Vadot      - description: audio i2s/pcm mck
38*aa1a8ff2SEmmanuel Vadot
39*aa1a8ff2SEmmanuel Vadot  clock-names:
40*aa1a8ff2SEmmanuel Vadot    minItems: 5
41*aa1a8ff2SEmmanuel Vadot    items:
42*aa1a8ff2SEmmanuel Vadot      - const: bus_ck
43*aa1a8ff2SEmmanuel Vadot      - const: 26m_ck
44*aa1a8ff2SEmmanuel Vadot      - const: l_ck
45*aa1a8ff2SEmmanuel Vadot      - const: aud_ck
46*aa1a8ff2SEmmanuel Vadot      - const: eg2_ck
47*aa1a8ff2SEmmanuel Vadot      - const: sel
48*aa1a8ff2SEmmanuel Vadot      - const: i2s_m
49*aa1a8ff2SEmmanuel Vadot
50*aa1a8ff2SEmmanuel Vadotrequired:
51*aa1a8ff2SEmmanuel Vadot  - compatible
52*aa1a8ff2SEmmanuel Vadot  - reg
53*aa1a8ff2SEmmanuel Vadot  - interrupts
54*aa1a8ff2SEmmanuel Vadot  - clocks
55*aa1a8ff2SEmmanuel Vadot  - clock-names
56*aa1a8ff2SEmmanuel Vadot
57*aa1a8ff2SEmmanuel VadotallOf:
58*aa1a8ff2SEmmanuel Vadot  - if:
59*aa1a8ff2SEmmanuel Vadot      properties:
60*aa1a8ff2SEmmanuel Vadot        compatible:
61*aa1a8ff2SEmmanuel Vadot          contains:
62*aa1a8ff2SEmmanuel Vadot            const: mediatek,mt7986-afe
63*aa1a8ff2SEmmanuel Vadot    then:
64*aa1a8ff2SEmmanuel Vadot      properties:
65*aa1a8ff2SEmmanuel Vadot        clocks:
66*aa1a8ff2SEmmanuel Vadot          items:
67*aa1a8ff2SEmmanuel Vadot            - description: audio bus clock
68*aa1a8ff2SEmmanuel Vadot            - description: audio 26M clock
69*aa1a8ff2SEmmanuel Vadot            - description: audio intbus clock
70*aa1a8ff2SEmmanuel Vadot            - description: audio hopping clock
71*aa1a8ff2SEmmanuel Vadot            - description: audio pll clock
72*aa1a8ff2SEmmanuel Vadot        clock-names:
73*aa1a8ff2SEmmanuel Vadot          items:
74*aa1a8ff2SEmmanuel Vadot            - const: bus_ck
75*aa1a8ff2SEmmanuel Vadot            - const: 26m_ck
76*aa1a8ff2SEmmanuel Vadot            - const: l_ck
77*aa1a8ff2SEmmanuel Vadot            - const: aud_ck
78*aa1a8ff2SEmmanuel Vadot            - const: eg2_ck
79*aa1a8ff2SEmmanuel Vadot
80*aa1a8ff2SEmmanuel Vadot  - if:
81*aa1a8ff2SEmmanuel Vadot      properties:
82*aa1a8ff2SEmmanuel Vadot        compatible:
83*aa1a8ff2SEmmanuel Vadot          contains:
84*aa1a8ff2SEmmanuel Vadot            const: mediatek,mt7981-afe
85*aa1a8ff2SEmmanuel Vadot    then:
86*aa1a8ff2SEmmanuel Vadot      properties:
87*aa1a8ff2SEmmanuel Vadot        clocks:
88*aa1a8ff2SEmmanuel Vadot          items:
89*aa1a8ff2SEmmanuel Vadot            - description: audio bus clock
90*aa1a8ff2SEmmanuel Vadot            - description: audio 26M clock
91*aa1a8ff2SEmmanuel Vadot            - description: audio intbus clock
92*aa1a8ff2SEmmanuel Vadot            - description: audio hopping clock
93*aa1a8ff2SEmmanuel Vadot            - description: audio pll clock
94*aa1a8ff2SEmmanuel Vadot            - description: mux for pcm_mck
95*aa1a8ff2SEmmanuel Vadot        clock-names:
96*aa1a8ff2SEmmanuel Vadot          items:
97*aa1a8ff2SEmmanuel Vadot            - const: bus_ck
98*aa1a8ff2SEmmanuel Vadot            - const: 26m_ck
99*aa1a8ff2SEmmanuel Vadot            - const: l_ck
100*aa1a8ff2SEmmanuel Vadot            - const: aud_ck
101*aa1a8ff2SEmmanuel Vadot            - const: eg2_ck
102*aa1a8ff2SEmmanuel Vadot            - const: sel
103*aa1a8ff2SEmmanuel Vadot
104*aa1a8ff2SEmmanuel Vadot  - if:
105*aa1a8ff2SEmmanuel Vadot      properties:
106*aa1a8ff2SEmmanuel Vadot        compatible:
107*aa1a8ff2SEmmanuel Vadot          contains:
108*aa1a8ff2SEmmanuel Vadot            const: mediatek,mt7988-afe
109*aa1a8ff2SEmmanuel Vadot    then:
110*aa1a8ff2SEmmanuel Vadot      properties:
111*aa1a8ff2SEmmanuel Vadot        clocks:
112*aa1a8ff2SEmmanuel Vadot          items:
113*aa1a8ff2SEmmanuel Vadot            - description: audio bus clock
114*aa1a8ff2SEmmanuel Vadot            - description: audio 26M clock
115*aa1a8ff2SEmmanuel Vadot            - description: audio intbus clock
116*aa1a8ff2SEmmanuel Vadot            - description: audio hopping clock
117*aa1a8ff2SEmmanuel Vadot            - description: audio pll clock
118*aa1a8ff2SEmmanuel Vadot            - description: mux for pcm_mck
119*aa1a8ff2SEmmanuel Vadot            - description: audio i2s/pcm mck
120*aa1a8ff2SEmmanuel Vadot        clock-names:
121*aa1a8ff2SEmmanuel Vadot          items:
122*aa1a8ff2SEmmanuel Vadot            - const: bus_ck
123*aa1a8ff2SEmmanuel Vadot            - const: 26m_ck
124*aa1a8ff2SEmmanuel Vadot            - const: l_ck
125*aa1a8ff2SEmmanuel Vadot            - const: aud_ck
126*aa1a8ff2SEmmanuel Vadot            - const: eg2_ck
127*aa1a8ff2SEmmanuel Vadot            - const: sel
128*aa1a8ff2SEmmanuel Vadot            - const: i2s_m
129*aa1a8ff2SEmmanuel Vadot
130*aa1a8ff2SEmmanuel VadotadditionalProperties: false
131*aa1a8ff2SEmmanuel Vadot
132*aa1a8ff2SEmmanuel Vadotexamples:
133*aa1a8ff2SEmmanuel Vadot  - |
134*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
135*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
136*aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/clock/mt7986-clk.h>
137*aa1a8ff2SEmmanuel Vadot
138*aa1a8ff2SEmmanuel Vadot    afe@11210000 {
139*aa1a8ff2SEmmanuel Vadot        compatible = "mediatek,mt7986-afe";
140*aa1a8ff2SEmmanuel Vadot        reg = <0x11210000 0x9000>;
141*aa1a8ff2SEmmanuel Vadot        interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
142*aa1a8ff2SEmmanuel Vadot        clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>,
143*aa1a8ff2SEmmanuel Vadot                 <&infracfg_ao CLK_INFRA_AUD_26M_CK>,
144*aa1a8ff2SEmmanuel Vadot                 <&infracfg_ao CLK_INFRA_AUD_L_CK>,
145*aa1a8ff2SEmmanuel Vadot                 <&infracfg_ao CLK_INFRA_AUD_AUD_CK>,
146*aa1a8ff2SEmmanuel Vadot                 <&infracfg_ao CLK_INFRA_AUD_EG2_CK>;
147*aa1a8ff2SEmmanuel Vadot        clock-names = "bus_ck",
148*aa1a8ff2SEmmanuel Vadot                      "26m_ck",
149*aa1a8ff2SEmmanuel Vadot                      "l_ck",
150*aa1a8ff2SEmmanuel Vadot                      "aud_ck",
151*aa1a8ff2SEmmanuel Vadot                      "eg2_ck";
152*aa1a8ff2SEmmanuel Vadot        assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>,
153*aa1a8ff2SEmmanuel Vadot                          <&topckgen CLK_TOP_AUD_L_SEL>,
154*aa1a8ff2SEmmanuel Vadot                          <&topckgen CLK_TOP_A_TUNER_SEL>;
155*aa1a8ff2SEmmanuel Vadot        assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>,
156*aa1a8ff2SEmmanuel Vadot                                 <&apmixedsys CLK_APMIXED_APLL2>,
157*aa1a8ff2SEmmanuel Vadot                                 <&topckgen CLK_TOP_APLL2_D4>;
158*aa1a8ff2SEmmanuel Vadot    };
159*aa1a8ff2SEmmanuel Vadot
160*aa1a8ff2SEmmanuel Vadot...
161