1692d25b6STrevor Wu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2692d25b6STrevor Wu%YAML 1.2 3692d25b6STrevor Wu--- 4692d25b6STrevor Wu$id: http://devicetree.org/schemas/sound/mediatek,mt8188-afe.yaml# 5692d25b6STrevor Wu$schema: http://devicetree.org/meta-schemas/core.yaml# 6692d25b6STrevor Wu 7692d25b6STrevor Wutitle: MediaTek AFE PCM controller for mt8188 8692d25b6STrevor Wu 9692d25b6STrevor Wumaintainers: 10692d25b6STrevor Wu - Trevor Wu <trevor.wu@mediatek.com> 11692d25b6STrevor Wu 12692d25b6STrevor Wuproperties: 13692d25b6STrevor Wu compatible: 14692d25b6STrevor Wu const: mediatek,mt8188-afe 15692d25b6STrevor Wu 16692d25b6STrevor Wu reg: 17692d25b6STrevor Wu maxItems: 1 18692d25b6STrevor Wu 19692d25b6STrevor Wu interrupts: 20692d25b6STrevor Wu maxItems: 1 21692d25b6STrevor Wu 22692d25b6STrevor Wu resets: 23692d25b6STrevor Wu maxItems: 1 24692d25b6STrevor Wu 25692d25b6STrevor Wu reset-names: 26692d25b6STrevor Wu const: audiosys 27692d25b6STrevor Wu 28e3326e3bSTrevor Wu memory-region: 29e3326e3bSTrevor Wu maxItems: 1 30e3326e3bSTrevor Wu description: | 31e3326e3bSTrevor Wu Shared memory region for AFE memif. A "shared-dma-pool". 32*b32dcf23SRob Herring See dtschema reserved-memory/shared-dma-pool.yaml for details. 33e3326e3bSTrevor Wu 34692d25b6STrevor Wu mediatek,topckgen: 35692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/phandle 36692d25b6STrevor Wu description: The phandle of the mediatek topckgen controller 37692d25b6STrevor Wu 38739ee993STrevor Wu mediatek,infracfg: 39739ee993STrevor Wu $ref: /schemas/types.yaml#/definitions/phandle 40739ee993STrevor Wu description: The phandle of the mediatek infracfg controller 41739ee993STrevor Wu 42692d25b6STrevor Wu power-domains: 43692d25b6STrevor Wu maxItems: 1 44692d25b6STrevor Wu 45692d25b6STrevor Wu clocks: 46692d25b6STrevor Wu items: 47692d25b6STrevor Wu - description: 26M clock 48692d25b6STrevor Wu - description: audio pll1 clock 49692d25b6STrevor Wu - description: audio pll2 clock 50692d25b6STrevor Wu - description: clock divider for i2si1_mck 51692d25b6STrevor Wu - description: clock divider for i2si2_mck 52692d25b6STrevor Wu - description: clock divider for i2so1_mck 53692d25b6STrevor Wu - description: clock divider for i2so2_mck 54692d25b6STrevor Wu - description: clock divider for dptx_mck 55692d25b6STrevor Wu - description: a1sys hoping clock 56692d25b6STrevor Wu - description: audio intbus clock 57692d25b6STrevor Wu - description: audio hires clock 58692d25b6STrevor Wu - description: audio local bus clock 59692d25b6STrevor Wu - description: mux for dptx_mck 60692d25b6STrevor Wu - description: mux for i2so1_mck 61692d25b6STrevor Wu - description: mux for i2so2_mck 62692d25b6STrevor Wu - description: mux for i2si1_mck 63692d25b6STrevor Wu - description: mux for i2si2_mck 64692d25b6STrevor Wu - description: audio 26m clock 65739ee993STrevor Wu - description: audio pll1 divide 4 66739ee993STrevor Wu - description: audio pll2 divide 4 67739ee993STrevor Wu - description: clock divider for iec 68739ee993STrevor Wu - description: mux for a2sys clock 69739ee993STrevor Wu - description: mux for aud_iec 70692d25b6STrevor Wu 71692d25b6STrevor Wu clock-names: 72692d25b6STrevor Wu items: 73692d25b6STrevor Wu - const: clk26m 74692d25b6STrevor Wu - const: apll1 75692d25b6STrevor Wu - const: apll2 76692d25b6STrevor Wu - const: apll12_div0 77692d25b6STrevor Wu - const: apll12_div1 78692d25b6STrevor Wu - const: apll12_div2 79692d25b6STrevor Wu - const: apll12_div3 80692d25b6STrevor Wu - const: apll12_div9 811e4fe75eSTrevor Wu - const: top_a1sys_hp 821e4fe75eSTrevor Wu - const: top_aud_intbus 831e4fe75eSTrevor Wu - const: top_audio_h 841e4fe75eSTrevor Wu - const: top_audio_local_bus 851e4fe75eSTrevor Wu - const: top_dptx 861e4fe75eSTrevor Wu - const: top_i2so1 871e4fe75eSTrevor Wu - const: top_i2so2 881e4fe75eSTrevor Wu - const: top_i2si1 891e4fe75eSTrevor Wu - const: top_i2si2 90692d25b6STrevor Wu - const: adsp_audio_26m 91739ee993STrevor Wu - const: apll1_d4 92739ee993STrevor Wu - const: apll2_d4 93739ee993STrevor Wu - const: apll12_div4 94739ee993STrevor Wu - const: top_a2sys 95739ee993STrevor Wu - const: top_aud_iec 96692d25b6STrevor Wu 97692d25b6STrevor Wu mediatek,etdm-in1-cowork-source: 98692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/uint32 99692d25b6STrevor Wu description: 100692d25b6STrevor Wu etdm modules can share the same external clock pin. Specify 101692d25b6STrevor Wu which etdm clock source is required by this etdm in module. 102692d25b6STrevor Wu enum: 103692d25b6STrevor Wu - 1 # etdm2_in 104692d25b6STrevor Wu - 2 # etdm1_out 105692d25b6STrevor Wu - 3 # etdm2_out 106692d25b6STrevor Wu 107692d25b6STrevor Wu mediatek,etdm-in2-cowork-source: 108692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/uint32 109692d25b6STrevor Wu description: 110692d25b6STrevor Wu etdm modules can share the same external clock pin. Specify 111692d25b6STrevor Wu which etdm clock source is required by this etdm in module. 112692d25b6STrevor Wu enum: 113692d25b6STrevor Wu - 0 # etdm1_in 114692d25b6STrevor Wu - 2 # etdm1_out 115692d25b6STrevor Wu - 3 # etdm2_out 116692d25b6STrevor Wu 117692d25b6STrevor Wu mediatek,etdm-out1-cowork-source: 118692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/uint32 119692d25b6STrevor Wu description: 120692d25b6STrevor Wu etdm modules can share the same external clock pin. Specify 121692d25b6STrevor Wu which etdm clock source is required by this etdm out module. 122692d25b6STrevor Wu enum: 123692d25b6STrevor Wu - 0 # etdm1_in 124692d25b6STrevor Wu - 1 # etdm2_in 125692d25b6STrevor Wu - 3 # etdm2_out 126692d25b6STrevor Wu 127692d25b6STrevor Wu mediatek,etdm-out2-cowork-source: 128692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/uint32 129692d25b6STrevor Wu description: 130692d25b6STrevor Wu etdm modules can share the same external clock pin. Specify 131692d25b6STrevor Wu which etdm clock source is required by this etdm out module. 132692d25b6STrevor Wu enum: 133692d25b6STrevor Wu - 0 # etdm1_in 134692d25b6STrevor Wu - 1 # etdm2_in 135692d25b6STrevor Wu - 2 # etdm1_out 136692d25b6STrevor Wu 137692d25b6STrevor WupatternProperties: 138692d25b6STrevor Wu "^mediatek,etdm-in[1-2]-chn-disabled$": 139692d25b6STrevor Wu $ref: /schemas/types.yaml#/definitions/uint8-array 140692d25b6STrevor Wu minItems: 1 141692d25b6STrevor Wu maxItems: 16 142692d25b6STrevor Wu description: 143692d25b6STrevor Wu This is a list of channel IDs which should be disabled. 14447aab533SBjorn Helgaas By default, all data received from ETDM pins will be outputted to 145692d25b6STrevor Wu memory. etdm in supports disable_out in direct mode(w/o interconn), 146692d25b6STrevor Wu so user can disable the specified channels by the property. 147692d25b6STrevor Wu uniqueItems: true 148692d25b6STrevor Wu items: 149692d25b6STrevor Wu minimum: 0 150692d25b6STrevor Wu maximum: 15 151692d25b6STrevor Wu 152692d25b6STrevor Wu "^mediatek,etdm-in[1-2]-multi-pin-mode$": 153692d25b6STrevor Wu type: boolean 154692d25b6STrevor Wu description: if present, the etdm data mode is I2S. 155692d25b6STrevor Wu 156692d25b6STrevor Wu "^mediatek,etdm-out[1-3]-multi-pin-mode$": 157692d25b6STrevor Wu type: boolean 158692d25b6STrevor Wu description: if present, the etdm data mode is I2S. 159692d25b6STrevor Wu 160692d25b6STrevor Wurequired: 161692d25b6STrevor Wu - compatible 162692d25b6STrevor Wu - reg 163692d25b6STrevor Wu - interrupts 164692d25b6STrevor Wu - resets 165692d25b6STrevor Wu - reset-names 166692d25b6STrevor Wu - mediatek,topckgen 167739ee993STrevor Wu - mediatek,infracfg 168692d25b6STrevor Wu - power-domains 169692d25b6STrevor Wu - clocks 170692d25b6STrevor Wu - clock-names 171692d25b6STrevor Wu 172692d25b6STrevor WuadditionalProperties: false 173692d25b6STrevor Wu 174692d25b6STrevor Wuexamples: 175692d25b6STrevor Wu - | 176692d25b6STrevor Wu #include <dt-bindings/interrupt-controller/arm-gic.h> 177692d25b6STrevor Wu #include <dt-bindings/interrupt-controller/irq.h> 178692d25b6STrevor Wu 179692d25b6STrevor Wu afe@10b10000 { 180692d25b6STrevor Wu compatible = "mediatek,mt8188-afe"; 181692d25b6STrevor Wu reg = <0x10b10000 0x10000>; 182692d25b6STrevor Wu interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; 183692d25b6STrevor Wu resets = <&watchdog 14>; 184692d25b6STrevor Wu reset-names = "audiosys"; 185e3326e3bSTrevor Wu memory-region = <&snd_dma_mem_reserved>; 186692d25b6STrevor Wu mediatek,topckgen = <&topckgen>; 187739ee993STrevor Wu mediatek,infracfg = <&infracfg_ao>; 188692d25b6STrevor Wu power-domains = <&spm 13>; //MT8188_POWER_DOMAIN_AUDIO 189692d25b6STrevor Wu mediatek,etdm-in2-cowork-source = <2>; 190692d25b6STrevor Wu mediatek,etdm-out2-cowork-source = <0>; 191692d25b6STrevor Wu mediatek,etdm-in1-multi-pin-mode; 192692d25b6STrevor Wu mediatek,etdm-in1-chn-disabled = /bits/ 8 <0x0 0x2>; 193692d25b6STrevor Wu clocks = <&clk26m>, 194692d25b6STrevor Wu <&apmixedsys 9>, //CLK_APMIXED_APLL1 195692d25b6STrevor Wu <&apmixedsys 10>, //CLK_APMIXED_APLL2 196692d25b6STrevor Wu <&topckgen 186>, //CLK_TOP_APLL12_CK_DIV0 197692d25b6STrevor Wu <&topckgen 187>, //CLK_TOP_APLL12_CK_DIV1 198692d25b6STrevor Wu <&topckgen 188>, //CLK_TOP_APLL12_CK_DIV2 199692d25b6STrevor Wu <&topckgen 189>, //CLK_TOP_APLL12_CK_DIV3 200692d25b6STrevor Wu <&topckgen 191>, //CLK_TOP_APLL12_CK_DIV9 201692d25b6STrevor Wu <&topckgen 83>, //CLK_TOP_A1SYS_HP 202692d25b6STrevor Wu <&topckgen 31>, //CLK_TOP_AUD_INTBUS 203692d25b6STrevor Wu <&topckgen 32>, //CLK_TOP_AUDIO_H 204692d25b6STrevor Wu <&topckgen 69>, //CLK_TOP_AUDIO_LOCAL_BUS 205692d25b6STrevor Wu <&topckgen 81>, //CLK_TOP_DPTX 206692d25b6STrevor Wu <&topckgen 77>, //CLK_TOP_I2SO1 207692d25b6STrevor Wu <&topckgen 78>, //CLK_TOP_I2SO2 208692d25b6STrevor Wu <&topckgen 79>, //CLK_TOP_I2SI1 209692d25b6STrevor Wu <&topckgen 80>, //CLK_TOP_I2SI2 210739ee993STrevor Wu <&adsp_audio26m 0>, //CLK_AUDIODSP_AUDIO26M 211739ee993STrevor Wu <&topckgen 132>, //CLK_TOP_APLL1_D4 212739ee993STrevor Wu <&topckgen 133>, //CLK_TOP_APLL2_D4 213739ee993STrevor Wu <&topckgen 183>, //CLK_TOP_APLL12_CK_DIV4 214739ee993STrevor Wu <&topckgen 84>, //CLK_TOP_A2SYS 215739ee993STrevor Wu <&topckgen 82>; //CLK_TOP_AUD_IEC>; 216692d25b6STrevor Wu clock-names = "clk26m", 217692d25b6STrevor Wu "apll1", 218692d25b6STrevor Wu "apll2", 219692d25b6STrevor Wu "apll12_div0", 220692d25b6STrevor Wu "apll12_div1", 221692d25b6STrevor Wu "apll12_div2", 222692d25b6STrevor Wu "apll12_div3", 223692d25b6STrevor Wu "apll12_div9", 2241e4fe75eSTrevor Wu "top_a1sys_hp", 2251e4fe75eSTrevor Wu "top_aud_intbus", 2261e4fe75eSTrevor Wu "top_audio_h", 2271e4fe75eSTrevor Wu "top_audio_local_bus", 2281e4fe75eSTrevor Wu "top_dptx", 2291e4fe75eSTrevor Wu "top_i2so1", 2301e4fe75eSTrevor Wu "top_i2so2", 2311e4fe75eSTrevor Wu "top_i2si1", 2321e4fe75eSTrevor Wu "top_i2si2", 233739ee993STrevor Wu "adsp_audio_26m", 234739ee993STrevor Wu "apll1_d4", 235739ee993STrevor Wu "apll2_d4", 236739ee993STrevor Wu "apll12_div4", 237739ee993STrevor Wu "top_a2sys", 238739ee993STrevor Wu "top_aud_iec"; 239692d25b6STrevor Wu }; 240692d25b6STrevor Wu 241692d25b6STrevor Wu... 242