18c2ecf20Sopenharmony_ciMediatek AFE PCM controller for mt2701
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible: should be one of the followings.
58c2ecf20Sopenharmony_ci	      - "mediatek,mt2701-audio"
68c2ecf20Sopenharmony_ci	      - "mediatek,mt7622-audio"
78c2ecf20Sopenharmony_ci- interrupts: should contain AFE and ASYS interrupts
88c2ecf20Sopenharmony_ci- interrupt-names: should be "afe" and "asys"
98c2ecf20Sopenharmony_ci- power-domains: should define the power domain
108c2ecf20Sopenharmony_ci- clocks: Must contain an entry for each entry in clock-names
118c2ecf20Sopenharmony_ci  See ../clocks/clock-bindings.txt for details
128c2ecf20Sopenharmony_ci- clock-names: should have these clock names:
138c2ecf20Sopenharmony_ci		"infra_sys_audio_clk",
148c2ecf20Sopenharmony_ci		"top_audio_mux1_sel",
158c2ecf20Sopenharmony_ci		"top_audio_mux2_sel",
168c2ecf20Sopenharmony_ci		"top_audio_a1sys_hp",
178c2ecf20Sopenharmony_ci		"top_audio_a2sys_hp",
188c2ecf20Sopenharmony_ci		"i2s0_src_sel",
198c2ecf20Sopenharmony_ci		"i2s1_src_sel",
208c2ecf20Sopenharmony_ci		"i2s2_src_sel",
218c2ecf20Sopenharmony_ci		"i2s3_src_sel",
228c2ecf20Sopenharmony_ci		"i2s0_src_div",
238c2ecf20Sopenharmony_ci		"i2s1_src_div",
248c2ecf20Sopenharmony_ci		"i2s2_src_div",
258c2ecf20Sopenharmony_ci		"i2s3_src_div",
268c2ecf20Sopenharmony_ci		"i2s0_mclk_en",
278c2ecf20Sopenharmony_ci		"i2s1_mclk_en",
288c2ecf20Sopenharmony_ci		"i2s2_mclk_en",
298c2ecf20Sopenharmony_ci		"i2s3_mclk_en",
308c2ecf20Sopenharmony_ci		"i2so0_hop_ck",
318c2ecf20Sopenharmony_ci		"i2so1_hop_ck",
328c2ecf20Sopenharmony_ci		"i2so2_hop_ck",
338c2ecf20Sopenharmony_ci		"i2so3_hop_ck",
348c2ecf20Sopenharmony_ci		"i2si0_hop_ck",
358c2ecf20Sopenharmony_ci		"i2si1_hop_ck",
368c2ecf20Sopenharmony_ci		"i2si2_hop_ck",
378c2ecf20Sopenharmony_ci		"i2si3_hop_ck",
388c2ecf20Sopenharmony_ci		"asrc0_out_ck",
398c2ecf20Sopenharmony_ci		"asrc1_out_ck",
408c2ecf20Sopenharmony_ci		"asrc2_out_ck",
418c2ecf20Sopenharmony_ci		"asrc3_out_ck",
428c2ecf20Sopenharmony_ci		"audio_afe_pd",
438c2ecf20Sopenharmony_ci		"audio_afe_conn_pd",
448c2ecf20Sopenharmony_ci		"audio_a1sys_pd",
458c2ecf20Sopenharmony_ci		"audio_a2sys_pd",
468c2ecf20Sopenharmony_ci		"audio_mrgif_pd";
478c2ecf20Sopenharmony_ci- assigned-clocks: list of input clocks and dividers for the audio system.
488c2ecf20Sopenharmony_ci		   See ../clocks/clock-bindings.txt for details.
498c2ecf20Sopenharmony_ci- assigned-clocks-parents: parent of input clocks of assigned clocks.
508c2ecf20Sopenharmony_ci- assigned-clock-rates: list of clock frequencies of assigned clocks.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciMust be a subnode of MediaTek audsys device tree node.
538c2ecf20Sopenharmony_ciSee ../arm/mediatek/mediatek,audsys.txt for details about the parent node.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciExample:
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci	audsys: audio-subsystem@11220000 {
588c2ecf20Sopenharmony_ci		compatible = "mediatek,mt2701-audsys", "syscon";
598c2ecf20Sopenharmony_ci		...
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci		afe: audio-controller {
628c2ecf20Sopenharmony_ci			compatible = "mediatek,mt2701-audio";
638c2ecf20Sopenharmony_ci			interrupts =  <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
648c2ecf20Sopenharmony_ci				      <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
658c2ecf20Sopenharmony_ci			interrupt-names	= "afe", "asys";
668c2ecf20Sopenharmony_ci			power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci			clocks = <&infracfg CLK_INFRA_AUDIO>,
698c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_MUX1_SEL>,
708c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_MUX2_SEL>,
718c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_48K_TIMING>,
728c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_44K_TIMING>,
738c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K1_SRC_SEL>,
748c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K2_SRC_SEL>,
758c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K3_SRC_SEL>,
768c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K4_SRC_SEL>,
778c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K1_SRC_DIV>,
788c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K2_SRC_DIV>,
798c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K3_SRC_DIV>,
808c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_K4_SRC_DIV>,
818c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_I2S1_MCLK>,
828c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_I2S2_MCLK>,
838c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_I2S3_MCLK>,
848c2ecf20Sopenharmony_ci				 <&topckgen CLK_TOP_AUD_I2S4_MCLK>,
858c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SO1>,
868c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SO2>,
878c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SO3>,
888c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SO4>,
898c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SIN1>,
908c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SIN2>,
918c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SIN3>,
928c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_I2SIN4>,
938c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_ASRCO1>,
948c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_ASRCO2>,
958c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_ASRCO3>,
968c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_ASRCO4>,
978c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_AFE>,
988c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_AFE_CONN>,
998c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_A1SYS>,
1008c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_A2SYS>,
1018c2ecf20Sopenharmony_ci				 <&audsys CLK_AUD_AFE_MRGIF>;
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci			clock-names = "infra_sys_audio_clk",
1048c2ecf20Sopenharmony_ci				      "top_audio_mux1_sel",
1058c2ecf20Sopenharmony_ci				      "top_audio_mux2_sel",
1068c2ecf20Sopenharmony_ci				      "top_audio_a1sys_hp",
1078c2ecf20Sopenharmony_ci				      "top_audio_a2sys_hp",
1088c2ecf20Sopenharmony_ci				      "i2s0_src_sel",
1098c2ecf20Sopenharmony_ci				      "i2s1_src_sel",
1108c2ecf20Sopenharmony_ci				      "i2s2_src_sel",
1118c2ecf20Sopenharmony_ci				      "i2s3_src_sel",
1128c2ecf20Sopenharmony_ci				      "i2s0_src_div",
1138c2ecf20Sopenharmony_ci				      "i2s1_src_div",
1148c2ecf20Sopenharmony_ci				      "i2s2_src_div",
1158c2ecf20Sopenharmony_ci				      "i2s3_src_div",
1168c2ecf20Sopenharmony_ci				      "i2s0_mclk_en",
1178c2ecf20Sopenharmony_ci				      "i2s1_mclk_en",
1188c2ecf20Sopenharmony_ci				      "i2s2_mclk_en",
1198c2ecf20Sopenharmony_ci				      "i2s3_mclk_en",
1208c2ecf20Sopenharmony_ci				      "i2so0_hop_ck",
1218c2ecf20Sopenharmony_ci				      "i2so1_hop_ck",
1228c2ecf20Sopenharmony_ci				      "i2so2_hop_ck",
1238c2ecf20Sopenharmony_ci				      "i2so3_hop_ck",
1248c2ecf20Sopenharmony_ci				      "i2si0_hop_ck",
1258c2ecf20Sopenharmony_ci				      "i2si1_hop_ck",
1268c2ecf20Sopenharmony_ci				      "i2si2_hop_ck",
1278c2ecf20Sopenharmony_ci				      "i2si3_hop_ck",
1288c2ecf20Sopenharmony_ci				      "asrc0_out_ck",
1298c2ecf20Sopenharmony_ci				      "asrc1_out_ck",
1308c2ecf20Sopenharmony_ci				      "asrc2_out_ck",
1318c2ecf20Sopenharmony_ci				      "asrc3_out_ck",
1328c2ecf20Sopenharmony_ci				      "audio_afe_pd",
1338c2ecf20Sopenharmony_ci				      "audio_afe_conn_pd",
1348c2ecf20Sopenharmony_ci				      "audio_a1sys_pd",
1358c2ecf20Sopenharmony_ci				      "audio_a2sys_pd",
1368c2ecf20Sopenharmony_ci				      "audio_mrgif_pd";
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci			assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
1398c2ecf20Sopenharmony_ci					  <&topckgen CLK_TOP_AUD_MUX2_SEL>,
1408c2ecf20Sopenharmony_ci					  <&topckgen CLK_TOP_AUD_MUX1_DIV>,
1418c2ecf20Sopenharmony_ci					  <&topckgen CLK_TOP_AUD_MUX2_DIV>;
1428c2ecf20Sopenharmony_ci			assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
1438c2ecf20Sopenharmony_ci						 <&topckgen CLK_TOP_AUD2PLL_90M>;
1448c2ecf20Sopenharmony_ci			assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
1458c2ecf20Sopenharmony_ci		};
1468c2ecf20Sopenharmony_ci	};
147