1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*b2d2a78aSEmmanuel Vadot%YAML 1.2 3*b2d2a78aSEmmanuel Vadot--- 4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/mediatek,mt8365-afe.yaml# 5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*b2d2a78aSEmmanuel Vadot 7*b2d2a78aSEmmanuel Vadottitle: MediaTek Audio Front End PCM controller for MT8365 8*b2d2a78aSEmmanuel Vadot 9*b2d2a78aSEmmanuel Vadotmaintainers: 10*b2d2a78aSEmmanuel Vadot - Alexandre Mergnat <amergnat@baylibre.com> 11*b2d2a78aSEmmanuel Vadot 12*b2d2a78aSEmmanuel Vadotproperties: 13*b2d2a78aSEmmanuel Vadot compatible: 14*b2d2a78aSEmmanuel Vadot const: mediatek,mt8365-afe-pcm 15*b2d2a78aSEmmanuel Vadot 16*b2d2a78aSEmmanuel Vadot reg: 17*b2d2a78aSEmmanuel Vadot maxItems: 1 18*b2d2a78aSEmmanuel Vadot 19*b2d2a78aSEmmanuel Vadot "#sound-dai-cells": 20*b2d2a78aSEmmanuel Vadot const: 0 21*b2d2a78aSEmmanuel Vadot 22*b2d2a78aSEmmanuel Vadot clocks: 23*b2d2a78aSEmmanuel Vadot items: 24*b2d2a78aSEmmanuel Vadot - description: 26M clock 25*b2d2a78aSEmmanuel Vadot - description: mux for audio clock 26*b2d2a78aSEmmanuel Vadot - description: audio i2s0 mck 27*b2d2a78aSEmmanuel Vadot - description: audio i2s1 mck 28*b2d2a78aSEmmanuel Vadot - description: audio i2s2 mck 29*b2d2a78aSEmmanuel Vadot - description: audio i2s3 mck 30*b2d2a78aSEmmanuel Vadot - description: engen 1 clock 31*b2d2a78aSEmmanuel Vadot - description: engen 2 clock 32*b2d2a78aSEmmanuel Vadot - description: audio 1 clock 33*b2d2a78aSEmmanuel Vadot - description: audio 2 clock 34*b2d2a78aSEmmanuel Vadot - description: mux for i2s0 35*b2d2a78aSEmmanuel Vadot - description: mux for i2s1 36*b2d2a78aSEmmanuel Vadot - description: mux for i2s2 37*b2d2a78aSEmmanuel Vadot - description: mux for i2s3 38*b2d2a78aSEmmanuel Vadot 39*b2d2a78aSEmmanuel Vadot clock-names: 40*b2d2a78aSEmmanuel Vadot items: 41*b2d2a78aSEmmanuel Vadot - const: top_clk26m_clk 42*b2d2a78aSEmmanuel Vadot - const: top_audio_sel 43*b2d2a78aSEmmanuel Vadot - const: audio_i2s0_m 44*b2d2a78aSEmmanuel Vadot - const: audio_i2s1_m 45*b2d2a78aSEmmanuel Vadot - const: audio_i2s2_m 46*b2d2a78aSEmmanuel Vadot - const: audio_i2s3_m 47*b2d2a78aSEmmanuel Vadot - const: engen1 48*b2d2a78aSEmmanuel Vadot - const: engen2 49*b2d2a78aSEmmanuel Vadot - const: aud1 50*b2d2a78aSEmmanuel Vadot - const: aud2 51*b2d2a78aSEmmanuel Vadot - const: i2s0_m_sel 52*b2d2a78aSEmmanuel Vadot - const: i2s1_m_sel 53*b2d2a78aSEmmanuel Vadot - const: i2s2_m_sel 54*b2d2a78aSEmmanuel Vadot - const: i2s3_m_sel 55*b2d2a78aSEmmanuel Vadot 56*b2d2a78aSEmmanuel Vadot interrupts: 57*b2d2a78aSEmmanuel Vadot maxItems: 1 58*b2d2a78aSEmmanuel Vadot 59*b2d2a78aSEmmanuel Vadot power-domains: 60*b2d2a78aSEmmanuel Vadot maxItems: 1 61*b2d2a78aSEmmanuel Vadot 62*b2d2a78aSEmmanuel Vadot mediatek,dmic-mode: 63*b2d2a78aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 64*b2d2a78aSEmmanuel Vadot description: 65*b2d2a78aSEmmanuel Vadot Indicates how many data pins are used to transmit two channels of PDM 66*b2d2a78aSEmmanuel Vadot signal. 1 means two wires, 0 means one wire. Default value is 0. 67*b2d2a78aSEmmanuel Vadot enum: 68*b2d2a78aSEmmanuel Vadot - 0 # one wire 69*b2d2a78aSEmmanuel Vadot - 1 # two wires 70*b2d2a78aSEmmanuel Vadot 71*b2d2a78aSEmmanuel Vadotrequired: 72*b2d2a78aSEmmanuel Vadot - compatible 73*b2d2a78aSEmmanuel Vadot - reg 74*b2d2a78aSEmmanuel Vadot - clocks 75*b2d2a78aSEmmanuel Vadot - clock-names 76*b2d2a78aSEmmanuel Vadot - interrupts 77*b2d2a78aSEmmanuel Vadot - power-domains 78*b2d2a78aSEmmanuel Vadot 79*b2d2a78aSEmmanuel VadotadditionalProperties: false 80*b2d2a78aSEmmanuel Vadot 81*b2d2a78aSEmmanuel Vadotexamples: 82*b2d2a78aSEmmanuel Vadot - | 83*b2d2a78aSEmmanuel Vadot #include <dt-bindings/clock/mediatek,mt8365-clk.h> 84*b2d2a78aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 85*b2d2a78aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 86*b2d2a78aSEmmanuel Vadot #include <dt-bindings/power/mediatek,mt8365-power.h> 87*b2d2a78aSEmmanuel Vadot 88*b2d2a78aSEmmanuel Vadot soc { 89*b2d2a78aSEmmanuel Vadot #address-cells = <2>; 90*b2d2a78aSEmmanuel Vadot #size-cells = <2>; 91*b2d2a78aSEmmanuel Vadot 92*b2d2a78aSEmmanuel Vadot audio-controller@11220000 { 93*b2d2a78aSEmmanuel Vadot compatible = "mediatek,mt8365-afe-pcm"; 94*b2d2a78aSEmmanuel Vadot reg = <0 0x11220000 0 0x1000>; 95*b2d2a78aSEmmanuel Vadot #sound-dai-cells = <0>; 96*b2d2a78aSEmmanuel Vadot clocks = <&clk26m>, 97*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUDIO_SEL>, 98*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_I2S0_M>, 99*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_I2S1_M>, 100*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_I2S2_M>, 101*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_I2S3_M>, 102*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_ENGEN1_SEL>, 103*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_ENGEN2_SEL>, 104*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_1_SEL>, 105*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_AUD_2_SEL>, 106*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_APLL_I2S0_SEL>, 107*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_APLL_I2S1_SEL>, 108*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_APLL_I2S2_SEL>, 109*b2d2a78aSEmmanuel Vadot <&topckgen CLK_TOP_APLL_I2S3_SEL>; 110*b2d2a78aSEmmanuel Vadot clock-names = "top_clk26m_clk", 111*b2d2a78aSEmmanuel Vadot "top_audio_sel", 112*b2d2a78aSEmmanuel Vadot "audio_i2s0_m", 113*b2d2a78aSEmmanuel Vadot "audio_i2s1_m", 114*b2d2a78aSEmmanuel Vadot "audio_i2s2_m", 115*b2d2a78aSEmmanuel Vadot "audio_i2s3_m", 116*b2d2a78aSEmmanuel Vadot "engen1", 117*b2d2a78aSEmmanuel Vadot "engen2", 118*b2d2a78aSEmmanuel Vadot "aud1", 119*b2d2a78aSEmmanuel Vadot "aud2", 120*b2d2a78aSEmmanuel Vadot "i2s0_m_sel", 121*b2d2a78aSEmmanuel Vadot "i2s1_m_sel", 122*b2d2a78aSEmmanuel Vadot "i2s2_m_sel", 123*b2d2a78aSEmmanuel Vadot "i2s3_m_sel"; 124*b2d2a78aSEmmanuel Vadot interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>; 125*b2d2a78aSEmmanuel Vadot power-domains = <&spm MT8365_POWER_DOMAIN_AUDIO>; 126*b2d2a78aSEmmanuel Vadot mediatek,dmic-mode = <1>; 127*b2d2a78aSEmmanuel Vadot }; 128*b2d2a78aSEmmanuel Vadot }; 129*b2d2a78aSEmmanuel Vadot 130*b2d2a78aSEmmanuel Vadot... 131