xref: /freebsd/sys/contrib/device-tree/Bindings/sound/mt8195-afe-pcm.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Mediatek AFE PCM controller for mt8195
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10354d7675SEmmanuel Vadot  - Trevor Wu <trevor.wu@mediatek.com>
11354d7675SEmmanuel Vadot
12354d7675SEmmanuel Vadotproperties:
13354d7675SEmmanuel Vadot  compatible:
14354d7675SEmmanuel Vadot    const: mediatek,mt8195-audio
15354d7675SEmmanuel Vadot
16354d7675SEmmanuel Vadot  reg:
17354d7675SEmmanuel Vadot    maxItems: 1
18354d7675SEmmanuel Vadot
19354d7675SEmmanuel Vadot  interrupts:
20354d7675SEmmanuel Vadot    maxItems: 1
21354d7675SEmmanuel Vadot
22c9ccf3a3SEmmanuel Vadot  resets:
23c9ccf3a3SEmmanuel Vadot    maxItems: 1
24c9ccf3a3SEmmanuel Vadot
25c9ccf3a3SEmmanuel Vadot  reset-names:
26c9ccf3a3SEmmanuel Vadot    const: audiosys
27c9ccf3a3SEmmanuel Vadot
28e67e8565SEmmanuel Vadot  memory-region:
29e67e8565SEmmanuel Vadot    maxItems: 1
30e67e8565SEmmanuel Vadot    description: |
31e67e8565SEmmanuel Vadot      Shared memory region for AFE memif.  A "shared-dma-pool".
32e67e8565SEmmanuel Vadot      See ../reserved-memory/reserved-memory.txt for details.
33e67e8565SEmmanuel Vadot
34354d7675SEmmanuel Vadot  mediatek,topckgen:
35fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
36354d7675SEmmanuel Vadot    description: The phandle of the mediatek topckgen controller
37354d7675SEmmanuel Vadot
38354d7675SEmmanuel Vadot  power-domains:
39354d7675SEmmanuel Vadot    maxItems: 1
40354d7675SEmmanuel Vadot
41354d7675SEmmanuel Vadot  clocks:
42354d7675SEmmanuel Vadot    items:
43354d7675SEmmanuel Vadot      - description: 26M clock
44354d7675SEmmanuel Vadot      - description: audio pll1 clock
45354d7675SEmmanuel Vadot      - description: audio pll2 clock
46354d7675SEmmanuel Vadot      - description: clock divider for i2si1_mck
47354d7675SEmmanuel Vadot      - description: clock divider for i2si2_mck
48354d7675SEmmanuel Vadot      - description: clock divider for i2so1_mck
49354d7675SEmmanuel Vadot      - description: clock divider for i2so2_mck
50354d7675SEmmanuel Vadot      - description: clock divider for dptx_mck
51354d7675SEmmanuel Vadot      - description: a1sys hoping clock
52354d7675SEmmanuel Vadot      - description: audio intbus clock
53354d7675SEmmanuel Vadot      - description: audio hires clock
54354d7675SEmmanuel Vadot      - description: audio local bus clock
55354d7675SEmmanuel Vadot      - description: mux for dptx_mck
56354d7675SEmmanuel Vadot      - description: mux for i2so1_mck
57354d7675SEmmanuel Vadot      - description: mux for i2so2_mck
58354d7675SEmmanuel Vadot      - description: mux for i2si1_mck
59354d7675SEmmanuel Vadot      - description: mux for i2si2_mck
60354d7675SEmmanuel Vadot      - description: audio infra 26M clock
61354d7675SEmmanuel Vadot      - description: infra bus clock
62354d7675SEmmanuel Vadot
63354d7675SEmmanuel Vadot  clock-names:
64354d7675SEmmanuel Vadot    items:
65354d7675SEmmanuel Vadot      - const: clk26m
66354d7675SEmmanuel Vadot      - const: apll1_ck
67354d7675SEmmanuel Vadot      - const: apll2_ck
68354d7675SEmmanuel Vadot      - const: apll12_div0
69354d7675SEmmanuel Vadot      - const: apll12_div1
70354d7675SEmmanuel Vadot      - const: apll12_div2
71354d7675SEmmanuel Vadot      - const: apll12_div3
72354d7675SEmmanuel Vadot      - const: apll12_div9
73354d7675SEmmanuel Vadot      - const: a1sys_hp_sel
74354d7675SEmmanuel Vadot      - const: aud_intbus_sel
75354d7675SEmmanuel Vadot      - const: audio_h_sel
76354d7675SEmmanuel Vadot      - const: audio_local_bus_sel
77354d7675SEmmanuel Vadot      - const: dptx_m_sel
78354d7675SEmmanuel Vadot      - const: i2so1_m_sel
79354d7675SEmmanuel Vadot      - const: i2so2_m_sel
80354d7675SEmmanuel Vadot      - const: i2si1_m_sel
81354d7675SEmmanuel Vadot      - const: i2si2_m_sel
82354d7675SEmmanuel Vadot      - const: infra_ao_audio_26m_b
83354d7675SEmmanuel Vadot      - const: scp_adsp_audiodsp
84354d7675SEmmanuel Vadot
85354d7675SEmmanuel Vadot  mediatek,etdm-in1-chn-disabled:
86354d7675SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8-array
87354d7675SEmmanuel Vadot    maxItems: 24
88354d7675SEmmanuel Vadot    description: Specify which input channel should be disabled.
89354d7675SEmmanuel Vadot
90354d7675SEmmanuel Vadot  mediatek,etdm-in2-chn-disabled:
91354d7675SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint8-array
92354d7675SEmmanuel Vadot    maxItems: 16
93354d7675SEmmanuel Vadot    description: Specify which input channel should be disabled.
94354d7675SEmmanuel Vadot
95354d7675SEmmanuel VadotpatternProperties:
96354d7675SEmmanuel Vadot  "^mediatek,etdm-in[1-2]-mclk-always-on-rate-hz$":
97354d7675SEmmanuel Vadot    description: Specify etdm in mclk output rate for always on case.
98354d7675SEmmanuel Vadot
99354d7675SEmmanuel Vadot  "^mediatek,etdm-out[1-3]-mclk-always-on-rate-hz$":
100354d7675SEmmanuel Vadot    description: Specify etdm out mclk output rate for always on case.
101354d7675SEmmanuel Vadot
102354d7675SEmmanuel Vadot  "^mediatek,etdm-in[1-2]-multi-pin-mode$":
103354d7675SEmmanuel Vadot    type: boolean
104354d7675SEmmanuel Vadot    description: if present, the etdm data mode is I2S.
105354d7675SEmmanuel Vadot
106354d7675SEmmanuel Vadot  "^mediatek,etdm-out[1-3]-multi-pin-mode$":
107354d7675SEmmanuel Vadot    type: boolean
108354d7675SEmmanuel Vadot    description: if present, the etdm data mode is I2S.
109354d7675SEmmanuel Vadot
110354d7675SEmmanuel Vadot  "^mediatek,etdm-in[1-2]-cowork-source$":
111354d7675SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
112354d7675SEmmanuel Vadot    description: |
113354d7675SEmmanuel Vadot      etdm modules can share the same external clock pin. Specify
114*aa1a8ff2SEmmanuel Vadot      which etdm clock source is required by this etdm in module.
115354d7675SEmmanuel Vadot    enum:
116354d7675SEmmanuel Vadot      - 0 # etdm1_in
117354d7675SEmmanuel Vadot      - 1 # etdm2_in
118354d7675SEmmanuel Vadot      - 2 # etdm1_out
119354d7675SEmmanuel Vadot      - 3 # etdm2_out
120354d7675SEmmanuel Vadot
121354d7675SEmmanuel Vadot  "^mediatek,etdm-out[1-2]-cowork-source$":
122354d7675SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
123354d7675SEmmanuel Vadot    description: |
124354d7675SEmmanuel Vadot      etdm modules can share the same external clock pin. Specify
125*aa1a8ff2SEmmanuel Vadot      which etdm clock source is required by this etdm out module.
126354d7675SEmmanuel Vadot    enum:
127354d7675SEmmanuel Vadot      - 0 # etdm1_in
128354d7675SEmmanuel Vadot      - 1 # etdm2_in
129354d7675SEmmanuel Vadot      - 2 # etdm1_out
130354d7675SEmmanuel Vadot      - 3 # etdm2_out
131354d7675SEmmanuel Vadot
132354d7675SEmmanuel Vadotrequired:
133354d7675SEmmanuel Vadot  - compatible
134354d7675SEmmanuel Vadot  - reg
135354d7675SEmmanuel Vadot  - interrupts
136c9ccf3a3SEmmanuel Vadot  - resets
137c9ccf3a3SEmmanuel Vadot  - reset-names
138354d7675SEmmanuel Vadot  - mediatek,topckgen
139354d7675SEmmanuel Vadot  - power-domains
140354d7675SEmmanuel Vadot  - clocks
141354d7675SEmmanuel Vadot  - clock-names
142e67e8565SEmmanuel Vadot  - memory-region
143354d7675SEmmanuel Vadot
144354d7675SEmmanuel VadotadditionalProperties: false
145354d7675SEmmanuel Vadot
146354d7675SEmmanuel Vadotexamples:
147354d7675SEmmanuel Vadot  - |
148354d7675SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
149354d7675SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
150354d7675SEmmanuel Vadot
151354d7675SEmmanuel Vadot    afe: mt8195-afe-pcm@10890000 {
152354d7675SEmmanuel Vadot        compatible = "mediatek,mt8195-audio";
153354d7675SEmmanuel Vadot        reg = <0x10890000 0x10000>;
154354d7675SEmmanuel Vadot        interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
155c9ccf3a3SEmmanuel Vadot        resets = <&watchdog 14>;
156c9ccf3a3SEmmanuel Vadot        reset-names = "audiosys";
157354d7675SEmmanuel Vadot        mediatek,topckgen = <&topckgen>;
158354d7675SEmmanuel Vadot        power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
159e67e8565SEmmanuel Vadot        memory-region = <&snd_dma_mem_reserved>;
160354d7675SEmmanuel Vadot        clocks = <&clk26m>,
161354d7675SEmmanuel Vadot                 <&topckgen 163>, //CLK_TOP_APLL1
162354d7675SEmmanuel Vadot                 <&topckgen 166>, //CLK_TOP_APLL2
163354d7675SEmmanuel Vadot                 <&topckgen 233>, //CLK_TOP_APLL12_DIV0
164354d7675SEmmanuel Vadot                 <&topckgen 234>, //CLK_TOP_APLL12_DIV1
165354d7675SEmmanuel Vadot                 <&topckgen 235>, //CLK_TOP_APLL12_DIV2
166354d7675SEmmanuel Vadot                 <&topckgen 236>, //CLK_TOP_APLL12_DIV3
167354d7675SEmmanuel Vadot                 <&topckgen 238>, //CLK_TOP_APLL12_DIV9
168354d7675SEmmanuel Vadot                 <&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL
169354d7675SEmmanuel Vadot                 <&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL
170354d7675SEmmanuel Vadot                 <&topckgen 34>, //CLK_TOP_AUDIO_H_SEL
171354d7675SEmmanuel Vadot                 <&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL
172354d7675SEmmanuel Vadot                 <&topckgen 98>, //CLK_TOP_DPTX_M_SEL
173354d7675SEmmanuel Vadot                 <&topckgen 94>, //CLK_TOP_I2SO1_M_SEL
174354d7675SEmmanuel Vadot                 <&topckgen 95>, //CLK_TOP_I2SO2_M_SEL
175354d7675SEmmanuel Vadot                 <&topckgen 96>, //CLK_TOP_I2SI1_M_SEL
176354d7675SEmmanuel Vadot                 <&topckgen 97>, //CLK_TOP_I2SI2_M_SEL
177354d7675SEmmanuel Vadot                 <&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B
178354d7675SEmmanuel Vadot                 <&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP
179354d7675SEmmanuel Vadot        clock-names = "clk26m",
180354d7675SEmmanuel Vadot                      "apll1_ck",
181354d7675SEmmanuel Vadot                      "apll2_ck",
182354d7675SEmmanuel Vadot                      "apll12_div0",
183354d7675SEmmanuel Vadot                      "apll12_div1",
184354d7675SEmmanuel Vadot                      "apll12_div2",
185354d7675SEmmanuel Vadot                      "apll12_div3",
186354d7675SEmmanuel Vadot                      "apll12_div9",
187354d7675SEmmanuel Vadot                      "a1sys_hp_sel",
188354d7675SEmmanuel Vadot                      "aud_intbus_sel",
189354d7675SEmmanuel Vadot                      "audio_h_sel",
190354d7675SEmmanuel Vadot                      "audio_local_bus_sel",
191354d7675SEmmanuel Vadot                      "dptx_m_sel",
192354d7675SEmmanuel Vadot                      "i2so1_m_sel",
193354d7675SEmmanuel Vadot                      "i2so2_m_sel",
194354d7675SEmmanuel Vadot                      "i2si1_m_sel",
195354d7675SEmmanuel Vadot                      "i2si2_m_sel",
196354d7675SEmmanuel Vadot                      "infra_ao_audio_26m_b",
197354d7675SEmmanuel Vadot                      "scp_adsp_audiodsp";
198354d7675SEmmanuel Vadot    };
199354d7675SEmmanuel Vadot
200354d7675SEmmanuel Vadot...
201