xref: /freebsd/sys/contrib/device-tree/Bindings/sound/mediatek,mt8173-afe-pcm.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mediatek,mt8173-afe-pcm.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: Mediatek AFE PCM controller for MT8173
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotmaintainers:
10*833e5d42SEmmanuel Vadot  - Trevor Wu <trevor.wu@mediatek.com>
11*833e5d42SEmmanuel Vadot
12*833e5d42SEmmanuel Vadotproperties:
13*833e5d42SEmmanuel Vadot  compatible:
14*833e5d42SEmmanuel Vadot    const: mediatek,mt8173-afe-pcm
15*833e5d42SEmmanuel Vadot
16*833e5d42SEmmanuel Vadot  reg:
17*833e5d42SEmmanuel Vadot    maxItems: 1
18*833e5d42SEmmanuel Vadot
19*833e5d42SEmmanuel Vadot  interrupts:
20*833e5d42SEmmanuel Vadot    maxItems: 1
21*833e5d42SEmmanuel Vadot
22*833e5d42SEmmanuel Vadot  clocks:
23*833e5d42SEmmanuel Vadot    items:
24*833e5d42SEmmanuel Vadot      - description: audio infra sys clock
25*833e5d42SEmmanuel Vadot      - description: audio top mux
26*833e5d42SEmmanuel Vadot      - description: audio intbus mux
27*833e5d42SEmmanuel Vadot      - description: apll1 clock
28*833e5d42SEmmanuel Vadot      - description: apll2 clock
29*833e5d42SEmmanuel Vadot      - description: i2s0 mclk mux
30*833e5d42SEmmanuel Vadot      - description: i2s1 mclk mux
31*833e5d42SEmmanuel Vadot      - description: i2s2 mclk mux
32*833e5d42SEmmanuel Vadot      - description: i2s3 mclk mux
33*833e5d42SEmmanuel Vadot      - description: i2s3 bclk mux
34*833e5d42SEmmanuel Vadot
35*833e5d42SEmmanuel Vadot  clock-names:
36*833e5d42SEmmanuel Vadot    items:
37*833e5d42SEmmanuel Vadot      - const: infra_sys_audio_clk
38*833e5d42SEmmanuel Vadot      - const: top_pdn_audio
39*833e5d42SEmmanuel Vadot      - const: top_pdn_aud_intbus
40*833e5d42SEmmanuel Vadot      - const: bck0
41*833e5d42SEmmanuel Vadot      - const: bck1
42*833e5d42SEmmanuel Vadot      - const: i2s0_m
43*833e5d42SEmmanuel Vadot      - const: i2s1_m
44*833e5d42SEmmanuel Vadot      - const: i2s2_m
45*833e5d42SEmmanuel Vadot      - const: i2s3_m
46*833e5d42SEmmanuel Vadot      - const: i2s3_b
47*833e5d42SEmmanuel Vadot
48*833e5d42SEmmanuel Vadot  power-domains:
49*833e5d42SEmmanuel Vadot    maxItems: 1
50*833e5d42SEmmanuel Vadot
51*833e5d42SEmmanuel Vadot  memory-region:
52*833e5d42SEmmanuel Vadot    description: memory region for audio DMA buffers
53*833e5d42SEmmanuel Vadot    maxItems: 1
54*833e5d42SEmmanuel Vadot
55*833e5d42SEmmanuel Vadotrequired:
56*833e5d42SEmmanuel Vadot  - compatible
57*833e5d42SEmmanuel Vadot  - reg
58*833e5d42SEmmanuel Vadot  - interrupts
59*833e5d42SEmmanuel Vadot  - clocks
60*833e5d42SEmmanuel Vadot  - clock-names
61*833e5d42SEmmanuel Vadot  - power-domains
62*833e5d42SEmmanuel Vadot
63*833e5d42SEmmanuel VadotadditionalProperties: false
64*833e5d42SEmmanuel Vadot
65*833e5d42SEmmanuel Vadotexamples:
66*833e5d42SEmmanuel Vadot  - |
67*833e5d42SEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
68*833e5d42SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
69*833e5d42SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
70*833e5d42SEmmanuel Vadot    #include <dt-bindings/power/mt8173-power.h>
71*833e5d42SEmmanuel Vadot
72*833e5d42SEmmanuel Vadot    mt8173-afe-pcm@11220000 {
73*833e5d42SEmmanuel Vadot        compatible = "mediatek,mt8173-afe-pcm";
74*833e5d42SEmmanuel Vadot        reg = <0x11220000 0x1000>;
75*833e5d42SEmmanuel Vadot        interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>;
76*833e5d42SEmmanuel Vadot        power-domains = <&spm MT8173_POWER_DOMAIN_AUDIO>;
77*833e5d42SEmmanuel Vadot        clocks = <&infracfg CLK_INFRA_AUDIO>,
78*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_AUDIO_SEL>,
79*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_AUD_INTBUS_SEL>,
80*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_APLL1_DIV0>,
81*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_APLL2_DIV0>,
82*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_I2S0_M_SEL>,
83*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_I2S1_M_SEL>,
84*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_I2S2_M_SEL>,
85*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_I2S3_M_SEL>,
86*833e5d42SEmmanuel Vadot                 <&topckgen CLK_TOP_I2S3_B_SEL>;
87*833e5d42SEmmanuel Vadot         clock-names = "infra_sys_audio_clk",
88*833e5d42SEmmanuel Vadot                       "top_pdn_audio",
89*833e5d42SEmmanuel Vadot                       "top_pdn_aud_intbus",
90*833e5d42SEmmanuel Vadot                       "bck0",
91*833e5d42SEmmanuel Vadot                       "bck1",
92*833e5d42SEmmanuel Vadot                       "i2s0_m",
93*833e5d42SEmmanuel Vadot                       "i2s1_m",
94*833e5d42SEmmanuel Vadot                       "i2s2_m",
95*833e5d42SEmmanuel Vadot                       "i2s3_m",
96*833e5d42SEmmanuel Vadot                       "i2s3_b";
97*833e5d42SEmmanuel Vadot          memory-region = <&afe_dma_mem>;
98*833e5d42SEmmanuel Vadot    };
99