xref: /openbmc/linux/Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1b5bac34fSTrevor Wu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b5bac34fSTrevor Wu%YAML 1.2
3b5bac34fSTrevor Wu---
4b5bac34fSTrevor Wu$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml#
5b5bac34fSTrevor Wu$schema: http://devicetree.org/meta-schemas/core.yaml#
6b5bac34fSTrevor Wu
7b5bac34fSTrevor Wutitle: Mediatek AFE PCM controller for mt8195
8b5bac34fSTrevor Wu
9b5bac34fSTrevor Wumaintainers:
10b5bac34fSTrevor Wu  - Trevor Wu <trevor.wu@mediatek.com>
11b5bac34fSTrevor Wu
12b5bac34fSTrevor Wuproperties:
13b5bac34fSTrevor Wu  compatible:
14b5bac34fSTrevor Wu    const: mediatek,mt8195-audio
15b5bac34fSTrevor Wu
16b5bac34fSTrevor Wu  reg:
17b5bac34fSTrevor Wu    maxItems: 1
18b5bac34fSTrevor Wu
19b5bac34fSTrevor Wu  interrupts:
20b5bac34fSTrevor Wu    maxItems: 1
21b5bac34fSTrevor Wu
22ee7f79a8STrevor Wu  resets:
23ee7f79a8STrevor Wu    maxItems: 1
24ee7f79a8STrevor Wu
25ee7f79a8STrevor Wu  reset-names:
26ee7f79a8STrevor Wu    const: audiosys
27ee7f79a8STrevor Wu
282da63624STrevor Wu  memory-region:
292da63624STrevor Wu    maxItems: 1
302da63624STrevor Wu    description: |
312da63624STrevor Wu      Shared memory region for AFE memif.  A "shared-dma-pool".
322da63624STrevor Wu      See ../reserved-memory/reserved-memory.txt for details.
332da63624STrevor Wu
34b5bac34fSTrevor Wu  mediatek,topckgen:
35d9e909e2SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
36b5bac34fSTrevor Wu    description: The phandle of the mediatek topckgen controller
37b5bac34fSTrevor Wu
38b5bac34fSTrevor Wu  power-domains:
39b5bac34fSTrevor Wu    maxItems: 1
40b5bac34fSTrevor Wu
41b5bac34fSTrevor Wu  clocks:
42b5bac34fSTrevor Wu    items:
43b5bac34fSTrevor Wu      - description: 26M clock
44b5bac34fSTrevor Wu      - description: audio pll1 clock
45b5bac34fSTrevor Wu      - description: audio pll2 clock
46b5bac34fSTrevor Wu      - description: clock divider for i2si1_mck
47b5bac34fSTrevor Wu      - description: clock divider for i2si2_mck
48b5bac34fSTrevor Wu      - description: clock divider for i2so1_mck
49b5bac34fSTrevor Wu      - description: clock divider for i2so2_mck
50b5bac34fSTrevor Wu      - description: clock divider for dptx_mck
51b5bac34fSTrevor Wu      - description: a1sys hoping clock
52b5bac34fSTrevor Wu      - description: audio intbus clock
53b5bac34fSTrevor Wu      - description: audio hires clock
54b5bac34fSTrevor Wu      - description: audio local bus clock
55b5bac34fSTrevor Wu      - description: mux for dptx_mck
56b5bac34fSTrevor Wu      - description: mux for i2so1_mck
57b5bac34fSTrevor Wu      - description: mux for i2so2_mck
58b5bac34fSTrevor Wu      - description: mux for i2si1_mck
59b5bac34fSTrevor Wu      - description: mux for i2si2_mck
60b5bac34fSTrevor Wu      - description: audio infra 26M clock
61b5bac34fSTrevor Wu      - description: infra bus clock
62b5bac34fSTrevor Wu
63b5bac34fSTrevor Wu  clock-names:
64b5bac34fSTrevor Wu    items:
65b5bac34fSTrevor Wu      - const: clk26m
66b5bac34fSTrevor Wu      - const: apll1_ck
67b5bac34fSTrevor Wu      - const: apll2_ck
68b5bac34fSTrevor Wu      - const: apll12_div0
69b5bac34fSTrevor Wu      - const: apll12_div1
70b5bac34fSTrevor Wu      - const: apll12_div2
71b5bac34fSTrevor Wu      - const: apll12_div3
72b5bac34fSTrevor Wu      - const: apll12_div9
73b5bac34fSTrevor Wu      - const: a1sys_hp_sel
74b5bac34fSTrevor Wu      - const: aud_intbus_sel
75b5bac34fSTrevor Wu      - const: audio_h_sel
76b5bac34fSTrevor Wu      - const: audio_local_bus_sel
77b5bac34fSTrevor Wu      - const: dptx_m_sel
78b5bac34fSTrevor Wu      - const: i2so1_m_sel
79b5bac34fSTrevor Wu      - const: i2so2_m_sel
80b5bac34fSTrevor Wu      - const: i2si1_m_sel
81b5bac34fSTrevor Wu      - const: i2si2_m_sel
82b5bac34fSTrevor Wu      - const: infra_ao_audio_26m_b
83b5bac34fSTrevor Wu      - const: scp_adsp_audiodsp
84b5bac34fSTrevor Wu
85b5bac34fSTrevor Wu  mediatek,etdm-in1-chn-disabled:
86b5bac34fSTrevor Wu    $ref: /schemas/types.yaml#/definitions/uint8-array
87b5bac34fSTrevor Wu    maxItems: 24
88b5bac34fSTrevor Wu    description: Specify which input channel should be disabled.
89b5bac34fSTrevor Wu
90b5bac34fSTrevor Wu  mediatek,etdm-in2-chn-disabled:
91b5bac34fSTrevor Wu    $ref: /schemas/types.yaml#/definitions/uint8-array
92b5bac34fSTrevor Wu    maxItems: 16
93b5bac34fSTrevor Wu    description: Specify which input channel should be disabled.
94b5bac34fSTrevor Wu
95b5bac34fSTrevor WupatternProperties:
96b5bac34fSTrevor Wu  "^mediatek,etdm-in[1-2]-mclk-always-on-rate-hz$":
97b5bac34fSTrevor Wu    description: Specify etdm in mclk output rate for always on case.
98b5bac34fSTrevor Wu
99b5bac34fSTrevor Wu  "^mediatek,etdm-out[1-3]-mclk-always-on-rate-hz$":
100b5bac34fSTrevor Wu    description: Specify etdm out mclk output rate for always on case.
101b5bac34fSTrevor Wu
102b5bac34fSTrevor Wu  "^mediatek,etdm-in[1-2]-multi-pin-mode$":
103b5bac34fSTrevor Wu    type: boolean
104b5bac34fSTrevor Wu    description: if present, the etdm data mode is I2S.
105b5bac34fSTrevor Wu
106b5bac34fSTrevor Wu  "^mediatek,etdm-out[1-3]-multi-pin-mode$":
107b5bac34fSTrevor Wu    type: boolean
108b5bac34fSTrevor Wu    description: if present, the etdm data mode is I2S.
109b5bac34fSTrevor Wu
110b5bac34fSTrevor Wu  "^mediatek,etdm-in[1-2]-cowork-source$":
111b5bac34fSTrevor Wu    $ref: /schemas/types.yaml#/definitions/uint32
112b5bac34fSTrevor Wu    description: |
113b5bac34fSTrevor Wu      etdm modules can share the same external clock pin. Specify
114*47aab533SBjorn Helgaas      which etdm clock source is required by this etdm in module.
115b5bac34fSTrevor Wu    enum:
116b5bac34fSTrevor Wu      - 0 # etdm1_in
117b5bac34fSTrevor Wu      - 1 # etdm2_in
118b5bac34fSTrevor Wu      - 2 # etdm1_out
119b5bac34fSTrevor Wu      - 3 # etdm2_out
120b5bac34fSTrevor Wu
121b5bac34fSTrevor Wu  "^mediatek,etdm-out[1-2]-cowork-source$":
122b5bac34fSTrevor Wu    $ref: /schemas/types.yaml#/definitions/uint32
123b5bac34fSTrevor Wu    description: |
124b5bac34fSTrevor Wu      etdm modules can share the same external clock pin. Specify
125*47aab533SBjorn Helgaas      which etdm clock source is required by this etdm out module.
126b5bac34fSTrevor Wu    enum:
127b5bac34fSTrevor Wu      - 0 # etdm1_in
128b5bac34fSTrevor Wu      - 1 # etdm2_in
129b5bac34fSTrevor Wu      - 2 # etdm1_out
130b5bac34fSTrevor Wu      - 3 # etdm2_out
131b5bac34fSTrevor Wu
132b5bac34fSTrevor Wurequired:
133b5bac34fSTrevor Wu  - compatible
134b5bac34fSTrevor Wu  - reg
135b5bac34fSTrevor Wu  - interrupts
136ee7f79a8STrevor Wu  - resets
137ee7f79a8STrevor Wu  - reset-names
138b5bac34fSTrevor Wu  - mediatek,topckgen
139b5bac34fSTrevor Wu  - power-domains
140b5bac34fSTrevor Wu  - clocks
141b5bac34fSTrevor Wu  - clock-names
1422da63624STrevor Wu  - memory-region
143b5bac34fSTrevor Wu
144b5bac34fSTrevor WuadditionalProperties: false
145b5bac34fSTrevor Wu
146b5bac34fSTrevor Wuexamples:
147b5bac34fSTrevor Wu  - |
148b5bac34fSTrevor Wu    #include <dt-bindings/interrupt-controller/arm-gic.h>
149b5bac34fSTrevor Wu    #include <dt-bindings/interrupt-controller/irq.h>
150b5bac34fSTrevor Wu
151b5bac34fSTrevor Wu    afe: mt8195-afe-pcm@10890000 {
152b5bac34fSTrevor Wu        compatible = "mediatek,mt8195-audio";
153b5bac34fSTrevor Wu        reg = <0x10890000 0x10000>;
154b5bac34fSTrevor Wu        interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
155ee7f79a8STrevor Wu        resets = <&watchdog 14>;
156ee7f79a8STrevor Wu        reset-names = "audiosys";
157b5bac34fSTrevor Wu        mediatek,topckgen = <&topckgen>;
158222039a2STrevor Wu        power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
1592da63624STrevor Wu        memory-region = <&snd_dma_mem_reserved>;
160b5bac34fSTrevor Wu        clocks = <&clk26m>,
161222039a2STrevor Wu                 <&topckgen 163>, //CLK_TOP_APLL1
162222039a2STrevor Wu                 <&topckgen 166>, //CLK_TOP_APLL2
163222039a2STrevor Wu                 <&topckgen 233>, //CLK_TOP_APLL12_DIV0
164222039a2STrevor Wu                 <&topckgen 234>, //CLK_TOP_APLL12_DIV1
165222039a2STrevor Wu                 <&topckgen 235>, //CLK_TOP_APLL12_DIV2
166222039a2STrevor Wu                 <&topckgen 236>, //CLK_TOP_APLL12_DIV3
167222039a2STrevor Wu                 <&topckgen 238>, //CLK_TOP_APLL12_DIV9
168222039a2STrevor Wu                 <&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL
169222039a2STrevor Wu                 <&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL
170222039a2STrevor Wu                 <&topckgen 34>, //CLK_TOP_AUDIO_H_SEL
171222039a2STrevor Wu                 <&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL
172222039a2STrevor Wu                 <&topckgen 98>, //CLK_TOP_DPTX_M_SEL
173222039a2STrevor Wu                 <&topckgen 94>, //CLK_TOP_I2SO1_M_SEL
174222039a2STrevor Wu                 <&topckgen 95>, //CLK_TOP_I2SO2_M_SEL
175222039a2STrevor Wu                 <&topckgen 96>, //CLK_TOP_I2SI1_M_SEL
176222039a2STrevor Wu                 <&topckgen 97>, //CLK_TOP_I2SI2_M_SEL
177222039a2STrevor Wu                 <&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B
178222039a2STrevor Wu                 <&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP
179b5bac34fSTrevor Wu        clock-names = "clk26m",
180b5bac34fSTrevor Wu                      "apll1_ck",
181b5bac34fSTrevor Wu                      "apll2_ck",
182b5bac34fSTrevor Wu                      "apll12_div0",
183b5bac34fSTrevor Wu                      "apll12_div1",
184b5bac34fSTrevor Wu                      "apll12_div2",
185b5bac34fSTrevor Wu                      "apll12_div3",
186b5bac34fSTrevor Wu                      "apll12_div9",
187b5bac34fSTrevor Wu                      "a1sys_hp_sel",
188b5bac34fSTrevor Wu                      "aud_intbus_sel",
189b5bac34fSTrevor Wu                      "audio_h_sel",
190b5bac34fSTrevor Wu                      "audio_local_bus_sel",
191b5bac34fSTrevor Wu                      "dptx_m_sel",
192b5bac34fSTrevor Wu                      "i2so1_m_sel",
193b5bac34fSTrevor Wu                      "i2so2_m_sel",
194b5bac34fSTrevor Wu                      "i2si1_m_sel",
195b5bac34fSTrevor Wu                      "i2si2_m_sel",
196b5bac34fSTrevor Wu                      "infra_ao_audio_26m_b",
197b5bac34fSTrevor Wu                      "scp_adsp_audiodsp";
198b5bac34fSTrevor Wu    };
199b5bac34fSTrevor Wu
200b5bac34fSTrevor Wu...
201