1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2cb7aa33aSEmmanuel Vadot%YAML 1.2 3cb7aa33aSEmmanuel Vadot--- 4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mediatek,mt8188-afe.yaml# 5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6cb7aa33aSEmmanuel Vadot 7cb7aa33aSEmmanuel Vadottitle: MediaTek AFE PCM controller for mt8188 8cb7aa33aSEmmanuel Vadot 9cb7aa33aSEmmanuel Vadotmaintainers: 10cb7aa33aSEmmanuel Vadot - Trevor Wu <trevor.wu@mediatek.com> 11cb7aa33aSEmmanuel Vadot 12cb7aa33aSEmmanuel Vadotproperties: 13cb7aa33aSEmmanuel Vadot compatible: 14cb7aa33aSEmmanuel Vadot const: mediatek,mt8188-afe 15cb7aa33aSEmmanuel Vadot 16cb7aa33aSEmmanuel Vadot reg: 17cb7aa33aSEmmanuel Vadot maxItems: 1 18cb7aa33aSEmmanuel Vadot 19cb7aa33aSEmmanuel Vadot interrupts: 20cb7aa33aSEmmanuel Vadot maxItems: 1 21cb7aa33aSEmmanuel Vadot 22cb7aa33aSEmmanuel Vadot resets: 23cb7aa33aSEmmanuel Vadot maxItems: 1 24cb7aa33aSEmmanuel Vadot 25cb7aa33aSEmmanuel Vadot reset-names: 26cb7aa33aSEmmanuel Vadot const: audiosys 27cb7aa33aSEmmanuel Vadot 28aa1a8ff2SEmmanuel Vadot memory-region: 29aa1a8ff2SEmmanuel Vadot maxItems: 1 30aa1a8ff2SEmmanuel Vadot description: | 31aa1a8ff2SEmmanuel Vadot Shared memory region for AFE memif. A "shared-dma-pool". 32*84943d6fSEmmanuel Vadot See dtschema reserved-memory/shared-dma-pool.yaml for details. 33aa1a8ff2SEmmanuel Vadot 34cb7aa33aSEmmanuel Vadot mediatek,topckgen: 35cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 36cb7aa33aSEmmanuel Vadot description: The phandle of the mediatek topckgen controller 37cb7aa33aSEmmanuel Vadot 38f126890aSEmmanuel Vadot mediatek,infracfg: 39f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 40f126890aSEmmanuel Vadot description: The phandle of the mediatek infracfg controller 41f126890aSEmmanuel Vadot 42cb7aa33aSEmmanuel Vadot power-domains: 43cb7aa33aSEmmanuel Vadot maxItems: 1 44cb7aa33aSEmmanuel Vadot 45cb7aa33aSEmmanuel Vadot clocks: 46cb7aa33aSEmmanuel Vadot items: 47cb7aa33aSEmmanuel Vadot - description: 26M clock 48cb7aa33aSEmmanuel Vadot - description: audio pll1 clock 49cb7aa33aSEmmanuel Vadot - description: audio pll2 clock 50cb7aa33aSEmmanuel Vadot - description: clock divider for i2si1_mck 51cb7aa33aSEmmanuel Vadot - description: clock divider for i2si2_mck 52cb7aa33aSEmmanuel Vadot - description: clock divider for i2so1_mck 53cb7aa33aSEmmanuel Vadot - description: clock divider for i2so2_mck 54cb7aa33aSEmmanuel Vadot - description: clock divider for dptx_mck 55cb7aa33aSEmmanuel Vadot - description: a1sys hoping clock 56cb7aa33aSEmmanuel Vadot - description: audio intbus clock 57cb7aa33aSEmmanuel Vadot - description: audio hires clock 58cb7aa33aSEmmanuel Vadot - description: audio local bus clock 59cb7aa33aSEmmanuel Vadot - description: mux for dptx_mck 60cb7aa33aSEmmanuel Vadot - description: mux for i2so1_mck 61cb7aa33aSEmmanuel Vadot - description: mux for i2so2_mck 62cb7aa33aSEmmanuel Vadot - description: mux for i2si1_mck 63cb7aa33aSEmmanuel Vadot - description: mux for i2si2_mck 64cb7aa33aSEmmanuel Vadot - description: audio 26m clock 65f126890aSEmmanuel Vadot - description: audio pll1 divide 4 66f126890aSEmmanuel Vadot - description: audio pll2 divide 4 67f126890aSEmmanuel Vadot - description: clock divider for iec 68f126890aSEmmanuel Vadot - description: mux for a2sys clock 69f126890aSEmmanuel Vadot - description: mux for aud_iec 70cb7aa33aSEmmanuel Vadot 71cb7aa33aSEmmanuel Vadot clock-names: 72cb7aa33aSEmmanuel Vadot items: 73cb7aa33aSEmmanuel Vadot - const: clk26m 74cb7aa33aSEmmanuel Vadot - const: apll1 75cb7aa33aSEmmanuel Vadot - const: apll2 76cb7aa33aSEmmanuel Vadot - const: apll12_div0 77cb7aa33aSEmmanuel Vadot - const: apll12_div1 78cb7aa33aSEmmanuel Vadot - const: apll12_div2 79cb7aa33aSEmmanuel Vadot - const: apll12_div3 80cb7aa33aSEmmanuel Vadot - const: apll12_div9 81f126890aSEmmanuel Vadot - const: top_a1sys_hp 82f126890aSEmmanuel Vadot - const: top_aud_intbus 83f126890aSEmmanuel Vadot - const: top_audio_h 84f126890aSEmmanuel Vadot - const: top_audio_local_bus 85f126890aSEmmanuel Vadot - const: top_dptx 86f126890aSEmmanuel Vadot - const: top_i2so1 87f126890aSEmmanuel Vadot - const: top_i2so2 88f126890aSEmmanuel Vadot - const: top_i2si1 89f126890aSEmmanuel Vadot - const: top_i2si2 90cb7aa33aSEmmanuel Vadot - const: adsp_audio_26m 91f126890aSEmmanuel Vadot - const: apll1_d4 92f126890aSEmmanuel Vadot - const: apll2_d4 93f126890aSEmmanuel Vadot - const: apll12_div4 94f126890aSEmmanuel Vadot - const: top_a2sys 95f126890aSEmmanuel Vadot - const: top_aud_iec 96cb7aa33aSEmmanuel Vadot 97cb7aa33aSEmmanuel Vadot mediatek,etdm-in1-cowork-source: 98cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 99cb7aa33aSEmmanuel Vadot description: 100cb7aa33aSEmmanuel Vadot etdm modules can share the same external clock pin. Specify 101cb7aa33aSEmmanuel Vadot which etdm clock source is required by this etdm in module. 102cb7aa33aSEmmanuel Vadot enum: 103cb7aa33aSEmmanuel Vadot - 1 # etdm2_in 104cb7aa33aSEmmanuel Vadot - 2 # etdm1_out 105cb7aa33aSEmmanuel Vadot - 3 # etdm2_out 106cb7aa33aSEmmanuel Vadot 107cb7aa33aSEmmanuel Vadot mediatek,etdm-in2-cowork-source: 108cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 109cb7aa33aSEmmanuel Vadot description: 110cb7aa33aSEmmanuel Vadot etdm modules can share the same external clock pin. Specify 111cb7aa33aSEmmanuel Vadot which etdm clock source is required by this etdm in module. 112cb7aa33aSEmmanuel Vadot enum: 113cb7aa33aSEmmanuel Vadot - 0 # etdm1_in 114cb7aa33aSEmmanuel Vadot - 2 # etdm1_out 115cb7aa33aSEmmanuel Vadot - 3 # etdm2_out 116cb7aa33aSEmmanuel Vadot 117cb7aa33aSEmmanuel Vadot mediatek,etdm-out1-cowork-source: 118cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 119cb7aa33aSEmmanuel Vadot description: 120cb7aa33aSEmmanuel Vadot etdm modules can share the same external clock pin. Specify 121cb7aa33aSEmmanuel Vadot which etdm clock source is required by this etdm out module. 122cb7aa33aSEmmanuel Vadot enum: 123cb7aa33aSEmmanuel Vadot - 0 # etdm1_in 124cb7aa33aSEmmanuel Vadot - 1 # etdm2_in 125cb7aa33aSEmmanuel Vadot - 3 # etdm2_out 126cb7aa33aSEmmanuel Vadot 127cb7aa33aSEmmanuel Vadot mediatek,etdm-out2-cowork-source: 128cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 129cb7aa33aSEmmanuel Vadot description: 130cb7aa33aSEmmanuel Vadot etdm modules can share the same external clock pin. Specify 131cb7aa33aSEmmanuel Vadot which etdm clock source is required by this etdm out module. 132cb7aa33aSEmmanuel Vadot enum: 133cb7aa33aSEmmanuel Vadot - 0 # etdm1_in 134cb7aa33aSEmmanuel Vadot - 1 # etdm2_in 135cb7aa33aSEmmanuel Vadot - 2 # etdm1_out 136cb7aa33aSEmmanuel Vadot 137cb7aa33aSEmmanuel VadotpatternProperties: 138cb7aa33aSEmmanuel Vadot "^mediatek,etdm-in[1-2]-chn-disabled$": 139cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 140cb7aa33aSEmmanuel Vadot minItems: 1 141cb7aa33aSEmmanuel Vadot maxItems: 16 142cb7aa33aSEmmanuel Vadot description: 143cb7aa33aSEmmanuel Vadot This is a list of channel IDs which should be disabled. 144aa1a8ff2SEmmanuel Vadot By default, all data received from ETDM pins will be outputted to 145cb7aa33aSEmmanuel Vadot memory. etdm in supports disable_out in direct mode(w/o interconn), 146cb7aa33aSEmmanuel Vadot so user can disable the specified channels by the property. 147cb7aa33aSEmmanuel Vadot uniqueItems: true 148cb7aa33aSEmmanuel Vadot items: 149cb7aa33aSEmmanuel Vadot minimum: 0 150cb7aa33aSEmmanuel Vadot maximum: 15 151cb7aa33aSEmmanuel Vadot 152cb7aa33aSEmmanuel Vadot "^mediatek,etdm-in[1-2]-multi-pin-mode$": 153cb7aa33aSEmmanuel Vadot type: boolean 154cb7aa33aSEmmanuel Vadot description: if present, the etdm data mode is I2S. 155cb7aa33aSEmmanuel Vadot 156cb7aa33aSEmmanuel Vadot "^mediatek,etdm-out[1-3]-multi-pin-mode$": 157cb7aa33aSEmmanuel Vadot type: boolean 158cb7aa33aSEmmanuel Vadot description: if present, the etdm data mode is I2S. 159cb7aa33aSEmmanuel Vadot 160cb7aa33aSEmmanuel Vadotrequired: 161cb7aa33aSEmmanuel Vadot - compatible 162cb7aa33aSEmmanuel Vadot - reg 163cb7aa33aSEmmanuel Vadot - interrupts 164cb7aa33aSEmmanuel Vadot - resets 165cb7aa33aSEmmanuel Vadot - reset-names 166cb7aa33aSEmmanuel Vadot - mediatek,topckgen 167f126890aSEmmanuel Vadot - mediatek,infracfg 168cb7aa33aSEmmanuel Vadot - power-domains 169cb7aa33aSEmmanuel Vadot - clocks 170cb7aa33aSEmmanuel Vadot - clock-names 171cb7aa33aSEmmanuel Vadot 172cb7aa33aSEmmanuel VadotadditionalProperties: false 173cb7aa33aSEmmanuel Vadot 174cb7aa33aSEmmanuel Vadotexamples: 175cb7aa33aSEmmanuel Vadot - | 176cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 177cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 178cb7aa33aSEmmanuel Vadot 179cb7aa33aSEmmanuel Vadot afe@10b10000 { 180cb7aa33aSEmmanuel Vadot compatible = "mediatek,mt8188-afe"; 181cb7aa33aSEmmanuel Vadot reg = <0x10b10000 0x10000>; 182cb7aa33aSEmmanuel Vadot interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; 183cb7aa33aSEmmanuel Vadot resets = <&watchdog 14>; 184cb7aa33aSEmmanuel Vadot reset-names = "audiosys"; 185aa1a8ff2SEmmanuel Vadot memory-region = <&snd_dma_mem_reserved>; 186cb7aa33aSEmmanuel Vadot mediatek,topckgen = <&topckgen>; 187f126890aSEmmanuel Vadot mediatek,infracfg = <&infracfg_ao>; 188cb7aa33aSEmmanuel Vadot power-domains = <&spm 13>; //MT8188_POWER_DOMAIN_AUDIO 189cb7aa33aSEmmanuel Vadot mediatek,etdm-in2-cowork-source = <2>; 190cb7aa33aSEmmanuel Vadot mediatek,etdm-out2-cowork-source = <0>; 191cb7aa33aSEmmanuel Vadot mediatek,etdm-in1-multi-pin-mode; 192cb7aa33aSEmmanuel Vadot mediatek,etdm-in1-chn-disabled = /bits/ 8 <0x0 0x2>; 193cb7aa33aSEmmanuel Vadot clocks = <&clk26m>, 194cb7aa33aSEmmanuel Vadot <&apmixedsys 9>, //CLK_APMIXED_APLL1 195cb7aa33aSEmmanuel Vadot <&apmixedsys 10>, //CLK_APMIXED_APLL2 196cb7aa33aSEmmanuel Vadot <&topckgen 186>, //CLK_TOP_APLL12_CK_DIV0 197cb7aa33aSEmmanuel Vadot <&topckgen 187>, //CLK_TOP_APLL12_CK_DIV1 198cb7aa33aSEmmanuel Vadot <&topckgen 188>, //CLK_TOP_APLL12_CK_DIV2 199cb7aa33aSEmmanuel Vadot <&topckgen 189>, //CLK_TOP_APLL12_CK_DIV3 200cb7aa33aSEmmanuel Vadot <&topckgen 191>, //CLK_TOP_APLL12_CK_DIV9 201cb7aa33aSEmmanuel Vadot <&topckgen 83>, //CLK_TOP_A1SYS_HP 202cb7aa33aSEmmanuel Vadot <&topckgen 31>, //CLK_TOP_AUD_INTBUS 203cb7aa33aSEmmanuel Vadot <&topckgen 32>, //CLK_TOP_AUDIO_H 204cb7aa33aSEmmanuel Vadot <&topckgen 69>, //CLK_TOP_AUDIO_LOCAL_BUS 205cb7aa33aSEmmanuel Vadot <&topckgen 81>, //CLK_TOP_DPTX 206cb7aa33aSEmmanuel Vadot <&topckgen 77>, //CLK_TOP_I2SO1 207cb7aa33aSEmmanuel Vadot <&topckgen 78>, //CLK_TOP_I2SO2 208cb7aa33aSEmmanuel Vadot <&topckgen 79>, //CLK_TOP_I2SI1 209cb7aa33aSEmmanuel Vadot <&topckgen 80>, //CLK_TOP_I2SI2 210f126890aSEmmanuel Vadot <&adsp_audio26m 0>, //CLK_AUDIODSP_AUDIO26M 211f126890aSEmmanuel Vadot <&topckgen 132>, //CLK_TOP_APLL1_D4 212f126890aSEmmanuel Vadot <&topckgen 133>, //CLK_TOP_APLL2_D4 213f126890aSEmmanuel Vadot <&topckgen 183>, //CLK_TOP_APLL12_CK_DIV4 214f126890aSEmmanuel Vadot <&topckgen 84>, //CLK_TOP_A2SYS 215f126890aSEmmanuel Vadot <&topckgen 82>; //CLK_TOP_AUD_IEC>; 216cb7aa33aSEmmanuel Vadot clock-names = "clk26m", 217cb7aa33aSEmmanuel Vadot "apll1", 218cb7aa33aSEmmanuel Vadot "apll2", 219cb7aa33aSEmmanuel Vadot "apll12_div0", 220cb7aa33aSEmmanuel Vadot "apll12_div1", 221cb7aa33aSEmmanuel Vadot "apll12_div2", 222cb7aa33aSEmmanuel Vadot "apll12_div3", 223cb7aa33aSEmmanuel Vadot "apll12_div9", 224f126890aSEmmanuel Vadot "top_a1sys_hp", 225f126890aSEmmanuel Vadot "top_aud_intbus", 226f126890aSEmmanuel Vadot "top_audio_h", 227f126890aSEmmanuel Vadot "top_audio_local_bus", 228f126890aSEmmanuel Vadot "top_dptx", 229f126890aSEmmanuel Vadot "top_i2so1", 230f126890aSEmmanuel Vadot "top_i2so2", 231f126890aSEmmanuel Vadot "top_i2si1", 232f126890aSEmmanuel Vadot "top_i2si2", 233f126890aSEmmanuel Vadot "adsp_audio_26m", 234f126890aSEmmanuel Vadot "apll1_d4", 235f126890aSEmmanuel Vadot "apll2_d4", 236f126890aSEmmanuel Vadot "apll12_div4", 237f126890aSEmmanuel Vadot "top_a2sys", 238f126890aSEmmanuel Vadot "top_aud_iec"; 239cb7aa33aSEmmanuel Vadot }; 240cb7aa33aSEmmanuel Vadot 241cb7aa33aSEmmanuel Vadot... 242