ASoC: mediatek: Add support for MT8195 SoC
Subsystems (4)
v2 cover ASoC: mediatek: Add support for MT8195 SoC
This series of patches adds support for Mediatek AFE of MT8195 SoC. Patches are based on broonie tree "for-next" branch.
Changes since v1:
- fixed some problems related to dt-bindings
- add some missing properties to dt-bindings
- add depency declaration on dt-bindings
- fixed some warnings found by kernel test robot
Trevor Wu (8):
ASoC: mediatek: mt8195: update mediatek common driver
ASoC: mediatek: mt8195: support etdm in platform driver
ASoC: mediatek: mt8195: support adda in platform driver
ASoC: mediatek: mt8195: support pcm in platform driver
ASoC: mediatek: mt8195: add platform driver
dt-bindings: mediatek: mt8195: add audio afe document
ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and
rt5682
dt-bindings: mediatek: mt8195: add mt8195-mt6359-rt1019-rt5682
document
.../bindings/sound/mt8195-afe-pcm.yaml | 136 + .../sound/mt8195-mt6359-rt1019-rt5682.yaml | 39 + sound/soc/mediatek/Kconfig | 23 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/mtk-afe-fe-dai.c | 22 +- sound/soc/mediatek/common/mtk-base-afe.h | 10 +- sound/soc/mediatek/mt8195/Makefile | 14 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-dai-adda.c | 929 +++++ sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2666 ++++++++++++++ sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 393 ++ .../mt8195/mt8195-mt6359-rt1019-rt5682.c | 977 +++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 16 files changed, 12562 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml create mode 100644 Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-adda.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.h
Signature · 1 line
2.18.0
PATCH v2 1/8 ASoC: mediatek: mt8195: update mediatek common driver
Update mediatek common driver to support MT8195
--- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 22 +++++++++++++++++++--- sound/soc/mediatek/common/mtk-base-afe.h | 10 ++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-)
sound/soc/mediatek/common/mtk-afe-fe-dai.c +19 -3
@@ -139,7 +139,7 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream, substream->runtime->dma_area, substream->runtime->dma_bytes); -memset_io (substream->runtime->dma_area,0 , +memset_io ((void __force __iomem *)substream->runtime->dma_area,0 , substream->runtime->dma_bytes);/* set addr */
@@ -433,11 +433,20 @@ int mtk_memif_set_addr(struct mtk_base_afe *afe, int id, phys_buf_addr_upper_32); } -/* set MSB to 33-bit */ -if (memif->data->msb_reg >=0 ) +/* +* set MSB to 33-bit, for memif address +* only for memif base address, if msb_end_reg exists +*/ +if (memif->data->msb_reg)mtk_regmap_update_bits (afe->regmap, memif->data->msb_reg,1 , msb_at_bit33, memif->data->msb_shift); +/* set MSB to 33-bit, for memif end address */ +if (memif->data->msb_end_reg) +mtk_regmap_update_bits (afe->regmap, memif->data->msb_end_reg, +1 , msb_at_bit33, + memif->data->msb_end_shift); +return 0 ; }EXPORT_SYMBOL_GPL (mtk_memif_set_addr);
@@ -464,6 +473,13 @@ int mtk_memif_set_channel(struct mtk_base_afe *afe,else mono = (channel ==1 ) ?1 :0 ; +/* for specific configuration of memif mono mode */ +if (memif->data->int_odd_flag_reg) +mtk_regmap_update_bits (afe->regmap, + memif->data->int_odd_flag_reg, +1 , mono, + memif->data->int_odd_flag_shift); +return mtk_regmap_update_bits (afe->regmap, memif->data->mono_reg,1 , mono, memif->data->mono_shift); }
sound/soc/mediatek/common/mtk-base-afe.h +8 -2
@@ -29,6 +29,8 @@ struct mtk_base_memif_data {int quad_ch_reg;int quad_ch_mask;int quad_ch_shift; +int int_odd_flag_reg; +int int_odd_flag_shift;int enable_reg;int enable_shift;int hd_reg;
@@ -37,10 +39,13 @@ struct mtk_base_memif_data {int hd_align_mshift;int msb_reg;int msb_shift; -int msb2_reg; -int msb2_shift; +int msb_end_reg; +int msb_end_shift;int agent_disable_reg;int agent_disable_shift; +int ch_num_reg; +int ch_num_shift; +int ch_num_maskbit;/* playback memif only */ int pbuf_reg;int pbuf_mask;
@@ -62,6 +67,7 @@ struct mtk_base_irq_data {int irq_en_shift;int irq_clr_reg;int irq_clr_shift; +int irq_status_shift; };struct device ;
Signature · 1 line
2.18.0
PATCH v2 2/8 ASoC: mediatek: mt8195: support etdm in platform driver
In reply to Trevor WuThis patch adds mt8195 tdm/i2s dai driver.
--- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2666 +++++++++++++++++++ 1 file changed, 2666 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c new file +2666 -0
@@ -0,0 +1,2666 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* MediaTek ALSA SoC Audio DAI eTDM Control +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/delay.h> +#include <linux/pm_runtime.h> +#include <linux/regmap.h> +#include <sound/pcm_params.h> +#include "mt8195-afe-clk.h" +#include "mt8195-afe-common.h" +#include "mt8195-reg.h" + +#define MT8195_ETDM_NORMAL_MAX_BCK_RATE 24576000 +#define ETDM_TO_DAI_ID (x) ((x) + MT8195_AFE_IO_ETDM_START) +#define ENUM_TO_STR (x) #x + +enum { +MTK_DAI_ETDM_FORMAT_I2S =0 , +MTK_DAI_ETDM_FORMAT_LJ , +MTK_DAI_ETDM_FORMAT_RJ , +MTK_DAI_ETDM_FORMAT_EIAJ , +MTK_DAI_ETDM_FORMAT_DSPA , +MTK_DAI_ETDM_FORMAT_DSPB , +}; + +enum { +MTK_DAI_ETDM_DATA_ONE_PIN =0 , +MTK_DAI_ETDM_DATA_MULTI_PIN , +}; + +enum { +ETDM_IN , +ETDM_OUT , +}; + +enum { +ETDM_IN_FROM_PAD , +ETDM_IN_FROM_ETDM_OUT1 , +ETDM_IN_FROM_ETDM_OUT2 , +}; + +enum { +ETDM_IN_SLAVE_FROM_PAD , +ETDM_IN_SLAVE_FROM_ETDM_OUT1 , +ETDM_IN_SLAVE_FROM_ETDM_OUT2 , +}; + +enum { +ETDM_OUT_SLAVE_FROM_PAD , +ETDM_OUT_SLAVE_FROM_ETDM_IN1 , +ETDM_OUT_SLAVE_FROM_ETDM_IN2 , +}; + +enum { +COWORK_ETDM_NONE =0 , +COWORK_ETDM_IN1_M =2 , +COWORK_ETDM_IN1_S =3 , +COWORK_ETDM_IN2_M =4 , +COWORK_ETDM_IN2_S =5 , +COWORK_ETDM_OUT1_M =10 , +COWORK_ETDM_OUT1_S =11 , +COWORK_ETDM_OUT2_M =12 , +COWORK_ETDM_OUT2_S =13 , +COWORK_ETDM_OUT3_M =14 , +COWORK_ETDM_OUT3_S =15 , +}; + +enum { +ETDM_RELATCH_TIMING_A1A2SYS , +ETDM_RELATCH_TIMING_A3SYS , +ETDM_RELATCH_TIMING_A4SYS , +}; + +enum { +ETDM_SYNC_NONE , +ETDM_SYNC_FROM_IN1 , +ETDM_SYNC_FROM_IN2 , +ETDM_SYNC_FROM_OUT1 , +ETDM_SYNC_FROM_OUT2 , +ETDM_SYNC_FROM_OUT3 , +}; + +struct etdm_con_reg { +unsigned int con0; +unsigned int con1; +unsigned int con2; +unsigned int con3; +unsigned int con4; +unsigned int con5; +}; + +struct mtk_dai_etdm_rate { +unsigned int rate; +unsigned int reg_value; +}; + +struct mtk_dai_etdm_priv { +unsigned int clock_mode; +unsigned int data_mode; +bool slave_mode; +bool lrck_inv; +bool bck_inv; +unsigned int format; +unsigned int slots; +unsigned int lrck_width; +unsigned int mclk_freq; +unsigned int mclk_fixed_apll; +unsigned int mclk_apll; +unsigned int mclk_dir; +int cowork_source_id;//dai id +unsigned int cowork_slv_count; +int cowork_slv_id[MT8195_AFE_IO_ETDM_NUM -1 ];//dai_id +bool in_disable_ch[MT8195_ETDM_MAX_CHANNELS ]; +unsigned int en_ref_cnt; +}; + +static const struct mtk_dai_etdm_rate mt8195_etdm_rates[] = { + { .rate =8000 , .reg_value =0 , }, + { .rate =12000 , .reg_value =1 , }, + { .rate =16000 , .reg_value =2 , }, + { .rate =24000 , .reg_value =3 , }, + { .rate =32000 , .reg_value =4 , }, + { .rate =48000 , .reg_value =5 , }, + { .rate =96000 , .reg_value =7 , }, + { .rate =192000 , .reg_value =9 , }, + { .rate =384000 , .reg_value =11 , }, + { .rate =11025 , .reg_value =16 , }, + { .rate =22050 , .reg_value =17 , }, + { .rate =44100 , .reg_value =18 , }, + { .rate =88200 , .reg_value =19 , }, + { .rate =176400 , .reg_value =20 , }, + { .rate =352800 , .reg_value =21 , }, +}; + +static int get_etdm_fs_timing (unsigned int rate) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (mt8195_etdm_rates); i++) +if (mt8195_etdm_rates[i].rate == rate) +return mt8195_etdm_rates[i].reg_value; + +return -EINVAL ; +} + +static unsigned int get_etdm_ch_fixup (unsigned int channels) +{ +if (channels >16 ) +return 24 ; +else if (channels >8 ) +return 16 ; +else if (channels >4 ) +return 8 ; +else if (channels >2 ) +return 4 ; +else +return 2 ; +} + +static int get_etdm_reg (unsigned int dai_id,struct etdm_con_reg *etdm_reg) +{ +switch (dai_id) { +case MT8195_AFE_IO_ETDM1_IN : + etdm_reg->con0 =ETDM_IN1_CON0 ; + etdm_reg->con1 =ETDM_IN1_CON1 ; + etdm_reg->con2 =ETDM_IN1_CON2 ; + etdm_reg->con3 =ETDM_IN1_CON3 ; + etdm_reg->con4 =ETDM_IN1_CON4 ; + etdm_reg->con5 =ETDM_IN1_CON5 ; +break ; +case MT8195_AFE_IO_ETDM2_IN : + etdm_reg->con0 =ETDM_IN2_CON0 ; + etdm_reg->con1 =ETDM_IN2_CON1 ; + etdm_reg->con2 =ETDM_IN2_CON2 ; + etdm_reg->con3 =ETDM_IN2_CON3 ; + etdm_reg->con4 =ETDM_IN2_CON4 ; + etdm_reg->con5 =ETDM_IN2_CON5 ; +break ; +case MT8195_AFE_IO_ETDM1_OUT : + etdm_reg->con0 =ETDM_OUT1_CON0 ; + etdm_reg->con1 =ETDM_OUT1_CON1 ; + etdm_reg->con2 =ETDM_OUT1_CON2 ; + etdm_reg->con3 =ETDM_OUT1_CON3 ; + etdm_reg->con4 =ETDM_OUT1_CON4 ; + etdm_reg->con5 =ETDM_OUT1_CON5 ; +break ; +case MT8195_AFE_IO_ETDM2_OUT : + etdm_reg->con0 =ETDM_OUT2_CON0 ; + etdm_reg->con1 =ETDM_OUT2_CON1 ; + etdm_reg->con2 =ETDM_OUT2_CON2 ; + etdm_reg->con3 =ETDM_OUT2_CON3 ; + etdm_reg->con4 =ETDM_OUT2_CON4 ; + etdm_reg->con5 =ETDM_OUT2_CON5 ; +break ; +case MT8195_AFE_IO_ETDM3_OUT : +case MT8195_AFE_IO_DPTX : + etdm_reg->con0 =ETDM_OUT3_CON0 ; + etdm_reg->con1 =ETDM_OUT3_CON1 ; + etdm_reg->con2 =ETDM_OUT3_CON2 ; + etdm_reg->con3 =ETDM_OUT3_CON3 ; + etdm_reg->con4 =ETDM_OUT3_CON4 ; + etdm_reg->con5 =ETDM_OUT3_CON5 ; +break ; +default : +return -EINVAL ; + } +return 0 ; +} + +static int get_etdm_dir (unsigned int dai_id) +{ +switch (dai_id) { +case MT8195_AFE_IO_ETDM1_IN : +case MT8195_AFE_IO_ETDM2_IN : +return ETDM_IN ; +case MT8195_AFE_IO_ETDM1_OUT : +case MT8195_AFE_IO_ETDM2_OUT : +case MT8195_AFE_IO_ETDM3_OUT : +return ETDM_OUT ; +default : +return -EINVAL ; + } +} + +static int get_etdm_wlen (unsigned int bitwidth) +{ +return bitwidth <=16 ?16 :32 ; +} + +static int is_cowork_mode (struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; + +return (etdm_data->cowork_slv_count >0 || + etdm_data->cowork_source_id !=COWORK_ETDM_NONE ); +} + +static int sync_to_dai_id (int source_sel) +{ +switch (source_sel) { +case ETDM_SYNC_FROM_IN1 : +return MT8195_AFE_IO_ETDM1_IN ; +case ETDM_SYNC_FROM_IN2 : +return MT8195_AFE_IO_ETDM2_IN ; +case ETDM_SYNC_FROM_OUT1 : +return MT8195_AFE_IO_ETDM1_OUT ; +case ETDM_SYNC_FROM_OUT2 : +return MT8195_AFE_IO_ETDM2_OUT ; +case ETDM_SYNC_FROM_OUT3 : +return MT8195_AFE_IO_ETDM3_OUT ; +default : +return 0 ; + } +} + +static int get_etdm_cowork_master_id (struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; +int dai_id = etdm_data->cowork_source_id; + +if (dai_id ==COWORK_ETDM_NONE ) + dai_id = dai->id; + +return dai_id; +} + +static const struct snd_kcontrol_new mtk_dai_etdm_o048_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I020 Switch" ,AFE_CONN48 ,20 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I022 Switch" ,AFE_CONN48 ,22 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I046 Switch" ,AFE_CONN48_1 ,14 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I070 Switch" ,AFE_CONN48_2 ,6 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o049_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I021 Switch" ,AFE_CONN49 ,21 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I023 Switch" ,AFE_CONN49 ,23 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I047 Switch" ,AFE_CONN49_1 ,15 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I071 Switch" ,AFE_CONN49_2 ,7 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o050_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I024 Switch" ,AFE_CONN50 ,24 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I048 Switch" ,AFE_CONN50_1 ,16 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o051_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I025 Switch" ,AFE_CONN51 ,25 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I049 Switch" ,AFE_CONN51_1 ,17 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o052_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I026 Switch" ,AFE_CONN52 ,26 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I050 Switch" ,AFE_CONN52_1 ,18 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o053_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I027 Switch" ,AFE_CONN53 ,27 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I051 Switch" ,AFE_CONN53_1 ,19 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o054_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I028 Switch" ,AFE_CONN54 ,28 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I052 Switch" ,AFE_CONN54_1 ,20 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o055_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I029 Switch" ,AFE_CONN55 ,29 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I053 Switch" ,AFE_CONN55_1 ,21 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o056_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I030 Switch" ,AFE_CONN56 ,30 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I054 Switch" ,AFE_CONN56_1 ,22 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o057_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I031 Switch" ,AFE_CONN57 ,31 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I055 Switch" ,AFE_CONN57_1 ,23 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o058_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I032 Switch" ,AFE_CONN58_1 ,0 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I056 Switch" ,AFE_CONN58_1 ,24 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o059_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I033 Switch" ,AFE_CONN59_1 ,1 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I057 Switch" ,AFE_CONN59_1 ,25 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o060_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I034 Switch" ,AFE_CONN60_1 ,2 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I058 Switch" ,AFE_CONN60_1 ,26 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o061_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I035 Switch" ,AFE_CONN61_1 ,3 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I059 Switch" ,AFE_CONN61_1 ,27 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o062_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I036 Switch" ,AFE_CONN62_1 ,4 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I060 Switch" ,AFE_CONN62_1 ,28 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o063_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I037 Switch" ,AFE_CONN63_1 ,5 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I061 Switch" ,AFE_CONN63_1 ,29 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o064_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I038 Switch" ,AFE_CONN64_1 ,6 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I062 Switch" ,AFE_CONN64_1 ,30 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o065_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I039 Switch" ,AFE_CONN65_1 ,7 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I063 Switch" ,AFE_CONN65_1 ,31 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o066_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I040 Switch" ,AFE_CONN66_1 ,8 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I064 Switch" ,AFE_CONN66_2 ,0 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o067_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I041 Switch" ,AFE_CONN67_1 ,9 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I065 Switch" ,AFE_CONN67_2 ,1 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o068_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I042 Switch" ,AFE_CONN68_1 ,10 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I066 Switch" ,AFE_CONN68_2 ,2 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o069_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I043 Switch" ,AFE_CONN69_1 ,11 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I067 Switch" ,AFE_CONN69_2 ,3 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o070_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I044 Switch" ,AFE_CONN70_1 ,12 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I068 Switch" ,AFE_CONN70_2 ,4 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o071_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I045 Switch" ,AFE_CONN71_1 ,13 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I069 Switch" ,AFE_CONN71_2 ,5 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o072_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I020 Switch" ,AFE_CONN72 ,20 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I022 Switch" ,AFE_CONN72 ,22 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I046 Switch" ,AFE_CONN72_1 ,14 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I070 Switch" ,AFE_CONN72_2 ,6 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o073_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I021 Switch" ,AFE_CONN73 ,21 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I023 Switch" ,AFE_CONN73 ,23 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I047 Switch" ,AFE_CONN73_1 ,15 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I071 Switch" ,AFE_CONN73_2 ,7 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o074_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I024 Switch" ,AFE_CONN74 ,24 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I048 Switch" ,AFE_CONN74_1 ,16 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o075_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I025 Switch" ,AFE_CONN75 ,25 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I049 Switch" ,AFE_CONN75_1 ,17 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o076_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I026 Switch" ,AFE_CONN76 ,26 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I050 Switch" ,AFE_CONN76_1 ,18 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o077_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I027 Switch" ,AFE_CONN77 ,27 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I051 Switch" ,AFE_CONN77_1 ,19 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o078_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I028 Switch" ,AFE_CONN78 ,28 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I052 Switch" ,AFE_CONN78_1 ,20 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o079_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I029 Switch" ,AFE_CONN79 ,29 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I053 Switch" ,AFE_CONN79_1 ,21 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o080_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I030 Switch" ,AFE_CONN80 ,30 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I054 Switch" ,AFE_CONN80_1 ,22 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o081_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I031 Switch" ,AFE_CONN81 ,31 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I055 Switch" ,AFE_CONN81_1 ,23 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o082_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I032 Switch" ,AFE_CONN82_1 ,0 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I056 Switch" ,AFE_CONN82_1 ,24 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o083_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I033 Switch" ,AFE_CONN83_1 ,1 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I057 Switch" ,AFE_CONN83_1 ,25 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o084_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I034 Switch" ,AFE_CONN84_1 ,2 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I058 Switch" ,AFE_CONN84_1 ,26 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o085_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I035 Switch" ,AFE_CONN85_1 ,3 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I059 Switch" ,AFE_CONN85_1 ,27 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o086_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I036 Switch" ,AFE_CONN86_1 ,4 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I060 Switch" ,AFE_CONN86_1 ,28 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o087_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I037 Switch" ,AFE_CONN87_1 ,5 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I061 Switch" ,AFE_CONN87_1 ,29 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o088_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I038 Switch" ,AFE_CONN88_1 ,6 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I062 Switch" ,AFE_CONN88_1 ,30 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o089_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I039 Switch" ,AFE_CONN89_1 ,7 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I063 Switch" ,AFE_CONN89_1 ,31 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o090_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I040 Switch" ,AFE_CONN90_1 ,8 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I064 Switch" ,AFE_CONN90_2 ,0 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o091_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I041 Switch" ,AFE_CONN91_1 ,9 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I065 Switch" ,AFE_CONN91_2 ,1 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o092_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I042 Switch" ,AFE_CONN92_1 ,10 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I066 Switch" ,AFE_CONN92_2 ,2 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o093_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I043 Switch" ,AFE_CONN93_1 ,11 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I067 Switch" ,AFE_CONN93_2 ,3 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o094_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I044 Switch" ,AFE_CONN94_1 ,12 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I068 Switch" ,AFE_CONN94_2 ,4 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_etdm_o095_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I045 Switch" ,AFE_CONN95_1 ,13 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I069 Switch" ,AFE_CONN95_2 ,5 ,1 ,0 ), +}; + +static const char *const mt8195_etdm_clk_src_sel_text[] = { +"26m" , +"a1sys_a2sys" , +"a3sys" , +"a4sys" , +}; + +static SOC_ENUM_SINGLE_EXT_DECL(etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_text); + +static const char *const hdmitx_dptx_mux_map[] = { +"Disconnect" ,"Connect" , +}; + +static int hdmitx_dptx_mux_map_value[] = { +0 ,1 , +}; + +/* HDMI_OUT_MUX */ +static SOC_VALUE_ENUM_SINGLE_AUTODISABLE_DECL(hdmi_out_mux_map_enum, + SND_SOC_NOPM, +0 , +1 , + hdmitx_dptx_mux_map, + hdmitx_dptx_mux_map_value); + +static const struct snd_kcontrol_new hdmi_out_mux_control = +SOC_DAPM_ENUM ("HDMI_OUT_MUX" , hdmi_out_mux_map_enum); + +/* DPTX_OUT_MUX */ +static SOC_VALUE_ENUM_SINGLE_AUTODISABLE_DECL(dptx_out_mux_map_enum, + SND_SOC_NOPM, +0 , +1 , + hdmitx_dptx_mux_map, + hdmitx_dptx_mux_map_value); + +static const struct snd_kcontrol_new dptx_out_mux_control = +SOC_DAPM_ENUM ("DPTX_OUT_MUX" , dptx_out_mux_map_enum); + +/* HDMI_CH0_MUX ~ HDMI_CH7_MUX */ +static const char *const afe_conn_hdmi_mux_map[] = { +"CH0" ,"CH1" ,"CH2" ,"CH3" ,"CH4" ,"CH5" ,"CH6" ,"CH7" , +}; + +static int afe_conn_hdmi_mux_map_value[] = { +0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 , +}; + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch0_mux_map_enum, + AFE_TDMOUT_CONN0, +0 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch0_mux_control = +SOC_DAPM_ENUM ("HDMI_CH0_MUX" , hdmi_ch0_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch1_mux_map_enum, + AFE_TDMOUT_CONN0, +4 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch1_mux_control = +SOC_DAPM_ENUM ("HDMI_CH1_MUX" , hdmi_ch1_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch2_mux_map_enum, + AFE_TDMOUT_CONN0, +8 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch2_mux_control = +SOC_DAPM_ENUM ("HDMI_CH2_MUX" , hdmi_ch2_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch3_mux_map_enum, + AFE_TDMOUT_CONN0, +12 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch3_mux_control = +SOC_DAPM_ENUM ("HDMI_CH3_MUX" , hdmi_ch3_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch4_mux_map_enum, + AFE_TDMOUT_CONN0, +16 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch4_mux_control = +SOC_DAPM_ENUM ("HDMI_CH4_MUX" , hdmi_ch4_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch5_mux_map_enum, + AFE_TDMOUT_CONN0, +20 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch5_mux_control = +SOC_DAPM_ENUM ("HDMI_CH5_MUX" , hdmi_ch5_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch6_mux_map_enum, + AFE_TDMOUT_CONN0, +24 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch6_mux_control = +SOC_DAPM_ENUM ("HDMI_CH6_MUX" , hdmi_ch6_mux_map_enum); + +static SOC_VALUE_ENUM_SINGLE_DECL(hdmi_ch7_mux_map_enum, + AFE_TDMOUT_CONN0, +28 , +0xf , + afe_conn_hdmi_mux_map, + afe_conn_hdmi_mux_map_value); + +static const struct snd_kcontrol_new hdmi_ch7_mux_control = +SOC_DAPM_ENUM ("HDMI_CH7_MUX" , hdmi_ch7_mux_map_enum); + +static int mt8195_etdm_clk_src_sel_put (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *component =snd_kcontrol_chip (kcontrol); +struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (component); +unsigned int source = ucontrol->value.enumerated.item[0 ]; +unsigned int val; +unsigned int mask; +unsigned int reg; + +if (source >= e->items) +return -EINVAL ; + + reg =0 ; +if (!strcmp (kcontrol->id.name,"ETDM_OUT1_Clock_Source" )) { + reg =ETDM_OUT1_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + val =ETDM_OUT_CON4_CLOCK (source); + }else if (!strcmp (kcontrol->id.name,"ETDM_OUT2_Clock_Source" )) { + reg =ETDM_OUT2_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + val =ETDM_OUT_CON4_CLOCK (source); + }else if (!strcmp (kcontrol->id.name,"ETDM_OUT3_Clock_Source" )) { + reg =ETDM_OUT3_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + val =ETDM_OUT_CON4_CLOCK (source); + }else if (!strcmp (kcontrol->id.name,"ETDM_IN1_Clock_Source" )) { + reg =ETDM_IN1_CON2 ; + mask =ETDM_IN_CON2_CLOCK_MASK ; + val =ETDM_IN_CON2_CLOCK (source); + }else if (!strcmp (kcontrol->id.name,"ETDM_IN2_Clock_Source" )) { + reg =ETDM_IN2_CON2 ; + mask =ETDM_IN_CON2_CLOCK_MASK ; + val =ETDM_IN_CON2_CLOCK (source); + } + +if (reg) +regmap_update_bits (afe->regmap, reg, mask, val); + +return 0 ; +} + +static int mt8195_etdm_clk_src_sel_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *component = +snd_soc_kcontrol_component (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (component); +unsigned int value =0 ; +unsigned int reg =0 ; +unsigned int mask =0 ; +unsigned int shift =0 ; + +if (!strcmp (kcontrol->id.name,"ETDM_OUT1_Clock_Source" )) { + reg =ETDM_OUT1_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + shift =ETDM_OUT_CON4_CLOCK_SHIFT ; + }else if (!strcmp (kcontrol->id.name,"ETDM_OUT2_Clock_Source" )) { + reg =ETDM_OUT2_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + shift =ETDM_OUT_CON4_CLOCK_SHIFT ; + }else if (!strcmp (kcontrol->id.name,"ETDM_OUT3_Clock_Source" )) { + reg =ETDM_OUT3_CON4 ; + mask =ETDM_OUT_CON4_CLOCK_MASK ; + shift =ETDM_OUT_CON4_CLOCK_SHIFT ; + }else if (!strcmp (kcontrol->id.name,"ETDM_IN1_Clock_Source" )) { + reg =ETDM_IN1_CON2 ; + mask =ETDM_IN_CON2_CLOCK_MASK ; + shift =ETDM_IN_CON2_CLOCK_SHIFT ; + }else if (!strcmp (kcontrol->id.name,"ETDM_IN2_Clock_Source" )) { + reg =ETDM_IN2_CON2 ; + mask =ETDM_IN_CON2_CLOCK_MASK ; + shift =ETDM_IN_CON2_CLOCK_SHIFT ; + } + +if (reg) +regmap_read (afe->regmap, reg, &value); + + value &= mask; + value >>= shift; + ucontrol->value.enumerated.item[0 ] = value; +return 0 ; +} + +static const struct snd_kcontrol_new mtk_dai_etdm_controls[] = { +SOC_ENUM_EXT ("ETDM_OUT1_Clock_Source" , + etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_get, + mt8195_etdm_clk_src_sel_put), +SOC_ENUM_EXT ("ETDM_OUT2_Clock_Source" , + etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_get, + mt8195_etdm_clk_src_sel_put), +SOC_ENUM_EXT ("ETDM_OUT3_Clock_Source" , + etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_get, + mt8195_etdm_clk_src_sel_put), +SOC_ENUM_EXT ("ETDM_IN1_Clock_Source" , + etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_get, + mt8195_etdm_clk_src_sel_put), +SOC_ENUM_EXT ("ETDM_IN2_Clock_Source" , + etdmout_clk_src_enum, + mt8195_etdm_clk_src_sel_get, + mt8195_etdm_clk_src_sel_put), +}; + +static const struct snd_soc_dapm_widget mtk_dai_etdm_widgets[] = { +/* eTDM_IN2 */ +SND_SOC_DAPM_MIXER ("I012" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I013" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I014" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I015" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I016" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I017" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I018" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I019" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), + +/* eTDM_IN1 */ +SND_SOC_DAPM_MIXER ("I072" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I073" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I074" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I075" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I076" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I077" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I078" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I079" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I080" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I081" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I082" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I083" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I084" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I085" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I086" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I087" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I088" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I089" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I090" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I091" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I092" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I093" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I094" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I095" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), + +/* eTDM_OUT2 */ +SND_SOC_DAPM_MIXER ("O048" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o048_mix, +ARRAY_SIZE (mtk_dai_etdm_o048_mix)), +SND_SOC_DAPM_MIXER ("O049" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o049_mix, +ARRAY_SIZE (mtk_dai_etdm_o049_mix)), +SND_SOC_DAPM_MIXER ("O050" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o050_mix, +ARRAY_SIZE (mtk_dai_etdm_o050_mix)), +SND_SOC_DAPM_MIXER ("O051" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o051_mix, +ARRAY_SIZE (mtk_dai_etdm_o051_mix)), +SND_SOC_DAPM_MIXER ("O052" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o052_mix, +ARRAY_SIZE (mtk_dai_etdm_o052_mix)), +SND_SOC_DAPM_MIXER ("O053" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o053_mix, +ARRAY_SIZE (mtk_dai_etdm_o053_mix)), +SND_SOC_DAPM_MIXER ("O054" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o054_mix, +ARRAY_SIZE (mtk_dai_etdm_o054_mix)), +SND_SOC_DAPM_MIXER ("O055" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o055_mix, +ARRAY_SIZE (mtk_dai_etdm_o055_mix)), +SND_SOC_DAPM_MIXER ("O056" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o056_mix, +ARRAY_SIZE (mtk_dai_etdm_o056_mix)), +SND_SOC_DAPM_MIXER ("O057" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o057_mix, +ARRAY_SIZE (mtk_dai_etdm_o057_mix)), +SND_SOC_DAPM_MIXER ("O058" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o058_mix, +ARRAY_SIZE (mtk_dai_etdm_o058_mix)), +SND_SOC_DAPM_MIXER ("O059" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o059_mix, +ARRAY_SIZE (mtk_dai_etdm_o059_mix)), +SND_SOC_DAPM_MIXER ("O060" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o060_mix, +ARRAY_SIZE (mtk_dai_etdm_o060_mix)), +SND_SOC_DAPM_MIXER ("O061" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o061_mix, +ARRAY_SIZE (mtk_dai_etdm_o061_mix)), +SND_SOC_DAPM_MIXER ("O062" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o062_mix, +ARRAY_SIZE (mtk_dai_etdm_o062_mix)), +SND_SOC_DAPM_MIXER ("O063" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o063_mix, +ARRAY_SIZE (mtk_dai_etdm_o063_mix)), +SND_SOC_DAPM_MIXER ("O064" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o064_mix, +ARRAY_SIZE (mtk_dai_etdm_o064_mix)), +SND_SOC_DAPM_MIXER ("O065" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o065_mix, +ARRAY_SIZE (mtk_dai_etdm_o065_mix)), +SND_SOC_DAPM_MIXER ("O066" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o066_mix, +ARRAY_SIZE (mtk_dai_etdm_o066_mix)), +SND_SOC_DAPM_MIXER ("O067" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o067_mix, +ARRAY_SIZE (mtk_dai_etdm_o067_mix)), +SND_SOC_DAPM_MIXER ("O068" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o068_mix, +ARRAY_SIZE (mtk_dai_etdm_o068_mix)), +SND_SOC_DAPM_MIXER ("O069" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o069_mix, +ARRAY_SIZE (mtk_dai_etdm_o069_mix)), +SND_SOC_DAPM_MIXER ("O070" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o070_mix, +ARRAY_SIZE (mtk_dai_etdm_o070_mix)), +SND_SOC_DAPM_MIXER ("O071" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o071_mix, +ARRAY_SIZE (mtk_dai_etdm_o071_mix)), + +/* eTDM_OUT1 */ +SND_SOC_DAPM_MIXER ("O072" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o072_mix, +ARRAY_SIZE (mtk_dai_etdm_o072_mix)), +SND_SOC_DAPM_MIXER ("O073" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o073_mix, +ARRAY_SIZE (mtk_dai_etdm_o073_mix)), +SND_SOC_DAPM_MIXER ("O074" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o074_mix, +ARRAY_SIZE (mtk_dai_etdm_o074_mix)), +SND_SOC_DAPM_MIXER ("O075" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o075_mix, +ARRAY_SIZE (mtk_dai_etdm_o075_mix)), +SND_SOC_DAPM_MIXER ("O076" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o076_mix, +ARRAY_SIZE (mtk_dai_etdm_o076_mix)), +SND_SOC_DAPM_MIXER ("O077" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o077_mix, +ARRAY_SIZE (mtk_dai_etdm_o077_mix)), +SND_SOC_DAPM_MIXER ("O078" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o078_mix, +ARRAY_SIZE (mtk_dai_etdm_o078_mix)), +SND_SOC_DAPM_MIXER ("O079" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o079_mix, +ARRAY_SIZE (mtk_dai_etdm_o079_mix)), +SND_SOC_DAPM_MIXER ("O080" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o080_mix, +ARRAY_SIZE (mtk_dai_etdm_o080_mix)), +SND_SOC_DAPM_MIXER ("O081" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o081_mix, +ARRAY_SIZE (mtk_dai_etdm_o081_mix)), +SND_SOC_DAPM_MIXER ("O082" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o082_mix, +ARRAY_SIZE (mtk_dai_etdm_o082_mix)), +SND_SOC_DAPM_MIXER ("O083" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o083_mix, +ARRAY_SIZE (mtk_dai_etdm_o083_mix)), +SND_SOC_DAPM_MIXER ("O084" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o084_mix, +ARRAY_SIZE (mtk_dai_etdm_o084_mix)), +SND_SOC_DAPM_MIXER ("O085" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o085_mix, +ARRAY_SIZE (mtk_dai_etdm_o085_mix)), +SND_SOC_DAPM_MIXER ("O086" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o086_mix, +ARRAY_SIZE (mtk_dai_etdm_o086_mix)), +SND_SOC_DAPM_MIXER ("O087" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o087_mix, +ARRAY_SIZE (mtk_dai_etdm_o087_mix)), +SND_SOC_DAPM_MIXER ("O088" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o088_mix, +ARRAY_SIZE (mtk_dai_etdm_o088_mix)), +SND_SOC_DAPM_MIXER ("O089" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o089_mix, +ARRAY_SIZE (mtk_dai_etdm_o089_mix)), +SND_SOC_DAPM_MIXER ("O090" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o090_mix, +ARRAY_SIZE (mtk_dai_etdm_o090_mix)), +SND_SOC_DAPM_MIXER ("O091" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o091_mix, +ARRAY_SIZE (mtk_dai_etdm_o091_mix)), +SND_SOC_DAPM_MIXER ("O092" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o092_mix, +ARRAY_SIZE (mtk_dai_etdm_o092_mix)), +SND_SOC_DAPM_MIXER ("O093" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o093_mix, +ARRAY_SIZE (mtk_dai_etdm_o093_mix)), +SND_SOC_DAPM_MIXER ("O094" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o094_mix, +ARRAY_SIZE (mtk_dai_etdm_o094_mix)), +SND_SOC_DAPM_MIXER ("O095" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_etdm_o095_mix, +ARRAY_SIZE (mtk_dai_etdm_o095_mix)), + +/* eTDM_OUT3 */ +SND_SOC_DAPM_MUX ("HDMI_OUT_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_out_mux_control), +SND_SOC_DAPM_MUX ("DPTX_OUT_MUX" ,SND_SOC_NOPM ,0 ,0 , + &dptx_out_mux_control), + +SND_SOC_DAPM_MUX ("HDMI_CH0_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch0_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH1_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch1_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH2_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch2_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH3_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch3_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH4_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch4_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH5_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch5_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH6_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch6_mux_control), +SND_SOC_DAPM_MUX ("HDMI_CH7_MUX" ,SND_SOC_NOPM ,0 ,0 , + &hdmi_ch7_mux_control), + +SND_SOC_DAPM_INPUT ("ETDM_INPUT" ), +SND_SOC_DAPM_OUTPUT ("ETDM_OUTPUT" ), +}; + +static const struct snd_soc_dapm_route mtk_dai_etdm_routes[] = { + {"I012" ,NULL ,"ETDM2 Capture" }, + {"I013" ,NULL ,"ETDM2 Capture" }, + {"I014" ,NULL ,"ETDM2 Capture" }, + {"I015" ,NULL ,"ETDM2 Capture" }, + {"I016" ,NULL ,"ETDM2 Capture" }, + {"I017" ,NULL ,"ETDM2 Capture" }, + {"I018" ,NULL ,"ETDM2 Capture" }, + {"I019" ,NULL ,"ETDM2 Capture" }, + + {"I072" ,NULL ,"ETDM1 Capture" }, + {"I073" ,NULL ,"ETDM1 Capture" }, + {"I074" ,NULL ,"ETDM1 Capture" }, + {"I075" ,NULL ,"ETDM1 Capture" }, + {"I076" ,NULL ,"ETDM1 Capture" }, + {"I077" ,NULL ,"ETDM1 Capture" }, + {"I078" ,NULL ,"ETDM1 Capture" }, + {"I079" ,NULL ,"ETDM1 Capture" }, + {"I080" ,NULL ,"ETDM1 Capture" }, + {"I081" ,NULL ,"ETDM1 Capture" }, + {"I082" ,NULL ,"ETDM1 Capture" }, + {"I083" ,NULL ,"ETDM1 Capture" }, + {"I084" ,NULL ,"ETDM1 Capture" }, + {"I085" ,NULL ,"ETDM1 Capture" }, + {"I086" ,NULL ,"ETDM1 Capture" }, + {"I087" ,NULL ,"ETDM1 Capture" }, + {"I088" ,NULL ,"ETDM1 Capture" }, + {"I089" ,NULL ,"ETDM1 Capture" }, + {"I090" ,NULL ,"ETDM1 Capture" }, + {"I091" ,NULL ,"ETDM1 Capture" }, + {"I092" ,NULL ,"ETDM1 Capture" }, + {"I093" ,NULL ,"ETDM1 Capture" }, + {"I094" ,NULL ,"ETDM1 Capture" }, + {"I095" ,NULL ,"ETDM1 Capture" }, + + {"UL8" ,NULL ,"ETDM1 Capture" }, + {"UL3" ,NULL ,"ETDM2 Capture" }, + + {"ETDM2 Playback" ,NULL ,"O048" }, + {"ETDM2 Playback" ,NULL ,"O049" }, + {"ETDM2 Playback" ,NULL ,"O050" }, + {"ETDM2 Playback" ,NULL ,"O051" }, + {"ETDM2 Playback" ,NULL ,"O052" }, + {"ETDM2 Playback" ,NULL ,"O053" }, + {"ETDM2 Playback" ,NULL ,"O054" }, + {"ETDM2 Playback" ,NULL ,"O055" }, + {"ETDM2 Playback" ,NULL ,"O056" }, + {"ETDM2 Playback" ,NULL ,"O057" }, + {"ETDM2 Playback" ,NULL ,"O058" }, + {"ETDM2 Playback" ,NULL ,"O059" }, + {"ETDM2 Playback" ,NULL ,"O060" }, + {"ETDM2 Playback" ,NULL ,"O061" }, + {"ETDM2 Playback" ,NULL ,"O062" }, + {"ETDM2 Playback" ,NULL ,"O063" }, + {"ETDM2 Playback" ,NULL ,"O064" }, + {"ETDM2 Playback" ,NULL ,"O065" }, + {"ETDM2 Playback" ,NULL ,"O066" }, + {"ETDM2 Playback" ,NULL ,"O067" }, + {"ETDM2 Playback" ,NULL ,"O068" }, + {"ETDM2 Playback" ,NULL ,"O069" }, + {"ETDM2 Playback" ,NULL ,"O070" }, + {"ETDM2 Playback" ,NULL ,"O071" }, + + {"ETDM1 Playback" ,NULL ,"O072" }, + {"ETDM1 Playback" ,NULL ,"O073" }, + {"ETDM1 Playback" ,NULL ,"O074" }, + {"ETDM1 Playback" ,NULL ,"O075" }, + {"ETDM1 Playback" ,NULL ,"O076" }, + {"ETDM1 Playback" ,NULL ,"O077" }, + {"ETDM1 Playback" ,NULL ,"O078" }, + {"ETDM1 Playback" ,NULL ,"O079" }, + {"ETDM1 Playback" ,NULL ,"O080" }, + {"ETDM1 Playback" ,NULL ,"O081" }, + {"ETDM1 Playback" ,NULL ,"O082" }, + {"ETDM1 Playback" ,NULL ,"O083" }, + {"ETDM1 Playback" ,NULL ,"O084" }, + {"ETDM1 Playback" ,NULL ,"O085" }, + {"ETDM1 Playback" ,NULL ,"O086" }, + {"ETDM1 Playback" ,NULL ,"O087" }, + {"ETDM1 Playback" ,NULL ,"O088" }, + {"ETDM1 Playback" ,NULL ,"O089" }, + {"ETDM1 Playback" ,NULL ,"O090" }, + {"ETDM1 Playback" ,NULL ,"O091" }, + {"ETDM1 Playback" ,NULL ,"O092" }, + {"ETDM1 Playback" ,NULL ,"O093" }, + {"ETDM1 Playback" ,NULL ,"O094" }, + {"ETDM1 Playback" ,NULL ,"O095" }, + + {"O048" ,"I020 Switch" ,"I020" }, + {"O049" ,"I021 Switch" ,"I021" }, + + {"O048" ,"I022 Switch" ,"I022" }, + {"O049" ,"I023 Switch" ,"I023" }, + {"O050" ,"I024 Switch" ,"I024" }, + {"O051" ,"I025 Switch" ,"I025" }, + {"O052" ,"I026 Switch" ,"I026" }, + {"O053" ,"I027 Switch" ,"I027" }, + {"O054" ,"I028 Switch" ,"I028" }, + {"O055" ,"I029 Switch" ,"I029" }, + {"O056" ,"I030 Switch" ,"I030" }, + {"O057" ,"I031 Switch" ,"I031" }, + {"O058" ,"I032 Switch" ,"I032" }, + {"O059" ,"I033 Switch" ,"I033" }, + {"O060" ,"I034 Switch" ,"I034" }, + {"O061" ,"I035 Switch" ,"I035" }, + {"O062" ,"I036 Switch" ,"I036" }, + {"O063" ,"I037 Switch" ,"I037" }, + {"O064" ,"I038 Switch" ,"I038" }, + {"O065" ,"I039 Switch" ,"I039" }, + {"O066" ,"I040 Switch" ,"I040" }, + {"O067" ,"I041 Switch" ,"I041" }, + {"O068" ,"I042 Switch" ,"I042" }, + {"O069" ,"I043 Switch" ,"I043" }, + {"O070" ,"I044 Switch" ,"I044" }, + {"O071" ,"I045 Switch" ,"I045" }, + + {"O048" ,"I046 Switch" ,"I046" }, + {"O049" ,"I047 Switch" ,"I047" }, + {"O050" ,"I048 Switch" ,"I048" }, + {"O051" ,"I049 Switch" ,"I049" }, + {"O052" ,"I050 Switch" ,"I050" }, + {"O053" ,"I051 Switch" ,"I051" }, + {"O054" ,"I052 Switch" ,"I052" }, + {"O055" ,"I053 Switch" ,"I053" }, + {"O056" ,"I054 Switch" ,"I054" }, + {"O057" ,"I055 Switch" ,"I055" }, + {"O058" ,"I056 Switch" ,"I056" }, + {"O059" ,"I057 Switch" ,"I057" }, + {"O060" ,"I058 Switch" ,"I058" }, + {"O061" ,"I059 Switch" ,"I059" }, + {"O062" ,"I060 Switch" ,"I060" }, + {"O063" ,"I061 Switch" ,"I061" }, + {"O064" ,"I062 Switch" ,"I062" }, + {"O065" ,"I063 Switch" ,"I063" }, + {"O066" ,"I064 Switch" ,"I064" }, + {"O067" ,"I065 Switch" ,"I065" }, + {"O068" ,"I066 Switch" ,"I066" }, + {"O069" ,"I067 Switch" ,"I067" }, + {"O070" ,"I068 Switch" ,"I068" }, + {"O071" ,"I069 Switch" ,"I069" }, + + {"O048" ,"I070 Switch" ,"I070" }, + {"O049" ,"I071 Switch" ,"I071" }, + + {"O072" ,"I020 Switch" ,"I020" }, + {"O073" ,"I021 Switch" ,"I021" }, + + {"O072" ,"I022 Switch" ,"I022" }, + {"O073" ,"I023 Switch" ,"I023" }, + {"O074" ,"I024 Switch" ,"I024" }, + {"O075" ,"I025 Switch" ,"I025" }, + {"O076" ,"I026 Switch" ,"I026" }, + {"O077" ,"I027 Switch" ,"I027" }, + {"O078" ,"I028 Switch" ,"I028" }, + {"O079" ,"I029 Switch" ,"I029" }, + {"O080" ,"I030 Switch" ,"I030" }, + {"O081" ,"I031 Switch" ,"I031" }, + {"O082" ,"I032 Switch" ,"I032" }, + {"O083" ,"I033 Switch" ,"I033" }, + {"O084" ,"I034 Switch" ,"I034" }, + {"O085" ,"I035 Switch" ,"I035" }, + {"O086" ,"I036 Switch" ,"I036" }, + {"O087" ,"I037 Switch" ,"I037" }, + {"O088" ,"I038 Switch" ,"I038" }, + {"O089" ,"I039 Switch" ,"I039" }, + {"O090" ,"I040 Switch" ,"I040" }, + {"O091" ,"I041 Switch" ,"I041" }, + {"O092" ,"I042 Switch" ,"I042" }, + {"O093" ,"I043 Switch" ,"I043" }, + {"O094" ,"I044 Switch" ,"I044" }, + {"O095" ,"I045 Switch" ,"I045" }, + + {"O072" ,"I046 Switch" ,"I046" }, + {"O073" ,"I047 Switch" ,"I047" }, + {"O074" ,"I048 Switch" ,"I048" }, + {"O075" ,"I049 Switch" ,"I049" }, + {"O076" ,"I050 Switch" ,"I050" }, + {"O077" ,"I051 Switch" ,"I051" }, + {"O078" ,"I052 Switch" ,"I052" }, + {"O079" ,"I053 Switch" ,"I053" }, + {"O080" ,"I054 Switch" ,"I054" }, + {"O081" ,"I055 Switch" ,"I055" }, + {"O082" ,"I056 Switch" ,"I056" }, + {"O083" ,"I057 Switch" ,"I057" }, + {"O084" ,"I058 Switch" ,"I058" }, + {"O085" ,"I059 Switch" ,"I059" }, + {"O086" ,"I060 Switch" ,"I060" }, + {"O087" ,"I061 Switch" ,"I061" }, + {"O088" ,"I062 Switch" ,"I062" }, + {"O089" ,"I063 Switch" ,"I063" }, + {"O090" ,"I064 Switch" ,"I064" }, + {"O091" ,"I065 Switch" ,"I065" }, + {"O092" ,"I066 Switch" ,"I066" }, + {"O093" ,"I067 Switch" ,"I067" }, + {"O094" ,"I068 Switch" ,"I068" }, + {"O095" ,"I069 Switch" ,"I069" }, + + {"O072" ,"I070 Switch" ,"I070" }, + {"O073" ,"I071 Switch" ,"I071" }, + + {"HDMI_CH0_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH0_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH1_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH1_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH2_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH2_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH3_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH3_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH4_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH4_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH5_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH5_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH6_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH6_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_CH7_MUX" ,"CH0" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH1" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH2" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH3" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH4" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH5" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH6" ,"DL10" }, + {"HDMI_CH7_MUX" ,"CH7" ,"DL10" }, + + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH0_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH1_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH2_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH3_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH4_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH5_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH6_MUX" }, + {"HDMI_OUT_MUX" ,"Connect" ,"HDMI_CH7_MUX" }, + + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH0_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH1_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH2_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH3_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH4_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH5_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH6_MUX" }, + {"DPTX_OUT_MUX" ,"Connect" ,"HDMI_CH7_MUX" }, + + {"ETDM3 Playback" ,NULL ,"HDMI_OUT_MUX" }, + {"DPTX Playback" ,NULL ,"DPTX_OUT_MUX" }, + + {"ETDM_OUTPUT" ,NULL ,"DPTX Playback" }, + {"ETDM_OUTPUT" ,NULL ,"ETDM1 Playback" }, + {"ETDM_OUTPUT" ,NULL ,"ETDM2 Playback" }, + {"ETDM_OUTPUT" ,NULL ,"ETDM3 Playback" }, + {"ETDM1 Capture" ,NULL ,"ETDM_INPUT" }, + {"ETDM2 Capture" ,NULL ,"ETDM_INPUT" }, +}; + +static int mt8195_afe_enable_edtm (struct mtk_base_afe *afe,int dai_id) +{ +int ret; +struct etdm_con_reg etdm_reg; +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +bool keep_status = true; +unsigned long flags; + +spin_lock_irqsave (&afe_priv->afe_ctrl_lock, flags); + etdm_data->en_ref_cnt++; +if (etdm_data->en_ref_cnt ==1 ) + keep_status = false; +spin_unlock_irqrestore (&afe_priv->afe_ctrl_lock, flags); + +if (keep_status) +return 0 ; + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +regmap_update_bits (afe->regmap, etdm_reg.con0, +ETDM_CON0_EN ,ETDM_CON0_EN ); +return 0 ; +} + +static int mt8195_afe_disable_edtm (struct mtk_base_afe *afe,int dai_id) +{ +int ret; +struct etdm_con_reg etdm_reg; +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +bool keep_status = true; +unsigned long flags; + +spin_lock_irqsave (&afe_priv->afe_ctrl_lock, flags); +if (etdm_data->en_ref_cnt >0 ) { + etdm_data->en_ref_cnt--; +if (etdm_data->en_ref_cnt ==0 ) + keep_status = false; + } +spin_unlock_irqrestore (&afe_priv->afe_ctrl_lock, flags); + +if (keep_status) +return 0 ; + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +regmap_update_bits (afe->regmap, etdm_reg.con0,ETDM_CON0_EN ,0 ); +return 0 ; +} + +static int etdm_cowork_slv_sel (int id,int slave_mode) +{ +if (slave_mode) { +switch (id) { +case MT8195_AFE_IO_ETDM1_IN : +return COWORK_ETDM_IN1_S ; +case MT8195_AFE_IO_ETDM2_IN : +return COWORK_ETDM_IN2_S ; +case MT8195_AFE_IO_ETDM1_OUT : +return COWORK_ETDM_OUT1_S ; +case MT8195_AFE_IO_ETDM2_OUT : +return COWORK_ETDM_OUT2_S ; +case MT8195_AFE_IO_ETDM3_OUT : +return COWORK_ETDM_OUT3_S ; +default : +return -EINVAL ; + } + }else { +switch (id) { +case MT8195_AFE_IO_ETDM1_IN : +return COWORK_ETDM_IN1_M ; +case MT8195_AFE_IO_ETDM2_IN : +return COWORK_ETDM_IN2_M ; +case MT8195_AFE_IO_ETDM1_OUT : +return COWORK_ETDM_OUT1_M ; +case MT8195_AFE_IO_ETDM2_OUT : +return COWORK_ETDM_OUT2_M ; +case MT8195_AFE_IO_ETDM3_OUT : +return COWORK_ETDM_OUT3_M ; +default : +return -EINVAL ; + } + } +} + +static int mt8195_etdm_sync_mode_configure (struct mtk_base_afe *afe,int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +struct etdm_con_reg etdm_reg; +unsigned int reg =0 ; +unsigned int mask; +unsigned int val; +int cowork_source_sel; +int ret; + +if (etdm_data->cowork_source_id ==COWORK_ETDM_NONE ) +return 0 ; + + cowork_source_sel =etdm_cowork_slv_sel (etdm_data->cowork_source_id, + etdm_data->slave_mode); +if (cowork_source_sel <0 ) +return cowork_source_sel; + +switch (dai_id) { +case MT8195_AFE_IO_ETDM1_IN : + reg =ETDM_COWORK_CON1 ; + mask =ETDM_IN1_SLAVE_SEL_MASK ; + val =ETDM_IN1_SLAVE_SEL (cowork_source_sel); +break ; +case MT8195_AFE_IO_ETDM2_IN : + reg =ETDM_COWORK_CON2 ; + mask =ETDM_IN2_SLAVE_SEL_MASK ; + val =ETDM_IN2_SLAVE_SEL (cowork_source_sel); +break ; +case MT8195_AFE_IO_ETDM1_OUT : + reg =ETDM_COWORK_CON0 ; + mask =ETDM_OUT1_SLAVE_SEL_MASK ; + val =ETDM_OUT1_SLAVE_SEL (cowork_source_sel); +break ; +case MT8195_AFE_IO_ETDM2_OUT : + reg =ETDM_COWORK_CON2 ; + mask =ETDM_OUT2_SLAVE_SEL_MASK ; + val =ETDM_OUT2_SLAVE_SEL (cowork_source_sel); +break ; +case MT8195_AFE_IO_ETDM3_OUT : + reg =ETDM_COWORK_CON2 ; + mask =ETDM_OUT3_SLAVE_SEL_MASK ; + val =ETDM_OUT3_SLAVE_SEL (cowork_source_sel); +break ; +default : +return 0 ; + } + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +regmap_update_bits (afe->regmap, reg, mask, val); + +return 0 ; +} + +static int mtk_dai_etdm_get_cg_id_by_dai_id (int dai_id) +{ +int cg_id =-1 ; + +switch (dai_id) { +case MT8195_AFE_IO_DPTX : + cg_id =MT8195_CLK_AUD_HDMI_OUT ; +break ; +case MT8195_AFE_IO_ETDM1_IN : + cg_id =MT8195_CLK_AUD_TDM_IN ; +break ; +case MT8195_AFE_IO_ETDM2_IN : + cg_id =MT8195_CLK_AUD_I2SIN ; +break ; +case MT8195_AFE_IO_ETDM1_OUT : + cg_id =MT8195_CLK_AUD_TDM_OUT ; +break ; +case MT8195_AFE_IO_ETDM2_OUT : + cg_id =MT8195_CLK_AUD_I2S_OUT ; +break ; +case MT8195_AFE_IO_ETDM3_OUT : + cg_id =MT8195_CLK_AUD_HDMI_OUT ; +break ; +default : +break ; + } + +return cg_id; +} + +static int mtk_dai_etdm_get_clk_id_by_dai_id (int dai_id) +{ +int clk_id =-1 ; + +switch (dai_id) { +case MT8195_AFE_IO_DPTX : + clk_id =MT8195_CLK_TOP_DPTX_M_SEL ; +break ; +case MT8195_AFE_IO_ETDM1_IN : + clk_id =MT8195_CLK_TOP_I2SI1_M_SEL ; +break ; +case MT8195_AFE_IO_ETDM2_IN : + clk_id =MT8195_CLK_TOP_I2SI2_M_SEL ; +break ; +case MT8195_AFE_IO_ETDM1_OUT : + clk_id =MT8195_CLK_TOP_I2SO1_M_SEL ; +break ; +case MT8195_AFE_IO_ETDM2_OUT : + clk_id =MT8195_CLK_TOP_I2SO2_M_SEL ; +break ; +case MT8195_AFE_IO_ETDM3_OUT : +default : +break ; + } + +return clk_id; +} + +static int mtk_dai_etdm_get_clkdiv_id_by_dai_id (int dai_id) +{ +int clk_id =-1 ; + +switch (dai_id) { +case MT8195_AFE_IO_DPTX : + clk_id =MT8195_CLK_TOP_APLL12_DIV9 ; +break ; +case MT8195_AFE_IO_ETDM1_IN : + clk_id =MT8195_CLK_TOP_APLL12_DIV0 ; +break ; +case MT8195_AFE_IO_ETDM2_IN : + clk_id =MT8195_CLK_TOP_APLL12_DIV1 ; +break ; +case MT8195_AFE_IO_ETDM1_OUT : + clk_id =MT8195_CLK_TOP_APLL12_DIV2 ; +break ; +case MT8195_AFE_IO_ETDM2_OUT : + clk_id =MT8195_CLK_TOP_APLL12_DIV3 ; +break ; +case MT8195_AFE_IO_ETDM3_OUT : +default : +break ; + } + +return clk_id; +} + +static int mtk_dai_etdm_enable_mclk (struct mtk_base_afe *afe,int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int clkdiv_id =mtk_dai_etdm_get_clkdiv_id_by_dai_id (dai_id); + +if (clkdiv_id <0 ) +return -EINVAL ; + +mt8195_afe_enable_clk (afe, afe_priv->clk[clkdiv_id]); + +return 0 ; +} + +static int mtk_dai_etdm_disable_mclk (struct mtk_base_afe *afe,int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int clkdiv_id =mtk_dai_etdm_get_clkdiv_id_by_dai_id (dai_id); + +if (clkdiv_id <0 ) +return -EINVAL ; + +mt8195_afe_disable_clk (afe, afe_priv->clk[clkdiv_id]); + +return 0 ; +} + +/* dai ops */ +static int mtk_dai_etdm_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *mst_etdm_data; +int cg_id; +int mst_dai_id; +int slv_dai_id; +int i; + +if (is_cowork_mode (dai)) { + mst_dai_id =get_etdm_cowork_master_id (dai); +mtk_dai_etdm_enable_mclk (afe, mst_dai_id); + + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (mst_dai_id); +if (cg_id >=0 ) +mt8195_afe_enable_clk (afe, afe_priv->clk[cg_id]); + + mst_etdm_data = afe_priv->dai_priv[mst_dai_id]; + +for (i =0 ; i < mst_etdm_data->cowork_slv_count; i++) { + slv_dai_id = mst_etdm_data->cowork_slv_id[i]; + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (slv_dai_id); +if (cg_id >=0 ) +mt8195_afe_enable_clk (afe, + afe_priv->clk[cg_id]); + } + }else { +mtk_dai_etdm_enable_mclk (afe, dai->id); + + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (dai->id); +if (cg_id >=0 ) +mt8195_afe_enable_clk (afe, afe_priv->clk[cg_id]); + } + +return 0 ; +} + +static void mtk_dai_etdm_shutdown (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *mst_etdm_data; +int cg_id; +int mst_dai_id; +int slv_dai_id; +int i; + +if (is_cowork_mode (dai)) { + mst_dai_id =get_etdm_cowork_master_id (dai); + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (mst_dai_id); +if (cg_id >=0 ) +mt8195_afe_disable_clk (afe, afe_priv->clk[cg_id]); + + mst_etdm_data = afe_priv->dai_priv[mst_dai_id]; +for (i =0 ; i < mst_etdm_data->cowork_slv_count; i++) { + slv_dai_id = mst_etdm_data->cowork_slv_id[i]; + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (slv_dai_id); +if (cg_id >=0 ) +mt8195_afe_disable_clk (afe, + afe_priv->clk[cg_id]); + } +mtk_dai_etdm_disable_mclk (afe, mst_dai_id); + }else { + cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (dai->id); +if (cg_id >=0 ) +mt8195_afe_disable_clk (afe, afe_priv->clk[cg_id]); + +mtk_dai_etdm_disable_mclk (afe, dai->id); + } +} + +static int mtk_dai_etdm_fifo_mode (struct mtk_base_afe *afe, +int dai_id,unsigned int rate) +{ +unsigned int mode =0 ; +unsigned int reg =0 ; +unsigned int val =0 ; +unsigned int mask = (ETDM_IN_AFIFO_MODE_MASK |ETDM_IN_USE_AFIFO ); + +if (rate !=0 ) + mode =mt8195_afe_fs_timing (rate); + +switch (dai_id) { +case MT8195_AFE_IO_ETDM1_IN : + reg =ETDM_IN1_AFIFO_CON ; +if (rate ==0 ) + mode =MT8195_ETDM_IN1_1X_EN ; +break ; +case MT8195_AFE_IO_ETDM2_IN : + reg =ETDM_IN2_AFIFO_CON ; +if (rate ==0 ) + mode =MT8195_ETDM_IN2_1X_EN ; +break ; +default : +return -EINVAL ; + } + + val = (mode |ETDM_IN_USE_AFIFO ); + +regmap_update_bits (afe->regmap, reg, mask, val); +return 0 ; +} + +static int mtk_dai_etdm_in_configure (struct mtk_base_afe *afe, +unsigned int rate, +unsigned int channels, +int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +struct etdm_con_reg etdm_reg; +bool slave_mode = etdm_data->slave_mode; +unsigned int data_mode = etdm_data->data_mode; +unsigned int val =0 ; +unsigned int mask =0 ; +int i; +int ret; + +dev_dbg (afe->dev,"%s rate %u channels %u, id %d\n" , + __func__, rate, channels, dai_id); + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +if (etdm_data->cowork_source_id !=COWORK_ETDM_NONE ) + slave_mode = true; + +/* afifo */ +if (slave_mode) +mtk_dai_etdm_fifo_mode (afe, dai_id,0 ); +else +mtk_dai_etdm_fifo_mode (afe, dai_id, rate); + +/* con2 */ +if (!slave_mode) { + mask |=ETDM_IN_CON2_UPDATE_GAP_MASK ; +if (rate ==352800 || rate ==384000 ) + val |=ETDM_IN_CON2_UPDATE_GAP (4 ); +else + val |=ETDM_IN_CON2_UPDATE_GAP (3 ); + } + mask |= (ETDM_IN_CON2_MULTI_IP_2CH_MODE | +ETDM_IN_CON2_MULTI_IP_TOTAL_CH_MASK ); +if (data_mode ==MTK_DAI_ETDM_DATA_MULTI_PIN ) { + val |=ETDM_IN_CON2_MULTI_IP_2CH_MODE | +ETDM_IN_CON2_MULTI_IP_TOTAL_CH (channels); + } +regmap_update_bits (afe->regmap, etdm_reg.con2, mask, val); + + mask =0 ; + val =0 ; + +/* con3 */ + mask |=ETDM_IN_CON3_DISABLE_OUT_MASK ; +for (i =0 ; i < channels; i +=2 ) { +if (etdm_data->in_disable_ch[i] && + etdm_data->in_disable_ch[i +1 ]) + val |=ETDM_IN_CON3_DISABLE_OUT (i >>1 ); + } +if (!slave_mode) { + mask |=ETDM_IN_CON3_FS_MASK ; + val |=ETDM_IN_CON3_FS (get_etdm_fs_timing (rate)); + } +regmap_update_bits (afe->regmap, etdm_reg.con3, mask, val); + + mask =0 ; + val =0 ; + +/* con4 */ + mask |= (ETDM_IN_CON4_MASTER_LRCK_INV |ETDM_IN_CON4_MASTER_BCK_INV | +ETDM_IN_CON4_SLAVE_LRCK_INV |ETDM_IN_CON4_SLAVE_BCK_INV ); +if (slave_mode) { +if (etdm_data->lrck_inv) + val |=ETDM_IN_CON4_SLAVE_LRCK_INV ; +if (etdm_data->bck_inv) + val |=ETDM_IN_CON4_SLAVE_BCK_INV ; + }else { +if (etdm_data->lrck_inv) + val |=ETDM_IN_CON4_MASTER_LRCK_INV ; +if (etdm_data->bck_inv) + val |=ETDM_IN_CON4_MASTER_BCK_INV ; + } +regmap_update_bits (afe->regmap, etdm_reg.con4, mask, val); + + mask =0 ; + val =0 ; + +/* con5 */ + mask |=ETDM_IN_CON5_LR_SWAP_MASK ; + mask |=ETDM_IN_CON5_ENABLE_ODD_MASK ; +for (i =0 ; i < channels; i +=2 ) { +if (etdm_data->in_disable_ch[i] && + !etdm_data->in_disable_ch[i +1 ]) { + val |=ETDM_IN_CON5_LR_SWAP (i >>1 ); + val |=ETDM_IN_CON5_ENABLE_ODD (i >>1 ); + }else if (!etdm_data->in_disable_ch[i] && + etdm_data->in_disable_ch[i +1 ]) { + val |=ETDM_IN_CON5_ENABLE_ODD (i >>1 ); + } + } +regmap_update_bits (afe->regmap, etdm_reg.con5, mask, val); +return 0 ; +} + +static int mtk_dai_etdm_out_configure (struct mtk_base_afe *afe, +unsigned int rate, +unsigned int channels, +int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +struct etdm_con_reg etdm_reg; +bool slave_mode = etdm_data->slave_mode; +unsigned int val =0 ; +unsigned int mask =0 ; +int ret; +int fs =0 ; + +dev_dbg (afe->dev,"%s rate %u channels %u, id %d\n" , + __func__, rate, channels, dai_id); + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +if (etdm_data->cowork_source_id !=COWORK_ETDM_NONE ) + slave_mode = true; + +/* con0 */ + mask =ETDM_OUT_CON0_RELATCH_DOMAIN_MASK ; + val =ETDM_OUT_CON0_RELATCH_DOMAIN (ETDM_RELATCH_TIMING_A1A2SYS ); +regmap_update_bits (afe->regmap, etdm_reg.con0, mask, val); + + mask =0 ; + val =0 ; + +if (slave_mode) { +/* con2 */ + mask = (ETDM_OUT_CON2_LRCK_DELAY_BCK_INV | +ETDM_OUT_CON2_LRCK_DELAY_0P5T_EN ); + val = (ETDM_OUT_CON2_LRCK_DELAY_BCK_INV | +ETDM_OUT_CON2_LRCK_DELAY_0P5T_EN ); +regmap_update_bits (afe->regmap, etdm_reg.con2, + mask, val); + mask =0 ; + val =0 ; + }else { +/* con4 */ + mask |=ETDM_OUT_CON4_FS_MASK ; + val |=ETDM_OUT_CON4_FS (get_etdm_fs_timing (rate)); + } + + mask |=ETDM_OUT_CON4_RELATCH_EN_MASK ; +if (dai_id ==MT8195_AFE_IO_ETDM1_OUT ) + fs =MT8195_ETDM_OUT1_1X_EN ; +else if (dai_id ==MT8195_AFE_IO_ETDM2_OUT ) + fs =MT8195_ETDM_OUT2_1X_EN ; + + val |=ETDM_OUT_CON4_RELATCH_EN (fs); + +regmap_update_bits (afe->regmap, etdm_reg.con4, mask, val); + + mask =0 ; + val =0 ; + +/* con5 */ + mask |= (ETDM_OUT_CON5_MASTER_LRCK_INV |ETDM_OUT_CON5_MASTER_BCK_INV | +ETDM_OUT_CON5_SLAVE_LRCK_INV |ETDM_OUT_CON5_SLAVE_BCK_INV ); +if (slave_mode) { +if (etdm_data->lrck_inv) + val |=ETDM_OUT_CON5_SLAVE_LRCK_INV ; +if (etdm_data->bck_inv) + val |=ETDM_OUT_CON5_SLAVE_BCK_INV ; + }else { +if (etdm_data->lrck_inv) + val |=ETDM_OUT_CON5_MASTER_LRCK_INV ; +if (etdm_data->bck_inv) + val |=ETDM_OUT_CON5_MASTER_BCK_INV ; + } +regmap_update_bits (afe->regmap, etdm_reg.con5, mask, val); + +return 0 ; +} + +static int mtk_dai_etdm_mclk_configure (struct mtk_base_afe *afe,int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +int clk_id =mtk_dai_etdm_get_clk_id_by_dai_id (dai_id); +int clkdiv_id =mtk_dai_etdm_get_clkdiv_id_by_dai_id (dai_id); +int apll; +int apll_clk_id; +struct etdm_con_reg etdm_reg; +unsigned int val =0 ; +unsigned int mask =0 ; +int ret =0 ; + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + + mask |=ETDM_CON1_MCLK_OUTPUT ; +if (etdm_data->mclk_dir ==SND_SOC_CLOCK_OUT ) + val |=ETDM_CON1_MCLK_OUTPUT ; +regmap_update_bits (afe->regmap, etdm_reg.con1, mask, val); + +if (etdm_data->mclk_freq) { + apll = etdm_data->mclk_apll; + apll_clk_id =mt8195_afe_get_mclk_source_clk_id (apll); +if (apll_clk_id <0 ) +return apll_clk_id; + +if (clk_id <0 || clkdiv_id <0 ) +return -EINVAL ; + +/* select apll */ + ret =mt8195_afe_set_clk_parent (afe, afe_priv->clk[clk_id], + afe_priv->clk[apll_clk_id]); +if (ret) +return ret; + +/* set rate */ + ret =mt8195_afe_set_clk_rate (afe, afe_priv->clk[clkdiv_id], + etdm_data->mclk_freq); + }else { +if (etdm_data->mclk_dir ==SND_SOC_CLOCK_OUT ) +dev_dbg (afe->dev,"%s mclk freq = 0\n" , __func__); + } +return ret; +} + +static int mtk_dai_etdm_configure (struct mtk_base_afe *afe, +unsigned int rate, +unsigned int channels, +unsigned int bit_width, +int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +struct etdm_con_reg etdm_reg; +bool slave_mode = etdm_data->slave_mode; +unsigned int etdm_channels; +unsigned int lrck_width = etdm_data->lrck_width; +unsigned int val =0 ; +unsigned int mask =0 ; +unsigned int bck; +unsigned int wlen =get_etdm_wlen (bit_width); +int ret; + + ret =get_etdm_reg (dai_id, &etdm_reg); +if (ret <0 ) +return ret; + +if (etdm_data->cowork_source_id !=COWORK_ETDM_NONE ) + slave_mode = true; + +dev_dbg (afe->dev,"%s fmt %u data %u lrck %d-%u bck %d, clock %u slv %u\n" , + __func__, etdm_data->format, etdm_data->data_mode, + etdm_data->lrck_inv, etdm_data->lrck_width, etdm_data->bck_inv, + etdm_data->clock_mode, etdm_data->slave_mode); +dev_dbg (afe->dev,"%s rate %u channels %u bitwiedh %u, id %d\n" , + __func__, rate, channels, bit_width, dai_id); + + etdm_channels = (etdm_data->data_mode ==MTK_DAI_ETDM_DATA_ONE_PIN ) ? +get_etdm_ch_fixup (channels) :2 ; + + bck = rate * etdm_channels * wlen; +if (bck >MT8195_ETDM_NORMAL_MAX_BCK_RATE ) { +dev_info (afe->dev,"%s bck rate %u not support\n" , + __func__, bck); +return -EINVAL ; + } + +/* con0 */ + mask |=ETDM_CON0_BIT_LEN_MASK ; + val |=ETDM_CON0_BIT_LEN (bit_width); + mask |=ETDM_CON0_WORD_LEN_MASK ; + val |=ETDM_CON0_WORD_LEN (wlen); + mask |=ETDM_CON0_FORMAT_MASK ; + val |=ETDM_CON0_FORMAT (etdm_data->format); + mask |=ETDM_CON0_CH_NUM_MASK ; + val |=ETDM_CON0_CH_NUM (etdm_channels); + + mask |=ETDM_CON0_SLAVE_MODE ; +if (slave_mode) { +if (dai_id ==MT8195_AFE_IO_ETDM1_OUT && + etdm_data->cowork_source_id ==COWORK_ETDM_NONE ) { +dev_info (afe->dev,"%s id %d only support master mode\n" , + __func__, dai_id); +return -EINVAL ; + } + val |=ETDM_CON0_SLAVE_MODE ; + } +regmap_update_bits (afe->regmap, etdm_reg.con0, mask, val); + + mask =0 ; + val =0 ; + +/* con1 */ +if (lrck_width >0 ) { + mask |=ETDM_CON1_LRCK_AUTO_MODE ; + val |=ETDM_CON1_LRCK_WIDTH (lrck_width); + } +regmap_update_bits (afe->regmap, etdm_reg.con1, mask, val); + +if (get_etdm_dir (dai_id) ==ETDM_IN ) +mtk_dai_etdm_in_configure (afe, rate, channels, dai_id); +else +mtk_dai_etdm_out_configure (afe, rate, channels, dai_id); + +return 0 ; +} + +static int mtk_dai_etdm_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai) +{ +int ret =0 ; +unsigned int rate =params_rate (params); +unsigned int bit_width =params_width (params); +unsigned int channels =params_channels (params); +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *mst_etdm_data; +int mst_dai_id; +int slv_dai_id; +int i; + +dev_dbg (afe->dev,"%s '%s' period %u-%u\n" , + __func__,snd_pcm_stream_str (substream), +params_period_size (params),params_periods (params)); + +if (is_cowork_mode (dai)) { + mst_dai_id =get_etdm_cowork_master_id (dai); + + ret =mtk_dai_etdm_mclk_configure (afe, mst_dai_id); +if (ret) +return ret; + + ret =mtk_dai_etdm_configure (afe, rate, channels, + bit_width, mst_dai_id); +if (ret) +return ret; + + mst_etdm_data = afe_priv->dai_priv[mst_dai_id]; +for (i =0 ; i < mst_etdm_data->cowork_slv_count; i++) { + slv_dai_id = mst_etdm_data->cowork_slv_id[i]; + ret =mtk_dai_etdm_configure (afe, rate, channels, + bit_width, slv_dai_id); +if (ret) +return ret; + + ret =mt8195_etdm_sync_mode_configure (afe, slv_dai_id); +if (ret) +return ret; + } + }else { + ret =mtk_dai_etdm_mclk_configure (afe, dai->id); +if (ret) +return ret; + + ret =mtk_dai_etdm_configure (afe, rate, channels, + bit_width, dai->id); + } + +return ret; +} + +static int mtk_dai_etdm_trigger (struct snd_pcm_substream *substream,int cmd, +struct snd_soc_dai *dai) +{ +int ret =0 ; +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *mst_etdm_data; +int mst_dai_id; +int slv_dai_id; +int i; + +dev_dbg (afe->dev,"%s(), cmd %d, dai id %d\n" , __func__, cmd, dai->id); +switch (cmd) { +case SNDRV_PCM_TRIGGER_START : +case SNDRV_PCM_TRIGGER_RESUME : +if (is_cowork_mode (dai)) { + mst_dai_id =get_etdm_cowork_master_id (dai); + mst_etdm_data = afe_priv->dai_priv[mst_dai_id]; + +//open master first + ret |=mt8195_afe_enable_edtm (afe, mst_dai_id); +for (i =0 ; i < mst_etdm_data->cowork_slv_count; i++) { + slv_dai_id = mst_etdm_data->cowork_slv_id[i]; + ret |=mt8195_afe_enable_edtm (afe, slv_dai_id); + } + }else { + ret =mt8195_afe_enable_edtm (afe, dai->id); + } +break ; +case SNDRV_PCM_TRIGGER_STOP : +case SNDRV_PCM_TRIGGER_SUSPEND : +if (is_cowork_mode (dai)) { + mst_dai_id =get_etdm_cowork_master_id (dai); + mst_etdm_data = afe_priv->dai_priv[mst_dai_id]; + +for (i =0 ; i < mst_etdm_data->cowork_slv_count; i++) { + slv_dai_id = mst_etdm_data->cowork_slv_id[i]; + ret |=mt8195_afe_disable_edtm (afe, slv_dai_id); + } +// close master at last + ret |=mt8195_afe_disable_edtm (afe, mst_dai_id); + }else { + ret =mt8195_afe_disable_edtm (afe, dai->id); + } +break ; +default : +break ; + } +return ret; +} + +static int mtk_dai_etdm_cal_mclk (struct mtk_base_afe *afe,int freq,int dai_id) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai_id]; +int apll; +int apll_rate; + +if (freq ==0 ) { + etdm_data->mclk_freq = freq; +return 0 ; + } + +if (etdm_data->mclk_fixed_apll ==0 ) + apll =mt8195_afe_get_default_mclk_source_by_rate (freq); +else + apll = etdm_data->mclk_apll; + + apll_rate =mt8195_afe_get_mclk_source_rate (afe, apll); + +if (freq > apll_rate) { +dev_info (afe->dev,"freq %d > apll rate %d\n" , freq, apll_rate); +return -EINVAL ; + } + +if (apll_rate % freq !=0 ) { +dev_info (afe->dev,"APLL%d cannot generate freq Hz\n" , apll); +return -EINVAL ; + } + +if (etdm_data->mclk_fixed_apll ==0 ) + etdm_data->mclk_apll = apll; + etdm_data->mclk_freq = freq; + +return 0 ; +} + +static int mtk_dai_etdm_set_sysclk (struct snd_soc_dai *dai, +int clk_id,unsigned int freq,int dir) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; +int dai_id; + +dev_dbg (dai->dev,"%s id %d freq %u, dir %d\n" , + __func__, dai->id, freq, dir); +if (is_cowork_mode (dai)) + dai_id =get_etdm_cowork_master_id (dai); +else + dai_id = dai->id; + + etdm_data = afe_priv->dai_priv[dai_id]; + etdm_data->mclk_dir = dir; +return mtk_dai_etdm_cal_mclk (afe, freq, dai_id); +} + +static int mtk_dai_etdm_set_tdm_slot (struct snd_soc_dai *dai, +unsigned int tx_mask,unsigned int rx_mask, +int slots,int slot_width) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; + +dev_dbg (dai->dev,"%s id %d slot_width %d\n" , + __func__, dai->id, slot_width); + + etdm_data->slots = slots; + etdm_data->lrck_width = slot_width; +return 0 ; +} + +static int mtk_dai_etdm_set_fmt (struct snd_soc_dai *dai,unsigned int fmt) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; + +switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) { +case SND_SOC_DAIFMT_I2S : + etdm_data->format =MTK_DAI_ETDM_FORMAT_I2S ; +break ; +case SND_SOC_DAIFMT_LEFT_J : + etdm_data->format =MTK_DAI_ETDM_FORMAT_LJ ; +break ; +case SND_SOC_DAIFMT_RIGHT_J : + etdm_data->format =MTK_DAI_ETDM_FORMAT_RJ ; +break ; +case SND_SOC_DAIFMT_DSP_A : + etdm_data->format =MTK_DAI_ETDM_FORMAT_DSPA ; +break ; +case SND_SOC_DAIFMT_DSP_B : + etdm_data->format =MTK_DAI_ETDM_FORMAT_DSPB ; +break ; +default : +return -EINVAL ; + } + +switch (fmt &SND_SOC_DAIFMT_INV_MASK ) { +case SND_SOC_DAIFMT_NB_NF : + etdm_data->bck_inv = false; + etdm_data->lrck_inv = false; +break ; +case SND_SOC_DAIFMT_NB_IF : + etdm_data->bck_inv = false; + etdm_data->lrck_inv = true; +break ; +case SND_SOC_DAIFMT_IB_NF : + etdm_data->bck_inv = true; + etdm_data->lrck_inv = false; +break ; +case SND_SOC_DAIFMT_IB_IF : + etdm_data->bck_inv = true; + etdm_data->lrck_inv = true; +break ; +default : +return -EINVAL ; + } + +switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { +case SND_SOC_DAIFMT_CBM_CFM : + etdm_data->slave_mode = true; +break ; +case SND_SOC_DAIFMT_CBS_CFS : + etdm_data->slave_mode = false; +break ; +default : +return -EINVAL ; + } + +return 0 ; +} + +static int mtk_dai_hdmitx_dptx_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (dai->id); + +mt8195_afe_enable_main_clock (afe); + +if (cg_id >=0 ) +mt8195_afe_enable_clk (afe, afe_priv->clk[cg_id]); + +mtk_dai_etdm_enable_mclk (afe, dai->id); + +return 0 ; +} + +static void mtk_dai_hdmitx_dptx_shutdown (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int cg_id =mtk_dai_etdm_get_cg_id_by_dai_id (dai->id); + +mtk_dai_etdm_disable_mclk (afe, dai->id); + +if (cg_id >=0 ) +mt8195_afe_disable_clk (afe, afe_priv->clk[cg_id]); + +mt8195_afe_disable_main_clock (afe); +} + +static unsigned int mtk_dai_get_dptx_ch_en (unsigned int channel) +{ +switch (channel) { + case 1 ... 2: +return AFE_DPTX_CON_CH_EN_2CH ; + case 3 ... 4: +return AFE_DPTX_CON_CH_EN_4CH ; + case 5 ... 6: +return AFE_DPTX_CON_CH_EN_6CH ; + case 7 ... 8: +return AFE_DPTX_CON_CH_EN_8CH ; +default : +return AFE_DPTX_CON_CH_EN_2CH ; + } +} + +static unsigned int mtk_dai_get_dptx_ch (unsigned int ch) +{ +return (ch >2 ) ? +AFE_DPTX_CON_CH_NUM_8CH :AFE_DPTX_CON_CH_NUM_2CH ; +} + +static unsigned int mtk_dai_get_dptx_wlen (snd_pcm_format_t format) +{ +return snd_pcm_format_physical_width (format) <=16 ? +AFE_DPTX_CON_16BIT :AFE_DPTX_CON_24BIT ; +} + +static int mtk_dai_hdmitx_dptx_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; +unsigned int rate =params_rate (params); +unsigned int channels =params_channels (params); +snd_pcm_format_t format =params_format (params); +int width =snd_pcm_format_physical_width (format); +int ret =0 ; + +/* dptx configure */ +if (dai->id ==MT8195_AFE_IO_DPTX ) { +regmap_update_bits (afe->regmap,AFE_DPTX_CON , +AFE_DPTX_CON_CH_EN_MASK , +mtk_dai_get_dptx_ch_en (channels)); +regmap_update_bits (afe->regmap,AFE_DPTX_CON , +AFE_DPTX_CON_CH_NUM_MASK , +mtk_dai_get_dptx_ch (channels)); +regmap_update_bits (afe->regmap,AFE_DPTX_CON , +AFE_DPTX_CON_16BIT_MASK , +mtk_dai_get_dptx_wlen (format)); + +if (mtk_dai_get_dptx_ch (channels) ==AFE_DPTX_CON_CH_NUM_8CH ) { + etdm_data->data_mode =MTK_DAI_ETDM_DATA_ONE_PIN ; + channels =8 ; + }else { + channels =2 ; + } + }else { + etdm_data->data_mode =MTK_DAI_ETDM_DATA_MULTI_PIN ; + } + + ret =mtk_dai_etdm_mclk_configure (afe, dai->id); +if (ret) +return ret; + + ret =mtk_dai_etdm_configure (afe, rate, channels, width, dai->id); + +return ret; +} + +static int mtk_dai_hdmitx_dptx_trigger (struct snd_pcm_substream *substream, +int cmd, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +int ret =0 ; + +dev_dbg (afe->dev,"%s(), cmd %d, dai id %d\n" , __func__, cmd, dai->id); + +switch (cmd) { +case SNDRV_PCM_TRIGGER_START : +case SNDRV_PCM_TRIGGER_RESUME : +/* enable dptx interface */ +if (dai->id ==MT8195_AFE_IO_DPTX ) +regmap_update_bits (afe->regmap,AFE_DPTX_CON , +AFE_DPTX_CON_ON_MASK , +AFE_DPTX_CON_ON ); + +/* enable etdm_out3 */ + ret =mt8195_afe_enable_edtm (afe, dai->id); +break ; +case SNDRV_PCM_TRIGGER_STOP : +case SNDRV_PCM_TRIGGER_SUSPEND : +/* disable etdm_out3 */ + ret =mt8195_afe_disable_edtm (afe, dai->id); + +/* disable dptx interface */ +if (dai->id ==MT8195_AFE_IO_DPTX ) +regmap_update_bits (afe->regmap,AFE_DPTX_CON , +AFE_DPTX_CON_ON_MASK ,0 ); +break ; +default : +return -EINVAL ; + } + +return ret; +} + +static int mtk_dai_hdmitx_dptx_set_sysclk (struct snd_soc_dai *dai, +int clk_id, +unsigned int freq, +int dir) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; + +dev_dbg (dai->dev,"%s id %d freq %u, dir %d\n" , + __func__, dai->id, freq, dir); + + etdm_data->mclk_dir = dir; +return mtk_dai_etdm_cal_mclk (afe, freq, dai->id); +} + +static const struct snd_soc_dai_ops mtk_dai_etdm_ops = { + .startup = mtk_dai_etdm_startup, + .shutdown = mtk_dai_etdm_shutdown, + .hw_params = mtk_dai_etdm_hw_params, + .trigger = mtk_dai_etdm_trigger, + .set_sysclk = mtk_dai_etdm_set_sysclk, + .set_fmt = mtk_dai_etdm_set_fmt, + .set_tdm_slot = mtk_dai_etdm_set_tdm_slot, +}; + +static const struct snd_soc_dai_ops mtk_dai_hdmitx_dptx_ops = { + .startup = mtk_dai_hdmitx_dptx_startup, + .shutdown = mtk_dai_hdmitx_dptx_shutdown, + .hw_params = mtk_dai_hdmitx_dptx_hw_params, + .trigger = mtk_dai_hdmitx_dptx_trigger, + .set_sysclk = mtk_dai_hdmitx_dptx_set_sysclk, + .set_fmt = mtk_dai_etdm_set_fmt, +}; + +/* dai driver */ +#define MTK_ETDM_RATES (SNDRV_PCM_RATE_8000_384000) + +#define MTK_ETDM_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ + SNDRV_PCM_FMTBIT_S24_LE |\ + SNDRV_PCM_FMTBIT_S32_LE) + +static int mtk_dai_etdm_probe (struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id]; + +dev_dbg (dai->dev,"%s id %d\n" , __func__, dai->id); + +if (etdm_data->mclk_freq) { +dev_dbg (afe->dev,"MCLK always on, rate %d\n" , + etdm_data->mclk_freq); +pm_runtime_get_sync (afe->dev); +mtk_dai_etdm_mclk_configure (afe, dai->id); +mtk_dai_etdm_enable_mclk (afe, dai->id); +pm_runtime_put_sync (afe->dev); + } +return 0 ; +} + +static struct snd_soc_dai_driver mtk_dai_etdm_driver[] = { + { + .name ="DPTX" , + .id =MT8195_AFE_IO_DPTX , + .playback = { + .stream_name ="DPTX Playback" , + .channels_min =1 , + .channels_max =8 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_hdmitx_dptx_ops, + }, + { + .name ="ETDM1_IN" , + .id =MT8195_AFE_IO_ETDM1_IN , + .capture = { + .stream_name ="ETDM1 Capture" , + .channels_min =1 , + .channels_max =24 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_etdm_ops, + .probe = mtk_dai_etdm_probe, + }, + { + .name ="ETDM2_IN" , + .id =MT8195_AFE_IO_ETDM2_IN , + .capture = { + .stream_name ="ETDM2 Capture" , + .channels_min =1 , + .channels_max =16 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_etdm_ops, + .probe = mtk_dai_etdm_probe, + }, + { + .name ="ETDM1_OUT" , + .id =MT8195_AFE_IO_ETDM1_OUT , + .playback = { + .stream_name ="ETDM1 Playback" , + .channels_min =1 , + .channels_max =24 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_etdm_ops, + .probe = mtk_dai_etdm_probe, + }, + { + .name ="ETDM2_OUT" , + .id =MT8195_AFE_IO_ETDM2_OUT , + .playback = { + .stream_name ="ETDM2 Playback" , + .channels_min =1 , + .channels_max =24 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_etdm_ops, + .probe = mtk_dai_etdm_probe, + }, + { + .name ="ETDM3_OUT" , + .id =MT8195_AFE_IO_ETDM3_OUT , + .playback = { + .stream_name ="ETDM3 Playback" , + .channels_min =1 , + .channels_max =8 , + .rates =MTK_ETDM_RATES , + .formats =MTK_ETDM_FORMATS , + }, + .ops = &mtk_dai_hdmitx_dptx_ops, + .probe = mtk_dai_etdm_probe, + }, +}; + +static void mt8195_etdm_update_sync_info (struct mtk_base_afe *afe) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data; +struct mtk_dai_etdm_priv *mst_data; +int i; +int mst_dai_id; + +for (i =MT8195_AFE_IO_ETDM_START ; i <MT8195_AFE_IO_ETDM_END ; i++) { + etdm_data = afe_priv->dai_priv[i]; +if (etdm_data->cowork_source_id !=COWORK_ETDM_NONE ) { + mst_dai_id = etdm_data->cowork_source_id; + mst_data = afe_priv->dai_priv[mst_dai_id]; +if (mst_data->cowork_source_id !=COWORK_ETDM_NONE ) +dev_info (afe->dev,"%s [%d] wrong sync source\n" + , __func__, i); + mst_data->cowork_slv_id[mst_data->cowork_slv_count] = i; + mst_data->cowork_slv_count++; + } + } +} + +static void mt8195_dai_etdm_parse_of (struct mtk_base_afe *afe) +{ +const struct device_node *of_node = afe->dev->of_node; +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_data; +int i, j; +char prop[32 ]; +u8 disable_chn[MT8195_ETDM_MAX_CHANNELS ]; +int max_chn =MT8195_ETDM_MAX_CHANNELS ; +u32 sel; +int ret; +int dai_id; +unsigned int sync_id; +struct { +const char *name; +const unsigned int sync_id; + } of_afe_etdms[MT8195_AFE_IO_ETDM_NUM ] = { + {"etdm-in1" ,ETDM_SYNC_FROM_IN1 }, + {"etdm-in2" ,ETDM_SYNC_FROM_IN2 }, + {"etdm-out1" ,ETDM_SYNC_FROM_OUT1 }, + {"etdm-out2" ,ETDM_SYNC_FROM_OUT2 }, + {"etdm-out3" ,ETDM_SYNC_FROM_OUT3 }, + }; + +for (i =0 ; i <MT8195_AFE_IO_ETDM_NUM ; i++) { + dai_id =ETDM_TO_DAI_ID (i); + etdm_data = afe_priv->dai_priv[dai_id]; + + ret =snprintf (prop,sizeof (prop),"%s-mclk-source" , + of_afe_etdms[i].name); +if (ret <0 ) { +dev_info (afe->dev,"%s snprintf err=%d\n" , + __func__, ret); +return ; + } + ret =of_property_read_u32 (of_node, prop, &sel); +if (ret ==0 ) { +if (sel <MT8195_MCK_SEL_NUM ) { + etdm_data->mclk_apll = sel; + etdm_data->mclk_fixed_apll =1 ; + }else { +dev_info (afe->dev,"%s invalid mclk source %u\n" + , __func__, sel); + } + } + + ret =snprintf (prop,sizeof (prop),"%s-mclk-always-on-rate" , + of_afe_etdms[i].name); +if (ret <0 ) { +dev_info (afe->dev,"%s snprintf err=%d\n" , + __func__, ret); +return ; + } + ret =of_property_read_u32 (of_node, prop, &sel); +if (ret ==0 ) { + etdm_data->mclk_dir =SND_SOC_CLOCK_OUT ; +if (mtk_dai_etdm_cal_mclk (afe, sel, dai_id)) +dev_info (afe->dev,"%s unsupported mclk %uHz\n" + , __func__, sel); + } + + ret =snprintf (prop,sizeof (prop),"%s-data-mode" , + of_afe_etdms[i].name); +if (ret <0 ) { +dev_info (afe->dev,"%s snprintf err=%d\n" , + __func__, ret); +return ; + } + ret =of_property_read_u32 (of_node, prop, &sel); +if (ret ==0 ) { +if (sel <=MTK_DAI_ETDM_DATA_MULTI_PIN ) + etdm_data->data_mode = sel; +else +dev_info (afe->dev,"%s invalid data mode %u\n" , + __func__, sel); + } + + ret =snprintf (prop,sizeof (prop),"%s-cowork-source" , + of_afe_etdms[i].name); +if (ret <0 ) { +dev_info (afe->dev,"%s snprintf err=%d\n" , + __func__, ret); +return ; + } + ret =of_property_read_u32 (of_node, prop, &sel); +if (ret ==0 ) { +if (sel >=MT8195_AFE_IO_ETDM_NUM ) { +dev_info (afe->dev,"%s invalid id=%d\n" , + __func__, sel); + etdm_data->cowork_source_id =COWORK_ETDM_NONE ; + }else { + sync_id = of_afe_etdms[sel].sync_id; + etdm_data->cowork_source_id = +sync_to_dai_id (sync_id); + } + }else { + etdm_data->cowork_source_id =COWORK_ETDM_NONE ; + } + } + +/* etdm in only */ +for (i =0 ; i <2 ; i++) { + ret =snprintf (prop,sizeof (prop),"%s-chn-disabled" , + of_afe_etdms[i].name); +if (ret <0 ) { +dev_info (afe->dev,"%s snprintf err=%d\n" , + __func__, ret); +return ; + } + ret =of_property_read_variable_u8_array (of_node, prop, + disable_chn, +1 , max_chn); +if (ret <0 ) +continue ; + +for (j =0 ; j < ret; j++) { +if (disable_chn[j] >=MT8195_ETDM_MAX_CHANNELS ) +dev_info (afe->dev,"%s [%d] invalid chn %u\n" , + __func__, j, disable_chn[j]); +else + etdm_data->in_disable_ch[disable_chn[j]] = true; + } + } +mt8195_etdm_update_sync_info (afe); +} + +static int init_etdm_priv_data (struct mtk_base_afe *afe) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_etdm_priv *etdm_priv; +int i; + +for (i =MT8195_AFE_IO_ETDM_START ; i <MT8195_AFE_IO_ETDM_END ; i++) { + etdm_priv =devm_kzalloc (afe->dev, +sizeof (struct mtk_dai_etdm_priv ), +GFP_KERNEL ); +if (!etdm_priv) +return -ENOMEM ; + + afe_priv->dai_priv[i] = etdm_priv; + } + + afe_priv->dai_priv[MT8195_AFE_IO_DPTX ] = + afe_priv->dai_priv[MT8195_AFE_IO_ETDM3_OUT ]; + +mt8195_dai_etdm_parse_of (afe); +return 0 ; +} + +int mt8195_dai_etdm_register (struct mtk_base_afe *afe) +{ +struct mtk_base_afe_dai *dai; + + dai =devm_kzalloc (afe->dev,sizeof (*dai),GFP_KERNEL ); +if (!dai) +return -ENOMEM ; + +list_add (&dai->list, &afe->sub_dais); + + dai->dai_drivers = mtk_dai_etdm_driver; + dai->num_dai_drivers =ARRAY_SIZE (mtk_dai_etdm_driver); + + dai->dapm_widgets = mtk_dai_etdm_widgets; + dai->num_dapm_widgets =ARRAY_SIZE (mtk_dai_etdm_widgets); + dai->dapm_routes = mtk_dai_etdm_routes; + dai->num_dapm_routes =ARRAY_SIZE (mtk_dai_etdm_routes); + dai->controls = mtk_dai_etdm_controls; + dai->num_controls =ARRAY_SIZE (mtk_dai_etdm_controls); + +return init_etdm_priv_data (afe); +}
Signature · 1 line
2.18.0
PATCH v2 3/8 ASoC: mediatek: mt8195: support adda in platform driver
In reply to Trevor WuThis patch adds mt8195 adda dai driver.
--- sound/soc/mediatek/mt8195/mt8195-dai-adda.c | 929 ++++++++++++++++++++ 1 file changed, 929 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-adda.c
sound/soc/mediatek/mt8195/mt8195-dai-adda.c new file +929 -0
@@ -0,0 +1,929 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* MediaTek ALSA SoC Audio DAI ADDA Control +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/delay.h> +#include <linux/regmap.h> +#include "mt8195-afe-clk.h" +#include "mt8195-afe-common.h" +#include "mt8195-reg.h" + +#define ADDA_DL_GAIN_LOOPBACK 0x1800 +#define ADDA_HIRES_THRES 48000 + +enum { +SUPPLY_SEQ_CLOCK_SEL , +SUPPLY_SEQ_CLOCK_ON , +SUPPLY_SEQ_ADDA_DL_ON , +SUPPLY_SEQ_ADDA_MTKAIF_CFG , +SUPPLY_SEQ_ADDA_UL_ON , +SUPPLY_SEQ_ADDA_AFE_ON , +}; + +enum { +MTK_AFE_ADDA_DL_RATE_8K =0 , +MTK_AFE_ADDA_DL_RATE_11K =1 , +MTK_AFE_ADDA_DL_RATE_12K =2 , +MTK_AFE_ADDA_DL_RATE_16K =3 , +MTK_AFE_ADDA_DL_RATE_22K =4 , +MTK_AFE_ADDA_DL_RATE_24K =5 , +MTK_AFE_ADDA_DL_RATE_32K =6 , +MTK_AFE_ADDA_DL_RATE_44K =7 , +MTK_AFE_ADDA_DL_RATE_48K =8 , +MTK_AFE_ADDA_DL_RATE_96K =9 , +MTK_AFE_ADDA_DL_RATE_192K =10 , +}; + +enum { +MTK_AFE_ADDA_UL_RATE_8K =0 , +MTK_AFE_ADDA_UL_RATE_16K =1 , +MTK_AFE_ADDA_UL_RATE_32K =2 , +MTK_AFE_ADDA_UL_RATE_48K =3 , +MTK_AFE_ADDA_UL_RATE_96K =4 , +MTK_AFE_ADDA_UL_RATE_192K =5 , +}; + +enum { +DELAY_DATA_MISO1 =0 , +DELAY_DATA_MISO0 =1 , +DELAY_DATA_MISO2 =1 , +}; + +enum { +MTK_AFE_ADDA , +MTK_AFE_ADDA6 , +}; + +struct mtk_dai_adda_priv { +bool hires_required; +}; + +static unsigned int afe_adda_dl_rate_transform (struct mtk_base_afe *afe, +unsigned int rate) +{ +switch (rate) { +case 8000 : +return MTK_AFE_ADDA_DL_RATE_8K ; +case 11025 : +return MTK_AFE_ADDA_DL_RATE_11K ; +case 12000 : +return MTK_AFE_ADDA_DL_RATE_12K ; +case 16000 : +return MTK_AFE_ADDA_DL_RATE_16K ; +case 22050 : +return MTK_AFE_ADDA_DL_RATE_22K ; +case 24000 : +return MTK_AFE_ADDA_DL_RATE_24K ; +case 32000 : +return MTK_AFE_ADDA_DL_RATE_32K ; +case 44100 : +return MTK_AFE_ADDA_DL_RATE_44K ; +case 48000 : +return MTK_AFE_ADDA_DL_RATE_48K ; +case 96000 : +return MTK_AFE_ADDA_DL_RATE_96K ; +case 192000 : +return MTK_AFE_ADDA_DL_RATE_192K ; +default : +dev_info (afe->dev,"%s(), rate %d invalid, use 48kHz!!!\n" , + __func__, rate); +return MTK_AFE_ADDA_DL_RATE_48K ; + } +} + +static unsigned int afe_adda_ul_rate_transform (struct mtk_base_afe *afe, +unsigned int rate) +{ +switch (rate) { +case 8000 : +return MTK_AFE_ADDA_UL_RATE_8K ; +case 16000 : +return MTK_AFE_ADDA_UL_RATE_16K ; +case 32000 : +return MTK_AFE_ADDA_UL_RATE_32K ; +case 48000 : +return MTK_AFE_ADDA_UL_RATE_48K ; +case 96000 : +return MTK_AFE_ADDA_UL_RATE_96K ; +case 192000 : +return MTK_AFE_ADDA_UL_RATE_192K ; +default : +dev_info (afe->dev,"%s(), rate %d invalid, use 48kHz!!!\n" , + __func__, rate); +return MTK_AFE_ADDA_UL_RATE_48K ; + } +} + +static int mt8195_adda_mtkaif_init (struct mtk_base_afe *afe) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; +int delay_data; +int delay_cycle; +unsigned int mask =0 ; +unsigned int val =0 ; + +/* set rx protocol 2 & mtkaif_rxif_clkinv_adc inverse */ + mask = (MTKAIF_RXIF_CLKINV_ADC |MTKAIF_RXIF_PROTOCOL2 ); + val = (MTKAIF_RXIF_CLKINV_ADC |MTKAIF_RXIF_PROTOCOL2 ); + +regmap_update_bits (afe->regmap,AFE_ADDA_MTKAIF_CFG0 , mask, val); +regmap_update_bits (afe->regmap,AFE_ADDA6_MTKAIF_CFG0 , mask, val); + + mask =RG_RX_PROTOCOL2 ; + val =RG_RX_PROTOCOL2 ; +regmap_update_bits (afe->regmap,AFE_AUD_PAD_TOP , mask, val); + +if (!param->mtkaif_calibration_ok) { +dev_info (afe->dev,"%s(), calibration fail\n" , __func__); +return 0 ; + } + +/* set delay for ch1, ch2 */ +if (param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_0 ] >= + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ]) { + delay_data =DELAY_DATA_MISO1 ; + delay_cycle = + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_0 ] - + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ]; + }else { + delay_data =DELAY_DATA_MISO0 ; + delay_cycle = + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ] - + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_0 ]; + } + + val =0 ; + mask = (MTKAIF_RXIF_DELAY_DATA |MTKAIF_RXIF_DELAY_CYCLE_MASK ); + val |=MTKAIF_RXIF_DELAY_CYCLE (delay_cycle) & +MTKAIF_RXIF_DELAY_CYCLE_MASK ; + val |= delay_data <<MTKAIF_RXIF_DELAY_DATA_SHIFT ; +regmap_update_bits (afe->regmap,AFE_ADDA_MTKAIF_RX_CFG2 , mask, val); + +/* set delay between ch3 and ch2 */ +if (param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_2 ] >= + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ]) { + delay_data =DELAY_DATA_MISO1 ; + delay_cycle = + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_2 ] - + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ]; + }else { + delay_data =DELAY_DATA_MISO2 ; + delay_cycle = + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_1 ] - + param->mtkaif_phase_cycle[MT8195_MTKAIF_MISO_2 ]; + } + + val =0 ; + mask = (MTKAIF_RXIF_DELAY_DATA |MTKAIF_RXIF_DELAY_CYCLE_MASK ); + val |=MTKAIF_RXIF_DELAY_CYCLE (delay_cycle) & +MTKAIF_RXIF_DELAY_CYCLE_MASK ; + val |= delay_data <<MTKAIF_RXIF_DELAY_DATA_SHIFT ; +regmap_update_bits (afe->regmap,AFE_ADDA6_MTKAIF_RX_CFG2 , mask, val); + +return 0 ; +} + +static int mtk_adda_mtkaif_cfg_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +switch (event) { +case SND_SOC_DAPM_PRE_PMU : +mt8195_adda_mtkaif_init (afe); +break ; +default : +break ; + } + +return 0 ; +} + +static int mtk_adda_dl_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +switch (event) { +case SND_SOC_DAPM_POST_PMD : +/* should delayed 1/fs(smallest is 8k) = 125us before afe off */ +usleep_range (125 ,135 ); +break ; +default : +break ; + } + +return 0 ; +} + +static void mtk_adda_ul_mictype (struct mtk_base_afe *afe,int adda,bool dmic) +{ +unsigned int reg =0 ; +unsigned int mask =0 ; +unsigned int val =0 ; + +switch (adda) { +case MTK_AFE_ADDA : + reg =AFE_ADDA_UL_SRC_CON0 ; +break ; +case MTK_AFE_ADDA6 : + reg =AFE_ADDA6_UL_SRC_CON0 ; +break ; +default : +dev_info (afe->dev,"%s(), wrong parameter\n" , __func__); +return ; + } + + mask = (UL_SDM3_LEVEL_CTL |UL_MODE_3P25M_CH1_CTL | +UL_MODE_3P25M_CH2_CTL ); + +/* turn on dmic, ch1, ch2 */ +if (dmic) + val = mask; + +regmap_update_bits (afe->regmap, reg, mask, val); +} + +static int mtk_adda_ul_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +switch (event) { +case SND_SOC_DAPM_PRE_PMU : +mtk_adda_ul_mictype (afe,MTK_AFE_ADDA , param->mtkaif_dmic_on); +break ; +case SND_SOC_DAPM_POST_PMD : +/* should delayed 1/fs(smallest is 8k) = 125us before afe off */ +usleep_range (125 ,135 ); +break ; +default : +break ; + } + +return 0 ; +} + +static int mtk_adda6_ul_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; +unsigned int val; + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +switch (event) { +case SND_SOC_DAPM_PRE_PMU : +mtk_adda_ul_mictype (afe,MTK_AFE_ADDA6 , param->mtkaif_dmic_on); + + val = (param->mtkaif_adda6_only ? +ADDA6_MTKAIF_RX_SYNC_WORD2_DISABLE :0 ); + +regmap_update_bits (afe->regmap, +AFE_ADDA_MTKAIF_SYNCWORD_CFG , +ADDA6_MTKAIF_RX_SYNC_WORD2_DISABLE , + val); +break ; +case SND_SOC_DAPM_POST_PMD : +/* should delayed 1/fs(smallest is 8k) = 125us before afe off */ +usleep_range (125 ,135 ); +break ; +default : +break ; + } + +return 0 ; +} + +static int mtk_audio_hires_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct clk *clk = afe_priv->clk[MT8195_CLK_TOP_AUDIO_H_SEL ]; +struct clk *clk_parent; + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +switch (event) { +case SND_SOC_DAPM_PRE_PMU : + clk_parent = afe_priv->clk[MT8195_CLK_TOP_APLL1 ]; +break ; +case SND_SOC_DAPM_POST_PMD : + clk_parent = afe_priv->clk[MT8195_CLK_XTAL_26M ]; +break ; +default : +return 0 ; + } +mt8195_afe_set_clk_parent (afe, clk, clk_parent); + +return 0 ; +} + +static int mtk_adda_hires_event (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol, +int event) +{ +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int clk_id; + +dev_dbg (afe->dev,"%s(), name %s, event 0x%x\n" , + __func__, w->name, event); + +if (strstr (w->name,"ADDA_UL" )) + clk_id =MT8195_CLK_AUD_ADC_HIRES ; +else if (strstr (w->name,"ADDA6_UL" )) + clk_id =MT8195_CLK_AUD_ADDA6_ADC_HIRES ; +else if (strstr (w->name,"ADDA_DL" )) + clk_id =MT8195_CLK_AUD_DAC_HIRES ; +else +return -EINVAL ; + +switch (event) { +case SND_SOC_DAPM_PRE_PMU : +mt8195_afe_enable_clk (afe, afe_priv->clk[clk_id]); +break ; +case SND_SOC_DAPM_POST_PMD : +mt8195_afe_disable_clk (afe, afe_priv->clk[clk_id]); +break ; +default : +break ; + } + +return 0 ; +} + +static struct mtk_dai_adda_priv *get_adda_priv_by_name (struct mtk_base_afe *afe, +const char *name) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int dai_id; + +if (strstr (name,"ADDA_UL" )) + dai_id =MT8195_AFE_IO_UL_SRC1 ; +else if (strstr (name,"ADDA6_UL" )) + dai_id =MT8195_AFE_IO_UL_SRC2 ; +else if (strstr (name,"ADDA_DL" )) + dai_id =MT8195_AFE_IO_DL_SRC ; +else +return NULL ; + +return afe_priv->dai_priv[dai_id]; +} + +static int mtk_afe_adda_hires_connect (struct snd_soc_dapm_widget *source, +struct snd_soc_dapm_widget *sink) +{ +struct snd_soc_dapm_widget *w = source; +struct snd_soc_component *cmpnt =snd_soc_dapm_to_component (w->dapm); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mtk_dai_adda_priv *adda_priv; + + adda_priv =get_adda_priv_by_name (afe, w->name); + +if (!adda_priv) { +dev_info (afe->dev,"adda_priv == NULL" ); +return 0 ; + } + +return (adda_priv->hires_required) ?1 :0 ; +} + +static const struct snd_kcontrol_new mtk_dai_adda_o176_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I000 Switch" ,AFE_CONN176 ,0 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I002 Switch" ,AFE_CONN176 ,2 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I020 Switch" ,AFE_CONN176 ,20 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I022 Switch" ,AFE_CONN176 ,22 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I070 Switch" ,AFE_CONN176_2 ,6 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_adda_o177_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I001 Switch" ,AFE_CONN177 ,1 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I003 Switch" ,AFE_CONN177 ,3 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I021 Switch" ,AFE_CONN177 ,21 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I023 Switch" ,AFE_CONN177 ,23 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I071 Switch" ,AFE_CONN177_2 ,7 ,1 ,0 ), +}; + +static const char *const adda_dlgain_mux_map[] = { +"Bypass" ,"Connect" , +}; + +static SOC_ENUM_SINGLE_DECL(adda_dlgain_mux_map_enum, + SND_SOC_NOPM, 0, + adda_dlgain_mux_map); + +static const struct snd_kcontrol_new adda_dlgain_mux_control = +SOC_DAPM_ENUM ("DL_GAIN_MUX" , adda_dlgain_mux_map_enum); + +static const struct snd_soc_dapm_widget mtk_dai_adda_widgets[] = { +SND_SOC_DAPM_MIXER ("I168" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I169" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I170" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I171" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), + +SND_SOC_DAPM_MIXER ("O176" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_adda_o176_mix, +ARRAY_SIZE (mtk_dai_adda_o176_mix)), +SND_SOC_DAPM_MIXER ("O177" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_adda_o177_mix, +ARRAY_SIZE (mtk_dai_adda_o177_mix)), + +SND_SOC_DAPM_SUPPLY_S ("ADDA Enable" ,SUPPLY_SEQ_ADDA_AFE_ON , +AFE_ADDA_UL_DL_CON0 , +ADDA_AFE_ON_SHIFT ,0 , +NULL , +0 ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA Playback Enable" ,SUPPLY_SEQ_ADDA_DL_ON , +AFE_ADDA_DL_SRC2_CON0 , +DL_2_SRC_ON_TMP_CTRL_PRE_SHIFT ,0 , + mtk_adda_dl_event, +SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA Capture Enable" ,SUPPLY_SEQ_ADDA_UL_ON , +AFE_ADDA_UL_SRC_CON0 , +UL_SRC_ON_TMP_CTL_SHIFT ,0 , + mtk_adda_ul_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA6 Capture Enable" ,SUPPLY_SEQ_ADDA_UL_ON , +AFE_ADDA6_UL_SRC_CON0 , +UL_SRC_ON_TMP_CTL_SHIFT ,0 , + mtk_adda6_ul_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA_UL_HIRES" ,SUPPLY_SEQ_CLOCK_ON , +SND_SOC_NOPM , +0 ,0 , + mtk_adda_hires_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA6_UL_HIRES" ,SUPPLY_SEQ_CLOCK_ON , +SND_SOC_NOPM , +0 ,0 , + mtk_adda_hires_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA_DL_HIRES" ,SUPPLY_SEQ_CLOCK_ON , +SND_SOC_NOPM , +0 ,0 , + mtk_adda_hires_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("AUDIO_HIRES" ,SUPPLY_SEQ_CLOCK_SEL , +SND_SOC_NOPM , +0 ,0 , + mtk_audio_hires_event, +SND_SOC_DAPM_PRE_PMU |SND_SOC_DAPM_POST_PMD ), + +SND_SOC_DAPM_SUPPLY_S ("ADDA_MTKAIF_CFG" ,SUPPLY_SEQ_ADDA_MTKAIF_CFG , +SND_SOC_NOPM , +0 ,0 , + mtk_adda_mtkaif_cfg_event, +SND_SOC_DAPM_PRE_PMU ), + +SND_SOC_DAPM_MUX ("DL_GAIN_MUX" ,SND_SOC_NOPM ,0 ,0 , + &adda_dlgain_mux_control), + +SND_SOC_DAPM_PGA ("DL_GAIN" ,AFE_ADDA_DL_SRC2_CON0 , +DL_2_GAIN_ON_CTL_PRE_SHIFT ,0 ,NULL ,0 ), + +SND_SOC_DAPM_INPUT ("ADDA_INPUT" ), +SND_SOC_DAPM_OUTPUT ("ADDA_OUTPUT" ), +}; + +static const struct snd_soc_dapm_route mtk_dai_adda_routes[] = { + {"ADDA Capture" ,NULL ,"ADDA Enable" }, + {"ADDA Capture" ,NULL ,"ADDA Capture Enable" }, + {"ADDA Capture" ,NULL ,"ADDA_MTKAIF_CFG" }, + {"ADDA Capture" ,NULL ,"ADDA_UL_HIRES" , mtk_afe_adda_hires_connect}, + {"ADDA6 Capture" ,NULL ,"ADDA Enable" }, + {"ADDA6 Capture" ,NULL ,"ADDA6 Capture Enable" }, + {"ADDA6 Capture" ,NULL ,"ADDA_MTKAIF_CFG" }, + {"ADDA6 Capture" ,NULL ,"ADDA6_UL_HIRES" , mtk_afe_adda_hires_connect}, + + {"I168" ,NULL ,"ADDA Capture" }, + {"I169" ,NULL ,"ADDA Capture" }, + {"I170" ,NULL ,"ADDA6 Capture" }, + {"I171" ,NULL ,"ADDA6 Capture" }, + + {"ADDA Playback" ,NULL ,"ADDA Enable" }, + {"ADDA Playback" ,NULL ,"ADDA Playback Enable" }, + {"ADDA Playback" ,NULL ,"ADDA_DL_HIRES" , mtk_afe_adda_hires_connect}, + + {"DL_GAIN" ,NULL ,"O176" }, + {"DL_GAIN" ,NULL ,"O177" }, + + {"DL_GAIN_MUX" ,"Bypass" ,"O176" }, + {"DL_GAIN_MUX" ,"Bypass" ,"O177" }, + {"DL_GAIN_MUX" ,"Connect" ,"DL_GAIN" }, + + {"ADDA Playback" ,NULL ,"DL_GAIN_MUX" }, + + {"O176" ,"I000 Switch" ,"I000" }, + {"O177" ,"I001 Switch" ,"I001" }, + + {"O176" ,"I002 Switch" ,"I002" }, + {"O177" ,"I003 Switch" ,"I003" }, + + {"O176" ,"I020 Switch" ,"I020" }, + {"O177" ,"I021 Switch" ,"I021" }, + + {"O176" ,"I022 Switch" ,"I022" }, + {"O177" ,"I023 Switch" ,"I023" }, + + {"O176" ,"I070 Switch" ,"I070" }, + {"O177" ,"I071 Switch" ,"I071" }, + + {"ADDA_UL_HIRES" ,NULL ,"AUDIO_HIRES" }, + {"ADDA6_UL_HIRES" ,NULL ,"AUDIO_HIRES" }, + {"ADDA_DL_HIRES" ,NULL ,"AUDIO_HIRES" }, + + {"ADDA Capture" ,NULL ,"ADDA_INPUT" }, + {"ADDA6 Capture" ,NULL ,"ADDA_INPUT" }, + {"ADDA_OUTPUT" ,NULL ,"ADDA Playback" }, +}; + +static int mt8195_adda_dl_gain_put (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *component =snd_kcontrol_chip (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (component); +unsigned int reg =AFE_ADDA_DL_SRC2_CON1 ; +unsigned int mask =DL_2_GAIN_CTL_PRE_MASK ; +unsigned int value = (unsigned int )(ucontrol->value.integer.value[0 ]); + +regmap_update_bits (afe->regmap, reg, mask,DL_2_GAIN_CTL_PRE (value)); +return 0 ; +} + +static int mt8195_adda_dl_gain_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *component =snd_kcontrol_chip (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (component); +unsigned int reg =AFE_ADDA_DL_SRC2_CON1 ; +unsigned int mask =DL_2_GAIN_CTL_PRE_MASK ; +unsigned int value =0 ; + +regmap_read (afe->regmap, reg, &value); + + ucontrol->value.integer.value[0 ] = ((value & mask) >> +DL_2_GAIN_CTL_PRE_SHIFT ); +return 0 ; +} + +static int mt8195_adda6_only_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *cmpnt =snd_soc_kcontrol_component (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; + + ucontrol->value.integer.value[0 ] = param->mtkaif_adda6_only; +return 0 ; +} + +static int mt8195_adda6_only_set (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *cmpnt =snd_soc_kcontrol_component (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; +int mtkaif_adda6_only; + + mtkaif_adda6_only = ucontrol->value.integer.value[0 ]; + +dev_info (afe->dev,"%s(), kcontrol name %s, mtkaif_adda6_only %d\n" , + __func__, kcontrol->id.name, mtkaif_adda6_only); + + param->mtkaif_adda6_only = mtkaif_adda6_only; + +return 0 ; +} + +static int mt8195_adda_dmic_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *cmpnt =snd_soc_kcontrol_component (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; + + ucontrol->value.integer.value[0 ] = param->mtkaif_dmic_on; +return 0 ; +} + +static int mt8195_adda_dmic_set (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_component *cmpnt =snd_soc_kcontrol_component (kcontrol); +struct mtk_base_afe *afe =snd_soc_component_get_drvdata (cmpnt); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtkaif_param *param = &afe_priv->mtkaif_params; +int dmic_on; + + dmic_on = ucontrol->value.integer.value[0 ]; + +dev_dbg (afe->dev,"%s(), kcontrol name %s, dmic_on %d\n" , + __func__, kcontrol->id.name, dmic_on); + + param->mtkaif_dmic_on = dmic_on; +return 0 ; +} + +static const struct snd_kcontrol_new mtk_dai_adda_controls[] = { +SOC_SINGLE_EXT ("ADDA_DL_Gain" ,SND_SOC_NOPM ,0 ,65535 ,0 , + mt8195_adda_dl_gain_get, mt8195_adda_dl_gain_put), +SOC_SINGLE_BOOL_EXT ("MTKAIF_DMIC" ,0 , + mt8195_adda_dmic_get, mt8195_adda_dmic_set), +SOC_SINGLE_BOOL_EXT ("MTKAIF_ADDA6_ONLY" ,0 , + mt8195_adda6_only_get, + mt8195_adda6_only_set), +}; + +/* dai ops */ +static int mtk_dai_adda_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int clk_id; + +dev_dbg (dai->dev,"%s id %d\n" , __func__, dai->id); + + clk_id =MT8195_CLK_INFRA_AO_AUDIO_26M_B ; +mt8195_afe_enable_clk (afe, afe_priv->clk[clk_id]); + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + clk_id =MT8195_CLK_AUD_DAC ; + }else { +if (dai->id ==MT8195_AFE_IO_UL_SRC1 ) + clk_id =MT8195_CLK_AUD_ADC ; +else if (dai->id ==MT8195_AFE_IO_UL_SRC2 ) + clk_id =MT8195_CLK_AUD_ADDA6_ADC ; +else + clk_id =-1 ; + } +if (clk_id >=0 ) +mt8195_afe_enable_clk (afe, afe_priv->clk[clk_id]); +return 0 ; +} + +static void mtk_dai_adda_shutdown (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +int clk_id; + +dev_dbg (dai->dev,"%s id %d\n" , __func__, dai->id); + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + clk_id =MT8195_CLK_AUD_DAC ; + }else { +if (dai->id ==MT8195_AFE_IO_UL_SRC1 ) + clk_id =MT8195_CLK_AUD_ADC ; +else if (dai->id ==MT8195_AFE_IO_UL_SRC2 ) + clk_id =MT8195_CLK_AUD_ADDA6_ADC ; +else + clk_id =-1 ; + } + +if (clk_id >=0 ) +mt8195_afe_disable_clk (afe, afe_priv->clk[clk_id]); + + clk_id =MT8195_CLK_INFRA_AO_AUDIO_26M_B ; +mt8195_afe_disable_clk (afe, afe_priv->clk[clk_id]); +} + +static int mtk_dai_da_configure (struct mtk_base_afe *afe, +unsigned int rate,int id) +{ +unsigned int val =0 ; +unsigned int mask =0 ; + +/* set sampling rate */ + mask |=DL_2_INPUT_MODE_CTL_MASK ; + val |=DL_2_INPUT_MODE_CTL (afe_adda_dl_rate_transform (afe, rate)); + +/* turn off saturation */ + mask |=DL_2_CH1_SATURATION_EN_CTL ; + mask |=DL_2_CH2_SATURATION_EN_CTL ; + +/* turn off mute function */ + mask |=DL_2_MUTE_CH1_OFF_CTL_PRE ; + mask |=DL_2_MUTE_CH2_OFF_CTL_PRE ; + val |=DL_2_MUTE_CH1_OFF_CTL_PRE ; + val |=DL_2_MUTE_CH2_OFF_CTL_PRE ; + +/* set voice input data if input sample rate is 8k or 16k */ + mask |=DL_2_VOICE_MODE_CTL_PRE ; +if (rate ==8000 || rate ==16000 ) + val |=DL_2_VOICE_MODE_CTL_PRE ; + +regmap_update_bits (afe->regmap,AFE_ADDA_DL_SRC2_CON0 , mask, val); + + mask =0 ; + val =0 ; + +/* new 2nd sdm */ + mask |=DL_USE_NEW_2ND_SDM ; + val |=DL_USE_NEW_2ND_SDM ; +regmap_update_bits (afe->regmap,AFE_ADDA_DL_SDM_DCCOMP_CON , mask, val); + +return 0 ; +} + +static int mtk_dai_ad_configure (struct mtk_base_afe *afe, +unsigned int rate,int id) +{ +unsigned int val =0 ; +unsigned int mask =0 ; + + mask |=UL_VOICE_MODE_CTL_MASK ; + val |=UL_VOICE_MODE_CTL (afe_adda_ul_rate_transform (afe, rate)); + +switch (id) { +case MT8195_AFE_IO_UL_SRC1 : +regmap_update_bits (afe->regmap,AFE_ADDA_UL_SRC_CON0 , + mask, val); +break ; +case MT8195_AFE_IO_UL_SRC2 : +regmap_update_bits (afe->regmap,AFE_ADDA6_UL_SRC_CON0 , + mask, val); +break ; +default : +break ; + } +return 0 ; +} + +static int mtk_dai_adda_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_adda_priv *adda_priv = afe_priv->dai_priv[dai->id]; +unsigned int rate =params_rate (params); +int id = dai->id; +int ret =0 ; + +dev_dbg (afe->dev,"%s(), id %d, stream %d, rate %d\n" , + __func__, id, substream->stream, rate); + +if (rate >ADDA_HIRES_THRES ) + adda_priv->hires_required =1 ; +else + adda_priv->hires_required =0 ; + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) + ret =mtk_dai_da_configure (afe, rate, id); +else + ret =mtk_dai_ad_configure (afe, rate, id); + +return ret; +} + +static const struct snd_soc_dai_ops mtk_dai_adda_ops = { + .startup = mtk_dai_adda_startup, + .shutdown = mtk_dai_adda_shutdown, + .hw_params = mtk_dai_adda_hw_params, +}; + +/* dai driver */ +#define MTK_ADDA_PLAYBACK_RATES (SNDRV_PCM_RATE_8000_48000 |\ + SNDRV_PCM_RATE_96000 |\ + SNDRV_PCM_RATE_192000) + +#define MTK_ADDA_CAPTURE_RATES (SNDRV_PCM_RATE_8000 |\ + SNDRV_PCM_RATE_16000 |\ + SNDRV_PCM_RATE_32000 |\ + SNDRV_PCM_RATE_48000 |\ + SNDRV_PCM_RATE_96000 |\ + SNDRV_PCM_RATE_192000) + +#define MTK_ADDA_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ + SNDRV_PCM_FMTBIT_S24_LE |\ + SNDRV_PCM_FMTBIT_S32_LE) + +static struct snd_soc_dai_driver mtk_dai_adda_driver[] = { + { + .name ="DL_SRC" , + .id =MT8195_AFE_IO_DL_SRC , + .playback = { + .stream_name ="ADDA Playback" , + .channels_min =1 , + .channels_max =2 , + .rates =MTK_ADDA_PLAYBACK_RATES , + .formats =MTK_ADDA_FORMATS , + }, + .ops = &mtk_dai_adda_ops, + }, + { + .name ="UL_SRC1" , + .id =MT8195_AFE_IO_UL_SRC1 , + .capture = { + .stream_name ="ADDA Capture" , + .channels_min =1 , + .channels_max =2 , + .rates =MTK_ADDA_CAPTURE_RATES , + .formats =MTK_ADDA_FORMATS , + }, + .ops = &mtk_dai_adda_ops, + }, + { + .name ="UL_SRC2" , + .id =MT8195_AFE_IO_UL_SRC2 , + .capture = { + .stream_name ="ADDA6 Capture" , + .channels_min =1 , + .channels_max =2 , + .rates =MTK_ADDA_CAPTURE_RATES , + .formats =MTK_ADDA_FORMATS , + }, + .ops = &mtk_dai_adda_ops, + }, +}; + +static int init_adda_priv_data (struct mtk_base_afe *afe) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_adda_priv *adda_priv; +int adda_dai_list[] = {MT8195_AFE_IO_DL_SRC , +MT8195_AFE_IO_UL_SRC1 , +MT8195_AFE_IO_UL_SRC2 }; +int i; + +for (i =0 ; i <ARRAY_SIZE (adda_dai_list); i++) { + adda_priv =devm_kzalloc (afe->dev, +sizeof (struct mtk_dai_adda_priv ), +GFP_KERNEL ); +if (!adda_priv) +return -ENOMEM ; + + afe_priv->dai_priv[adda_dai_list[i]] = adda_priv; + } + +return 0 ; +} + +int mt8195_dai_adda_register (struct mtk_base_afe *afe) +{ +struct mtk_base_afe_dai *dai; + + dai =devm_kzalloc (afe->dev,sizeof (*dai),GFP_KERNEL ); +if (!dai) +return -ENOMEM ; + +list_add (&dai->list, &afe->sub_dais); + + dai->dai_drivers = mtk_dai_adda_driver; + dai->num_dai_drivers =ARRAY_SIZE (mtk_dai_adda_driver); + + dai->dapm_widgets = mtk_dai_adda_widgets; + dai->num_dapm_widgets =ARRAY_SIZE (mtk_dai_adda_widgets); + dai->dapm_routes = mtk_dai_adda_routes; + dai->num_dapm_routes =ARRAY_SIZE (mtk_dai_adda_routes); + dai->controls = mtk_dai_adda_controls; + dai->num_controls =ARRAY_SIZE (mtk_dai_adda_controls); + +return init_adda_priv_data (afe); +}
Signature · 1 line
2.18.0
PATCH v2 4/8 ASoC: mediatek: mt8195: support pcm in platform driver
In reply to Trevor WuThis patch adds mt8195 pcm dai driver.
--- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 393 +++++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
sound/soc/mediatek/mt8195/mt8195-dai-pcm.c new file +393 -0
@@ -0,0 +1,393 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* MediaTek ALSA SoC Audio DAI PCM I/F Control +* +* Copyright (c) 2020 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/regmap.h> +#include <sound/pcm_params.h> +#include "mt8195-afe-clk.h" +#include "mt8195-afe-common.h" +#include "mt8195-reg.h" + +enum { +MTK_DAI_PCM_FMT_I2S , +MTK_DAI_PCM_FMT_EIAJ , +MTK_DAI_PCM_FMT_MODEA , +MTK_DAI_PCM_FMT_MODEB , +}; + +enum { +MTK_DAI_PCM_CLK_A1SYS , +MTK_DAI_PCM_CLK_A2SYS , +MTK_DAI_PCM_CLK_26M_48K , +MTK_DAI_PCM_CLK_26M_441K , +}; + +struct mtk_dai_pcm_rate { +unsigned int rate; +unsigned int reg_value; +}; + +struct mtk_dai_pcmif_priv { +unsigned int slave_mode; +unsigned int lrck_inv; +unsigned int bck_inv; +unsigned int format; +}; + +static const struct mtk_dai_pcm_rate mtk_dai_pcm_rates[] = { + { .rate =8000 , .reg_value =0 , }, + { .rate =16000 , .reg_value =1 , }, + { .rate =32000 , .reg_value =2 , }, + { .rate =48000 , .reg_value =3 , }, + { .rate =11025 , .reg_value =1 , }, + { .rate =22050 , .reg_value =2 , }, + { .rate =44100 , .reg_value =3 , }, +}; + +static int mtk_dai_pcm_mode (unsigned int rate) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (mtk_dai_pcm_rates); i++) +if (mtk_dai_pcm_rates[i].rate == rate) +return mtk_dai_pcm_rates[i].reg_value; + +return -EINVAL ; +} + +static const struct snd_kcontrol_new mtk_dai_pcm_o000_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I000 Switch" ,AFE_CONN0 ,0 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I070 Switch" ,AFE_CONN0_2 ,6 ,1 ,0 ), +}; + +static const struct snd_kcontrol_new mtk_dai_pcm_o001_mix[] = { +SOC_DAPM_SINGLE_AUTODISABLE ("I001 Switch" ,AFE_CONN1 ,1 ,1 ,0 ), +SOC_DAPM_SINGLE_AUTODISABLE ("I071 Switch" ,AFE_CONN1_2 ,7 ,1 ,0 ), +}; + +static const struct snd_soc_dapm_widget mtk_dai_pcm_widgets[] = { +SND_SOC_DAPM_MIXER ("I002" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("I003" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("O000" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_pcm_o000_mix, +ARRAY_SIZE (mtk_dai_pcm_o000_mix)), +SND_SOC_DAPM_MIXER ("O001" ,SND_SOC_NOPM ,0 ,0 , + mtk_dai_pcm_o001_mix, +ARRAY_SIZE (mtk_dai_pcm_o001_mix)), + +SND_SOC_DAPM_INPUT ("PCM1_INPUT" ), +SND_SOC_DAPM_OUTPUT ("PCM1_OUTPUT" ), +}; + +static const struct snd_soc_dapm_route mtk_dai_pcm_routes[] = { + {"I002" ,NULL ,"PCM1 Capture" }, + {"I003" ,NULL ,"PCM1 Capture" }, + + {"O000" ,"I000 Switch" ,"I000" }, + {"O001" ,"I001 Switch" ,"I001" }, + + {"O000" ,"I070 Switch" ,"I070" }, + {"O001" ,"I071 Switch" ,"I071" }, + + {"PCM1 Playback" ,NULL ,"O000" }, + {"PCM1 Playback" ,NULL ,"O001" }, + + {"PCM1_OUTPUT" ,NULL ,"PCM1 Playback" }, + {"PCM1 Capture" ,NULL ,"PCM1_INPUT" }, +}; + +static void mtk_dai_pcm_enable (struct mtk_base_afe *afe) +{ +regmap_update_bits (afe->regmap,PCM_INTF_CON1 , +PCM_INTF_CON1_PCM_EN ,PCM_INTF_CON1_PCM_EN ); +} + +static void mtk_dai_pcm_disable (struct mtk_base_afe *afe) +{ +regmap_update_bits (afe->regmap,PCM_INTF_CON1 , +PCM_INTF_CON1_PCM_EN ,0x0 ); +} + +static int mtk_dai_pcm_configure (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct snd_pcm_runtime *const runtime = substream->runtime; +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_pcmif_priv *pcmif_priv = afe_priv->dai_priv[dai->id]; +unsigned int slave_mode = pcmif_priv->slave_mode; +unsigned int lrck_inv = pcmif_priv->lrck_inv; +unsigned int bck_inv = pcmif_priv->bck_inv; +unsigned int fmt = pcmif_priv->format; +unsigned int bit_width = dai->sample_bits; +unsigned int val =0 ; +unsigned int mask =0 ; +int fs =0 ; +int mode =0 ; + +/* sync freq mode */ + fs =mt8195_afe_fs_timing (runtime->rate); +if (fs <0 ) +return -EINVAL ; + val |=PCM_INTF_CON2_SYNC_FREQ_MODE (fs); + mask |=PCM_INTF_CON2_SYNC_FREQ_MODE_MASK ; + +/* clk domain sel */ +if (runtime->rate %8000 ) + val |=PCM_INTF_CON2_CLK_DOMAIN_SEL (MTK_DAI_PCM_CLK_26M_441K ); +else + val |=PCM_INTF_CON2_CLK_DOMAIN_SEL (MTK_DAI_PCM_CLK_26M_48K ); + mask |=PCM_INTF_CON2_CLK_DOMAIN_SEL_MASK ; + +regmap_update_bits (afe->regmap,PCM_INTF_CON2 , mask, val); + + val =0 ; + mask =0 ; + +/* pcm mode */ + mode =mtk_dai_pcm_mode (runtime->rate); +if (mode <0 ) +return -EINVAL ; + val |=PCM_INTF_CON1_PCM_MODE (mode); + mask |=PCM_INTF_CON1_PCM_MODE_MASK ; + +/* pcm format */ + val |=PCM_INTF_CON1_PCM_FMT (fmt); + mask |=PCM_INTF_CON1_PCM_FMT_MASK ; + +/* pcm sync length */ +if (fmt ==MTK_DAI_PCM_FMT_MODEA || + fmt ==MTK_DAI_PCM_FMT_MODEB ) + val |=PCM_INTF_CON1_SYNC_LENGTH (1 ); +else + val |=PCM_INTF_CON1_SYNC_LENGTH (bit_width); + mask |=PCM_INTF_CON1_SYNC_LENGTH_MASK ; + +/* pcm bits, word length */ +if (bit_width >16 ) { + val |=PCM_INTF_CON1_PCM_24BIT ; + val |=PCM_INTF_CON1_PCM_WLEN_64BCK ; + }else { + val |=PCM_INTF_CON1_PCM_16BIT ; + val |=PCM_INTF_CON1_PCM_WLEN_32BCK ; + } + mask |=PCM_INTF_CON1_PCM_BIT_MASK ; + mask |=PCM_INTF_CON1_PCM_WLEN_MASK ; + +/* master/slave */ +if (!slave_mode) { + val |=PCM_INTF_CON1_PCM_MASTER ; + +if (lrck_inv) + val |=PCM_INTF_CON1_SYNC_OUT_INV ; +if (bck_inv) + val |=PCM_INTF_CON1_BCLK_OUT_INV ; + mask |=PCM_INTF_CON1_CLK_OUT_INV_MASK ; + }else { + val |=PCM_INTF_CON1_PCM_SLAVE ; + +if (lrck_inv) + val |=PCM_INTF_CON1_SYNC_IN_INV ; +if (bck_inv) + val |=PCM_INTF_CON1_BCLK_IN_INV ; + mask |=PCM_INTF_CON1_CLK_IN_INV_MASK ; + +/* TODO: add asrc setting for slave mode */ + } + mask |=PCM_INTF_CON1_PCM_M_S_MASK ; + +regmap_update_bits (afe->regmap,PCM_INTF_CON1 , mask, val); + +return 0 ; +} + +/* dai ops */ +static int mtk_dai_pcm_startup (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; + +if (dai->component->active) +return 0 ; + +mt8195_afe_enable_main_clock (afe); + +mt8195_afe_enable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_ASRC11 ]); +mt8195_afe_enable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_ASRC12 ]); +mt8195_afe_enable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_PCMIF ]); + +return 0 ; +} + +static void mtk_dai_pcm_shutdown (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; + +if (dai->component->active) +return ; + +mtk_dai_pcm_disable (afe); + +mt8195_afe_disable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_PCMIF ]); +mt8195_afe_disable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_ASRC12 ]); +mt8195_afe_disable_clk (afe, afe_priv->clk[MT8195_CLK_AUD_ASRC11 ]); + +mt8195_afe_disable_main_clock (afe); +} + +static int mtk_dai_pcm_prepare (struct snd_pcm_substream *substream, +struct snd_soc_dai *dai) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +int ret =0 ; + +if (snd_soc_dai_stream_active (dai,SNDRV_PCM_STREAM_PLAYBACK ) && +snd_soc_dai_stream_active (dai,SNDRV_PCM_STREAM_CAPTURE )) +return 0 ; + + ret =mtk_dai_pcm_configure (substream, dai); +if (ret) +return ret; + +mtk_dai_pcm_enable (afe); + +return 0 ; +} + +static int mtk_dai_pcm_set_fmt (struct snd_soc_dai *dai,unsigned int fmt) +{ +struct mtk_base_afe *afe =snd_soc_dai_get_drvdata (dai); +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_pcmif_priv *pcmif_priv = afe_priv->dai_priv[dai->id]; + +dev_dbg (dai->dev,"%s fmt 0x%x\n" , __func__, fmt); + +switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) { +case SND_SOC_DAIFMT_I2S : + pcmif_priv->format =MTK_DAI_PCM_FMT_I2S ; +break ; +case SND_SOC_DAIFMT_DSP_A : + pcmif_priv->format =MTK_DAI_PCM_FMT_MODEA ; +break ; +case SND_SOC_DAIFMT_DSP_B : + pcmif_priv->format =MTK_DAI_PCM_FMT_MODEB ; +break ; +default : +return -EINVAL ; + } + +switch (fmt &SND_SOC_DAIFMT_INV_MASK ) { +case SND_SOC_DAIFMT_NB_NF : + pcmif_priv->bck_inv =0 ; + pcmif_priv->lrck_inv =0 ; +break ; +case SND_SOC_DAIFMT_NB_IF : + pcmif_priv->bck_inv =0 ; + pcmif_priv->lrck_inv =1 ; +break ; +case SND_SOC_DAIFMT_IB_NF : + pcmif_priv->bck_inv =1 ; + pcmif_priv->lrck_inv =0 ; +break ; +case SND_SOC_DAIFMT_IB_IF : + pcmif_priv->bck_inv =1 ; + pcmif_priv->lrck_inv =1 ; +break ; +default : +return -EINVAL ; + } + +switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) { +case SND_SOC_DAIFMT_CBM_CFM : + pcmif_priv->slave_mode =1 ; +break ; +case SND_SOC_DAIFMT_CBS_CFS : + pcmif_priv->slave_mode =0 ; +break ; +default : +return -EINVAL ; + } + +return 0 ; +} + +static const struct snd_soc_dai_ops mtk_dai_pcm_ops = { + .startup = mtk_dai_pcm_startup, + .shutdown = mtk_dai_pcm_shutdown, + .prepare = mtk_dai_pcm_prepare, + .set_fmt = mtk_dai_pcm_set_fmt, +}; + +/* dai driver */ +#define MTK_PCM_RATES (SNDRV_PCM_RATE_8000_48000) + +#define MTK_PCM_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ + SNDRV_PCM_FMTBIT_S24_LE |\ + SNDRV_PCM_FMTBIT_S32_LE) + +static struct snd_soc_dai_driver mtk_dai_pcm_driver[] = { + { + .name ="PCM1" , + .id =MT8195_AFE_IO_PCM , + .playback = { + .stream_name ="PCM1 Playback" , + .channels_min =1 , + .channels_max =2 , + .rates =MTK_PCM_RATES , + .formats =MTK_PCM_FORMATS , + }, + .capture = { + .stream_name ="PCM1 Capture" , + .channels_min =1 , + .channels_max =2 , + .rates =MTK_PCM_RATES , + .formats =MTK_PCM_FORMATS , + }, + .ops = &mtk_dai_pcm_ops, + .symmetric_rate =1 , + .symmetric_sample_bits =1 , + }, +}; + +static int init_pcmif_priv_data (struct mtk_base_afe *afe) +{ +struct mt8195_afe_private *afe_priv = afe->platform_priv; +struct mtk_dai_pcmif_priv *pcmif_priv; + + pcmif_priv =devm_kzalloc (afe->dev,sizeof (struct mtk_dai_pcmif_priv ), +GFP_KERNEL ); +if (!pcmif_priv) +return -ENOMEM ; + + afe_priv->dai_priv[MT8195_AFE_IO_PCM ] = pcmif_priv; +return 0 ; +} + +int mt8195_dai_pcm_register (struct mtk_base_afe *afe) +{ +struct mtk_base_afe_dai *dai; + + dai =devm_kzalloc (afe->dev,sizeof (*dai),GFP_KERNEL ); +if (!dai) +return -ENOMEM ; + +list_add (&dai->list, &afe->sub_dais); + + dai->dai_drivers = mtk_dai_pcm_driver; + dai->num_dai_drivers =ARRAY_SIZE (mtk_dai_pcm_driver); + + dai->dapm_widgets = mtk_dai_pcm_widgets; + dai->num_dapm_widgets =ARRAY_SIZE (mtk_dai_pcm_widgets); + dai->dapm_routes = mtk_dai_pcm_routes; + dai->num_dapm_routes =ARRAY_SIZE (mtk_dai_pcm_routes); + +return init_pcmif_priv_data (afe); +}
Signature · 1 line
2.18.0
PATCH v2 5/8 ASoC: mediatek: mt8195: add platform driver
In reply to Trevor WuThis patch adds mt8195 platform and affiliated driver.
--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.h
sound/soc/mediatek/Kconfig +9 -0
@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for Mediatek MT8195 chip + that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".
sound/soc/mediatek/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/
sound/soc/mediatek/mt8195/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.o
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +899 -0
899 lines not on this page · raw message
sound/soc/mediatek/mt8195/mt8195-afe-clk.h new file +201 -0
201 lines not on this page · raw message
sound/soc/mediatek/mt8195/mt8195-afe-common.h new file +200 -0
200 lines not on this page · raw message
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c new file +3264 -0
1,673 lines not on this page · raw message
sound/soc/mediatek/mt8195/mt8195-reg.h new file +2793 -0
2,793 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
are all internal Hi,
Quoted 76 lines · Trevor Wu
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +9
-0@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for Mediatek MT8195 chip + that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +6
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]>
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {
Most of these clocks are not described in the device tree binding. If the driver needs to reference them, they should be described. We should not be hard-coding clock names across different drivers.
The more important question is, why does the driver need to reference all of them? Maybe we should take a step back and draw out a clock tree diagram for the hardware?
Quoted 129 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +127
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] = "audio_local_bus_sel", + [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] = "infra_ao_audio_26m_b", + [MT8195_CLK_SCP_ADSP_AUDIODSP] = "scp_adsp_audiodsp", + [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] = "aud_spdifin_tuner_apll", + [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] = "aud_spdifin_tuner_dbg", + [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] = "aud_afe_26m_dmic_tm", + [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] = "aud_adda6_adc_hires", + [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",
The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address space as the audio parts. Would it be possible to model them as internal ASoC SUPPLY widgets? The external ones could be modeled using ASoC CLK_SUPPLY widgets, and the dependencies could be modeled with ASoC routes. The ASoC core could then handle power sequencing, which the driver currently does manually.
IMO this is better than having two drivers handling two aspects of the same piece of hardware, while the two aspects are intertwined.
Regards
ChenYu
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 94 lines · Chen-Yu Tsai
are all internal Hi,
Quoted 90 lines · Trevor Wu
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +6
-0@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for MediatekMT8195 chip
sound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +13
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h"
Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 3 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If the driver needs to reference them, they should be described. We should
not be hard-coding clock names across different drivers.
Sorry, I didn't know I have to list all clocks in the dt-binding. Originally, I thought these clocks will be described in the clock binding, so I didn't add them to the binding of afe driver. I will add these clocks to mt8195-afe-pcm.yaml.
Quoted 5 lines
The more important question is, why does the driver need to reference all of them? Maybe we should take a step back and draw out a clock tree
diagram for the hardware?
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use case, we use clk_get to retrive all clocks which are possible to be used.
Some of them are not used in this series, because some modules are still developing. Should I only keep the clocks that have been used in the series?
Quoted 151 lines
Quoted 132 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +15
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] = "infra_ao_audio_26m_b", + [MT8195_CLK_SCP_ADSP_AUDIODSP] = "scp_adsp_audiodsp", + [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +63
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] = "aud_afe_26m_dmic_tm", + [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] = "aud_adda6_adc_hires", + [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address space as the audio parts. Would it be possible to model them as internal ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with ASoC routes. The ASoC core could then handle power sequencing, which the driver currently does manually.
Quoted 3 lines
IMO this is better than having two drivers handling two aspects of the same piece of hardware, while the two aspects are intertwined.
Yes, it's ok to use the CLK_SUPPLY and SUPPLY to model such clocks. But those clocks are managed by CCF in the preceding SOCs like mt2701, mt6779 and mt8183. Additionally, in some audio modules, clocks should be enabled before configuring parameters(hw_params). As far as I know, if we use CLK_SUPPLY or SUPPLY to model clocks, the power sequence is controlled by DAPM. It seems to be impossible to fulfill all use cases. That's why we just keep the manual control sequence and CCF seems to be the best choice to model such clock gatess.
Thanks,
Trevor
Quoted 3 lines
Regards
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 105 lines · Trevor Wu
Quoted 94 lines · Chen-Yu Tsai
are all internal Hi,
Quoted 90 lines · Trevor Wu
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +6
-0@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for MediatekMT8195 chip
sound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +13
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 3 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If the driver needs to reference them, they should be described. We should
not be hard-coding clock names across different drivers.
Quoted 4 lines
Sorry, I didn't know I have to list all clocks in the dt-binding. Originally, I thought these clocks will be described in the clock binding, so I didn't add them to the binding of afe driver. I will add these clocks to
mt8195-afe-pcm.yaml.
If the device consumes clocks, then the clocks that get consumed should be listed in the device's bindings. This is not related to the clock bindings, which is a clock provider.
Quoted 10 lines
Quoted 5 lines
The more important question is, why does the driver need to reference all of them? Maybe we should take a step back and draw out a clock tree
diagram for the hardware?The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use case, we useclk_getto retrive all clocks which are possible to be used.
So I see a couple the driver is doing reparenting:
a. Reparent audio_h to standard oscillator when ADDA is not used,
presumably to let the APLL be turned off
Why not just turn off audio_h? It looks like audio_h feeds a couple clock gates in the audio subsystem. Just a guess, but is this the AHB bus clock? Why not just have it parented to "univpll_d7" all the time then?
Also, reparenting really should be done implicitly with clk_set_rate() with the clock driver supporting reparenting on rate changes.
b. Assignment of PLLs for I2S/PCM MCLK outputs
Is there a reason for explicit assignment, other than clock rate conflicts? CCF supports requesting and locking the clock rate. And again, implicit reparenting should be the norm. The clock driver's purpose is to fulfill any and all clock rate requirements from its consumers. The consumer should only need to ask for the clock rate, not a specific parent, unless there are details that are not yet covered by the CCF.
A related question: the chip has five APLLs. How many MCLK combinations does the application need to support? I assume this includes the standard 24.576 MHz and 22.5792 MHz clock rates.
Quoted 3 lines
Some of them are not used in this series, because some modules are still developing. Should I only keep the clocks that have been used in the series?
Yes please. Only add the ones that are used. Things that aren't used don't get tested and verified, and end up as dead code. If there are plans to extend them in the future, and you can leave comments stating that intent, and also mention it in the cover letter.
Quoted 151 lines
Quoted 151 lines
Quoted 132 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +15
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] = "infra_ao_audio_26m_b", + [MT8195_CLK_SCP_ADSP_AUDIODSP] = "scp_adsp_audiodsp", + [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +63
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] = "aud_afe_26m_dmic_tm", + [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] = "aud_adda6_adc_hires", + [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address space as the audio parts. Would it be possible to model them as internal ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with ASoC routes. The ASoC core could then handle power sequencing, which the driver currently does manually.
Quoted 7 lines
Quoted 3 lines
IMO this is better than having two drivers handling two aspects of the same piece of hardware, while the two aspects are intertwined.
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks. But those clocks are managed by CCF in the preceding SOCs like mt2701, mt6779 and mt8183. Additionally, in some audio modules, clocks should
This being a new driver, we have some more freedom to improve the design.
Quoted 5 lines
be enabled before configuring
parameters(hw_params). As far as I know, if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequence is controlled by DAPM. It seems to be impossible to fulfill all use cases. That's why we just keep the manual control sequence and CCF seems to be the best choice to model such clock gatess.
I see. So yes, using CCF does give you reference counting, dependency tracking and other advantages. And using DAPM supplies means you can't enable the clock gates outside of DAPM without both pieces of code fighting for control.
Can we at least move the audio clock gates into the audio driver though? The arbitrary separation into two devices and drivers is fishy. And with the move the external references to the audio clock gates can be removed.
And regarding the clock requirements for different modules, could we have that information put in comments somewhere, so if someone were to revisit it later, they would have the information needed to understand and possibly improve it? Because right now there's just a bunch of clocks enabled and disabled and nothing to explain why that's needed.
Regards
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 116 lines · Chen-Yu Tsai
Quoted 109 lines · Trevor Wu
Quoted 97 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <[email protected]
Quoted 1 line
Quoted 92 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +6
-0@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for MediatekMT8195 chip
sound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +14
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 2 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ +static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described. We should
not be hard-coding clock names across different drivers.Quoted 4 lines
Sorry, I didn't know I have to list all clocks in the dt-binding. Originally, I thought these clocks will be described in the clock binding, so I didn't add them to the binding of afe driver. I will add these clocks to
mt8195-afe-pcm.yaml.
Quoted 5 lines
If the device consumes clocks, then the clocks that get consumed should
be listed in the device's bindings. This is not related to the clock bindings, which is a clock provider.
Got it. Thanks.
Quoted 16 lines
Quoted 8 lines
Quoted 7 lines
The more important question is, why does the driver need to reference
all of them? Maybe we should take a step back and draw out a clock
tree
diagram for the hardware?Quoted 5 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use case, we useclk_getto retrive all clocks which are possible to be used.So I see a couple the driver is doing reparenting:
Quoted 9 lines
a. Reparent
audio_hto standard oscillator when ADDA is not used,
presumably to let the APLL be turned offWhy not just turn off
audio_h? It looks likeaudio_hfeeds a couple clock
gates in the audio subsystem. Just a guess, but is this the AHB bus clock?
Why not just have it parented to "univpll_d7" all the time then?
Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_h feeds to some clock gate like aud_adc_hires, which is used when sampling rate is higher than 48kHz, and hardware designer suggests us use apll1_ck when AFE requrires the clock.
As I know, DSP also requires audio_h.
When we disable the clock in AFE driver, the ref count in CCF is not becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparent audio_h to 26M when it's not required in adda module.
Quoted 6 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 12 lines
Is there a reason for explicit assignment, other than clock rate conflicts?
CCF supports requesting and locking the clock rate. And again, implicit
reparenting should be the norm. The clock driver's purpose is to fulfill
any and all clock rate requirements from its consumers. The consumer should
only need to ask for the clock rate, not a specific parent, unless there
are details that are not yet covered by the CCF.
For MCLK output, we should configure divider to get the target rate, and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is not a multiple of target rate.
Quoted 6 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the standard
24.576 MHz and 22.5792 MHz clock rates.
APLL1 and APLL2 are used in most AFE modules, so their rate should be fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in v3.
Quoted 11 lines
Quoted 4 lines
Some of them are not used in this series, because some modules are still developing. Should I only keep the clocks that have been used in
the series?Yes please. Only add the ones that are used. Things that aren't used don't get tested and verified, and end up as dead code. If there are plans to extend them in the future, and you can leave comments stating
that intent, and also mention it in the cover letter.
OK, I will remove the unused clock in v3.
Quoted 191 lines
Quoted 166 lines
Quoted 160 lines
Quoted 135 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +11
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_SCP_ADSP_AUDIODSP] = "scp_adsp_audiodsp", + [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +17
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +42
-0+ [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with ASoC
routes. The ASoC core could then handle power sequencing, which the
driver currently does manually.Quoted 5 lines
IMO this is better than having two drivers handling two aspects of
the same piece of hardware, while the two aspects are intertwined.Quoted 5 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks. But those clocks are managed by CCF in the preceding SOCs like mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks shouldThis being a new driver, we have some more freedom to improve the design.
Quoted 9 lines
be enabled before configuring
parameters(hw_params). As far as I know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequence is
controlled by DAPM. It seems to be impossible to fulfill all use cases.
That's why we just keep the manual control sequence and CCF seems to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency tracking and other advantages. And using DAPM supplies means you can't
enable the clock gates outside of DAPM without both pieces of code fighting for control.
Quoted 7 lines
Can we at least move the audio clock gates into the audio driver though?
The arbitrary separation into two devices and drivers is fishy. And with
the move the external references to the audio clock gates can be removed.
Because DAPM SUPPLY can't fit our control scenario.
Did you suggest us implement the simple logic control(including ref count, clock dependency) for clock gate(MT8195_CLK_AUD_*) in afe driver instead of using CCF?
Quoted 10 lines
And regarding the clock requirements for different modules, could we have
that information put in comments somewhere, so if someone were to revisit
it later, they would have the information needed to understand and possibly
improve it? Because right now there's just a bunch of clocks enabled and
disabled and nothing to explain why that's needed.
For example,MT8195_CLK_AUD_ADC(clock gate) is one of the clock feeding to ADDA module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly in comments. Could you kindly share me an example for reference?
Thanks,
Trevor
Quoted 3 lines
Regards
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Hi,
Quoted 151 lines · Trevor Wu
Quoted 116 lines · Chen-Yu Tsai
Quoted 109 lines · Trevor Wu
Quoted 97 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <[email protected]
Quoted 1 line
Quoted 92 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +6
-0@@ -184,3 +184,12 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682 with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for MediatekMT8195 chip
sound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +14
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 2 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ +static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described. We should
not be hard-coding clock names across different drivers.Quoted 4 lines
Sorry, I didn't know I have to list all clocks in the dt-binding. Originally, I thought these clocks will be described in the clock binding, so I didn't add them to the binding of afe driver. I will add these clocks to
mt8195-afe-pcm.yaml.Quoted 5 lines
If the device consumes clocks, then the clocks that get consumed should
be listed in the device's bindings. This is not related to the clock bindings, which is a clock provider.Got it. Thanks.
Quoted 16 lines
Quoted 8 lines
Quoted 7 lines
The more important question is, why does the driver need to reference
all of them? Maybe we should take a step back and draw out a clock
tree
diagram for the hardware?Quoted 5 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use case, we useclk_getto retrive all clocks which are possible to be used.So I see a couple the driver is doing reparenting:
Quoted 9 lines
a. Reparent
audio_hto standard oscillator when ADDA is not used,
presumably to let the APLL be turned offWhy not just turn off
audio_h? It looks likeaudio_hfeeds a couple clock
gates in the audio subsystem. Just a guess, but is this the AHB bus clock?
Why not just have it parented to "univpll_d7" all the time then?
Quoted 5 lines
Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_hfeeds to some clock gate likeaud_adc_hires, which is used when sampling rate is higher than 48kHz, and hardware designer suggests us useapll1_ckwhen AFE requrires the clock.
I see. So the simplified explanation is high clock rate for high res audio. Would high clock rate work for standard sample rates?
Would using apll1 or univpll all the time work, instead of reparenting? What's the gain if we do reparenting?
Quoted 5 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF is not becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_hto 26M when it's not required in adda module.
I see. Wouldn't reparenting the clock while it is in use by another module cause glitches?
Quoted 19 lines
Quoted 6 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 12 lines
Is there a reason for explicit assignment, other than clock rate conflicts?
CCF supports requesting and locking the clock rate. And again, implicit
reparenting should be the norm. The clock driver's purpose is to fulfill
any and all clock rate requirements from its consumers. The consumer should
only need to ask for the clock rate, not a specific parent, unless there
are details that are not yet covered by the CCF.
Quoted 4 lines
For MCLK output, we should configure divider to get the target rate, and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is not a multiple of target rate.
Right. That is expected. What I'm saying is that the CCF provides the framework for automatically reparenting based on the requested clock rate. This is done in the clock driver's .determine_rate op.
When properly implemented, and also restricting or locking the clock rates of the PLLs, then you can simply request a clock rate on the leaf clock, in this case one of the MCLKs, and the CCF and clock driver would handle everything else. The consumer should not be reparenting clocks manually unless for a very good reason which cannot be satisfied by the CCF.
Quoted 228 lines
Quoted 6 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the standard
24.576 MHz and 22.5792 MHz clock rates.APLL1 and APLL2 are used in most AFE modules, so their rate should be fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in v3.Quoted 11 lines
Quoted 4 lines
Some of them are not used in this series, because some modules are still developing. Should I only keep the clocks that have been used in
the series?Yes please. Only add the ones that are used. Things that aren't used don't get tested and verified, and end up as dead code. If there are plans to extend them in the future, and you can leave comments stating
that intent, and also mention it in the cover letter.OK, I will remove the unused clock in v3.
Quoted 191 lines
Quoted 166 lines
Quoted 160 lines
Quoted 135 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +11
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_SCP_ADSP_AUDIODSP] = "scp_adsp_audiodsp", + [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +17
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +42
-0+ [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with ASoC
routes. The ASoC core could then handle power sequencing, which the
driver currently does manually.Quoted 5 lines
IMO this is better than having two drivers handling two aspects of
the same piece of hardware, while the two aspects are intertwined.Quoted 5 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks. But those clocks are managed by CCF in the preceding SOCs like mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks shouldThis being a new driver, we have some more freedom to improve the design.
Quoted 9 lines
be enabled before configuring
parameters(hw_params). As far as I know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequence is
controlled by DAPM. It seems to be impossible to fulfill all use cases.
That's why we just keep the manual control sequence and CCF seems to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency tracking and other advantages. And using DAPM supplies means you can't
enable the clock gates outside of DAPM without both pieces of code fighting for control.Quoted 7 lines
Can we at least move the audio clock gates into the audio driver though?
The arbitrary separation into two devices and drivers is fishy. And with
the move the external references to the audio clock gates can be removed.
Quoted 4 lines
Because DAPM SUPPLY can't fit our control scenario.
Did you suggest us implement the simple logiccontrol(including ref count, clock dependency)for clockgate(MT8195_CLK_AUD_*)in afe driver instead of using CCF?
I meant simply moving the CCF-based clk driver code (clk-mt8516-aud.c) from drivers/clk and incorporating it into the audio driver, likely in mt8195-afe-clk.c or maybe as a separate file. So the audio driver would be a clock provider, and a clock consumer. It will directly use the clocks it provides, internally, and you could remove all those clock references from the device tree.
The goal is to have one hardware representation (device node) only, so that it matches the hardware, which is one single unified block.
After the driver is completed, we can look for opportunities to improve it, if resources are available.
Quoted 11 lines
Quoted 10 lines
And regarding the clock requirements for different modules, could we have
that information put in comments somewhere, so if someone were to revisit
it later, they would have the information needed to understand and possibly
improve it? Because right now there's just a bunch of clocks enabled and
disabled and nothing to explain why that's needed.
Quoted 6 lines
For example,
MT8195_CLK_AUD_ADC(clock gate)is one of the clock feeding to ADDA module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly in comments. Could you kindly share me an example for reference?
For example, in mt8195_afe_enable_reg_rw_clk() in mt8195-afe-clk.c:
unsigned int clk_array[] = {
MT8195_CLK_SCP_ADSP_AUDIODSP,
MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL,
MT8195_CLK_TOP_CFG_26M_AUD,
MT8195_CLK_INFRA_AO_AUDIO,
MT8195_CLK_INFRA_AO_AUDIO_26M_B,
MT8195_CLK_TOP_AUD_INTBUS_SEL,
MT8195_CLK_TOP_A1SYS_HP_SEL,
MT8195_CLK_AUD_A1SYS_HP,
MT8195_CLK_AUD_A1SYS,
MT8195_CLK_TOP_AUDIO_H_SEL,
};You could add a comment after each line stating why that clock needs to be enabled. A simple note like "bus access clock" or "internal logic clock" would suffice.
The above list also has some redundancies that could be eliminated. MT8195_CLK_TOP_A1SYS_HP_SEL is parent to both MT8195_CLK_AUD_A1SYS_HP and MT8195_CLK_AUD_A1SYS. When clocks are enabled, their parents are also enabled by CCF, so there's no need to enable them explicitly, unless that clock also directly feeds the clock consumer.
Another thing I wanted to bring up: is any of the code after
struct mt8195_afe_tuner_cfg {used? It looks like it is used to configure the five extra PLLs in the audio subsystem, but the exposed (non-static) functions don't seem to be called anywhere. Are they for modules not yet supported?
Regards
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 181 lines · Chen-Yu Tsai
Hi,
Quoted 169 lines · Trevor Wu
Quoted 127 lines · Chen-Yu Tsai
Quoted 117 lines · Trevor Wu
Quoted 105 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <
[email protected]Quoted 1 line
Quoted 98 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +0
-0@@ -184,3 +184,12 @@ config
SND_SOC_MT8192_MT6359_RT1015_RT5682
with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N".sound/soc/mediatek/Kconfig +6
-0+ +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support forMediatek
MT8195 chipsound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +15
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" +Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 1 line
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +1
-0+static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described. We
should
not be hard-coding clock names across different drivers.Quoted 6 lines
Sorry, I didn't know I have to list all clocks in the dt- binding.
Originally, I thought these clocks will be described in the clock
binding, so I didn't add them to the binding of afe driver. I will add these clocks tomt8195-afe-pcm.yaml.Quoted 6 lines
If the device consumes clocks, then the clocks that get consumed should
be listed in the device's bindings. This is not related to the clock
bindings, which is a clock provider.Got it. Thanks.
Quoted 22 lines
Quoted 8 lines
Quoted 7 lines
The more important question is, why does the driver need to reference
all of them? Maybe we should take a step back and draw out a clock
tree
diagram for the hardware?Quoted 7 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use
case, we useclk_getto retrive all clocks which are possible to be
used.So I see a couple the driver is doing reparenting:
a. Reparent
audio_hto standard oscillator when ADDA is not
used,
presumably to let the APLL be turned offQuoted 8 lines
Why not just turn off
audio_h? It looks likeaudio_hfeeds a couple
clock
gates in the audio subsystem. Just a guess, but is this the AHB bus
clock?
Why not just have it parented to "univpll_d7" all the time then?Quoted 7 lines
Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_hfeeds to some clock gate likeaud_adc_hires, which is used when
sampling rate is higher than 48kHz, and hardware designer suggests us
useapll1_ckwhen AFE requrires the clock.
Quoted 3 lines
I see. So the simplified explanation is high clock rate for high res audio.
Would high clock rate work for standard sample rates?
As far as I know, HW will switch clock to hires clock automatically when the required rate is high,(ex: aud_adc and aud_adc_hires) so it can't be controlled by driver.
Quoted 4 lines
Would using apll1 or univpll all the time work, instead of reparenting?
What's the gain if we do reparenting?
As you said before, the gain is apll can be turned off when the clock is not requrired by ADDA. That's why we didn't use apll all the time.
Quoted 11 lines
Quoted 7 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF is not
becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_hto 26M
when it's not required in adda module.I see. Wouldn't reparenting the clock while it is in use by another module
cause glitches?
I checked with the DSP owner.audio_h clock is required for DSP bus, but the clock rate is not important.
The only thing it cares is audio_h should be powered on, so reparenting is harmless for DSP.
Quoted 33 lines
Quoted 22 lines
Quoted 7 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 14 lines
Is there a reason for explicit assignment, other than clock rate conflicts?
CCF supports requesting and locking the clock rate. And again, implicit
reparenting should be the norm. The clock driver's purpose is to fulfill
any and all clock rate requirements from its consumers. The consumer
should
only need to ask for the clock rate, not a specific parent, unless
there
are details that are not yet covered by the CCF.Quoted 6 lines
For MCLK output, we should configure divider to get the target rate,
and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is
not a multiple of target rate.Right. That is expected. What I'm saying is that the CCF provides the framework for automatically reparenting based on the requested clock rate. This is done in the clock driver's .determine_rate op.
Quoted 10 lines
When properly implemented, and also restricting or locking the clock rates
of the PLLs, then you can simply request a clock rate on the leaf clock,
in this case one of the MCLKs, and the CCF and clock driver would handle
everything else. The consumer should not be reparenting clocks manually
unless for a very good reason which cannot be satisfied by the CCF.
In some use cases, we really need to reparent clock manually. For example, spdif in(slave) -> .... -> i2s out(master)
APLL3/APLL4 are reserved for slave input like earc in or spdif in, which can refer to the external clock source.(APLL3 syncs with earc, and APLL4 syncs with spdif in.)
When i2s out selects the clock source to APLL4, this makes sure that spdif in and i2s out works in the same clock source.
If we just use APLL1/APLL2 on i2s out, there is little rate mismatch between data input and output. Finally, it results in XRUN.
If we only use set_rate, it's possible that it can't switch to the expected PLL source, because the rate of APLL3/APLL4 should be close to APLL1/APLL2.
Quoted 265 lines
Quoted 250 lines
Quoted 7 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the standard
24.576 MHz and 22.5792 MHz clock rates.APLL1 and APLL2 are used in most AFE modules, so their rate should be
fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in v3.Quoted 7 lines
Quoted 6 lines
Some of them are not used in this series, because some modules are
still developing. Should I only keep the clocks that have been used
in
the series?Quoted 8 lines
Yes please. Only add the ones that are used. Things that aren't used
don't get tested and verified, and end up as dead code. If there are
plans to extend them in the future, and you can leave comments stating
that intent, and also mention it in the cover letter.OK, I will remove the unused clock in v3.
Quoted 203 lines
Quoted 171 lines
Quoted 164 lines
Quoted 136 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +11
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",
+ [MT8195_CLK_SCP_ADSP_AUDIODSP] =
"scp_adsp_audiodsp",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +17
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +42
-0+ [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 153
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address
space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with
ASoC
routes. The ASoC core could then handle power sequencing, which
the
driver currently does manually.Quoted 6 lines
IMO this is better than having two drivers handling two aspects
of
the same piece of hardware, while the two aspects are intertwined.Quoted 6 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks.
But those clocks are managed by CCF in the preceding SOCs like mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks shouldThis being a new driver, we have some more freedom to improve the design.
Quoted 5 lines
be enabled before configuring
parameters(hw_params). As far as I
know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequenceQuoted 8 lines
is
controlled by DAPM. It seems to be impossible to fulfill all use
cases.
That's why we just keep the manual control sequence and CCF seems
to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency
tracking and other advantages. And using DAPM supplies means you can't
enable the clock gates outside of DAPM without both pieces of code
fighting for control.Quoted 8 lines
Can we at least move the audio clock gates into the audio driver though?
The arbitrary separation into two devices and drivers is fishy. And
with
the move the external references to the audio clock gates can be removed.Quoted 5 lines
Because DAPM SUPPLY can't fit our control scenario.
Did you suggest us implement the simple logiccontrol(including ref count, clock dependency)for clockgate(MT8195_CLK_AUD_*)in afe driver
instead of using CCF?I meant simply moving the CCF-based clk driver code (clk-mt8516-
aud.c)
fromdrivers/clkand incorporating it into the audio driver, likely inmt8195-afe-clk.cor maybe as a separate file. So the audio driver
would be a clock provider, and a clock consumer. It will directly use the clocks it provides, internally, and you could remove all those clock references from the device tree.
Quoted 7 lines
The goal is to have one hardware representation (device node) only, so
that it matches the hardware, which is one single unified block.After the driver is completed, we can look for opportunities to improve
it, if resources are available.
Thanks for your detailed information.
I will try to move the CCF-based clk driver code to AFE driver. If there are no other internal concerns and blocking problems, I will include the changes in v3.
Quoted 38 lines
Quoted 14 lines
Quoted 4 lines
And regarding the clock requirements for different modules, could we
have
that information put in comments somewhere, so if someone were toQuoted 9 lines
revisit
it later, they would have the information needed to understand and
possibly
improve it? Because right now there's just a bunch of clocks enabled
and
disabled and nothing to explain why that's needed.Quoted 7 lines
For example,
MT8195_CLK_AUD_ADC(clock gate)is one of the clock feeding to ADDA module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly
in comments. Could you kindly share me an example for reference?For example, in
mt8195_afe_enable_reg_rw_clk()inmt8195-afe-clk.c:unsigned int clk_array[] = { MT8195_CLK_SCP_ADSP_AUDIODSP, MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL, MT8195_CLK_TOP_CFG_26M_AUD, MT8195_CLK_INFRA_AO_AUDIO, MT8195_CLK_INFRA_AO_AUDIO_26M_B, MT8195_CLK_TOP_AUD_INTBUS_SEL, MT8195_CLK_TOP_A1SYS_HP_SEL, MT8195_CLK_AUD_A1SYS_HP, MT8195_CLK_AUD_A1SYS, MT8195_CLK_TOP_AUDIO_H_SEL, };
Quoted 6 lines
You could add a comment after each line stating why that clock needs to
be enabled. A simple note like "bus access clock" or "internal logic clock"
would suffice.
OK, I will add short notes to such clock lists.
Quoted 7 lines
The above list also has some redundancies that could be eliminated.
MT8195_CLK_TOP_A1SYS_HP_SELis parent to bothMT8195_CLK_AUD_A1SYS_HPandMT8195_CLK_AUD_A1SYS. When clocks are enabled, their parents are also enabled by CCF, so there's no need to enable them explicitly, unless that clock also directly feeds the clock consumer.
OK, I will review all clock usages and remove the unnecessary clocks.
Quoted 11 lines
Another thing I wanted to bring up: is any of the code after
struct mt8195_afe_tuner_cfg {used? It looks like it is used to configure the five extra PLLs in the audio
subsystem, but the exposed (non-static) functions don't seem to be called
anywhere. Are they for modules not yet supported?
Yes, tuners are not supported now.
I will remove the code and add them back when tuners are required in the future.
Thanks,
Trevor
Quoted 3 lines
Regards
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 183 lines · Trevor Wu
Quoted 181 lines · Chen-Yu Tsai
Hi,
Quoted 176 lines · Trevor Wu
Quoted 127 lines · Chen-Yu Tsai
Quoted 117 lines · Trevor Wu
Quoted 105 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <
[email protected]Quoted 1 line
Quoted 98 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe- pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +0
-0@@ -184,3 +184,12 @@ config
SND_SOC_MT8192_MT6359_RT1015_RT5682
with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N".sound/soc/mediatek/Kconfig +6
-0+ +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195 chip" + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support forMediatek
MT8195 chipsound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +15
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> +* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" +Quoted 9 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 1 line
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +1
-0+static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described. We
should
not be hard-coding clock names across different drivers.Quoted 6 lines
Sorry, I didn't know I have to list all clocks in the dt- binding.
Originally, I thought these clocks will be described in the clock
binding, so I didn't add them to the binding of afe driver. I will add these clocks tomt8195-afe-pcm.yaml.Quoted 6 lines
If the device consumes clocks, then the clocks that get consumed should
be listed in the device's bindings. This is not related to the clock
bindings, which is a clock provider.Got it. Thanks.
Quoted 22 lines
Quoted 8 lines
Quoted 7 lines
The more important question is, why does the driver need to reference
all of them? Maybe we should take a step back and draw out a clock
tree
diagram for the hardware?Quoted 7 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX. Because we select the clock input of audio module based on the use
case, we useclk_getto retrive all clocks which are possible to be
used.So I see a couple the driver is doing reparenting:
a. Reparent
audio_hto standard oscillator when ADDA is not
used,
presumably to let the APLL be turned offQuoted 8 lines
Why not just turn off
audio_h? It looks likeaudio_hfeeds a couple
clock
gates in the audio subsystem. Just a guess, but is this the AHB bus
clock?
Why not just have it parented to "univpll_d7" all the time then?Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_hfeeds to some clock gate likeaud_adc_hires, which is used when
sampling rate is higher than 48kHz, and hardware designer suggests us
useapll1_ckwhen AFE requrires the clock.
Quoted 7 lines
Quoted 3 lines
I see. So the simplified explanation is high clock rate for high res audio.
Would high clock rate work for standard sample rates?As far as I know, HW will switch clock to hires clock automatically when the required rate is high,(ex:
aud_adcandaud_adc_hires) so it can't be controlled by driver.
I see. That might not be so friendly to the Linux clk driver.
Quoted 7 lines
Quoted 4 lines
Would using apll1 or univpll all the time work, instead of reparenting?
What's the gain if we do reparenting?As you said before, the gain is apll can be turned off when the clock is not requrired by ADDA. That's why we didn't use apll all the time.
Right, and what's the gain from turning it off? Lower power consumption?
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF is not
becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_hto 26M
when it's not required in adda module.I see. Wouldn't reparenting the clock while it is in use by another module
cause glitches?
Quoted 5 lines
I checked with the DSP owner.
audio_hclock is required for DSP bus, but the clock rate is not important.
The only thing it cares isaudio_hshould be powered on, so reparenting is harmless for DSP.
OK.
Quoted 46 lines
Quoted 32 lines
Quoted 21 lines
Quoted 6 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 14 lines
Is there a reason for explicit assignment, other than clock rate conflicts?
CCF supports requesting and locking the clock rate. And again, implicit
reparenting should be the norm. The clock driver's purpose is to fulfill
any and all clock rate requirements from its consumers. The consumer
should
only need to ask for the clock rate, not a specific parent, unless
there
are details that are not yet covered by the CCF.Quoted 6 lines
For MCLK output, we should configure divider to get the target rate,
and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is
not a multiple of target rate.Right. That is expected. What I'm saying is that the CCF provides the framework for automatically reparenting based on the requested clock rate. This is done in the clock driver's .determine_rate op.
Quoted 10 lines
When properly implemented, and also restricting or locking the clock rates
of the PLLs, then you can simply request a clock rate on the leaf clock,
in this case one of the MCLKs, and the CCF and clock driver would handle
everything else. The consumer should not be reparenting clocks manually
unless for a very good reason which cannot be satisfied by the CCF.In some use cases, we really need to reparent clock manually. For example, spdif in(slave) -> .... -> i2s out(master)
Quoted 8 lines
APLL3/APLL4 are reserved for slave input like earc in or spdif in, which can refer to the external clock source.(APLL3 syncs with earc, and APLL4 syncs with spdif in.)
When i2s out selects the clock source to APLL4, this makes sure that spdif in and i2s out works in the same clock source.
If we just use APLL1/APLL2 on i2s out, there is little rate mismatch between data input and output. Finally, it results in XRUN.
I see, that makes more sense.
Quoted 3 lines
If we only use
set_rate, it's possible that it can't switch to the expected PLL source, because the rate of APLL3/APLL4 should be close to APLL1/APLL2.
Well, in theory the CCF should choose the one with the closest rate. And if APLL3/APLL4 is already tracking the external clock source, its clock rate should match.
If it's a static requirement, maybe we could replace the *-mclk-source DT properties with standard assigned-clocks and assigned-clock-parents? This would get handled by CCF directly, and then the only thing the clk driver has to do is make sure it doesn't get reparented again.
Or is there a need to do reparenting at runtime?
Quoted 268 lines
Quoted 268 lines
Quoted 249 lines
Quoted 6 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the standard
24.576 MHz and 22.5792 MHz clock rates.APLL1 and APLL2 are used in most AFE modules, so their rate should be
fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in v3.Quoted 7 lines
Quoted 6 lines
Some of them are not used in this series, because some modules are
still developing. Should I only keep the clocks that have been used
in
the series?Quoted 8 lines
Yes please. Only add the ones that are used. Things that aren't used
don't get tested and verified, and end up as dead code. If there are
plans to extend them in the future, and you can leave comments stating
that intent, and also mention it in the cover letter.OK, I will remove the unused clock in v3.
Quoted 203 lines
Quoted 171 lines
Quoted 164 lines
Quoted 136 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +48
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] = "hdmirx_apll", +/* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] = "hdmirx_apll_ck", + [MT8195_CLK_TOP_MAINPLL_D4_D4] = "mainpll_d4_d4", + [MT8195_CLK_TOP_MAINPLL_D5_D2] = "mainpll_d5_d2", + [MT8195_CLK_TOP_MAINPLL_D7_D2] = "mainpll_d7_d2", + [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] = "aud_intbus_sel", + [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +11
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] = "mphone_slave_b", + [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",
+ [MT8195_CLK_SCP_ADSP_AUDIODSP] =
"scp_adsp_audiodsp",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +17
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] = "aud_apll1_tuner", + [MT8195_CLK_AUD_APLL2_TUNER] = "aud_apll2_tuner", + [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +4
-0+ [MT8195_CLK_AUD_UL_TML_HIRES] = "aud_ul_tml_hires", + [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +42
-0+ [MT8195_CLK_AUD_LINEIN_TUNER] = "aud_linein_tuner", + [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address
space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with
ASoC
routes. The ASoC core could then handle power sequencing, which
the
driver currently does manually.Quoted 6 lines
IMO this is better than having two drivers handling two aspects
of
the same piece of hardware, while the two aspects are intertwined.Quoted 6 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks.
But those clocks are managed by CCF in the preceding SOCs like mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks shouldThis being a new driver, we have some more freedom to improve the design.
Quoted 5 lines
be enabled before configuring
parameters(hw_params). As far as I
know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequenceQuoted 8 lines
is
controlled by DAPM. It seems to be impossible to fulfill all use
cases.
That's why we just keep the manual control sequence and CCF seems
to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency
tracking and other advantages. And using DAPM supplies means you can't
enable the clock gates outside of DAPM without both pieces of code
fighting for control.Quoted 8 lines
Can we at least move the audio clock gates into the audio driver though?
The arbitrary separation into two devices and drivers is fishy. And
with
the move the external references to the audio clock gates can be removed.Quoted 5 lines
Because DAPM SUPPLY can't fit our control scenario.
Did you suggest us implement the simple logiccontrol(including ref count, clock dependency)for clockgate(MT8195_CLK_AUD_*)in afe driver
instead of using CCF?I meant simply moving the CCF-based clk driver code (clk-mt8516-
aud.c)
fromdrivers/clkand incorporating it into the audio driver, likely inmt8195-afe-clk.cor maybe as a separate file. So the audio driver
would be a clock provider, and a clock consumer. It will directly use the clocks it provides, internally, and you could remove all those clock references from the device tree.The goal is to have one hardware representation (device node) only, so
that it matches the hardware, which is one single unified block.
Quoted 8 lines
Quoted 3 lines
After the driver is completed, we can look for opportunities to improve
it, if resources are available.Thanks for your detailed information.
I will try to move the CCF-based clk driver code to AFE driver. If there are no other internal concerns and blocking problems, I will include the changes in v3.
Great.
Quoted 67 lines
Quoted 38 lines
Quoted 14 lines
Quoted 4 lines
And regarding the clock requirements for different modules, could we
have
that information put in comments somewhere, so if someone were toQuoted 9 lines
revisit
it later, they would have the information needed to understand and
possibly
improve it? Because right now there's just a bunch of clocks enabled
and
disabled and nothing to explain why that's needed.Quoted 7 lines
For example,
MT8195_CLK_AUD_ADC(clock gate)is one of the clock feeding to ADDA module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly
in comments. Could you kindly share me an example for reference?For example, in
mt8195_afe_enable_reg_rw_clk()inmt8195-afe-clk.c:unsigned int clk_array[] = { MT8195_CLK_SCP_ADSP_AUDIODSP, MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL, MT8195_CLK_TOP_CFG_26M_AUD, MT8195_CLK_INFRA_AO_AUDIO, MT8195_CLK_INFRA_AO_AUDIO_26M_B, MT8195_CLK_TOP_AUD_INTBUS_SEL, MT8195_CLK_TOP_A1SYS_HP_SEL, MT8195_CLK_AUD_A1SYS_HP, MT8195_CLK_AUD_A1SYS, MT8195_CLK_TOP_AUDIO_H_SEL, };Quoted 6 lines
You could add a comment after each line stating why that clock needs to
be enabled. A simple note like "bus access clock" or "internal logic clock"
would suffice.OK, I will add short notes to such clock lists.
Quoted 7 lines
The above list also has some redundancies that could be eliminated.
MT8195_CLK_TOP_A1SYS_HP_SELis parent to bothMT8195_CLK_AUD_A1SYS_HPandMT8195_CLK_AUD_A1SYS. When clocks are enabled, their parents are also enabled by CCF, so there's no need to enable them explicitly, unless that clock also directly feeds the clock consumer.OK, I will review all clock usages and remove the unnecessary clocks.
Quoted 11 lines
Another thing I wanted to bring up: is any of the code after
struct mt8195_afe_tuner_cfg {used? It looks like it is used to configure the five extra PLLs in the audio
subsystem, but the exposed (non-static) functions don't seem to be called
anywhere. Are they for modules not yet supported?
Quoted 3 lines
Yes, tuners are not supported now.
I will remove the code and add them back when tuners are required in the future.
Thanks.
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 223 lines · Chen-Yu Tsai
Quoted 209 lines · Trevor Wu
Quoted 202 lines · Chen-Yu Tsai
Hi,
On Thu, Jul 15, 2021 at 7:05 PM Trevor Wu <[email protected]
Quoted 1 line
Quoted 187 lines · wrote:
Quoted 136 lines · Chen-Yu Tsai
Quoted 126 lines · Trevor Wu
Quoted 115 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <
[email protected]Quoted 1 line
Quoted 97 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-
reg.hsound/soc/mediatek/Kconfig +0
-0@@ -184,3 +184,12 @@ config
SND_SOC_MT8192_MT6359_RT1015_RT5682
with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N".sound/soc/mediatek/Kconfig +3
-0+ +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195chip"
sound/soc/mediatek/Kconfig +3
-0+ select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support forMediatek
MT8195 chipsound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +6
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {Quoted 8 lines
Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described.
We
should
not be hard-coding clock names across different drivers.Quoted 6 lines
Sorry, I didn't know I have to list all clocks in the dt- binding.
Originally, I thought these clocks will be described in the clock
binding, so I didn't add them to the binding of afe driver. I will add these clocks tomt8195-afe-pcm.yaml.Quoted 8 lines
If the device consumes clocks, then the clocks that get consumed
should
be listed in the device's bindings. This is not related to the
clock
bindings, which is a clock provider.Got it. Thanks.
Quoted 27 lines
Quoted 10 lines
Quoted 9 lines
The more important question is, why does the driver need to
reference
all of them? Maybe we should take a step back and draw out a
clock
tree
diagram for the hardware?Quoted 10 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX.
Because we select the clock input of audio module based on the
use
case, we useclk_getto retrive all clocks which are possible
to be
used.So I see a couple the driver is doing reparenting:
a. Reparent
audio_hto standard oscillator when ADDA is not
used,
presumably to let the APLL be turned offQuoted 10 lines
Why not just turn off
audio_h? It looks likeaudio_hfeeds a couple
clock
gates in the audio subsystem. Just a guess, but is this the AHB
bus
clock?
Why not just have it parented to "univpll_d7" all the time then?Quoted 9 lines
Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_hfeeds to some clock gate likeaud_adc_hires, which is used
when
sampling rate is higher than 48kHz, and hardware designer suggests
us
useapll1_ckwhen AFE requrires the clock.Quoted 4 lines
I see. So the simplified explanation is high clock rate for high res
audio.
Would high clock rate work for standard sample rates?Quoted 4 lines
As far as I know, HW will switch clock to hires clock automatically when the required rate is high,(ex:
aud_adcandaud_adc_hires) so it
can't be controlled by driver.I see. That might not be so friendly to the Linux clk driver.
Quoted 5 lines
Quoted 4 lines
Would using apll1 or univpll all the time work, instead of reparenting?
What's the gain if we do reparenting?
Quoted 8 lines
Quoted 4 lines
As you said before, the gain is apll can be turned off when the clock
is not requrired by ADDA. That's why we didn't use apll all the time.Right, and what's the gain from turning it off? Lower power consumption?
Yes. Xtal_26m is supplied to most modules, but APLL1 is mainly used by afe. When audio feature is not used, we hope APLL1 can be turned off to lower power consumption.
Quoted 100 lines
Quoted 15 lines
Quoted 10 lines
Quoted 9 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF is
not
becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_hto
26M
when it's not required in adda module.Quoted 4 lines
I see. Wouldn't reparenting the clock while it is in use by another
module
cause glitches?Quoted 6 lines
I checked with the DSP owner.
audio_hclock is required for DSP bus, but the clock rate is not important.
The only thing it cares isaudio_hshould be powered on, so reparenting
is harmless for DSP.OK.
Quoted 58 lines
Quoted 37 lines
Quoted 24 lines
Quoted 6 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 17 lines
Is there a reason for explicit assignment, other than clock rate
conflicts?
CCF supports requesting and locking the clock rate. And again,
implicit
reparenting should be the norm. The clock driver's purpose is to
fulfill
any and all clock rate requirements from its consumers. The consumer
should
only need to ask for the clock rate, not a specific parent, unless
there
are details that are not yet covered by the CCF.Quoted 6 lines
For MCLK output, we should configure divider to get the target rate,
and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is
not a multiple of target rate.Right. That is expected. What I'm saying is that the CCF provides the
framework for automatically reparenting based on the requested clock
rate. This is done in the clock driver's .determine_rate op.Quoted 12 lines
When properly implemented, and also restricting or locking the clock
rates
of the PLLs, then you can simply request a clock rate on the leaf clock,
in this case one of the MCLKs, and the CCF and clock driver would handle
everything else. The consumer should not be reparenting clocks manually
unless for a very good reason which cannot be satisfied by the CCF.In some use cases, we really need to reparent clock manually. For example, spdif in(slave) -> .... -> i2s out(master)
APLL3/APLL4 are reserved for slave input like earc in or spdif in, which can refer to the external clock source.(APLL3 syncs with earc,
and APLL4 syncs with spdif in.)Quoted 6 lines
When i2s out selects the clock source to APLL4, this makes sure that
spdif in and i2s out works in the same clock source. If we just use APLL1/APLL2 on i2s out, there is little rate mismatch
between data input and output. Finally, it results in XRUN.I see, that makes more sense.
Quoted 4 lines
If we only use
set_rate, it's possible that it can't switch to the expected PLL source, because the rate of APLL3/APLL4 should be close to
APLL1/APLL2.Well, in theory the CCF should choose the one with the closest rate. And if APLL3/APLL4 is already tracking the external clock source, its clock rate should match.
Quoted 9 lines
If it's a static requirement, maybe we could replace the *-mclk- source
DT properties with standard assigned-clocks and assigned-clock- parents?
This would get handled by CCF directly, and then the only thing the clk driver has to do is make sure it doesn't get reparented again.Or is there a need to do reparenting at runtime?
For the use case of APLL3/APLL4, static assignment should be ok.
But I checked with CCF owner, we can't just use clk_set_rate(divider, rate) to get expected MCLK output, because reparenting MUX automatically is not supported now. (PLL -> MUX -> divider)
We still have to call clk_set_parent() before clk_set_rate(). Which means some information should be got from DTS to check whether the PLL source can be switched or not, so *-mclk-source should be keeped to identify the case.
Thanks,
Trevor
Quoted 408 lines
Quoted 307 lines
Quoted 298 lines
Quoted 278 lines
Quoted 7 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the
standard
24.576 MHz and 22.5792 MHz clock rates.APLL1 and APLL2 are used in most AFE modules, so their rate should
be
fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in
v3.Quoted 9 lines
Quoted 8 lines
Some of them are not used in this series, because some modules
are
still developing. Should I only keep the clocks that have been
used
in
the series?Quoted 11 lines
Yes please. Only add the ones that are used. Things that aren't
used
don't get tested and verified, and end up as dead code. If there
are
plans to extend them in the future, and you can leave comments
stating
that intent, and also mention it in the cover letter.OK, I will remove the unused clock in v3.
Quoted 221 lines
Quoted 183 lines
Quoted 176 lines
Quoted 147 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +9
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] ="
hdmirx_apll",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +18
-0+ /* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] ="
hdmirx_apll_ck",
+ [MT8195_CLK_TOP_MAINPLL_D4_D4] =
"mainpll_d4_d4",
+ [MT8195_CLK_TOP_MAINPLL_D5_D2] =
"mainpll_d5_d2",
+ [MT8195_CLK_TOP_MAINPLL_D7_D2] =
"mainpll_d7_d2",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +16
-0+ [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] ="
aud_intbus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +8
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] ="
mphone_slave_b",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",
+ [MT8195_CLK_SCP_ADSP_AUDIODSP] =
"scp_adsp_audiodsp",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] ="
aud_apll1_tuner",
+ [MT8195_CLK_AUD_APLL2_TUNER] =
"aud_apll2_tuner",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +14
-0+ [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",
+ [MT8195_CLK_AUD_UL_TML_HIRES] =
"aud_ul_tml_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",
+ [MT8195_CLK_AUD_LINEIN_TUNER] =
"aud_linein_tuner",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +41
-0+ [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address
space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using
ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with
ASoC
routes. The ASoC core could then handle power sequencing, which
the
driver currently does manually.Quoted 6 lines
IMO this is better than having two drivers handling two aspects
of
the same piece of hardware, while the two aspects are intertwined.Quoted 8 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks.
But those clocks are managed by CCF in the preceding SOCs like
mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks
shouldThis being a new driver, we have some more freedom to improve the
design.Quoted 7 lines
be enabled before configuring
parameters(hw_params). As far as
I
know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequence
isQuoted 8 lines
controlled by DAPM. It seems to be impossible to fulfill all
use
cases.
That's why we just keep the manual control sequence and CCF seems
to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency
tracking and other advantages. And using DAPM supplies means you
can't
enable the clock gates outside of DAPM without both pieces of code
fighting for control.Quoted 11 lines
Can we at least move the audio clock gates into the audio driver
though?
The arbitrary separation into two devices and drivers is fishy.
And
with
the move the external references to the audio clock gates can be
removed.Quoted 7 lines
Because DAPM SUPPLY can't fit our control scenario. Did you suggest us implement the simple logic control(including ref
count, clock dependency) for clockgate(MT8195_CLK_AUD_*)in afe
driver
instead of using CCF?I meant simply moving the CCF-based clk driver code (clk-mt8516-
aud.c)
fromdrivers/clkand incorporating it into the audio driver, likely
inmt8195-afe-clk.cor maybe as a separate file. So the audio driver
would be a clock provider, and a clock consumer. It will directly use
the clocks it provides, internally, and you could remove all those
clock references from the device tree.Quoted 8 lines
The goal is to have one hardware representation (device node) only,
so
that it matches the hardware, which is one single unified block.After the driver is completed, we can look for opportunities to improve
it, if resources are available.Quoted 5 lines
Thanks for your detailed information.
I will try to move the CCF-based clk driver code to AFE driver. If there are no other internal concerns and blocking problems, I will
include the changes in v3.Great.
Quoted 84 lines
Quoted 44 lines
Quoted 17 lines
Quoted 7 lines
And regarding the clock requirements for different modules, could
we
have
that information put in comments somewhere, so if someone were to
revisitQuoted 9 lines
it later, they would have the information needed to understand
and
possibly
improve it? Because right now there's just a bunch of clocks enabled
and
disabled and nothing to explain why that's needed.Quoted 9 lines
For example,
MT8195_CLK_AUD_ADC(clock gate)is one of the clock feeding to ADDA
module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly
in comments. Could you kindly share me an example for reference?For example, in
mt8195_afe_enable_reg_rw_clk()in mt8195-afe-clk.c:unsigned int clk_array[] = { MT8195_CLK_SCP_ADSP_AUDIODSP, MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL, MT8195_CLK_TOP_CFG_26M_AUD, MT8195_CLK_INFRA_AO_AUDIO, MT8195_CLK_INFRA_AO_AUDIO_26M_B, MT8195_CLK_TOP_AUD_INTBUS_SEL, MT8195_CLK_TOP_A1SYS_HP_SEL, MT8195_CLK_AUD_A1SYS_HP, MT8195_CLK_AUD_A1SYS, MT8195_CLK_TOP_AUDIO_H_SEL, };Quoted 8 lines
You could add a comment after each line stating why that clock needs
to
be enabled. A simple note like "bus access clock" or "internal logic
clock"
would suffice.OK, I will add short notes to such clock lists.
Quoted 11 lines
The above list also has some redundancies that could be eliminated.
MT8195_CLK_TOP_A1SYS_HP_SELis parent to bothMT8195_CLK_AUD_A1SYS_HP
andMT8195_CLK_AUD_A1SYS. When clocks are enabled, their parents are also
enabled by CCF, so there's no need to enable them explicitly, unless
that clock also directly feeds the clock consumer.OK, I will review all clock usages and remove the unnecessary clocks.
Quoted 5 lines
Another thing I wanted to bring up: is any of the code after
struct mt8195_afe_tuner_cfg {Quoted 8 lines
used? It looks like it is used to configure the five extra PLLs in
the audio
subsystem, but the exposed (non-static) functions don't seem to be
called
anywhere. Are they for modules not yet supported?Quoted 4 lines
Yes, tuners are not supported now.
I will remove the code and add them back when tuners are required in
the future.Thanks.
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 350 lines · Trevor Wu
Quoted 223 lines · Chen-Yu Tsai
Quoted 209 lines · Trevor Wu
Quoted 202 lines · Chen-Yu Tsai
Hi,
On Thu, Jul 15, 2021 at 7:05 PM Trevor Wu <[email protected]
Quoted 1 line
Quoted 187 lines · wrote:
Quoted 136 lines · Chen-Yu Tsai
Quoted 126 lines · Trevor Wu
Quoted 115 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <
[email protected]Quoted 1 line
Quoted 97 lines · wrote:
This patch adds mt8195 platform and affiliated driver.
Signed-off-by Trevor Wu <[email protected]>--- sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8195/Makefile | 11 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 899 +++++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 201 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 200 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3264 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2793 ++++++++++++++ 8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-
reg.hsound/soc/mediatek/Kconfig +0
-0@@ -184,3 +184,12 @@ config
SND_SOC_MT8192_MT6359_RT1015_RT5682
with the MT6359 RT1015 RT5682 audio codec. Select Y if you have such device. If unsure select "N".sound/soc/mediatek/Kconfig +3
-0+ +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195chip"
sound/soc/mediatek/Kconfig +3
-0+ select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support forMediatek
MT8195 chipsound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +1
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) += mt6797/ obj-$(CONFIG_SND_SOC_MT8173) += mt8173/ obj-$(CONFIG_SND_SOC_MT8183) += mt8183/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ +obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.osound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +6
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl +* +* Copyright (c) 2021 MediaTek Inc. +* Author: Bicycle Tsai <[email protected]> sound/soc/mediatek/mt8195/mt8195-afe-clk.c line 16
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+* Trevor Wu <[email protected]> +*/ + +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {Quoted 8 lines
Most of these clocks are not described in the device tree binding. If
the driver needs to reference them, they should be described.
We
should
not be hard-coding clock names across different drivers.Quoted 6 lines
Sorry, I didn't know I have to list all clocks in the dt- binding.
Originally, I thought these clocks will be described in the clock
binding, so I didn't add them to the binding of afe driver. I will add these clocks tomt8195-afe-pcm.yaml.Quoted 8 lines
If the device consumes clocks, then the clocks that get consumed
should
be listed in the device's bindings. This is not related to the
clock
bindings, which is a clock provider.Got it. Thanks.
Quoted 27 lines
Quoted 10 lines
Quoted 9 lines
The more important question is, why does the driver need to
reference
all of them? Maybe we should take a step back and draw out a
clock
tree
diagram for the hardware?Quoted 10 lines
The clock structure is PLL -> MUX -> GATE.
xtal, pll and divider are the possible clock inputs for MUX.
Because we select the clock input of audio module based on the
use
case, we useclk_getto retrive all clocks which are possible
to be
used.So I see a couple the driver is doing reparenting:
a. Reparent
audio_hto standard oscillator when ADDA is not
used,
presumably to let the APLL be turned offQuoted 10 lines
Why not just turn off
audio_h? It looks likeaudio_hfeeds a couple
clock
gates in the audio subsystem. Just a guess, but is this the AHB
bus
clock?
Why not just have it parented to "univpll_d7" all the time then?Quoted 9 lines
Sorry, I am not sure if it is the AHB bus clock.
I only know how audio module uses the clock.audio_hfeeds to some clock gate likeaud_adc_hires, which is used
when
sampling rate is higher than 48kHz, and hardware designer suggests
us
useapll1_ckwhen AFE requrires the clock.Quoted 4 lines
I see. So the simplified explanation is high clock rate for high res
audio.
Would high clock rate work for standard sample rates?Quoted 4 lines
As far as I know, HW will switch clock to hires clock automatically when the required rate is high,(ex:
aud_adcandaud_adc_hires) so it
can't be controlled by driver.I see. That might not be so friendly to the Linux clk driver.
Quoted 5 lines
Quoted 4 lines
Would using apll1 or univpll all the time work, instead of reparenting?
What's the gain if we do reparenting?Quoted 8 lines
Quoted 4 lines
As you said before, the gain is apll can be turned off when the clock
is not requrired by ADDA. That's why we didn't use apll all the time.Right, and what's the gain from turning it off? Lower power consumption?
Yes.
Xtal_26mis supplied to most modules, but APLL1 is mainly used by afe. When audio feature is not used, we hope APLL1 can be turned off to lower power consumption.Quoted 100 lines
Quoted 15 lines
Quoted 10 lines
Quoted 9 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF is
not
becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_hto
26M
when it's not required in adda module.Quoted 4 lines
I see. Wouldn't reparenting the clock while it is in use by another
module
cause glitches?Quoted 6 lines
I checked with the DSP owner.
audio_hclock is required for DSP bus, but the clock rate is not important.
The only thing it cares isaudio_hshould be powered on, so reparenting
is harmless for DSP.OK.
Quoted 58 lines
Quoted 37 lines
Quoted 24 lines
Quoted 6 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Quoted 17 lines
Is there a reason for explicit assignment, other than clock rate
conflicts?
CCF supports requesting and locking the clock rate. And again,
implicit
reparenting should be the norm. The clock driver's purpose is to
fulfill
any and all clock rate requirements from its consumers. The consumer
should
only need to ask for the clock rate, not a specific parent, unless
there
are details that are not yet covered by the CCF.Quoted 6 lines
For MCLK output, we should configure divider to get the target rate,
and it can only divide the clock from current parent source. So we should do reparent to divider's parent in case the parent rate is
not a multiple of target rate.Right. That is expected. What I'm saying is that the CCF provides the
framework for automatically reparenting based on the requested clock
rate. This is done in the clock driver's .determine_rate op.Quoted 12 lines
When properly implemented, and also restricting or locking the clock
rates
of the PLLs, then you can simply request a clock rate on the leaf clock,
in this case one of the MCLKs, and the CCF and clock driver would handle
everything else. The consumer should not be reparenting clocks manually
unless for a very good reason which cannot be satisfied by the CCF.In some use cases, we really need to reparent clock manually. For example, spdif in(slave) -> .... -> i2s out(master)
APLL3/APLL4 are reserved for slave input like earc in or spdif in, which can refer to the external clock source.(APLL3 syncs with earc,
and APLL4 syncs with spdif in.)Quoted 6 lines
When i2s out selects the clock source to APLL4, this makes sure that
spdif in and i2s out works in the same clock source. If we just use APLL1/APLL2 on i2s out, there is little rate mismatch
between data input and output. Finally, it results in XRUN.I see, that makes more sense.
Quoted 4 lines
If we only use
set_rate, it's possible that it can't switch to the expected PLL source, because the rate of APLL3/APLL4 should be close to
APLL1/APLL2.Well, in theory the CCF should choose the one with the closest rate. And if APLL3/APLL4 is already tracking the external clock source, its clock rate should match.
Quoted 9 lines
If it's a static requirement, maybe we could replace the *-mclk- source
DT properties with standard assigned-clocks and assigned-clock- parents?
This would get handled by CCF directly, and then the only thing the clk driver has to do is make sure it doesn't get reparented again.Or is there a need to do reparenting at runtime?
For the use case of APLL3/APLL4, static assignment should be ok.
Quoted 8 lines
But I checked with CCF owner, we can't just use
clk_set_rate(divider, rate)to get expected MCLK output, because reparenting MUX automatically is not supported now. (PLL -> MUX -> divider)We still have to call
clk_set_parent()beforeclk_set_rate(). Which means some information should be got from DTS to check whether the PLL source can be switched or not, so *-mclk-source should be keeped to identify the case.
So for the clk stuff I already provided a proof of concept [1] offline.
I would like to see a device tree description that follows the design of the hardware, such as only listing the clocks that actually do feed into the audio subsystem, and not including all their parents (and grand parents).
The driver should follow that description.
ChenYu
[1] https://crrev.com/c/3060172
Quoted 408 lines
Quoted 408 lines
Quoted 307 lines
Quoted 298 lines
Quoted 278 lines
Quoted 7 lines
A related question: the chip has five APLLs. How many MCLK combinations
does the application need to support? I assume this includes the
standard
24.576 MHz and 22.5792 MHz clock rates.APLL1 and APLL2 are used in most AFE modules, so their rate should
be
fixed.
APLL1 is fixed to 196608000Hz.
APLL2 is fixed to 180633600Hz.
APLL is inputed to the divider(8bit), and MCLK is the output of divider.
Other APLLs are reserved for some special usage which can't be supported by APLL1 & APLL2.
But APLL3~APLL5 aren't used in the series, so I will remove them in
v3.Quoted 9 lines
Quoted 8 lines
Some of them are not used in this series, because some modules
are
still developing. Should I only keep the clocks that have been
used
in
the series?Quoted 11 lines
Yes please. Only add the ones that are used. Things that aren't
used
don't get tested and verified, and end up as dead code. If there
are
plans to extend them in the future, and you can leave comments
stating
that intent, and also mention it in the cover letter.OK, I will remove the unused clock in v3.
Quoted 221 lines
Quoted 183 lines
Quoted 176 lines
Quoted 147 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +9
-0+ /* xtal */ + [MT8195_CLK_XTAL_26M] = "clk26m", +/* pll */ + [MT8195_CLK_APMIXED_APLL1] = "apll1", + [MT8195_CLK_APMIXED_APLL2] = "apll2", + [MT8195_CLK_APMIXED_APLL3] = "apll3", + [MT8195_CLK_APMIXED_APLL4] = "apll4", + [MT8195_CLK_APMIXED_APLL5] = "apll5", + [MT8195_CLK_APMIXED_HDMIRX_APLL] ="
hdmirx_apll",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +18
-0+ /* divider */ + [MT8195_CLK_TOP_APLL1] = "apll1_ck", + [MT8195_CLK_TOP_APLL1_D4] = "apll1_d4", + [MT8195_CLK_TOP_APLL2] = "apll2_ck", + [MT8195_CLK_TOP_APLL2_D4] = "apll2_d4", + [MT8195_CLK_TOP_APLL3] = "apll3_ck", + [MT8195_CLK_TOP_APLL3_D4] = "apll3_d4", + [MT8195_CLK_TOP_APLL4] = "apll4_ck", + [MT8195_CLK_TOP_APLL4_D4] = "apll4_d4", + [MT8195_CLK_TOP_APLL5] = "apll5_ck", + [MT8195_CLK_TOP_APLL5_D4] = "apll5_d4", + [MT8195_CLK_TOP_APLL12_DIV0] = "apll12_div0", + [MT8195_CLK_TOP_APLL12_DIV1] = "apll12_div1", + [MT8195_CLK_TOP_APLL12_DIV2] = "apll12_div2", + [MT8195_CLK_TOP_APLL12_DIV3] = "apll12_div3", + [MT8195_CLK_TOP_APLL12_DIV4] = "apll12_div4", + [MT8195_CLK_TOP_APLL12_DIV9] = "apll12_div9", + [MT8195_CLK_TOP_HDMIRX_APLL] ="
hdmirx_apll_ck",
+ [MT8195_CLK_TOP_MAINPLL_D4_D4] =
"mainpll_d4_d4",
+ [MT8195_CLK_TOP_MAINPLL_D5_D2] =
"mainpll_d5_d2",
+ [MT8195_CLK_TOP_MAINPLL_D7_D2] =
"mainpll_d7_d2",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +16
-0+ [MT8195_CLK_TOP_UNIVPLL_D4] = "univpll_d4", +/* mux */ + [MT8195_CLK_TOP_APLL1_SEL] = "apll1_sel", + [MT8195_CLK_TOP_APLL2_SEL] = "apll2_sel", + [MT8195_CLK_TOP_APLL3_SEL] = "apll3_sel", + [MT8195_CLK_TOP_APLL4_SEL] = "apll4_sel", + [MT8195_CLK_TOP_APLL5_SEL] = "apll5_sel", + [MT8195_CLK_TOP_A1SYS_HP_SEL] = "a1sys_hp_sel", + [MT8195_CLK_TOP_A2SYS_SEL] = "a2sys_sel", + [MT8195_CLK_TOP_A3SYS_SEL] = "a3sys_sel", + [MT8195_CLK_TOP_A4SYS_SEL] = "a4sys_sel", + [MT8195_CLK_TOP_ASM_H_SEL] = "asm_h_sel", + [MT8195_CLK_TOP_ASM_M_SEL] = "asm_m_sel", + [MT8195_CLK_TOP_ASM_L_SEL] = "asm_l_sel", + [MT8195_CLK_TOP_AUD_IEC_SEL] = "aud_iec_sel", + [MT8195_CLK_TOP_AUD_INTBUS_SEL] ="
aud_intbus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ [MT8195_CLK_TOP_AUDIO_H_SEL] = "audio_h_sel", + [MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL] ="
audio_local_bus_sel",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +8
-0+ [MT8195_CLK_TOP_DPTX_M_SEL] = "dptx_m_sel", + [MT8195_CLK_TOP_INTDIR_SEL] = "intdir_sel", + [MT8195_CLK_TOP_I2SO1_M_SEL] = "i2so1_m_sel", + [MT8195_CLK_TOP_I2SO2_M_SEL] = "i2so2_m_sel", + [MT8195_CLK_TOP_I2SI1_M_SEL] = "i2si1_m_sel", + [MT8195_CLK_TOP_I2SI2_M_SEL] = "i2si2_m_sel", +/* clock gate */ + [MT8195_CLK_TOP_MPHONE_SLAVE_B] ="
mphone_slave_b",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_TOP_CFG_26M_AUD] = "cfg_26m_aud", + [MT8195_CLK_INFRA_AO_AUDIO] = "infra_ao_audio", + [MT8195_CLK_INFRA_AO_AUDIO_26M_B] ="
infra_ao_audio_26m_b",
+ [MT8195_CLK_SCP_ADSP_AUDIODSP] =
"scp_adsp_audiodsp",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_AFE] = "aud_afe", + [MT8195_CLK_AUD_LRCK_CNT] = "aud_lrck_cnt", + [MT8195_CLK_AUD_SPDIFIN_TUNER_APLL] ="
aud_spdifin_tuner_apll",
+ [MT8195_CLK_AUD_SPDIFIN_TUNER_DBG] =
"aud_spdifin_tuner_dbg",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +2
-0+ [MT8195_CLK_AUD_UL_TML] = "aud_ul_tml", + [MT8195_CLK_AUD_APLL1_TUNER] ="
aud_apll1_tuner",
+ [MT8195_CLK_AUD_APLL2_TUNER] =
"aud_apll2_tuner",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +14
-0+ [MT8195_CLK_AUD_TOP0_SPDF] = "aud_top0_spdf", + [MT8195_CLK_AUD_APLL] = "aud_apll", + [MT8195_CLK_AUD_APLL2] = "aud_apll2", + [MT8195_CLK_AUD_DAC] = "aud_dac", + [MT8195_CLK_AUD_DAC_PREDIS] = "aud_dac_predis", + [MT8195_CLK_AUD_TML] = "aud_tml", + [MT8195_CLK_AUD_ADC] = "aud_adc", + [MT8195_CLK_AUD_DAC_HIRES] = "aud_dac_hires", + [MT8195_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp", + [MT8195_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1", + [MT8195_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2", + [MT8195_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3", + [MT8195_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4", + [MT8195_CLK_AUD_AFE_26M_DMIC_TM] ="
aud_afe_26m_dmic_tm",
+ [MT8195_CLK_AUD_UL_TML_HIRES] =
"aud_ul_tml_hires",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0+ [MT8195_CLK_AUD_ADC_HIRES] = "aud_adc_hires", + [MT8195_CLK_AUD_ADDA6_ADC] = "aud_adda6_adc", + [MT8195_CLK_AUD_ADDA6_ADC_HIRES] ="
aud_adda6_adc_hires",
+ [MT8195_CLK_AUD_LINEIN_TUNER] =
"aud_linein_tuner",sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +41
-0+ [MT8195_CLK_AUD_EARC_TUNER] = "aud_earc_tuner", + [MT8195_CLK_AUD_I2SIN] = "aud_i2sin", + [MT8195_CLK_AUD_TDM_IN] = "aud_tdm_in", + [MT8195_CLK_AUD_I2S_OUT] = "aud_i2s_out", + [MT8195_CLK_AUD_TDM_OUT] = "aud_tdm_out", + [MT8195_CLK_AUD_HDMI_OUT] = "aud_hdmi_out", + [MT8195_CLK_AUD_ASRC11] = "aud_asrc11", + [MT8195_CLK_AUD_ASRC12] = "aud_asrc12", + [MT8195_CLK_AUD_MULTI_IN] = "aud_multi_in", + [MT8195_CLK_AUD_INTDIR] = "aud_intdir", + [MT8195_CLK_AUD_A1SYS] = "aud_a1sys", + [MT8195_CLK_AUD_A2SYS] = "aud_a2sys", + [MT8195_CLK_AUD_PCMIF] = "aud_pcmif", + [MT8195_CLK_AUD_A3SYS] = "aud_a3sys", + [MT8195_CLK_AUD_A4SYS] = "aud_a4sys", + [MT8195_CLK_AUD_MEMIF_UL1] = "aud_memif_ul1", + [MT8195_CLK_AUD_MEMIF_UL2] = "aud_memif_ul2", + [MT8195_CLK_AUD_MEMIF_UL3] = "aud_memif_ul3", + [MT8195_CLK_AUD_MEMIF_UL4] = "aud_memif_ul4", + [MT8195_CLK_AUD_MEMIF_UL5] = "aud_memif_ul5", + [MT8195_CLK_AUD_MEMIF_UL6] = "aud_memif_ul6", + [MT8195_CLK_AUD_MEMIF_UL8] = "aud_memif_ul8", + [MT8195_CLK_AUD_MEMIF_UL9] = "aud_memif_ul9", + [MT8195_CLK_AUD_MEMIF_UL10] = "aud_memif_ul10", + [MT8195_CLK_AUD_MEMIF_DL2] = "aud_memif_dl2", + [MT8195_CLK_AUD_MEMIF_DL3] = "aud_memif_dl3", + [MT8195_CLK_AUD_MEMIF_DL6] = "aud_memif_dl6", + [MT8195_CLK_AUD_MEMIF_DL7] = "aud_memif_dl7", + [MT8195_CLK_AUD_MEMIF_DL8] = "aud_memif_dl8", + [MT8195_CLK_AUD_MEMIF_DL10] = "aud_memif_dl10", + [MT8195_CLK_AUD_MEMIF_DL11] = "aud_memif_dl11", + [MT8195_CLK_AUD_GASRC0] = "aud_gasrc0", + [MT8195_CLK_AUD_GASRC1] = "aud_gasrc1", + [MT8195_CLK_AUD_GASRC2] = "aud_gasrc2", + [MT8195_CLK_AUD_GASRC3] = "aud_gasrc3", + [MT8195_CLK_AUD_GASRC4] = "aud_gasrc4", + [MT8195_CLK_AUD_GASRC5] = "aud_gasrc5", + [MT8195_CLK_AUD_GASRC6] = "aud_gasrc6", + [MT8195_CLK_AUD_GASRC7] = "aud_gasrc7", + [MT8195_CLK_AUD_GASRC8] = "aud_gasrc8", + [MT8195_CLK_AUD_GASRC9] = "aud_gasrc9",sound/soc/mediatek/mt8195/mt8195-afe-clk.c
Quoted 10 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +10
-0+ [MT8195_CLK_AUD_GASRC10] = "aud_gasrc10", + [MT8195_CLK_AUD_GASRC11] = "aud_gasrc11", + [MT8195_CLK_AUD_GASRC12] = "aud_gasrc12", + [MT8195_CLK_AUD_GASRC13] = "aud_gasrc13", + [MT8195_CLK_AUD_GASRC14] = "aud_gasrc14", + [MT8195_CLK_AUD_GASRC15] = "aud_gasrc15", + [MT8195_CLK_AUD_GASRC16] = "aud_gasrc16", + [MT8195_CLK_AUD_GASRC17] = "aud_gasrc17", + [MT8195_CLK_AUD_GASRC18] = "aud_gasrc18", + [MT8195_CLK_AUD_GASRC19] = "aud_gasrc19",The MT8195_CLK_AUD_* clocks are all internal to the audio subsystem:
the bits that control these clock gates are in the same address
space
as the audio parts. Would it be possible to model them as internal
ASoC SUPPLY widgets? The external ones could be modeled using
ASoCCLK_SUPPLYwidgets, and the dependencies could be modeled with
ASoC
routes. The ASoC core could then handle power sequencing, which
the
driver currently does manually.Quoted 6 lines
IMO this is better than having two drivers handling two aspects
of
the same piece of hardware, while the two aspects are intertwined.Quoted 8 lines
Yes, it's ok to use the
CLK_SUPPLYand SUPPLY to model such clocks.
But those clocks are managed by CCF in the preceding SOCs like
mt2701,
mt6779 and mt8183. Additionally, in some audio modules, clocks
shouldThis being a new driver, we have some more freedom to improve the
design.Quoted 7 lines
be enabled before configuring
parameters(hw_params). As far as
I
know,
if we useCLK_SUPPLYor SUPPLY to model clocks, the power sequence
isQuoted 8 lines
controlled by DAPM. It seems to be impossible to fulfill all
use
cases.
That's why we just keep the manual control sequence and CCF seems
to be
the best choice to model such clock gatess.I see. So yes, using CCF does give you reference counting, dependency
tracking and other advantages. And using DAPM supplies means you
can't
enable the clock gates outside of DAPM without both pieces of code
fighting for control.Quoted 11 lines
Can we at least move the audio clock gates into the audio driver
though?
The arbitrary separation into two devices and drivers is fishy.
And
with
the move the external references to the audio clock gates can be
removed.Quoted 7 lines
Because DAPM SUPPLY can't fit our control scenario. Did you suggest us implement the simple logic control(including ref
count, clock dependency) for clockgate(MT8195_CLK_AUD_*)in afe
driver
instead of using CCF?I meant simply moving the CCF-based clk driver code (clk-mt8516-
aud.c)
fromdrivers/clkand incorporating it into the audio driver, likely
inmt8195-afe-clk.cor maybe as a separate file. So the audio driver
would be a clock provider, and a clock consumer. It will directly use
the clocks it provides, internally, and you could remove all those
clock references from the device tree.Quoted 8 lines
The goal is to have one hardware representation (device node) only,
so
that it matches the hardware, which is one single unified block.After the driver is completed, we can look for opportunities to improve
it, if resources are available.Quoted 5 lines
Thanks for your detailed information.
I will try to move the CCF-based clk driver code to AFE driver. If there are no other internal concerns and blocking problems, I will
include the changes in v3.Great.
Quoted 84 lines
Quoted 44 lines
Quoted 17 lines
Quoted 7 lines
And regarding the clock requirements for different modules, could
we
have
that information put in comments somewhere, so if someone were to
revisitQuoted 9 lines
it later, they would have the information needed to understand
and
possibly
improve it? Because right now there's just a bunch of clocks enabled
and
disabled and nothing to explain why that's needed.Quoted 9 lines
For example,
MT8195_CLK_AUD_ADC(clock gate)is one of the clock feeding to ADDA
module.
Did you want me show the clock gate list feeding to ADDA? On the other hand, I didn't know how to show the information properly
in comments. Could you kindly share me an example for reference?For example, in
mt8195_afe_enable_reg_rw_clk()in mt8195-afe-clk.c:unsigned int clk_array[] = { MT8195_CLK_SCP_ADSP_AUDIODSP, MT8195_CLK_TOP_AUDIO_LOCAL_BUS_SEL, MT8195_CLK_TOP_CFG_26M_AUD, MT8195_CLK_INFRA_AO_AUDIO, MT8195_CLK_INFRA_AO_AUDIO_26M_B, MT8195_CLK_TOP_AUD_INTBUS_SEL, MT8195_CLK_TOP_A1SYS_HP_SEL, MT8195_CLK_AUD_A1SYS_HP, MT8195_CLK_AUD_A1SYS, MT8195_CLK_TOP_AUDIO_H_SEL, };Quoted 8 lines
You could add a comment after each line stating why that clock needs
to
be enabled. A simple note like "bus access clock" or "internal logic
clock"
would suffice.OK, I will add short notes to such clock lists.
Quoted 11 lines
The above list also has some redundancies that could be eliminated.
MT8195_CLK_TOP_A1SYS_HP_SELis parent to bothMT8195_CLK_AUD_A1SYS_HP
andMT8195_CLK_AUD_A1SYS. When clocks are enabled, their parents are also
enabled by CCF, so there's no need to enable them explicitly, unless
that clock also directly feeds the clock consumer.OK, I will review all clock usages and remove the unnecessary clocks.
Quoted 5 lines
Another thing I wanted to bring up: is any of the code after
struct mt8195_afe_tuner_cfg {Quoted 8 lines
used? It looks like it is used to configure the five extra PLLs in
the audio
subsystem, but the exposed (non-static) functions don't seem to be
called
anywhere. Are they for modules not yet supported?Quoted 4 lines
Yes, tuners are not supported now.
I will remove the code and add them back when tuners are required in
the future.Thanks.
ChenYu
Re: [PATCH v2 5/8] ASoC: mediatek: mt8195: add platform driver
Quoted 19,685 lines · Chen-Yu Tsai
Quoted 19,668 lines · Trevor Wu
Quoted 265 lines · Chen-Yu Tsai
On Thu, Jul 22, 2021 at 4:56 PM Trevor Wu <[email protected]
Quoted 1 line
Quoted 248 lines · wrote:
Quoted 240 lines · Chen-Yu Tsai
Hi,
On Thu, Jul 15, 2021 at 7:05 PM Trevor Wu <
[email protected]Quoted 1 line
Quoted 222 lines · wrote:
Quoted 163 lines · Chen-Yu Tsai
Quoted 150 lines · Trevor Wu
Quoted 138 lines · Chen-Yu Tsai
are all internal Hi,
On Tue, Jun 29, 2021 at 9:49 AM Trevor Wu <
[email protected]Quoted 1 line
Quoted 121 lines · wrote:
This patch adds mt8195 platform and affiliated
driver.Signed-off-by Trevor Wu <[email protected]>---
sound/soc/mediatek/Kconfig|
9
+
sound/soc/mediatek/Makefile|
1 +
sound/soc/mediatek/mt8195/Makefile|
11 +
sound/soc/mediatek/mt8195/mt8195-afe-clk.c| 899
+++++
sound/soc/mediatek/mt8195/mt8195-afe-clk.h| 201 +
sound/soc/mediatek/mt8195/mt8195-afe-common.h
| 200 +
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c|
3264
+++++++++++++++++
sound/soc/mediatek/mt8195/mt8195-reg.h|
2793
++++++++++++++8 files changed, 7378 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195- afe- pcm.c create mode 100644
sound/soc/mediatek/mt8195/mt8195-reg.hsound/soc/mediatek/Kconfig +0
-0@@ -184,3 +184,12 @@ config
SND_SOC_MT8192_MT6359_RT1015_RT5682with the MT6359 RT1015 RT5682 audiocodec.
Select Y if you have such device.
If unsure select "N".sound/soc/mediatek/Kconfig +3
-0+ +config SND_SOC_MT8195 + tristate "ASoC support for Mediatek MT8195chip"
sound/soc/mediatek/Kconfig +3
-0+ select SND_SOC_MEDIATEK + help + This adds ASoC platform driver supportfor
Mediatek
MT8195 chipsound/soc/mediatek/Kconfig +3
-0+ that can be used with other codecs. + Select Y if you have such device. + If unsure select "N".sound/soc/mediatek/Makefile +0
-0@@ -5,3 +5,4 @@ obj-$(CONFIG_SND_SOC_MT6797) +=mt6797/
obj-$(CONFIG_SND_SOC_MT8173) += mt8173/
obj-$(CONFIG_SND_SOC_MT8183) += mt8183/
obj-$(CONFIG_SND_SOC_MT8192) += mt8192/sound/soc/mediatek/Makefile +1
-0+obj-$(CONFIG_SND_SOC_MT8195) += mt8195/sound/soc/mediatek/mt8195/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 + +# platform driver +snd-soc-mt8195-afe-objs := \ + mt8195-afe-clk.o \ + mt8195-afe-pcm.o \ + mt8195-dai-adda.o \ + mt8195-dai-etdm.o \ + mt8195-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.o
(quoted diff) +0
-0
clk.cb/sound/soc/mediatek/mt8195/mt8195-afe-clk.c
new file mode 100644
index 000000000000..57aa799b4f41sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +3
-0@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* mt8195-afe-clk.c -- Mediatek 8195 afe clock ctrl
+ *
+ * Copyright (c) 2021 MediaTek Inc.
+ * Author: Bicycle Tsai <[email protected]Quoted 1 line
+ * Trevor Wu <[email protected]>
+ */sound/soc/mediatek/mt8195/mt8195-afe-clk.c
Quoted 8 lines
sound/soc/mediatek/mt8195/mt8195-afe-clk.c new file +8
-0+ +#include <linux/clk.h> + +#include "mt8195-afe-common.h" +#include "mt8195-afe-clk.h" +#include "mt8195-reg.h" + +static const char *aud_clks[MT8195_CLK_NUM ] = {Most of these clocks are not described in the device
Quoted 9 lines
tree
binding. If
the driver needs to reference them, they should be described.
We
should
not be hard-coding clock names across different drivers.Quoted 9 lines
Sorry, I didn't know I have to list all clocks in the dt-
binding.
Originally, I thought these clocks will be described in the
clock
binding, so I didn't add them to the binding of afe driver.
I will add these clocks tomt8195-afe-pcm.yaml.Quoted 9 lines
If the device consumes clocks, then the clocks that get consumed
should
be listed in the device's bindings. This is not related to
the
clock
bindings, which is a clock provider.Got it. Thanks.
Quoted 31 lines
Quoted 12 lines
Quoted 11 lines
The more important question is, why does the driver need
to
reference
all of them? Maybe we should take a step back and draw
out a
clock
tree
diagram for the hardware?Quoted 11 lines
The clock structure is PLL -> MUX -> GATE. xtal, pll and divider are the possible clock inputs for MUX.
Because we select the clock input of audio module based on
the
use
case, we useclk_getto retrive all clocks which are possible
to be
used.So I see a couple the driver is doing reparenting:
a. Reparent
audio_hto standard oscillator when ADDA is
not
used,
presumably to let the APLL be turned offQuoted 13 lines
Why not just turn off
audio_h? It looks likeaudio_hfeeds a
couple
clock
gates in the audio subsystem. Just a guess, but is this the
AHB
bus
clock?
Why not just have it parented to "univpll_d7" all the time
then?Quoted 10 lines
Sorry, I am not sure if it is the AHB bus clock. I only know how audio module uses the clock.
audio_hfeeds to some clock gate likeaud_adc_hires, which is
used
when
sampling rate is higher than 48kHz, and hardware designer suggests
us
useapll1_ckwhen AFE requrires the clock.Quoted 5 lines
I see. So the simplified explanation is high clock rate for high
res
audio.
Would high clock rate work for standard sample rates?Quoted 6 lines
As far as I know, HW will switch clock to hires clock automatically
when the required rate is high,(ex:aud_adcandaud_adc_hires) so
it
can't be controlled by driver.I see. That might not be so friendly to the Linux clk driver.
Quoted 5 lines
Quoted 4 lines
Would using apll1 or univpll all the time work, instead of reparenting?
What's the gain if we do reparenting?Quoted 8 lines
Quoted 4 lines
As you said before, the gain is apll can be turned off when the clock
is not requrired by ADDA. That's why we didn't use apll all the time.Right, and what's the gain from turning it off? Lower power consumption?
Yes.
Xtal_26mis supplied to most modules, but APLL1 is mainly used by
afe. When audio feature is not used, we hope APLL1 can be turned off to
lower power consumption.Quoted 131 lines
Quoted 17 lines
Quoted 12 lines
Quoted 11 lines
As I know, DSP also requires
audio_h.
When we disable the clock in AFE driver, the ref count in CCF
is
not
becoming zero if DSP still uses it.
But only AFE requires higher clock rate, so we reparentaudio_h
to
26M
when it's not required in adda module.Quoted 4 lines
I see. Wouldn't reparenting the clock while it is in use by another
module
cause glitches?Quoted 7 lines
I checked with the DSP owner.
audio_hclock is required for DSP bus, but the clock rate is not
important.
The only thing it cares isaudio_hshould be powered on, so reparenting
is harmless for DSP.OK.
Quoted 74 lines
Quoted 47 lines
Quoted 29 lines
Quoted 19 lines
Also, reparenting really should be done implicitly with
clk_set_rate()
with the clock driver supporting reparenting on rate changes.b. Assignment of PLLs for I2S/PCM MCLK outputs
Is there a reason for explicit assignment, other than clock
rate
conflicts?
CCF supports requesting and locking the clock rate. And again,
implicit
reparenting should be the norm. The clock driver's purpose is
to
fulfill
any and all clock rate requirements from its consumers.Quoted 9 lines
The
consumer
should
only need to ask for the clock rate, not a specific parent,
unless
there
are details that are not yet covered by the CCF.Quoted 9 lines
For MCLK output, we should configure divider to get the target
rate,
and it can only divide the clock from current parent source.
So we should do reparent to divider's parent in case the parent
rate is
not a multiple of target rate.Right. That is expected. What I'm saying is that the CCF provides
the
framework for automatically reparenting based on the requested
clock
rate. This is done in the clock driver's .determine_rate op.Quoted 17 lines
When properly implemented, and also restricting or locking the
clock
rates
of the PLLs, then you can simply request a clock rate on the leaf
clock,
in this case one of the MCLKs, and the CCF and clock driver would
handle
everything else. The consumer should not be reparenting clocks
manually
unless for a very good reason which cannot be satisfied by the
CCF.In some use cases, we really need to reparent clock manually. For example, spdif in(slave) -> .... -> i2s out(master)
APLL3/APLL4 are reserved for slave input like earc in or spdif in,
which can refer to the external clock source.(APLL3 syncs with earc,
and APLL4 syncs with spdif in.)Quoted 6 lines
When i2s out selects the clock source to APLL4, this makes sure that
spdif in and i2s out works in the same clock source. If we just use APLL1/APLL2 on i2s out, there is little rate mismatch
between data input and output. Finally, it results in XRUN.I see, that makes more sense.
Quoted 5 lines
If we only use
set_rate, it's possible that it can't switch to the
expected PLL source, because the rate of APLL3/APLL4 should be close to
APLL1/APLL2.Well, in theory the CCF should choose the one with the closest rate.
And if APLL3/APLL4 is already tracking the external clock source, its
clock rate should match.If it's a static requirement, maybe we could replace the *-mclk- source
DT properties with standard assigned-clocks and assigned-clock- parents?
This would get handled by CCF directly, and then the only thing the
clk driver has to do is make sure it doesn't get reparented again.Quoted 2 lines
Or is there a need to do reparenting at runtime?
For the use case of APLL3/APLL4, static assignment should be ok.
But I checked with CCF owner, we can't just use
clk_set_rate(divider,[ 3.694495] <7>.(7)[1:swapper/0]initcallmtk_spi_slave_driver_init+0x0/0x20returned 0 after 110 usecs[ 3.695671] <7>.(7)[1:swapper/0]calling spi_slave_mt27xx_test_driver_init+0x0/ 0x20 @ 1 [ 3.696677] <7>.(7)[1:swapper/0]initcall spi_slave_mt27xx_test_driver_init+0x0/0x20 returned 0 after 7 usecs [ 3.697900] <7>.(7)[1:swapper/0]calling mtk_spmi_driver_init+0x0/0x20 @ 1 [ 3.698455] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.699545] <0>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699596] <6>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699635] <6>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699677] <7>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699715] <6>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699763] <7>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.699771] <6>.(6)[154:irq/257-pmif_ir]spmimst 0x44 = 0xb0323 [ 3.701281] <7>.(7)[1:swapper/0]probe of 0-06 returned 1 after 875 usecs [ 3.701910] <6>.(6)[154:irq/257-pmif_ir]spmimst 0x48 = 0x0 [ 3.703358] <7>.(7)[1:swapper/0]platform gpufreq: Linked as a consumer to 0-07 [ 3.703395] <7>.(6)[154:irq/257-pmif_ir]spmimst 0x4c = 0x0 [ 3.704671] <7>.(7)[1:swapper/0]probe of 0-07 returned 1 after 1706 usecs [ 3.704852] <7>.(6)[154:irq/257-pmif_ir]spmimst 0x50 = 0x0 [ 3.705690] <7>.(7)[1:swapper/0]probe of 10027000.spmi returned 1 after 6915 usecs [ 3.710523] <7>.(7)[1:swapper/0]initcall mtk_spmi_driver_init+0x0/0x20 returned 0 after 11489 usecs [ 3.711655] <7>.(7)[1:swapper/0]calling dummy_init_module+0x0/0xa0 @ 1 [ 3.712845] <7>.(7)[1:swapper/0]initcall dummy_init_module+0x0/0xa0 returned 0 after 355 usecs [ 3.713918] <7>.(7)[1:swapper/0]calling ifb_init_module+0x0/0xb8 @ 1 [ 3.715120] <2>-(2)[0:swapper/2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.715202] <7>.(7)[1:swapper/0]initcall ifb_init_module+0x0/0xb8 returned 0 after 468 usecs [ 3.717105] <7>.(7)[1:swapper/0]calling net_olddevs_init+0x0/0x34 @ 1 [ 3.717923] <7>.(7)[1:swapper/0]initcall net_olddevs_init+0x0/0x34 returned 0 after 5 usecs [ 3.718963] <7>.(7)[1:swapper/0]calling fixed_mdio_bus_init+0x0/0x118 @ 1 [ 3.720218] <7>.(7)[1:swapper/0]mdio_bus fixed-0: GPIO lookup for consumer reset [ 3.721140] <7>.(7)[1:swapper/0]mdio_bus fixed-0: using lookup tables for GPIO lookup [ 3.722116] <7>.(7)[1:swapper/0]mdio_bus fixed-0: No GPIO consumer reset found [ 3.723021] <7>.(7)[1:swapper/0]libphy: Fixed MDIO Bus: probed [ 3.723756] <7>.(7)[1:swapper/0]initcall fixed_mdio_bus_init+0x0/0x118 returned 0 after 3837 usecs [ 3.724871] <7>.(7)[1:swapper/0]calling phy_module_init+0x0/0x24 @ 1 [ 3.725707] <7>.(7)[1:swapper/0]initcall phy_module_init+0x0/0x24 returned 0 after 32 usecs [ 3.726747] <7>.(7)[1:swapper/0]calling tun_init+0x0/0xc0 @ 1 [ 3.727479] <7>.(7)[1:swapper/0]tun: Universal TUN/TAP device driver, 1.6 [ 3.728514] <7>.(7)[1:swapper/0]initcall tun_init+0x0/0xc0 returned 0 after 1010 usecs [ 3.729501] <7>.(7)[1:swapper/0]calling veth_init+0x0/0x1c @ 1 [ 3.730240] <7>.(7)[1:swapper/0]initcall veth_init+0x0/0x1c returned 0 after 1 usecs [ 3.731209] <7>.(7)[1:swapper/0]calling cavium_ptp_driver_init+0x0/0x28 @ 1 [ 3.731785] <3>-(3)[0:swapper/3]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.732127] <7>.(7)[1:swapper/0]initcall cavium_ptp_driver_init+0x0/0x28 returned 0 after 37 usecs [ 3.734135] <7>.(7)[1:swapper/0]calling stmmac_init+0x0/0x64 @ 1 [ 3.734903] <7>.(7)[1:swapper/0]initcall stmmac_init+0x0/0x64 returned 0 after 7 usecs [ 3.735894] <7>.(7)[1:swapper/0]calling mediatek_dwmac_driver_init+0x0/0x20 @ 1 [ 3.736855] <7>.(7)[1:swapper/0]probe of 11021000.ethernet returned -517 after 0 usecs [ 3.737922] <7>.(7)[1:swapper/0]initcall mediatek_dwmac_driver_init+0x0/0x20 returned 0 after 1078 usecs [ 3.739107] <7>.(7)[1:swapper/0]calling dwmac_generic_driver_init+0x0/0x20 @ 1 [ 3.740209] <7>.(7)[1:swapper/0]initcall dwmac_generic_driver_init+0x0/0x20 returned 0 after 186 usecs [ 3.741368] <7>.(7)[1:swapper/0]calling ppp_init+0x0/0x128 @ 1 [ 3.742105] <7>.(7)[1:swapper/0]PPP generic driver version 2.4.2 [ 3.743040] <7>.(7)[1:swapper/0]initcall ppp_init+0x0/0x128 returned 0 after 912 usecs [ 3.744032] <7>.(7)[1:swapper/0]calling ppp_async_init+0x0/0x48 @ 1 [ 3.744826] <7>.(7)[1:swapper/0]initcall ppp_async_init+0x0/0x48 returned 0 after 0 usecs [ 3.745845] <7>.(7)[1:swapper/0]calling bsdcomp_init+0x0/0x40 @ 1 [ 3.746615] <7>.(7)[1:swapper/0]PPP BSD Compression module registered [ 3.747422] <7>.(7)[1:swapper/0]initcall bsdcomp_init+0x0/0x40 returned 0 after 787 usecs [ 3.748441] <7>.(7)[1:swapper/0]calling deflate_init+0x0/0x60 @ 1 [ 3.749212] <7>-(7)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.750145] <7>.(7)[1:swapper/0]PPP Deflate Compression module registered [ 3.750993] <7>.(7)[1:swapper/0]initcall deflate_init+0x0/0x60 returned 0 after 827 usecs [ 3.752015] <7>.(7)[1:swapper/0]calling ppp_mppe_init+0x0/0xd0 @ 1 [ 3.752814] <7>.(7)[1:swapper/0]PPP MPPE Compression module registered [ 3.753629] <7>.(7)[1:swapper/0]initcall ppp_mppe_init+0x0/0xd0 returned 0 after 812 usecs [ 3.754658] <7>.(7)[1:swapper/0]calling ppp_sync_init+0x0/0x48 @ 1 [ 3.755442] <7>.(7)[1:swapper/0]initcall ppp_sync_init+0x0/0x48 returned 0 after 0 usecs [ 3.756450] <7>.(7)[1:swapper/0]calling pppox_init+0x0/0x1c @ 1 [ 3.757199] <7>.(7)[1:swapper/0]NET: Registered protocol family 24 [ 3.757970] <7>.(7)[1:swapper/0]initcall pppox_init+0x0/0x1c returned 0 after 753 usecs [ 3.758966] <7>.(7)[1:swapper/0]calling pppoe_init+0x0/0x9c @ 1 [ 3.759729] <7>.(7)[1:swapper/0]initcall pppoe_init+0x0/0x9c returned 0 after 9 usecs [ 3.760705] <7>.(7)[1:swapper/0]calling pptp_init_module+0x0/0xdc @ 1 [ 3.761519] <7>.(7)[1:swapper/0]PPTP driver version 0.8.5 [ 3.762398] <7>.(7)[1:swapper/0]initcall pptp_init_module+0x0/0xdc returned 0 after 856 usecs [ 3.763467] <7>.(7)[1:swapper/0]calling asix_driver_init+0x0/0x28 @ 1 [ 3.764304] <7>.(7)[1:swapper/0]usbcore: registered new interface driver asix [ 3.765122] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.765194] <7>.(7)[1:swapper/0]initcall asix_driver_init+0x0/0x28 returned 0 after 891 usecs [ 3.765200] <7>.(7)[1:swapper/0]calling ax88179_178a_driver_init+0x0/0x28 @ 1 [ 3.768118] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ax88179_178a [ 3.769094] <7>.(7)[1:swapper/0]initcall ax88179_178a_driver_init+0x0/0x28 returned 0 after 977 usecs [ 3.770243] <7>.(7)[1:swapper/0]calling cdc_driver_init+0x0/0x28 @ 1 [ 3.771056] <7>.(7)[1:swapper/0]usbcore: registered new interface driver cdc_ether [ 3.771999] <7>.(7)[1:swapper/0]initcall cdc_driver_init+0x0/0x28 returned 0 after 930 usecs [ 3.773050] <7>.(7)[1:swapper/0]calling net1080_driver_init+0x0/0x28 @ 1 [ 3.773901] <7>.(7)[1:swapper/0]usbcore: registered new interface driver net1080 [ 3.774823] <7>.(7)[1:swapper/0]initcall net1080_driver_init+0x0/0x28 returned 0 after 904 usecs [ 3.775920] <7>.(7)[1:swapper/0]calling cdc_subset_driver_init+0x0/0x28 @ 1 [ 3.776806] <7>.(7)[1:swapper/0]usbcore: registered new interface driver cdc_subset [ 3.777759] <7>.(7)[1:swapper/0]initcall cdc_subset_driver_init+0x0/0x28 returned 0 after 937 usecs [ 3.778885] <7>.(7)[1:swapper/0]calling zaurus_driver_init+0x0/0x28 @ 1 [ 3.779728] <7>.(7)[1:swapper/0]usbcore: registered new interface driver zaurus [ 3.780639] <7>.(7)[1:swapper/0]initcall zaurus_driver_init+0x0/0x28 returned 0 after 894 usecs [ 3.781722] <7>.(7)[1:swapper/0]calling usbnet_init+0x0/0x40 @ 1 [ 3.781788] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.782486] <7>.(7)[1:swapper/0]initcall usbnet_init+0x0/0x40 returned 0 after 2 usecs [ 3.784406] <7>.(7)[1:swapper/0]calling cdc_ncm_driver_init+0x0/0x28 @ 1 [ 3.785263] <7>.(7)[1:swapper/0]usbcore: registered new interface driver cdc_ncm [ 3.786185] <7>.(7)[1:swapper/0]initcall cdc_ncm_driver_init+0x0/0x28 returned 0 after 910 usecs [ 3.787283] <7>.(7)[1:swapper/0]calling mtu3_driver_init+0x0/0x20 @ 1 [ 3.788238] <7>.(7)[1:swapper/0]mtu3 usb: Linked as a consumer to regulator.19 [ 3.789222] <7>.(7)[1:swapper/0]mtu3 usb: usb supply vbus not found, using dummy regulator [ 3.790267] <7>.(7)[1:swapper/0]mtu3 usb: Linked as a consumer to regulator.0 [ 3.791164] <7>.(7)[1:swapper/0]mtu3 usb: dr_mode: 3, is_u3_dr: 1, u3p_dis_msk: 0, drd: auto [ 3.792260] <7>.(7)[1:swapper/0]mtk-tphy usb-phy0: u2_phy_pll_26m_set [ 3.793078] <7>.(7)[1:swapper/0]phy phy-usb-phy0.1: u2_phy_props_set, bc12:0, src:0, vrt:0, term:0, rev6:1, dis:0 [ 3.794448] <7>.(7)[1:swapper/0]mtk-tphy usb-phy0: u2_phy_instance_set_mode_ext submode(2) [ 3.795502] <7>.(7)[1:swapper/0]mtu3 usb: irq 290 [ 3.796099] <7>.(7)[1:swapper/0]mtu3 usb: IP version 0x1006(U3 IP) [ 3.796983] <7>.(7)[1:swapper/0]mtu3 usb: fifosz/epnum: Tx=0x4000/8, Rx=0x4000/8 [ 3.797916] <7>.(7)[1:swapper/0]mtu3 usb: max_speed: super- speed-plus [ 3.798454] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.798724] <7>.(7)[1:swapper/0]mtu3 usb: dma mask: 36 bits [ 3.801312] <7>.(7)[1:swapper/0]mtu3 usb: role_sw_set role 0 [ 3.802021] <7>.(7)[1:swapper/0]mtu3 usb: mailbox ID_FLOAT [ 3.802706] <7>.(7)[1:swapper/0]mtu3 usb: clk already enabled [ 3.803429] <7>.(7)[1:swapper/0]mtu3 usb: phy already enabled [ 3.804285] <7>.(7)[1:swapper/0]BOOTPROF: 3804.284162:probe: probe=platform_drv_probe drv=mtu3(0xffffff8009607dd8) 16.101384ms [ 3.805797] <7>.(7)[1:swapper/0]probe of usb returned 1 after 17663 usecs [ 3.806694] <7>.(7)[1:swapper/0]mtu3 usb1: Linked as a consumer to regulator.19 [ 3.807667] <7>.(7)[1:swapper/0]mtu3 usb1: Linked as a consumer to regulator.2 [ 3.808568] <7>.(7)[1:swapper/0]mtu3 usb1: dr_mode: 1, is_u3_dr: 0, u3p_dis_msk: 0, drd: auto [ 3.809643] <7>.(7)[1:swapper/0]mtk-tphy usb-phy2: u2_phy_pll_26m_set [ 3.810457] <7>.(7)[1:swapper/0]phy phy-usb-phy2.0: u2_phy_props_set, bc12:0, src:0, vrt:0, term:0, rev6:1, dis:0 [ 3.811760] <7>.(7)[1:swapper/0]mtk-tphy usb-phy2: u2_phy_instance_set_mode_ext submode(2) [ 3.813036] <7>.(7)[1:swapper/0]platform 112a0000.xhci1: Linked as a consumer to 11003000.syscon [ 3.814133] <7>.(7)[1:swapper/0]platform 112a0000.xhci1: Linked as a consumer to usb-phy2 [ 3.815119] <2>-(2)[0:swapper/2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.815281] <7>.(7)[1:swapper/0]mtu3 usb1: xHCI platform device register success... [ 3.817050] <7>.(7)[1:swapper/0]probe of usb1 returned 1 after 10401 usecs [ 3.818059] <7>.(7)[1:swapper/0]BOOTPROF: 3818.057700:initcall: mtu3_driver_init 29.959154ms [ 3.819204] <7>.(7)[1:swapper/0]initcall mtu3_driver_init+0x0/0x20 returned 0 after 30377 usecs [ 3.820287] <7>.(7)[1:swapper/0]calling xhci_hcd_init+0x0/0x28 @ 1 [ 3.821073] <7>.(7)[1:swapper/0]initcall xhci_hcd_init+0x0/0x28 returned 0 after 3 usecs [ 3.822081] <7>.(7)[1:swapper/0]calling xhci_pci_init+0x0/0x68 @ 1 [ 3.822888] <7>.(7)[1:swapper/0]initcall xhci_pci_init+0x0/0x68 returned 0 after 23 usecs [ 3.823911] <7>.(7)[1:swapper/0]calling xhci_mtk_init+0x0/0x34 @ 1 [ 3.824729] <7>.(7)[1:swapper/0]probe of 11290000.xhci30 returned -517 after 0 usecs [ 3.825811] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: 112a0000.xhci1 supply vbus not found, using dummy regulator [ 3.827146] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: Linked as a consumer to regulator.0 [ 3.828200] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: 112a0000.xhci1 supply vusb33 not found, using dummy regulator [ 3.829751] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: xHCI Host Controller [ 3.830648] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: new USB bus registered, assigned bus number 1 [ 3.831785] <3>-(3)[0:swapper/3]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.832035] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: hcc params 0x01400f99 hci version 0x110 quirks 0x0000000000210010 [ 3.834130] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: irq 465, io mem 0x112a0000 [ 3.835624] <7>.(7)[1:swapper/0]hub 1-0:1.0: USB hub found [ 3.836320] <7>.(7)[1:swapper/0]hub 1-0:1.0: 1 port detected [ 3.837232] <7>.(7)[1:swapper/0]probe of 1-0:1.0 returned 1 after 1614 usecs [ 3.838286] <7>.(7)[1:swapper/0]probe of usb1 returned 1 after 2866 usecs [ 3.839309] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: xHCI Host Controller [ 3.840201] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: new USB bus registered, assigned bus number 2 [ 3.841363] <7>.(7)[1:swapper/0]xhci-mtk 112a0000.xhci1: Host supports USB 3.0 SuperSpeed [ 3.842396] <7>.(7)[1:swapper/0]usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 3.844018] <7>.(7)[1:swapper/0]hub 2-0:1.0: USB hub found [ 3.844709] <7>.(7)[1:swapper/0]hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19) [ 3.845823] <7>.(7)[1:swapper/0]probe of 2-0:1.0 returned 0 after 1808 usecs [ 3.846878] <7>.(7)[1:swapper/0]probe of usb2 returned 1 after 3043 usecs [ 3.847915] <7>.(7)[1:swapper/0]BOOTPROF: 3847.913931:probe: probe=platform_drv_probe drv=xhci- mtk(0xffffff800960b2d8) 22.114539ms [ 3.848450] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.849467] <7>.(7)[1:swapper/0]probe of 112a0000.xhci1 returned 1 after 23680 usecs [ 3.851372] <7>.(7)[1:swapper/0]BOOTPROF: 3851.370931:initcall: xhci_mtk_init 26.677616ms [ 3.852477] <7>.(7)[1:swapper/0]initcall xhci_mtk_init+0x0/0x34 returned 0 after 27133 usecs [ 3.853528] <7>.(7)[1:swapper/0]calling usb_storage_driver_init+0x0/0x40 @ 1 [ 3.854442] <7>.(7)[1:swapper/0]usbcore: registered new interface driver usb-storage [ 3.855412] <7>.(7)[1:swapper/0]initcall usb_storage_driver_init+0x0/0x40 returned 0 after 970 usecs [ 3.856549] <7>.(7)[1:swapper/0]calling alauda_driver_init+0x0/0x40 @ 1 [ 3.857396] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-alauda [ 3.858350] <7>.(7)[1:swapper/0]initcall alauda_driver_init+0x0/0x40 returned 0 after 942 usecs [ 3.859437] <7>.(7)[1:swapper/0]calling cypress_driver_init+0x0/0x40 @ 1 [ 3.860290] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-cypress [ 3.861254] <7>.(7)[1:swapper/0]initcall cypress_driver_init+0x0/0x40 returned 0 after 948 usecs [ 3.862348] <7>.(7)[1:swapper/0]calling datafab_driver_init+0x0/0x40 @ 1 [ 3.863205] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-datafab [ 3.864171] <7>.(7)[1:swapper/0]initcall datafab_driver_init+0x0/0x40 returned 0 after 950 usecs [ 3.865116] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.865265] <7>.(7)[1:swapper/0]calling freecom_driver_init+0x0/0x40 @ 1 [ 3.867052] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-freecom [ 3.868018] <7>.(7)[1:swapper/0]initcall freecom_driver_init+0x0/0x40 returned 0 after 954 usecs [ 3.869113] <7>.(7)[1:swapper/0]calling isd200_driver_init+0x0/0x40 @ 1 [ 3.869956] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-isd200 [ 3.870911] <7>.(7)[1:swapper/0]initcall isd200_driver_init+0x0/0x40 returned 0 after 939 usecs [ 3.871999] <7>.(7)[1:swapper/0]calling jumpshot_driver_init+0x0/0x40 @ 1 [ 3.872860] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-jumpshot [ 3.873836] <7>.(7)[1:swapper/0]initcall jumpshot_driver_init+0x0/0x40 returned 0 after 958 usecs [ 3.874941] <7>.(7)[1:swapper/0]calling karma_driver_init+0x0/0x40 @ 1 [ 3.875775] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-karma [ 3.876720] <7>.(7)[1:swapper/0]initcall karma_driver_init+0x0/0x40 returned 0 after 927 usecs [ 3.877793] <7>.(7)[1:swapper/0]calling onetouch_driver_init+0x0/0x40 @ 1 [ 3.878655] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-onetouch [ 3.879634] <7>.(7)[1:swapper/0]initcall onetouch_driver_init+0x0/0x40 returned 0 after 961 usecs [ 3.880739] <7>.(7)[1:swapper/0]calling sddr09_driver_init+0x0/0x40 @ 1 [ 3.881579] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-sddr09 [ 3.881784] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.882534] <7>.(7)[1:swapper/0]initcall sddr09_driver_init+0x0/0x40 returned 0 after 936 usecs [ 3.884552] <7>.(7)[1:swapper/0]calling sddr55_driver_init+0x0/0x40 @ 1 [ 3.885393] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-sddr55 [ 3.886347] <7>.(7)[1:swapper/0]initcall sddr55_driver_init+0x0/0x40 returned 0 after 937 usecs [ 3.887434] <7>.(7)[1:swapper/0]calling usbat_driver_init+0x0/0x40 @ 1 [ 3.888266] <7>.(7)[1:swapper/0]usbcore: registered new interface driver ums-usbat [ 3.889209] <7>.(7)[1:swapper/0]initcall usbat_driver_init+0x0/0x40 returned 0 after 927 usecs [ 3.890282] <7>.(7)[1:swapper/0]calling tv_driver_init+0x0/0x28 @ 1 [ 3.891084] <7>.(7)[1:swapper/0]usbcore: registered new interface driver trancevibrator [ 3.892081] <7>.(7)[1:swapper/0]initcall tv_driver_init+0x0/0x28 returned 0 after 979 usecs [ 3.893122] <7>.(7)[1:swapper/0]calling gadget_cfs_init+0x0/0x60 @ 1 [ 3.893943] <7>.(7)[1:swapper/0]initcall gadget_cfs_init+0x0/0x60 returned 0 after 17 usecs [ 3.894984] <7>.(7)[1:swapper/0]calling acmmod_init+0x0/0x1c @ 1 [ 3.895749] <7>.(7)[1:swapper/0]usb_function_register name=acm [ 3.896477] <7>.(7)[1:swapper/0]initcall acmmod_init+0x0/0x1c returned 0 after 711 usecs [ 3.897488] <7>.(7)[1:swapper/0]calling userial_init+0x0/0x1d0 @ 1 [ 3.898276] <7>.(7)[1:swapper/0]initcall userial_init+0x0/0x1d0 returned 0 after 6 usecs [ 3.899285] <7>-(7)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.900221] <7>.(7)[1:swapper/0]calling gsermod_init+0x0/0x1c @ 1 [ 3.900992] <7>.(7)[1:swapper/0]usb_function_register name=gser [ 3.901731] <7>.(7)[1:swapper/0]initcall gsermod_init+0x0/0x1c returned 0 after 721 usecs [ 3.902750] <7>.(7)[1:swapper/0]calling gether_init+0x0/0xfc @ 1 [ 3.903644] <7>.(7)[1:swapper/0]initcall gether_init+0x0/0xfc returned 0 after 126 usecs [ 3.904652] <7>.(7)[1:swapper/0]calling rndismod_init+0x0/0x1c @ 1 [ 3.905432] <7>.(7)[1:swapper/0]usb_function_register name=rndis [ 3.906182] <7>.(7)[1:swapper/0]initcall rndismod_init+0x0/0x1c returned 0 after 731 usecs [ 3.907217] <7>.(7)[1:swapper/0]calling mass_storagemod_init+0x0/0x1c @ 1 [ 3.908074] <7>.(7)[1:swapper/0]usb_function_register name=mass_storage [ 3.908899] <7>.(7)[1:swapper/0]initcall mass_storagemod_init+0x0/0x1c returned 0 after 805 usecs [ 3.910005] <7>.(7)[1:swapper/0]calling ffsmod_init+0x0/0x1c @ 1 [ 3.910765] <7>.(7)[1:swapper/0]usb_function_register name=ffs [ 3.911495] <7>.(7)[1:swapper/0]initcall ffsmod_init+0x0/0x1c returned 0 after 712 usecs [ 3.912504] <7>.(7)[1:swapper/0]calling midimod_init+0x0/0x1c @ 1 [ 3.913275] <7>.(7)[1:swapper/0]usb_function_register name=midi [ 3.914013] <7>.(7)[1:swapper/0]initcall midimod_init+0x0/0x1c returned 0 after 720 usecs [ 3.915031] <7>.(7)[1:swapper/0]calling hidmod_init+0x0/0x1c @ 1 [ 3.915123] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.915795] <7>.(7)[1:swapper/0]usb_function_register name=hid [ 3.917454] <7>.(7)[1:swapper/0]initcall hidmod_init+0x0/0x1c returned 0 after 1620 usecs [ 3.918472] <7>.(7)[1:swapper/0]calling accessorymod_init+0x0/0x1c @ 1 [ 3.919299] <7>.(7)[1:swapper/0]usb_function_register name=accessory [ 3.920092] <7>.(7)[1:swapper/0]initcall accessorymod_init+0x0/0x1c returned 0 after 772 usecs [ 3.921164] <7>.(7)[1:swapper/0]calling audio_sourcemod_init+0x0/0x1c @ 1 [ 3.922021] <7>.(7)[1:swapper/0]usb_function_register name=audio_source [ 3.922846] <7>.(7)[1:swapper/0]initcall audio_sourcemod_init+0x0/0x1c returned 0 after 805 usecs [ 3.923953] <7>.(7)[1:swapper/0]calling mtpmod_init+0x0/0x1c @ 1 [ 3.924713] <7>.(7)[1:swapper/0]usb_function_register name=mtp [ 3.925442] <7>.(7)[1:swapper/0]initcall mtpmod_init+0x0/0x1c returned 0 after 710 usecs [ 3.926450] <7>.(7)[1:swapper/0]calling ptpmod_init+0x0/0x1c @ 1 [ 3.927212] <7>.(7)[1:swapper/0]usb_function_register name=ptp [ 3.927940] <7>.(7)[1:swapper/0]initcall ptpmod_init+0x0/0x1c returned 0 after 710 usecs [ 3.928948] <7>.(7)[1:swapper/0]calling input_leds_init+0x0/0x1c @ 1 [ 3.929753] <7>.(7)[1:swapper/0]initcall input_leds_init+0x0/0x1c returned 0 after 2 usecs [ 3.930782] <7>.(7)[1:swapper/0]calling evdev_init+0x0/0x1c @ 1 [ 3.931534] <7>.(7)[1:swapper/0]initcall evdev_init+0x0/0x1c returned 0 after 0 usecs [ 3.931787] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.932513] <7>.(7)[1:swapper/0]calling pmic_keys_pdrv_init+0x0/0x20 @ 1 [ 3.934744] <7>.(7)[1:swapper/0]input: mtk-pmic-keys as /devices/platform/10024000.pwrap/10024000.pwrap:mt6359/mtk-pmic- keys/input/input0 [ 3.936487] <7>.(7)[1:swapper/0]probe of mtk-pmic-keys returned 1 after 2033 usecs [ 3.937437] <7>.(7)[1:swapper/0]initcall pmic_keys_pdrv_init+0x0/0x20 returned 0 after 3073 usecs [ 3.938542] <7>.(7)[1:swapper/0]calling xpad_driver_init+0x0/0x28 @ 1 [ 3.939383] <7>.(7)[1:swapper/0]usbcore: registered new interface driver xpad [ 3.940274] <7>.(7)[1:swapper/0]initcall xpad_driver_init+0x0/0x28 returned 0 after 886 usecs [ 3.941336] <7>.(7)[1:swapper/0]calling uinput_misc_init+0x0/0x1c @ 1 [ 3.942332] <7>.(7)[1:swapper/0]initcall uinput_misc_init+0x0/0x1c returned 0 after 176 usecs [ 3.943400] <7>.(7)[1:swapper/0]calling mtk_i2c_driver_init+0x0/0x20 @ 1 [ 3.944836] <7>.(7)[1:swapper/0]i2c 6-0034: Linked as a consumer to 10005000.pinctrl [ 3.948451] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.951508] <7>-(7)[1:swapper/0]Perf order domain is not ready! [ 3.951715] <7>.(7)[1:swapper/0]probe of 6-001a returned 1 after 11 usecs [ 3.953470] <7>.(7)[1:swapper/0]probe of 6-0064 returned 1 after 5 usecs [ 3.954845] <7>.(7)[1:swapper/0]platform odm:extcon_usb: Linked as a consumer to mt6360_chg.2.auto [ 3.955992] <7>.(7)[1:swapper/0]platform mt6360_chg.2.auto: Linked as a consumer to usb-phy0 [ 3.957577] <7>.(7)[1:swapper/0]mt6360_regulator mt6360_pmic.4.auto: DMA mask not set [ 3.965119] <3>-(3)[0:swapper/3]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.981783] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 3.998452] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.003505] <7>.(7)[1:swapper/0]mt6360_regulator mt6360_pmic.4.auto: Successfully probed [ 4.004521] <7>.(7)[1:swapper/0]BOOTPROF: 4004.520470:probe: probe=platform_drv_probe drv=mt6360_regulator(0xffffff80095be858) 45.958230ms [ 4.006161] <7>.(7)[1:swapper/0]probe of mt6360_pmic.4.auto returned 1 after 48590 usecs [ 4.007433] <7>.(7)[1:swapper/0]mt6360_regulator mt6360_ldo.5.auto: DMA mask not set [ 4.015117] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.031784] <7>-(7)[0:swapper/7]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.037204] <4>.(4)[1:swapper/0]mt6360_regulator mt6360_ldo.5.auto: Successfully probed [ 4.038205] <4>.(4)[1:swapper/0]BOOTPROF: 4038.204239:probe: probe=platform_drv_probe drv=mt6360_regulator(0xffffff80095be858) 29.799231ms [ 4.039849] <4>.(4)[1:swapper/0]probe of mt6360_ldo.5.auto returned 1 after 32419 usecs [ 4.041198] <4>.(4)[1:swapper/0]mt6360_pmu 6-0034: Successfully probed [ 4.042018] <4>.(4)[1:swapper/0]BOOTPROF: 4042.017470:probe: probe=i2c_device_probe drv=mt6360_pmu(0xffffff80095fba68) 96.130923ms [ 4.043571] <4>.(4)[1:swapper/0]mt6360_pmu 6-0034: Dropping the link to usb-phy0 [ 4.044502] <4>.(4)[1:swapper/0]probe of 6-0034 returned 1 after 98658 usecs [ 4.045545] <4>.(4)[1:swapper/0]i2c 6-004e: Linked as a consumer to 6-0034 [ 4.046433] <4>.(4)[1:swapper/0]BOOTPROF: 4046.432470:probe: probe=platform_drv_probe drv=i2c- mt65xx(0xffffff8009618770) 102.075769ms [ 4.048007] <4>.(4)[1:swapper/0]i2c-mt65xx 11d01000.i2c: Dropping the link to usb-phy0 [ 4.048449] <7>-(7)[0:swapper/7]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.048997] <4>.(4)[1:swapper/0]probe of 11d01000.i2c returned 1 after 104690 usecs [ 4.051420] <4>.(4)[1:swapper/0]i2c 0-001a: Linked as a consumer to 10005000.pinctrl [ 4.052394] <4>.(4)[1:swapper/0]i2c 0-001a: Linked as a consumer to mt6359-regulator [ 4.053360] <4>.(4)[1:swapper/0]i2c 0-001a: Linked as a consumer to 10000000.syscon [ 4.054682] <4>.(4)[1:swapper/0]i2c-mt65xx 11e00000.i2c: Dropping the link to 10000000.syscon [ 4.055750] <4>.(4)[1:swapper/0]i2c-mt65xx 11e00000.i2c: Dropping the link to mt6359-regulator [ 4.056827] <4>.(4)[1:swapper/0]probe of 11e00000.i2c returned 1 after 5943 usecs [ 4.058188] <4>.(4)[1:swapper/0]i2c 1-0010: Linked as a consumer to 10005000.pinctrl [ 4.059175] <4>.(4)[1:swapper/0]i2c 1-0010: Linked as a consumer to mt6359-regulator [ 4.060140] <4>.(4)[1:swapper/0]i2c 1-0010: Linked as a consumer to 10000000.syscon [ 4.061280] <4>.(4)[1:swapper/0]i2c-mt65xx 11e01000.i2c: Dropping the link to 10000000.syscon [ 4.062342] <4>.(4)[1:swapper/0]i2c-mt65xx 11e01000.i2c: Dropping the link to mt6359-regulator [ 4.063431] <4>.(4)[1:swapper/0]probe of 11e01000.i2c returned 1 after 5670 usecs [ 4.064794] <4>.(4)[1:swapper/0][KE/NT50358A] name=nt50358a addr=0x3e [ 4.065124] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.065603] <4>.(4)[1:swapper/0]probe of 2-003e returned 1 after 818 usecs [ 4.067401] <4>.(4)[1:swapper/0]probe of 11e02000.i2c returned 1 after 3036 usecs [ 4.068740] <4>.(4)[1:swapper/0]i2c 3-002c: Linked as a consumer to odm:audio_power [ 4.069720] <4>.(4)[1:swapper/0]i2c 3-002c: Linked as a consumer to 10006000.syscon:power-controller [ 4.070858] <4>.(4)[1:swapper/0]i2c 3-002c: Linked as a consumer to 10890000.syscon:audio-controller [ 4.072170] <4>.(4)[1:swapper/0]i2c 3-004d: Linked as a consumer to odm:audio_power [ 4.073126] <4>.(4)[1:swapper/0]i2c 3-004d: Linked as a consumer to 10006000.syscon:power-controller [ 4.074263] <4>.(4)[1:swapper/0]i2c 3-004d: Linked as a consumer to 10890000.syscon:audio-controller [ 4.075414] <4>.(4)[1:swapper/0]i2c-mt65xx 11e03000.i2c: Dropping the link to 10006000.syscon:power-controller [ 4.076658] <4>.(4)[1:swapper/0]i2c-mt65xx 11e03000.i2c: Dropping the link to odm:audio_power [ 4.077720] <4>.(4)[1:swapper/0]i2c-mt65xx 11e03000.i2c: Dropping the link to 10890000.syscon:audio-controller [ 4.078969] <4>.(4)[1:swapper/0]probe of 11e03000.i2c returned 1 after 10633 usecs [ 4.080197] <4>.(4)[1:swapper/0]platform 11021000.ethernet: Linked as a consumer to 4-0022 [ 4.081278] <4>.(4)[1:swapper/0]platform odm:fusb304: Linked as a consumer to 4-0022 [ 4.081785] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.082257] <4>.(4)[1:swapper/0]i2c 0-001a: Linked as a consumer to 4-0022 [ 4.084066] <4>.(4)[1:swapper/0]i2c 1-0010: Linked as a consumer to 4-0022 [ 4.084957] <4>.(4)[1:swapper/0]i2c 4-0022: Linked as a consumer to 10005000.pinctrl [ 4.085969] <4>.(4)[1:swapper/0]pca953x 4-0022: GPIO lookup for consumer reset [ 4.086868] <4>.(4)[1:swapper/0]pca953x 4-0022: using device tree for GPIO lookup [ 4.087816] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/i2c@11e04000/gpio-pcal6534@22[0]' - status (0) [ 4.089435] <4>.(4)[1:swapper/0]gpio gpiochip0: Persistence not supported for GPIO 4 [ 4.090420] <4>.(4)[1:swapper/0]pca953x 4-0022: 4-0022 supply vcc not found, using dummy regulator [ 4.091572] <4>.(4)[1:swapper/0]pca953x 4-0022: Linked as a consumer to regulator.0 [ 4.094848] <4>-(4)[1:swapper/0]gpiochip_find_base: found new base at 313 [ 4.095794] <4>.(4)[1:swapper/0]gpio gpiochip1: (pcal6534): added GPIO chardev (254:1) [ 4.096874] <4>.(4)[1:swapper/0]gpiochip_setup_dev: registered GPIOs 313 to 346 on device: gpiochip1 (pcal6534) [ 4.098450] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.099456] <4>-(4)[1:swapper/0]Perf order domain is not ready! [ 4.099476] <4>.(4)[1:swapper/0]probe of 4-0022 returned 1 after 13547 usecs [ 4.101156] <4>.(4)[1:swapper/0]platform odm:mt8570_sound: Linked as a consumer to 4-0023 [ 4.102178] <4>.(4)[1:swapper/0]platform odm:consys7921: Linked as a consumer to 4-0023 [ 4.103188] <4>.(4)[1:swapper/0]platform hifi4dsp_8570: Linked as a consumer to 4-0023 [ 4.104183] <4>.(4)[1:swapper/0]i2c 3-002c: Linked as a consumer to 4-0023 [ 4.105047] <4>.(4)[1:swapper/0]i2c 3-004d: Linked as a consumer to 4-0023 [ 4.105908] <4>.(4)[1:swapper/0]i2c 4-0023: Linked as a consumer to 10005000.pinctrl [ 4.106911] <4>.(4)[1:swapper/0]pca953x 4-0023: GPIO lookup for consumer reset [ 4.107817] <4>.(4)[1:swapper/0]pca953x 4-0023: using device tree for GPIO lookup [ 4.108755] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/i2c@11e04000 /gpio-pcal6534@23[0]' [ 4.110282] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/i2c@11e04000/gpio-pcal6534@23 [0]' [ 4.111800] <4>.(4)[1:swapper/0]pca953x 4-0023: using lookup tables for GPIO lookup [ 4.112754] <4>.(4)[1:swapper/0]pca953x 4-0023: No GPIO consumer reset found [ 4.113641] <4>.(4)[1:swapper/0]pca953x 4-0023: 4-0023 supply vcc not found, using dummy regulator [ 4.114773] <4>.(4)[1:swapper/0]pca953x 4-0023: Linked as a consumer to regulator.0 [ 4.115117] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.118048] <6>-(6)[1:swapper/0]gpiochip_find_base: found new base at 279 [ 4.118922] <6>.(6)[1:swapper/0]gpio gpiochip2: (pcal6534): added GPIO chardev (254:2) [ 4.119933] <6>.(6)[1:swapper/0]gpiochip_setup_dev: registered GPIOs 279 to 312 on device: gpiochip2 (pcal6534) [ 4.122058] <4>-(4)[1:swapper/0]Perf order domain is not ready! [ 4.122077] <4>.(4)[1:swapper/0]BOOTPROF: 4122.075855:probe: probe=i2c_device_probe drv=pca953x(0xffffff80095aa418) 15.168154ms [ 4.124342] <4>.(4)[1:swapper/0]probe of 4-0023 returned 1 after 17463 usecs [ 4.125240] <4>.(4)[1:swapper/0]i2c 4-0020: Linked as a consumer to 10005000.pinctrl [ 4.126241] <4>.(4)[1:swapper/0]pca953x 4-0020: GPIO lookup for consumer reset [ 4.127147] <4>.(4)[1:swapper/0]pca953x 4-0020: using device tree for GPIO lookup [ 4.128081] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/i2c@11e04000 /gpio-pcal6534@20[0]' [ 4.129607] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/i2c@11e04000/gpio-pcal6534@20 [0]' [ 4.131123] <4>.(4)[1:swapper/0]pca953x 4-0020: using lookup tables for GPIO lookup [ 4.131789] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.132080] <4>.(4)[1:swapper/0]pca953x 4-0020: No GPIO consumer reset found [ 4.133898] <4>.(4)[1:swapper/0]pca953x 4-0020: 4-0020 supply vcc not found, using dummy regulator [ 4.135026] <4>.(4)[1:swapper/0]pca953x 4-0020: Linked as a consumer to regulator.0 [ 4.138303] <4>-(4)[1:swapper/0]gpiochip_find_base: found new base at 245 [ 4.139173] <4>.(4)[1:swapper/0]gpio gpiochip3: (pcal6534): added GPIO chardev (254:3) [ 4.140170] <4>.(4)[1:swapper/0]gpiochip_setup_dev: registered GPIOs 245 to 278 on device: gpiochip3 (pcal6534) [ 4.142287] <5>-(5)[1:swapper/0]Perf order domain is not ready! [ 4.142304] <5>.(5)[1:swapper/0]BOOTPROF: 4142.303470:probe: probe=i2c_device_probe drv=pca953x(0xffffff80095aa418) 16.064769ms [ 4.144584] <5>.(5)[1:swapper/0]probe of 4-0020 returned 1 after 18371 usecs [ 4.145468] <5>.(5)[1:swapper/0]BOOTPROF: 4145.467547:probe: probe=platform_drv_probe drv=i2c- mt65xx(0xffffff8009618770) 65.505000ms [ 4.147039] <5>.(5)[1:swapper/0]probe of 11e04000.i2c returned 1 after 67121 usecs [ 4.148278] <5>.(5)[1:swapper/0]BOOTPROF: 4148.277855:initcall: mtk_i2c_driver_init 204.026616ms [ 4.149449] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.150384] <5>.(5)[1:swapper/0]initcall mtk_i2c_driver_init+0x0/0x20 returned 0 after 201305 usecs [ 4.151517] <5>.(5)[1:swapper/0]calling mtk_vcu_driver_init+0x0/0x20 @ 1 [ 4.152517] <5>.(5)[1:swapper/0]probe of 18000000.vcu returned -517 after 0 usecs [ 4.153547] <5>.(5)[1:swapper/0]initcall mtk_vcu_driver_init+0x0/0x20 returned 0 after 1154 usecs [ 4.154651] <5>.(5)[1:swapper/0]calling mtk_vcodec_dec_driver_init+0x0/0x20 @ 1 [ 4.155728] <5>.(5)[1:swapper/0]probe of 18000000.vdec returned -517 after 0 usecs [ 4.156781] <5>.(5)[1:swapper/0]initcall mtk_vcodec_dec_driver_init+0x0/0x20 returned 0 after 1173 usecs [ 4.157962] <5>.(5)[1:swapper/0]calling mtk_vdec_larb_driver_init+0x0/0x20 @ 1 [ 4.158954] <5>.(5)[1:swapper/0]probe of vdec_l21 returned -517 after 0 usecs [ 4.159849] <5>.(5)[1:swapper/0]probe of vdec_l22 returned -517 after 0 usecs [ 4.160739] <5>.(5)[1:swapper/0]probe of vdec_l23 returned -517 after 0 usecs [ 4.161629] <5>.(5)[1:swapper/0]probe of vdec_l24 returned -517 after 0 usecs [ 4.162532] <5>.(5)[1:swapper/0]initcall mtk_vdec_larb_driver_init+0x0/0x20 returned 0 after 3572 usecs [ 4.163706] <5>.(5)[1:swapper/0]calling mtk_vcodec_enc_driver_init+0x0/0x20 @ 1 [ 4.164783] <5>.(5)[1:swapper/0]probe of 1a020000.venc returned -517 after 0 usecs [ 4.165122] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.165804] <5>.(5)[1:swapper/0]initcall mtk_vcodec_enc_driver_init+0x0/0x20 returned 0 after 1147 usecs [ 4.167847] <5>.(5)[1:swapper/0]calling mtk_venc_larb_driver_init+0x0/0x20 @ 1 [ 4.168836] <5>.(5)[1:swapper/0]probe of venc_l19 returned -517 after 0 usecs [ 4.169727] <5>.(5)[1:swapper/0]probe of venc_l20 returned -517 after 0 usecs [ 4.170630] <5>.(5)[1:swapper/0]initcall mtk_venc_larb_driver_init+0x0/0x20 returned 0 after 1827 usecs [ 4.171805] <5>.(5)[1:swapper/0]calling mtk_jpeg_driver_init+0x0/0x20 @ 1 [ 4.172765] <5>.(5)[1:swapper/0]probe of 1a030000.jpgenc returned -517 after 0 usecs [ 4.173730] <5>.(5)[1:swapper/0]probe of 1a040000.jpgdec returned -517 after 0 usecs [ 4.174696] <5>.(5)[1:swapper/0]probe of 1a050000.jpgdec returned -517 after 0 usecs [ 4.175668] <5>.(5)[1:swapper/0]probe of 1b030000.jpgenc returned -517 after 0 usecs [ 4.176634] <5>.(5)[1:swapper/0]probe of 1b040000.jpgdec returned -517 after 0 usecs [ 4.177651] <5>.(5)[1:swapper/0]initcall mtk_jpeg_driver_init+0x0/0x20 returned 0 after 4870 usecs [ 4.178767] <5>.(5)[1:swapper/0]calling mtk_hcp_driver_init+0x0/0x20 @ 1 [ 4.179676] <5>.(5)[1:swapper/0]probe of hcp@0 returned -517 after 0 usecs [ 4.180551] <5>.(5)[1:swapper/0]initcall mtk_hcp_driver_init+0x0/0x20 returned 0 after 910 usecs [ 4.181646] <5>.(5)[1:swapper/0]calling mtk_imgsys_driver_init+0x0/0x20 @ 1 [ 4.182526] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.183500] <5>.(5)[1:swapper/0]probe of 15000000.imgsys_fw returned -517 after 0 usecs [ 4.184542] <5>.(5)[1:swapper/0]initcall mtk_imgsys_driver_init+0x0/0x20 returned 0 after 1052 usecs [ 4.185680] <5>.(5)[1:swapper/0]calling mtk_imgsys_me_driver_init+0x0/0x20 @ 1 [ 4.186628] <5>.(5)[1:swapper/0]probe of 15320000.ipesys_me returned -517 after 0 usecs [ 4.187666] <5>.(5)[1:swapper/0]initcall mtk_imgsys_me_driver_init+0x0/0x20 returned 0 after 1049 usecs [ 4.188837] <5>.(5)[1:swapper/0]calling mtk_cam_init+0x0/0x20 @ 1 [ 4.189705] <5>.(5)[1:swapper/0]mtk-cam 16000000.camisp: mtk_cam_probe [ 4.190661] <5>.(5)[1:swapper/0]probe of camisp_l13 returned -517 after 0 usecs [ 4.191581] <5>.(5)[1:swapper/0]probe of camisp_l14 returned -517 after 0 usecs [ 4.192899] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_0: ctx->port = 0 [ 4.193941] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_0: read csi efuse returned with error cell -1 [ 4.195298] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_0: Failed to read efuse data [ 4.196482] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_0: seninf_probe: port=0 [ 4.197604] <5>.(5)[1:swapper/0]probe of 16007000.seninf_top:seninf_csi_port_0 returned 1 after 4720 usecs [ 4.198450] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.198922] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_1: ctx->port = 1 [ 4.200779] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_1: read csi efuse returned with error cell -1 [ 4.202130] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_1: Failed to read efuse data [ 4.203312] <5>.(5)[1:swapper/0]seninf 16007000.seninf_top:seninf_csi_port_1: seninf_probe: port=1 [ 4.204433] <5>.(5)[1:swapper/0]probe of 16007000.seninf_top:seninf_csi_port_1 returned 1 after 5522 usecs [ 4.205798] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: Linked as a consumer to regulator.3 [ 4.206938] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: dfs[0] freq 273000000 volt 550000 [ 4.208058] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: dfs[1] freq 392000000 volt 600000 [ 4.209173] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: dfs[2] freq 416000000 volt 650000 [ 4.210287] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: dfs[3] freq 499000000 volt 750000 [ 4.211472] <5>.(5)[1:swapper/0]seninf-core 16007000.seninf_top: seninf_core_probe [ 4.212438] <5>.(5)[1:swapper/0]BOOTPROF: 4212.437240:probe: probe=platform_drv_probe drv=seninf- core(0xffffff800962b528) 19.782000ms [ 4.214023] <5>.(5)[1:swapper/0]probe of 16007000.seninf_top returned 1 after 21385 usecs [ 4.215117] <7>-(7)[0:swapper/7]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.215150] <5>.(5)[1:swapper/0]probe of 160b0000.camsv1 returned -517 after 0 usecs [ 4.217013] <5>.(5)[1:swapper/0]probe of 160b1000.camsv2 returned -517 after 0 usecs [ 4.217980] <5>.(5)[1:swapper/0]probe of 160b2000.camsv3 returned -517 after 0 usecs [ 4.218946] <5>.(5)[1:swapper/0]probe of 160b3000.camsv4 returned -517 after 0 usecs [ 4.219916] <5>.(5)[1:swapper/0]probe of 160b4000.camsv5 returned -517 after 0 usecs [ 4.220882] <5>.(5)[1:swapper/0]probe of 160b5000.camsv6 returned -517 after 0 usecs [ 4.221925] <5>.(5)[1:swapper/0]probe of 16030000.cam_raw_a returned -517 after 0 usecs [ 4.222924] <5>.(5)[1:swapper/0]probe of 16070000.cam_raw_b returned -517 after 0 usecs [ 4.224003] <5>.(5)[1:swapper/0]probe of 16050000.cam_yuv_a returned -517 after 0 usecs [ 4.225002] <5>.(5)[1:swapper/0]probe of 16090000.cam_yuv_b returned -517 after 0 usecs [ 4.226342] <5>.(5)[1:swapper/0]mtk-cam 16000000.camisp: #: raw 2, yuv 2, larb 2, sv 6, seninf 2 [ 4.227716] <6>.(6)[1:swapper/0]BOOTPROF: 4227.714393:probe: probe=platform_drv_probe drv=mtk- cam(0xffffff800962adb8) 38.050846ms [ 4.229274] <6>.(6)[1:swapper/0]probe of 16000000.camisp returned 1 after 39627 usecs [ 4.230311] <6>.(6)[1:swapper/0]BOOTPROF: 4230.310086:initcall: mtk_cam_init 40.699000ms [ 4.231417] <6>.(6)[1:swapper/0]initcall mtk_cam_init+0x0/0x20 returned 0 after 40828 usecs [ 4.231789] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.232463] <6>.(6)[1:swapper/0]calling camdbg_module_init+0x0/0x38 @ 1 [ 4.234236] <6>.(6)[1:swapper/0]initcall camdbg_module_init+0x0/0x38 returned 0 after 7 usecs [ 4.235302] <6>.(6)[1:swapper/0]calling mtk_aie_driver_init+0x0/0x20 @ 1 [ 4.236191] <6>.(6)[1:swapper/0]probe of 15310000.aie returned -517 after 0 usecs [ 4.237162] <6>.(6)[1:swapper/0]initcall mtk_aie_driver_init+0x0/0x20 returned 0 after 989 usecs [ 4.238256] <6>.(6)[1:swapper/0]calling uvc_init+0x0/0x58 @ 1 [ 4.239034] <6>.(6)[1:swapper/0]usbcore: registered new interface driver uvcvideo [ 4.239972] <6>.(6)[1:swapper/0]USB Video Class driver (1.1.1) [ 4.240701] <6>.(6)[1:swapper/0]initcall uvc_init+0x0/0x58 returned 0 after 1676 usecs [ 4.241688] <6>.(6)[1:swapper/0]calling syscon_reboot_mode_driver_init+0x0/0x2 0 @ 1 [ 4.242719] <6>.(6)[1:swapper/0]initcall syscon_reboot_mode_driver_init+0x0/0x20 returned 0 after 62 usecs [ 4.243925] <6>.(6)[1:swapper/0]calling mtk_pd_adapter_init+0x0/0x20 @ 1 [ 4.244841] <6>.(6)[1:swapper/0]initcall mtk_pd_adapter_init+0x0/0x20 returned 0 after 67 usecs [ 4.245925] <6>.(6)[1:swapper/0]calling mtk_thermal_driver_init+0x0/0x20 @ 1 [ 4.246967] <6>.(6)[1:swapper/0]initcall mtk_thermal_driver_init+0x0/0x20 returned 0 after 149 usecs [ 4.248108] <6>.(6)[1:swapper/0]calling soc_temp_lvts_init+0x0/0x20 @ 1 [ 4.248452] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.249052] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: [lvts_cal] This sample is not calibrated, fake !! [ 4.251169] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: [lvts_cal] golden_temp = 50 [ 4.252224] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts:[
lvts_cal] num:g_count:g_count_rc 0:35000:2750 1:35000:2750 2:35000:2750 3:35000:2750 4:35000:2750 5:35000:2750 6:35000:2750 7:35000:2750 8:35000:2750 9:35000:2750 10:35000:2750 11:35000:2750 12:35000:2750 13:35000:2750 14:35000:2750 15:35000:2750 16:35000:2750[ 4.257431] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 0, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.258913] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 0, LVTSMSRCTL0_0= 0x492 [ 4.260076] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts0: read all 2 sensors in 1120 us, one in 444 us [ 4.261404] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 1, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.262886] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 1, LVTSMSRCTL0_0= 0x492 [ 4.264047] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts1: read all 2 sensors in 1120 us, one in 444 us [ 4.265119] <2>-(2)[0:swapper/2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.265376] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 2, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.267773] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 2, LVTSMSRCTL0_0= 0x492 [ 4.268931] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts2: read all 4 sensors in 2240 us, one in 444 us [ 4.270260] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 3, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.271745] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 3, LVTSMSRCTL0_0= 0x492 [ 4.272903] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts3: read all 2 sensors in 1120 us, one in 444 us [ 4.274231] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 4, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.275715] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 4, LVTSMSRCTL0_0= 0x492 [ 4.276874] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts4: read all 2 sensors in 1120 us, one in 444 us [ 4.278202] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 5, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.279686] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 5, LVTSMSRCTL0_0= 0x492 [ 4.280844] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts5: read all 3 sensors in 1680 us, one in 444 us [ 4.281786] <3>-(3)[0:swapper/3]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.282173] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_polling_speed 6, LVTSMONCTL1_0= 0x10000c,LVTSMONCTL2_0= 0x10001 [ 4.284572] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_hw_filter 6, LVTSMSRCTL0_0= 0x492 [ 4.285730] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: lvts6: read all 2 sensors in 1120 us, one in 444 us [ 4.287041] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS0, the dominator sensing point= 1 [ 4.288506] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS1, the dominator sensing point= 0 [ 4.289968] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS2, the dominator sensing point= 0 [ 4.291432] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS3, the dominator sensing point= 0 [ 4.292894] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS4, the dominator sensing point= 1 [ 4.294356] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS5, the dominator sensing point= 1 [ 4.295820] <6>.(6)[1:swapper/0]mtk-soc-temp-lvts 1100b000.lvts: set_tc_hw_reboot_threshold: LVTS6, the dominator sensing point= 0 [ 4.297939] <6>.(6)[1:swapper/0]BOOTPROF: 4297.938394:probe: probe=platform_drv_probe drv=mtk-soc-temp- lvts(0xffffff8009639a48) 48.948000ms [ 4.298451] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.299595] <6>.(6)[1:swapper/0]probe of 1100b000.lvts returned 1 after 50622 usecs [ 4.301551] <6>.(6)[1:swapper/0]BOOTPROF: 4301.550547:initcall: soc_temp_lvts_init 52.605308ms [ 4.302710] <6>.(6)[1:swapper/0]initcall soc_temp_lvts_init+0x0/0x20 returned 0 after 52505 usecs [ 4.303819] <6>.(6)[1:swapper/0]calling pmic_temp_driver_init+0x0/0x20 @ 1 [ 4.304764] <6>.(6)[1:swapper/0]initcall pmic_temp_driver_init+0x0/0x20 returned 0 after 75 usecs [ 4.305869] <6>.(6)[1:swapper/0]calling gadc_thermal_driver_init+0x0/0x20 @ 1 [ 4.306831] <6>.(6)[1:swapper/0]initcall gadc_thermal_driver_init+0x0/0x20 returned 0 after 60 usecs [ 4.307973] <6>.(6)[1:swapper/0]calling mtk_wdt_driver_init+0x0/0x20 @ 1 [ 4.308846] <6>.(6)[1:swapper/0]watchdog0, mtk wdt stop, wdd-Quoted 1 line
status=0
[ 4.309711] <6>.(6)[1:swapper/0]mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0) [ 4.310899] <6>.(6)[1:swapper/0]probe of 10007000.watchdog returned 1 after 2067 usecs [ 4.311957] <6>.(6)[1:swapper/0]initcall mtk_wdt_driver_init+0x0/0x20 returned 0 after 3063 usecs [ 4.313060] <6>.(6)[1:swapper/0]calling dm_init+0x0/0x70 @ 1 [ 4.313853] <6>.(6)[1:swapper/0]device-mapper: uevent: version 1.0.3 [ 4.314704] <6>.(6)[1:swapper/0]device-mapper: ioctl: 4.39.0- ioctl (2018-04-03) initialised: [email protected] [ 4.315118] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.315976] <6>.(6)[1:swapper/0]initcall dm_init+0x0/0x70 returned 0 after 2147 usecs [ 4.317875] <6>.(6)[1:swapper/0]calling dm_bufio_init+0x0/0x164 @ 1 [ 4.318759] <6>.(6)[1:swapper/0]initcall dm_bufio_init+0x0/0x164 returned 0 after 88 usecs [ 4.319795] <6>.(6)[1:swapper/0]calling dm_crypt_init+0x0/0x44 @ 1 [ 4.320577] <6>.(6)[1:swapper/0]initcall dm_crypt_init+0x0/0x44 returned 0 after 0 usecs [ 4.321585] <6>.(6)[1:swapper/0]calling dm_snapshot_init+0x0/0x248 @ 1 [ 4.322427] <6>.(6)[1:swapper/0]initcall dm_snapshot_init+0x0/0x248 returned 0 after 17 usecs [ 4.323492] <6>.(6)[1:swapper/0]calling dm_verity_init+0x0/0x44 @ 1 [ 4.324285] <6>.(6)[1:swapper/0]initcall dm_verity_init+0x0/0x44 returned 0 after 0 usecs [ 4.325303] <6>.(6)[1:swapper/0]calling cpufreq_gov_powersave_init+0x0/0x1c @ 1 [ 4.326227] <6>.(6)[1:swapper/0]initcall cpufreq_gov_powersave_init+0x0/0x1c returned 0 after 1 usecs [ 4.327377] <6>.(6)[1:swapper/0]calling cpufreq_gov_userspace_init+0x0/0x1c @ 1 [ 4.328298] <6>.(6)[1:swapper/0]initcall cpufreq_gov_userspace_init+0x0/0x1c returned 0 after 0 usecs [ 4.329446] <6>.(6)[1:swapper/0]calling cpufreq_gov_dbs_init+0x0/0x1c @ 1 [ 4.330302] <6>.(6)[1:swapper/0]initcall cpufreq_gov_dbs_init+0x0/0x1c returned 0 after 0 usecs [ 4.331388] <6>.(6)[1:swapper/0]calling mtk_cpufreq_hw_driver_init+0x0/0x20 @ 1 [ 4.331789] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.335418] <6>.(6)[1:swapper/0]energy_model: pd0: hertz/watts ratio non-monotonically decreasing: em_cap_state 1 >= em_cap_state0 [ 4.336978] <6>.(6)[1:swapper/0]energy_model: Created perf domain 0-3 [ 4.338125] <6>.(6)[1:swapper/0]energy_model: Created perf domain 4-7 [ 4.339008] <6>.(6)[58:kworker/6:1]Initializing perf order domain: [ 4.339800] <6>.(6)[58:kworker/6:1]cpu=0, cpu_perf=525 [ 4.339807] <6>.(0)[0:swapper/0]CPU1: update max cpu_capacity 525 [ 4.341199] <6>.(6)[58:kworker/6:1]cpu=4, cpu_perf=1024 [ 4.341849] <6>.(6)[58:kworker/6:1]Sort perf_domains from little to big: [ 4.342683] <6>.(6)[58:kworker/6:1] cpumask: 0x0f [ 4.343307] <6>.(6)[58:kworker/6:1] cpumask: 0xf0 [ 4.343377] <4>.(0)[0:swapper/0]CPU4: update max cpu_capacity 1024 [ 4.343504] <6>.(4)[1:swapper/0]probe of 11bc10.performance- controller returned 1 after 11181 usecs [ 4.343927] <4>.(6)[58:kworker/6:1]Initializing perf order domain done [ 4.344790] <4>.(4)[1:swapper/0]initcall mtk_cpufreq_hw_driver_init+0x0/0x20 returned 0 after 12185 usecs [ 4.347833] <4>.(4)[1:swapper/0]calling arm_idle_init+0x0/0xc8 @ 1 [ 4.348465] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.349817] <4>.(4)[1:swapper/0]initcall arm_idle_init+0x0/0xc8 returned 0 after 1174 usecs [ 4.350857] <4>.(4)[1:swapper/0]calling mmc_pwrseq_simple_driver_init+0x0/0x20 @ 1 [ 4.351914] <4>.(4)[1:swapper/0]initcall mmc_pwrseq_simple_driver_init+0x0/0x20 returned 0 after 92 usecs [ 4.353105] <4>.(4)[1:swapper/0]calling mmc_pwrseq_emmc_driver_init+0x0/0x20 @ 1 [ 4.354094] <4>.(4)[1:swapper/0]initcall mmc_pwrseq_emmc_driver_init+0x0/0x20 returned 0 after 57 usecs [ 4.355269] <4>.(4)[1:swapper/0]calling mmc_blk_init+0x0/0x120 @ 1 [ 4.356100] <4>.(4)[1:swapper/0]initcall mmc_blk_init+0x0/0x120 returned 0 after 49 usecs [ 4.357118] <4>.(4)[1:swapper/0]calling mt_msdc_driver_init+0x0/0x20 @ 1 [ 4.358356] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: GPIO lookup for consumer wp [ 4.359306] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: using device tree for GPIO lookup [ 4.360319] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11230000[0]' [ 4.361629] <4>.(4)[1:swapper/0]of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11230000[0]' [ 4.362927] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: using lookup tables for GPIO lookup [ 4.363960] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: No GPIO consumer wp found [ 4.364998] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: Linked as a consumer to regulator.35 [ 4.365130] <2>-(2)[0:swapper/2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.366063] <4>.(4)[1:swapper/0]mtk-msdc 11230000.mmc: Linked as a consumer to regulator.42 [ 4.368090] <4>.(4)[1:swapper/0]mmc0: CQHCI version 5.10 [ 4.381796] <3>-(3)[0:swapper/3]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.395231] <4>.(4)[1:swapper/0]BOOTPROF: 4395.224471:probe: probe=platform_drv_probe drv=mtk- msdc(0xffffff800963d938) 36.822154ms [ 4.396847] <4>.(4)[1:swapper/0]probe of 11230000.mmc returned 1 after 38824 usecs [ 4.398001] <4>.(4)[1:swapper/0]BOOTPROF: 4398.000317:initcall: mt_msdc_driver_init 40.033769ms [ 4.398449] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.399193] <4>.(4)[1:swapper/0]initcall mt_msdc_driver_init+0x0/0x20 returned 0 after 40261 usecs [ 4.401225] <4>.(4)[1:swapper/0]calling led_pwm_driver_init+0x0/0x20 @ 1 [ 4.402168] <4>.(4)[1:swapper/0]initcall led_pwm_driver_init+0x0/0x20 returned 0 after 95 usecs [ 4.403263] <4>.(4)[1:swapper/0]calling timer_led_trigger_init+0x0/0x1c @ 1 [ 4.404151] <4>.(4)[1:swapper/0]initcall timer_led_trigger_init+0x0/0x1c returned 0 after 3 usecs [ 4.405258] <4>.(4)[1:swapper/0]calling hid_init+0x0/0x7c @ 1 [ 4.406010] <4>.(4)[1:swapper/0]hidraw: raw HID events driver (C) Jiri Kosina [ 4.406907] <4>.(4)[1:swapper/0]initcall hid_init+0x0/0x7c returned 0 after 899 usecs [ 4.407893] <4>.(4)[1:swapper/0]calling uhid_misc_init+0x0/0x1c @ 1 [ 4.408716] <4>.(4)[1:swapper/0]initcall uhid_misc_init+0x0/0x1c returned 0 after 26 usecs [ 4.409745] <4>.(4)[1:swapper/0]calling hid_generic_init+0x0/0x28 @ 1 [ 4.410583] <4>.(4)[1:swapper/0]initcall hid_generic_init+0x0/0x28 returned 0 after 25 usecs [ 4.411637] <4>.(4)[1:swapper/0]calling a4_driver_init+0x0/0x28 @ 1 [ 4.412435] <4>.(4)[1:swapper/0]initcall a4_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.413453] <4>.(4)[1:swapper/0]calling apple_driver_init+0x0/0x28 @ 1 [ 4.414287] <4>.(4)[1:swapper/0]initcall apple_driver_init+0x0/0x28 returned 0 after 11 usecs [ 4.415353] <4>-(4)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.416285] <4>.(4)[1:swapper/0]calling belkin_driver_init+0x0/0x28 @ 1 [ 4.417126] <4>.(4)[1:swapper/0]initcall belkin_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.418187] <4>.(4)[1:swapper/0]calling ch_driver_init+0x0/0x28 @ 1 [ 4.418983] <4>.(4)[1:swapper/0]initcall ch_driver_init+0x0/0x28 returned 0 after 5 usecs [ 4.420010] <4>.(4)[1:swapper/0]calling ch_driver_init+0x0/0x28 @ 1 [ 4.420814] <4>.(4)[1:swapper/0]initcall ch_driver_init+0x0/0x28 returned 0 after 7 usecs [ 4.421833] <4>.(4)[1:swapper/0]calling cp_driver_init+0x0/0x28 @ 1 [ 4.422629] <4>.(4)[1:swapper/0]initcall cp_driver_init+0x0/0x28 returned 0 after 4 usecs [ 4.423651] <4>.(4)[1:swapper/0]calling dr_driver_init+0x0/0x28 @ 1 [ 4.424450] <4>.(4)[1:swapper/0]initcall dr_driver_init+0x0/0x28 returned 0 after 7 usecs [ 4.425467] <4>.(4)[1:swapper/0]calling ez_driver_init+0x0/0x28 @ 1 [ 4.426264] <4>.(4)[1:swapper/0]initcall ez_driver_init+0x0/0x28 returned 0 after 5 usecs [ 4.427286] <4>.(4)[1:swapper/0]calling gyration_driver_init+0x0/0x28 @ 1 [ 4.428147] <4>.(4)[1:swapper/0]initcall gyration_driver_init+0x0/0x28 returned 0 after 4 usecs [ 4.429229] <4>.(4)[1:swapper/0]calling ks_driver_init+0x0/0x28 @ 1 [ 4.430024] <4>.(4)[1:swapper/0]initcall ks_driver_init+0x0/0x28 returned 0 after 3 usecs [ 4.431041] <4>.(4)[1:swapper/0]calling kye_driver_init+0x0/0x28 @ 1 [ 4.431848] <4>-(4)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.433074] <5>.(5)[1:swapper/0]initcall kye_driver_init+0x0/0x28 returned 0 after 268 usecs [ 4.434177] <5>.(5)[1:swapper/0]calling lg_driver_init+0x0/0x28 @ 1 [ 4.435004] <5>.(5)[1:swapper/0]initcall lg_driver_init+0x0/0x28 returned 0 after 27 usecs [ 4.436092] <5>.(5)[1:swapper/0]calling magicmouse_driver_init+0x0/0x28 @ 1 [ 4.437004] <5>.(5)[1:swapper/0]initcall magicmouse_driver_init+0x0/0x28 returned 0 after 26 usecs [ 4.438124] <5>.(5)[1:swapper/0]calling ms_driver_init+0x0/0x28 @ 1 [ 4.438937] <5>.(5)[1:swapper/0]initcall ms_driver_init+0x0/0x28 returned 0 after 15 usecs [ 4.439989] <5>.(5)[1:swapper/0]calling mr_driver_init+0x0/0x28 @ 1 [ 4.440811] <5>.(5)[1:swapper/0]initcall mr_driver_init+0x0/0x28 returned 0 after 23 usecs [ 4.441844] <5>.(5)[1:swapper/0]calling mt_driver_init+0x0/0x28 @ 1 [ 4.442658] <5>.(5)[1:swapper/0]initcall mt_driver_init+0x0/0x28 returned 0 after 15 usecs [ 4.443710] <5>.(5)[1:swapper/0]calling nintendo_hid_driver_init+0x0/0x28 @ 1 [ 4.444617] <5>.(5)[1:swapper/0]initcall nintendo_hid_driver_init+0x0/0x28 returned 0 after 5 usecs [ 4.445742] <5>.(5)[1:swapper/0]calling pl_driver_init+0x0/0x28 @ 1 [ 4.446539] <5>.(5)[1:swapper/0]initcall pl_driver_init+0x0/0x28 returned 0 after 5 usecs [ 4.447585] <5>.(5)[1:swapper/0]calling pl_driver_init+0x0/0x28 @ 1 [ 4.448383] <5>.(5)[1:swapper/0]initcall pl_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.449406] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.450338] <5>.(5)[1:swapper/0]calling samsung_driver_init+0x0/0x28 @ 1 [ 4.451203] <5>.(5)[1:swapper/0]initcall samsung_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.452274] <5>.(5)[1:swapper/0]calling sjoy_driver_init+0x0/0x28 @ 1 [ 4.453094] <5>.(5)[1:swapper/0]initcall sjoy_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.454133] <5>.(5)[1:swapper/0]calling sony_init+0x0/0x54 @ 1 [ 4.454877] <5>.(5)[1:swapper/0]initcall sony_init+0x0/0x54 returned 0 after 5 usecs [ 4.455849] <5>.(5)[1:swapper/0]calling sp_driver_init+0x0/0x28 @ 1 [ 4.456648] <5>.(5)[1:swapper/0]initcall sp_driver_init+0x0/0x28 returned 0 after 7 usecs [ 4.457665] <5>.(5)[1:swapper/0]calling ga_driver_init+0x0/0x28 @ 1 [ 4.458462] <5>.(5)[1:swapper/0]initcall ga_driver_init+0x0/0x28 returned 0 after 4 usecs [ 4.459500] <5>.(5)[1:swapper/0]calling tm_driver_init+0x0/0x28 @ 1 [ 4.460298] <5>.(5)[1:swapper/0]initcall tm_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.461315] <5>.(5)[1:swapper/0]calling ts_driver_init+0x0/0x28 @ 1 [ 4.462112] <5>.(5)[1:swapper/0]initcall ts_driver_init+0x0/0x28 returned 0 after 5 usecs [ 4.463136] <5>.(5)[1:swapper/0]calling twinhan_driver_init+0x0/0x28 @ 1 [ 4.463991] <5>.(5)[1:swapper/0]initcall twinhan_driver_init+0x0/0x28 returned 0 after 8 usecs [ 4.465062] <5>.(5)[1:swapper/0]calling zp_driver_init+0x0/0x28 @ 1 [ 4.465855] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.466792] <5>.(5)[1:swapper/0]initcall zp_driver_init+0x0/0x28 returned 0 after 6 usecs [ 4.467816] <5>.(5)[1:swapper/0]calling hid_init+0x0/0x70 @ 1 [ 4.468570] <5>.(5)[1:swapper/0]usbcore: registered new interface driver usbhid [ 4.469481] <5>.(5)[1:swapper/0]usbhid: USB HID core driver [ 4.470176] <5>.(5)[1:swapper/0]initcall hid_init+0x0/0x70 returned 0 after 1595 usecs [ 4.471165] <5>.(5)[1:swapper/0]calling i2c_hid_driver_init+0x0/0x20 @ 1 [ 4.472045] <5>.(5)[1:swapper/0]initcall i2c_hid_driver_init+0x0/0x20 returned 0 after 33 usecs [ 4.473141] <5>.(5)[1:swapper/0]calling ashmem_init+0x0/0x10c @ 1 [ 4.473977] <5>.(5)[1:swapper/0]ashmem: initialized [ 4.474586] <5>.(5)[1:swapper/0]initcall ashmem_init+0x0/0x10c returned 0 after 659 usecs [ 4.475619] <5>.(5)[1:swapper/0]calling ion_page_pool_init+0x0/0x8 @ 1 [ 4.476443] <5>.(5)[1:swapper/0]initcall ion_page_pool_init+0x0/0x8 returned 0 after 0 usecs [ 4.477494] <5>.(5)[1:swapper/0]calling ccu_rproc_driver_init+0x0/0x20 @ 1 [ 4.478460] <5>.(5)[1:swapper/0]probe of 17080000.ccu_rproc returned -517 after 0 usecs [ 4.479481] <5>.(5)[1:swapper/0]initcall ccu_rproc_driver_init+0x0/0x20 returned 0 after 1091 usecs [ 4.480606] <5>.(5)[1:swapper/0]calling ccu_rproc1_driver_init+0x0/0x20 @ 1 [ 4.481557] <5>.(5)[1:swapper/0]probe of ccu_rproc1 returned -517 after 0 usecs [ 4.482468] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.483419] <5>.(5)[1:swapper/0]initcall ccu_rproc1_driver_init+0x0/0x20 returned 0 after 1888 usecs [ 4.484556] <5>.(5)[1:swapper/0]calling extcon_class_init+0x0/0x58 @ 1 [ 4.485381] <5>.(5)[1:swapper/0]initcall extcon_class_init+0x0/0x58 returned 0 after 1 usecs [ 4.486451] <5>.(5)[1:swapper/0]calling mt635x_auxadc_driver_init+0x0/0x20 @ 1 [ 4.487493] <5>.(5)[1:swapper/0]mt635x-auxadc mt635x-auxadc: no imix_r, ret=-22 [ 4.488475] <5>.(5)[1:swapper/0]mt635x-auxadc mt635x-auxadc: mt635x_auxadc_probe done [ 4.489455] <5>.(5)[1:swapper/0]probe of mt635x-auxadc returned 1 after 2025 usecs [ 4.490403] <5>.(5)[1:swapper/0]initcall mt635x_auxadc_driver_init+0x0/0x20 returned 0 after 2959 usecs [ 4.491582] <5>.(5)[1:swapper/0]calling mt6360_adc_driver_init+0x0/0x20 @ 1 [ 4.492531] <5>.(5)[1:swapper/0]mt6360_adc mt6360_adc.1.auto: DMA mask not set [ 4.500183] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.515140] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 4.612611] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 5.364425] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 5.365385] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 5.428296] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 5.428339] <7>.(7)[7:kworker/u16:0]warning: SCP DVFS is OFF [ 5.430024] <7>.(7)[7:kworker/u16:0][SCP]scp_register_feature request_freq fail [ 5.431811] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.036323] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.038436] <0>.(0)[1:swapper/0]mt6360_adc mt6360_adc.1.auto: Successfully probed [ 6.039490] <0>.(0)[1:swapper/0]BOOTPROF: 6039.479705:probe: probe=platform_drv_probe drv=mt6360_adc(0xffffff8009644d00) 1546.011157ms [ 6.041205] <0>.(0)[1:swapper/0]probe of mt6360_adc.1.auto returned 1 after 1548674 usecs [ 6.042382] <0>.(0)[1:swapper/0]BOOTPROF: 6042.374090:initcall: mt6360_adc_driver_init 1549.898850ms [ 6.043705] <0>.(0)[1:swapper/0]initcall mt6360_adc_driver_init+0x0/0x20 returned 0 after 1514871 usecs [ 6.044930] <0>.(0)[1:swapper/0]calling dsu_pmu_init+0x0/0x58 @ 1 [ 6.048465] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.050981] <0>.(0)[1:swapper/0]probe of dsu-pmu returned 1 after 3616 usecs [ 6.052460] <0>.(0)[1:swapper/0]initcall dsu_pmu_init+0x0/0x58 returned 0 after 6560 usecs [ 6.053533] <0>.(0)[1:swapper/0]calling binder_init+0x0/0x13c @ 1 [ 6.053543] <0>.(4)[56:kworker/4:1]mtk-msdc 11230000.mmc: phase: [map:fffffffe] [maxlen:31] [final:16] [ 6.055801] <0>.(0)[1:swapper/0]initcall binder_init+0x0/0x13c returned 0 after 181 usecs [ 6.056850] <0>.(0)[1:swapper/0]calling mt635x_efuse_driver_init+0x0/0x20 @ 1 [ 6.058487] <0>.(0)[1:swapper/0]probe of mt6359-efuse returned 1 after 182 usecs [ 6.058586] <4>.(4)[56:kworker/4:1]mmc0: Command Queue Engine enabled [ 6.059516] <0>.(0)[1:swapper/0]initcall mt635x_efuse_driver_init+0x0/0x20 returned 0 after 1697 usecs [ 6.060281] <4>.(4)[56:kworker/4:1]mmc0: new HS400 MMC card at address 0001 [ 6.061441] <0>.(0)[1:swapper/0]calling optee_driver_init+0x0/0x650 @ 1 [ 6.062975] <4>.(4)[56:kworker/4:1]mmcblk0: mmc0:0001 S0J57X 29.6 GiB [ 6.063726] <0>.(0)[1:swapper/0]optee: probing for conduit method from DT. [ 6.064125] <4>.(4)[56:kworker/4:1]mmcblk0boot0: mmc0:0001 S0J57X partition 1 31.5 MiB [ 6.064874] <0>.(0)[1:swapper/0]optee: revision 3.10 (6c7ad106) [ 6.065062] <4>.(0)[1:swapper/0]optee: initialized driver [ 6.065830] <0>-(4)[56:kworker/4:1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.066577] <4>.(0)[1:swapper/0]initcall optee_driver_init+0x0/0x650 returned 0 after 3290 usecs [ 6.067413] <0>.(4)[56:kworker/4:1]mmcblk0boot1: mmc0:0001 S0J57X partition 2 31.5 MiB [ 6.068248] <4>.(0)[1:swapper/0]calling icc_init+0x0/0x4c @ 1 [ 6.069373] <0>.(4)[56:kworker/4:1]mmcblk0rpmb: mmc0:0001 S0J57X partition 3 4.00 MiB, chardev (242:0) [ 6.070352] <0>.(0)[1:swapper/0]initcall icc_init+0x0/0x4c returned 0 after 21 usecs [ 6.073223] <0>.(0)[1:swapper/0]calling mtk_mmqos_mt8195_driver_init+0x0/0x20 @ 1 [ 6.076001] <0>.(0)[1:swapper/0]mtk-smi-common 1c01b000.smi: Linked as a consumer to regulator.3 [ 6.077271] <0>.(0)[1:swapper/0]mtk-smi-common 14012000.smi: Linked as a consumer to regulator.3 [ 6.079199] <4>.(4)[56:kworker/4:1] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46 p47 p48 p49 p50 p51 p52 p53 p54 [ 6.079566] <0>.(0)[1:swapper/0]probe of interconnect returned 1 after 4886 usecs [ 6.081979] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.084099] <0>.(0)[1:swapper/0]initcall mtk_mmqos_mt8195_driver_init+0x0/0x20 returned 0 after 9684 usecs [ 6.084229] <4>.(4)[56:kworker/4:1]BOOTPROF: 6084.224936:probe: probe=mmc_bus_probe drv=mmcblk(0xffffff800963d6f8) 21.769000ms [ 6.085311] <0>.(0)[1:swapper/0]calling alsa_hwdep_init+0x0/0x38 @ 1 [ 6.086821] <4>.(4)[56:kworker/4:1]probe of mmc0:0001 returned 1 after 24405 usecs [ 6.087654] <0>.(0)[1:swapper/0]initcall alsa_hwdep_init+0x0/0x38 returned 0 after 15 usecs [ 6.089620] <0>.(0)[1:swapper/0]calling alsa_timer_init+0x0/0x1e4 @ 1 [ 6.090502] <0>.(0)[1:swapper/0]initcall alsa_timer_init+0x0/0x1e4 returned 0 after 60 usecs [ 6.091782] <6>.(6)[1:swapper/0]calling snd_hrtimer_init+0x0/0xf4 @ 1 [ 6.092602] <6>.(6)[1:swapper/0]initcall snd_hrtimer_init+0x0/0xf4 returned 0 after 3 usecs [ 6.093643] <6>.(6)[1:swapper/0]calling alsa_pcm_init+0x0/0x80 @ 1 [ 6.094429] <6>.(6)[1:swapper/0]initcall alsa_pcm_init+0x0/0x80 returned 0 after 3 usecs [ 6.095504] <6>.(6)[1:swapper/0]calling alsa_rawmidi_init+0x0/0x34 @ 1 [ 6.096331] <6>.(6)[1:swapper/0]initcall alsa_rawmidi_init+0x0/0x34 returned 0 after 1 usecs [ 6.097382] <6>.(6)[1:swapper/0]calling alsa_seq_init+0x0/0x64 @ 1 [ 6.098205] <6>.(6)[1:swapper/0]initcall alsa_seq_init+0x0/0x64 returned 0 after 40 usecs [ 6.099226] <6>-(6)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.100182] <6>.(6)[1:swapper/0]calling alsa_seq_dummy_init+0x0/0x14 @ 1 [ 6.101034] <6>.(6)[1:swapper/0]initcall alsa_seq_dummy_init+0x0/0x14 returned 0 after 4 usecs [ 6.102108] <6>.(6)[1:swapper/0]calling seq_midisynth_driver_init+0x0/0x20 @ 1 [ 6.103031] <6>.(6)[1:swapper/0]initcall seq_midisynth_driver_init+0x0/0x20 returned 0 after 11 usecs [ 6.104190] <6>.(6)[1:swapper/0]calling usb_audio_driver_init+0x0/0x28 @ 1 [ 6.105111] <6>.(6)[1:swapper/0]usbcore: registered new interface driver snd-usb-audio [ 6.106099] <6>.(6)[1:swapper/0]initcall usb_audio_driver_init+0x0/0x28 returned 0 after 1015 usecs [ 6.107247] <6>.(6)[1:swapper/0]calling snd_soc_init+0x0/0xcc @ 1 [ 6.108338] <6>.(6)[1:swapper/0]snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #1 [ 6.109434] <6>.(6)[1:swapper/0]snd-soc-dummy snd-soc-dummy: ASoC: dynamically register DAI snd-soc-dummy [ 6.110626] <6>.(6)[1:swapper/0]snd-soc-dummy snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai' [ 6.111814] <6>.(6)[1:swapper/0]snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #0 [ 6.112914] <6>.(6)[1:swapper/0]probe of snd-soc-dummy returned 1 after 4609 usecs [ 6.113923] <6>.(6)[1:swapper/0]initcall snd_soc_init+0x0/0xcc returned 0 after 5766 usecs [ 6.114953] <6>.(6)[1:swapper/0]calling mt6359_platform_driver_init+0x0/0x20 @ 1 [ 6.115894] <6>-(6)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.116882] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: mt6359_platform_driver_probe(), dev name mt6359-sound [ 6.118189] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: Linked as a consumer to regulator.15 [ 6.119320] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: ASoC: dai register mt6359-sound #2 [ 6.120381] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: ASoC: dynamically register DAI mt6359-sound [ 6.121541] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: ASoC: Registered DAI 'mt6359-snd-codec-aif1' [ 6.122710] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: ASoC: dynamically register DAI mt6359-sound [ 6.123879] <6>.(6)[1:swapper/0]mt6359-sound mt6359-sound: ASoC: Registered DAI 'mt6359-snd-codec-aif2' [ 6.125052] <6>.(6)[1:swapper/0]probe of mt6359-sound returned 1 after 8181 usecs [ 6.125991] <6>.(6)[1:swapper/0]initcall mt6359_platform_driver_init+0x0/0x20 returned 0 after 8943 usecs [ 6.127184] <6>.(6)[1:swapper/0]calling accdet_soc_init+0x0/0x2c @ 1 [ 6.128287] <6>.(6)[1:swapper/0]accdet mic_vol=8, plugout_deb=1 mic_mode=2 eint_pol=4 [ 6.129263] <6>.(6)[1:swapper/0]accdet caps=145 [ 6.129966] <6>.(6)[1:swapper/0]pmic-codec-accdet mt635x-accdet: ASoC: DAPM unknown pin Headset [ 6.131116] <6>.(6)[1:swapper/0]input: mt63xx-accdet Headset as /devices/platform/10024000.pwrap/10024000.pwrap:mt6359/mt635x- accdet/sound/card0/input1 [ 6.132804] <6>-(6)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.134100] <6>.(6)[1:swapper/0]accdet_get_efuse moisture_vdd efuse=0x112e, moisture_vdd_offset=17 mv [ 6.135416] <6>.(6)[1:swapper/0]accdet_get_efuse moisture_efuse efuse=0x5500,moisture_offset=0 mv [ 6.136519] <6>.(6)[1:swapper/0]accdet_get_efuse efuse=0x5500,auxadc_val=-63mv [ 6.139182] <5>.(5)[1:swapper/0]probe of mt635x-accdet returned 1 after 10982 usecs [ 6.140160] <5>.(5)[1:swapper/0]initcall accdet_soc_init+0x0/0x2c returned 0 after 11886 usecs [ 6.141232] <5>.(5)[1:swapper/0]calling hdmi_codec_driver_init+0x0/0x20 @ 1 [ 6.142170] <5>.(5)[1:swapper/0]hdmi-audio-codec hdmi-audio- codec.0.auto: ASoC: dai register hdmi-audio-codec.0.auto #1 [ 6.143590] <5>.(5)[1:swapper/0]hdmi-audio-codec hdmi-audio- codec.0.auto: ASoC: dynamically register DAI hdmi-audio- codec.0.auto [ 6.145029] <5>.(5)[1:swapper/0]hdmi-audio-codec hdmi-audio- codec.0.auto: ASoC: Registered DAI 'i2s-hifi' [ 6.146230] <5>.(5)[1:swapper/0]probe of hdmi-audio-codec.0.auto returned 1 after 4078 usecs [ 6.147316] <5>.(5)[1:swapper/0]initcall hdmi_codec_driver_init+0x0/0x20 returned 0 after 5083 usecs [ 6.148458] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.149392] <5>.(5)[1:swapper/0]calling mt8195_afe_pcm_driver_init+0x0/0x20 @ 1 [ 6.152036] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mt8195_dai_hostless_register() [ 6.153277] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mtk_afe_combine_sub_dai(), num of dai 56 [ 6.154636] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_resume [ 6.155964] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: No cache defaults, reading back from HW [ 6.160586] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_suspend [ 6.161972] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_resume [ 6.163825] <5>.(5)[53:kworker/5:1]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_suspend [ 6.165092] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dai register 10890000.syscon:audio-controller #0 [ 6.166586] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.167536] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dai register 10890000.syscon:audio-controller #56 [ 6.169037] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.170626] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL2' [ 6.171826] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.173415] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL3' [ 6.174604] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.176197] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL6' [ 6.177387] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.178975] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL7' [ 6.180169] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.181758] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL8' [ 6.182947] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.183881] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.185469] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL10' [ 6.186669] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.188261] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL11' [ 6.189461] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.191052] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL1' [ 6.192241] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.193830] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL2' [ 6.195020] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.196612] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL3' [ 6.197801] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.199389] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.200323] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL4' [ 6.201514] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.203105] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL5' [ 6.204294] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.205883] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL6' [ 6.207075] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.208662] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL8' [ 6.209851] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.211442] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL9' [ 6.212631] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.214219] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL10' [ 6.215422] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.216354] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.217942] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'PCM1' [ 6.219145] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.220733] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'MULTI_IN1' [ 6.221987] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.223579] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'MULTI_IN2' [ 6.224832] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.226421] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'HW_GAIN1' [ 6.227666] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.229254] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'HW_GAIN2' [ 6.230498] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.232088] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.233020] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ADDA_HOSTLESS_LPBK' [ 6.234371] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.235962] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DMIC_HOSTLESS_RECORD' [ 6.237333] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.238922] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL_VIRTUAL_SOURCE' [ 6.240264] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.241852] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC0' [ 6.243076] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.244665] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC1' [ 6.245886] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.247476] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC2' [ 6.248699] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.249630] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.251221] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC3' [ 6.252442] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.254031] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC4' [ 6.255256] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.256844] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC5' [ 6.258065] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.259656] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC6' [ 6.260878] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.262466] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC7' [ 6.263690] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.265278] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.266210] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC8' [ 6.267434] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.269023] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC9' [ 6.270245] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.271836] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC10' [ 6.273069] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.274657] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC11' [ 6.275892] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.277481] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC12' [ 6.278713] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.280304] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC13' [ 6.281537] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.283126] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.284060] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC14' [ 6.285293] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.286881] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC15' [ 6.288116] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.289704] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC16' [ 6.290937] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.292528] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC17' [ 6.293760] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.295351] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC18' [ 6.296584] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.298172] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'GASRC19' [ 6.299405] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.300339] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.301928] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DPTX' [ 6.303131] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.304720] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ETDM1_IN' [ 6.305962] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.307553] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ETDM2_IN' [ 6.308796] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.310384] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ETDM1_OUT' [ 6.311641] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.313229] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ETDM2_OUT' [ 6.314483] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.316074] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.317005] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'ETDM3_OUT' [ 6.318260] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.319852] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DMIC' [ 6.321053] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.322641] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'SPDIF_OUT' [ 6.323898] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.325486] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'SPDIF_IN' [ 6.326728] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.328319] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'DL_SRC' [ 6.329541] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.331132] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL_SRC1' [ 6.332365] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.333296] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: dynamically register DAI 10890000.syscon:audio-controller [ 6.334885] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: ASoC: Registered DAI 'UL_SRC2' [ 6.336134] <5>.(5)[1:swapper/0]BOOTPROF: 6336.133475:probe: probe=platform_drv_probe drv=mt8195- audio(0xffffff8009650ab8) 185.651154ms [ 6.337741] <5>.(5)[1:swapper/0]probe of 10890000.syscon:audio- controller returned 1 after 187288 usecs [ 6.338926] <5>.(5)[1:swapper/0]BOOTPROF: 6338.925552:initcall: mt8195_afe_pcm_driver_init 188.611847ms [ 6.340175] <5>.(5)[1:swapper/0]initcall mt8195_afe_pcm_driver_init+0x0/0x20 returned 0 after 185411 usecs [ 6.341376] <5>.(5)[1:swapper/0]calling mt8195_adsp_pcm_driver_init+0x0/0x20 @ 1 [ 6.342482] <5>.(5)[1:swapper/0]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_resume [ 6.344113] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: mt8195_adsp_pcm_parse_of, dsp-boot-run=1, read_val=1 [ 6.345749] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dai register 10890000.syscon:audio-controller:mt8195-adsp-pcm #0 [ 6.347582] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dai register 10890000.syscon:audio-controller:mt8195-adsp-pcm #6 [ 6.349408] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.350339] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.352266] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'FE_HOSTLESS_VA' [ 6.353736] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.355662] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'FE_VA' [ 6.357034] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.358956] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'FE_MICR' [ 6.360353] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.362276] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'BE_TDM_IN' [ 6.363694] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.365616] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.366549] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'BE_UL9_IN' [ 6.367967] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: dynamically register DAI 10890000.syscon:audio-controller:mt8195-adsp-pcm [ 6.369890] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: ASoC: Registered DAI 'BE_UL2_IN' [ 6.371310] <5>.(5)[1:swapper/0]mt8195-adsp 10890000.syscon:audio-controller:mt8195-adsp-pcm: mt8195_adsp_pcm_dev_probe initialized. [ 6.372797] <5>.(5)[1:swapper/0]BOOTPROF: 6372.796168:probe: probe=platform_drv_probe drv=mt8195- adsp(0xffffff800966c608) 28.682462ms [ 6.374381] <5>.(5)[1:swapper/0]probe of 10890000.syscon:audio- controller:mt8195-adsp-pcm returned 1 after 30286 usecs [ 6.375721] <5>.(5)[53:kworker/5:1]mt8195-audio 10890000.syscon:audio-controller: mt8195_afe_runtime_suspend [ 6.376962] <5>.(5)[1:swapper/0]BOOTPROF: 6376.961552:initcall: mt8195_adsp_pcm_driver_init 34.652231ms [ 6.378232] <5>.(5)[1:swapper/0]initcall mt8195_adsp_pcm_driver_init+0x0/0x20 returned 0 after 35081 usecs [ 6.379438] <5>.(5)[1:swapper/0]calling butterscotch_driver_init+0x0/0x20 @ 1 [ 6.380613] <5>.(5)[1:swapper/0]probe of sound returned 0 after 195 usecs [ 6.381476] <5>.(5)[1:swapper/0]initcall butterscotch_driver_init+0x0/0x20 returned 0 after 1111 usecs [ 6.382635] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.383577] <5>.(5)[1:swapper/0]calling mt8570_adsp_pcm_driver_init+0x0/0x20 @ 1 [ 6.384631] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: dai register odm:audio_spi #0 [ 6.385748] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: dai register odm:audio_spi #2 [ 6.386862] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: dynamically register DAI odm:audio_spi [ 6.388107] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: Registered DAI 'FE_MICR' [ 6.389168] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: dynamically register DAI odm:audio_spi [ 6.390379] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: Registered DAI 'BE_MICR' [ 6.391449] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: mt8570_adsp_pcm_dev_probe initialized. [ 6.392603] <5>.(5)[1:swapper/0]probe of odm:audio_spi returned 1 after 8012 usecs [ 6.393562] <5>.(5)[1:swapper/0]initcall mt8570_adsp_pcm_driver_init+0x0/0x20 returned 0 after 8840 usecs [ 6.394752] <5>.(5)[1:swapper/0]calling mt8570_adsp_card_driver_init+0x0/0x20 @ 1 [ 6.395778] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: GPIO lookup for consumer dmic_clk_en_io [ 6.396937] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: using device tree for GPIO lookup [ 6.398049] <5>.(5)[1:swapper/0]of_get_named_gpiod_flags: parsed 'dmic_clk_en_io-gpios' property of node '/odm/mt8570_sound[0]' - status (0) [ 6.399619] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 6.900122] <7>.(7)[0:swapper/7][mtk_net][rtnl_lock]There is no process hold rtnl lock [ 6.900132] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 7.412352] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.020129] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.021164] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV0_FE [ 8.022206] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_MIC_FE [ 8.023285] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV1_FE [ 8.024304] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV2_FE [ 8.025321] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV3_FE [ 8.026336] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV4_FE [ 8.027373] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding PCMP_RSV1_FE [ 8.028398] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV6_FE [ 8.029414] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV7_FE [ 8.030429] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV8_FE [ 8.031458] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV1_FE [ 8.032501] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.033437] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV2_FE [ 8.034478] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV3_FE [ 8.035523] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV4_FE [ 8.036565] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI MIC BE [ 8.037562] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV1_BE [ 8.038571] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV2_BE [ 8.039661] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: adding FE_MICR widget [ 8.040692] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: adding SPI MIC Capture widget [ 8.041821] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: mt8570_adsp_pcm_pcm_probe register callback for audio controller fail -22 [ 8.043352] <5>.(5)[1:swapper/0]mt8570-adsp-pcm odm:audio_spi: ASoC: failed to probe component -517 [ 8.044500] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: ASoC: failed to instantiate card -517 [ 8.045667] <5>.(5)[1:swapper/0]mt8570-sound odm:mt8570_sound: mt8570_adsp_card_dev_probe snd_soc_register_card fail -517 [ 8.047065] <5>.(5)[1:swapper/0]BOOTPROF: 8047.062787:probe: probe=platform_drv_probe drv=mt8570- sound(0xffffff80096712e0) 1651.261157ms [ 8.048655] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.049612] <5>.(5)[1:swapper/0]probe of odm:mt8570_sound returned 0 after 1653850 usecs [ 8.050750] <5>.(5)[1:swapper/0]BOOTPROF: 8050.749710:initcall: mt8570_adsp_card_driver_init 1655.041004ms [ 8.052026] <5>.(5)[1:swapper/0]initcall mt8570_adsp_card_driver_init+0x0/0x20 returned 0 after 1617500 usecs [ 8.053260] <5>.(5)[1:swapper/0]calling fb_dai_link_driver_init+0x0/0x20 @ 1 [ 8.054557] <5>.(5)[1:swapper/0]probe of odm:fb_dai_link_amp returned 1 after 58 usecs [ 8.055573] <5>.(5)[1:swapper/0]probe of odm:fb_dai_link_dbmdx_tdm0 returned 1 after 16 usecs [ 8.056668] <5>.(5)[1:swapper/0]initcall fb_dai_link_driver_init+0x0/0x20 returned 0 after 2458 usecs [ 8.057815] <5>.(5)[1:swapper/0]calling fb_i2s_mclk_driver_init+0x0/0x20 @ 1 [ 8.059044] <5>.(5)[1:swapper/0]probe of odm:afe_i2so_mclk returned 1 after 213 usecs [ 8.060053] <5>.(5)[1:swapper/0]initcall fb_i2s_mclk_driver_init+0x0/0x20 returned 0 after 1316 usecs [ 8.061203] <5>.(5)[1:swapper/0]calling sock_diag_init+0x0/0x48 @ 1 [ 8.062063] <5>.(5)[1:swapper/0]initcall sock_diag_init+0x0/0x48 returned 0 after 65 usecs [ 8.063106] <5>.(5)[1:swapper/0]calling llc_init+0x0/0x2c @ 1 [ 8.063837] <5>.(5)[1:swapper/0]initcall llc_init+0x0/0x2c returned 0 after 2 usecs [ 8.064790] <5>.(5)[1:swapper/0]calling snap_init+0x0/0x44 @ 1 [ 8.065530] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.066463] <5>.(5)[1:swapper/0]initcall snap_init+0x0/0x44 returned 0 after 1 usecs [ 8.067431] <5>.(5)[1:swapper/0]calling blackhole_init+0x0/0x1c @ 1 [ 8.068225] <5>.(5)[1:swapper/0]initcall blackhole_init+0x0/0x1c returned 0 after 2 usecs [ 8.069243] <5>.(5)[1:swapper/0]calling police_init_module+0x0/0x24 @ 1 [ 8.070081] <5>.(5)[1:swapper/0]initcall police_init_module+0x0/0x24 returned 0 after 3 usecs [ 8.071146] <5>.(5)[1:swapper/0]calling mirred_init_module+0x0/0x68 @ 1 [ 8.071990] <5>.(5)[1:swapper/0]Mirror/redirect action on [ 8.072665] <5>.(5)[1:swapper/0]initcall mirred_init_module+0x0/0x68 returned 0 after 668 usecs [ 8.073748] <5>.(5)[1:swapper/0]calling ipt_init_module+0x0/0x78 @ 1 [ 8.074553] <5>.(5)[1:swapper/0]initcall ipt_init_module+0x0/0x78 returned 0 after 2 usecs [ 8.075587] <5>.(5)[1:swapper/0]calling htb_module_init+0x0/0x1c @ 1 [ 8.076390] <5>.(5)[1:swapper/0]initcall htb_module_init+0x0/0x1c returned 0 after 0 usecs [ 8.077419] <5>.(5)[1:swapper/0]calling ingress_module_init+0x0/0x50 @ 1 [ 8.078265] <5>.(5)[1:swapper/0]initcall ingress_module_init+0x0/0x50 returned 0 after 0 usecs [ 8.079339] <5>.(5)[1:swapper/0]calling init_u32+0x0/0x9c @ 1 [ 8.080066] <5>.(5)[1:swapper/0]u32 classifier [ 8.080620] <5>.(5)[1:swapper/0] Performance counters on [ 8.081315] <5>.(5)[1:swapper/0] input device check on [ 8.081989] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.082921] <5>.(5)[1:swapper/0] Actions configured [ 8.083566] <5>.(5)[1:swapper/0]initcall init_u32+0x0/0x9c returned 0 after 3417 usecs [ 8.084552] <5>.(5)[1:swapper/0]calling init_fw+0x0/0x1c @ 1 [ 8.085268] <5>.(5)[1:swapper/0]initcall init_fw+0x0/0x1c returned 0 after 0 usecs [ 8.086211] <5>.(5)[1:swapper/0]calling cls_flow_init+0x0/0x1c @ 1 [ 8.086992] <5>.(5)[1:swapper/0]initcall cls_flow_init+0x0/0x1c returned 0 after 0 usecs [ 8.088002] <5>.(5)[1:swapper/0]calling cls_bpf_init_mod+0x0/0x1c @ 1 [ 8.088815] <5>.(5)[1:swapper/0]initcall cls_bpf_init_mod+0x0/0x1c returned 0 after 0 usecs [ 8.089854] <5>.(5)[1:swapper/0]calling init_em_u32+0x0/0x1c @ 1 [ 8.090613] <5>.(5)[1:swapper/0]initcall init_em_u32+0x0/0x1c returned 0 after 0 usecs [ 8.091601] <5>.(5)[1:swapper/0]calling nfnetlink_init+0x0/0x64 @ 1 [ 8.092397] <5>.(5)[1:swapper/0]initcall nfnetlink_init+0x0/0x64 returned 0 after 4 usecs [ 8.093415] <5>.(5)[1:swapper/0]calling nfnetlink_queue_init+0x0/0xb8 @ 1 [ 8.094280] <5>.(5)[1:swapper/0]initcall nfnetlink_queue_init+0x0/0xb8 returned 0 after 8 usecs [ 8.095369] <5>.(5)[1:swapper/0]calling nfnetlink_log_init+0x0/0xbc @ 1 [ 8.096208] <5>.(5)[1:swapper/0]initcall nfnetlink_log_init+0x0/0xbc returned 0 after 4 usecs [ 8.097268] <5>.(5)[1:swapper/0]calling nf_conntrack_standalone_init+0x0/0xa4 @ 1 [ 8.098403] <5>.(5)[1:swapper/0]initcall nf_conntrack_standalone_init+0x0/0xa4 returned 0 after 185 usecs [ 8.099594] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.100539] <5>.(5)[1:swapper/0]calling nf_ct_proto_gre_init+0x0/0x5c @ 1 [ 8.101398] <5>.(5)[1:swapper/0]initcall nf_ct_proto_gre_init+0x0/0x5c returned 0 after 2 usecs [ 8.102480] <5>.(5)[1:swapper/0]calling ctnetlink_init+0x0/0xa4 @ 1 [ 8.103277] <5>.(5)[1:swapper/0]initcall ctnetlink_init+0x0/0xa4 returned 0 after 1 usecs [ 8.104295] <5>.(5)[1:swapper/0]calling nf_conntrack_amanda_init+0x0/0xcc @ 1 [ 8.105199] <5>.(5)[1:swapper/0]initcall nf_conntrack_amanda_init+0x0/0xcc returned 0 after 4 usecs [ 8.106324] <5>.(5)[1:swapper/0]calling nf_conntrack_ftp_init+0x0/0x178 @ 1 [ 8.107209] <5>.(5)[1:swapper/0]initcall nf_conntrack_ftp_init+0x0/0x178 returned 0 after 2 usecs [ 8.108313] <5>.(5)[1:swapper/0]calling nf_conntrack_h323_init+0x0/0x84 @ 1 [ 8.109195] <5>.(5)[1:swapper/0]initcall nf_conntrack_h323_init+0x0/0x84 returned 0 after 4 usecs [ 8.110299] <5>.(5)[1:swapper/0]calling nf_conntrack_irc_init+0x0/0x174 @ 1 [ 8.111182] <5>.(5)[1:swapper/0]initcall nf_conntrack_irc_init+0x0/0x174 returned 0 after 2 usecs [ 8.112287] <5>.(5)[1:swapper/0]calling nf_conntrack_netbios_ns_init+0x0/0x2c @ 1 [ 8.113231] <5>.(5)[1:swapper/0]initcall nf_conntrack_netbios_ns_init+0x0/0x2c returned 0 after 1 usecs [ 8.114399] <5>.(5)[1:swapper/0]calling nf_conntrack_pptp_init+0x0/0x1c @ 1 [ 8.115280] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.116214] <5>.(5)[1:swapper/0]initcall nf_conntrack_pptp_init+0x0/0x1c returned 0 after 1 usecs [ 8.117318] <5>.(5)[1:swapper/0]calling nf_conntrack_sane_init+0x0/0x16c @ 1 [ 8.118212] <5>.(5)[1:swapper/0]initcall nf_conntrack_sane_init+0x0/0x16c returned 0 after 6 usecs [ 8.119331] <5>.(5)[1:swapper/0]calling nf_conntrack_tftp_init+0x0/0x13c @ 1 [ 8.120220] <5>.(5)[1:swapper/0]initcall nf_conntrack_tftp_init+0x0/0x13c returned 0 after 1 usecs [ 8.121335] <5>.(5)[1:swapper/0]calling nf_nat_init+0x0/0xf8 @ 1 [ 8.122133] <5>.(5)[1:swapper/0]initcall nf_nat_init+0x0/0xf8 returned 0 after 38 usecs [ 8.123136] <5>.(5)[1:swapper/0]calling nf_nat_amanda_init+0x0/0x24 @ 1 [ 8.123971] <5>.(5)[1:swapper/0]initcall nf_nat_amanda_init+0x0/0x24 returned 0 after 0 usecs [ 8.125032] <5>.(5)[1:swapper/0]calling nf_nat_ftp_init+0x0/0x24 @ 1 [ 8.125834] <5>.(5)[1:swapper/0]initcall nf_nat_ftp_init+0x0/0x24 returned 0 after 0 usecs [ 8.126863] <5>.(5)[1:swapper/0]calling nf_nat_irc_init+0x0/0x24 @ 1 [ 8.127669] <5>.(5)[1:swapper/0]initcall nf_nat_irc_init+0x0/0x24 returned 0 after 0 usecs [ 8.128698] <5>.(5)[1:swapper/0]calling nf_nat_tftp_init+0x0/0x24 @ 1 [ 8.129512] <5>.(5)[1:swapper/0]initcall nf_nat_tftp_init+0x0/0x24 returned 0 after 0 usecs [ 8.130551] <5>.(5)[1:swapper/0]calling nf_conncount_modinit+0x0/0x90 @ 1 [ 8.131429] <5>.(5)[1:swapper/0]initcall nf_conncount_modinit+0x0/0x90 returned 0 after 18 usecs [ 8.132522] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.133454] <5>.(5)[1:swapper/0]calling xt_init+0x0/0x144 @ 1 [ 8.134184] <5>.(5)[1:swapper/0]initcall xt_init+0x0/0x144 returned 0 after 3 usecs [ 8.135141] <5>.(5)[1:swapper/0]calling tcpudp_mt_init+0x0/0x20 @ 1 [ 8.135935] <5>.(5)[1:swapper/0]initcall tcpudp_mt_init+0x0/0x20 returned 0 after 1 usecs [ 8.136953] <5>.(5)[1:swapper/0]calling mark_mt_init+0x0/0x5c @ 1 [ 8.137723] <5>.(5)[1:swapper/0]initcall mark_mt_init+0x0/0x5c returned 0 after 0 usecs [ 8.138719] <5>.(5)[1:swapper/0]calling connmark_mt_init+0x0/0x64 @ 1 [ 8.139535] <5>.(5)[1:swapper/0]initcall connmark_mt_init+0x0/0x64 returned 0 after 0 usecs [ 8.140575] <5>.(5)[1:swapper/0]calling xt_nat_init+0x0/0x20 @ 1 [ 8.141335] <5>.(5)[1:swapper/0]initcall xt_nat_init+0x0/0x20 returned 0 after 0 usecs [ 8.142321] <5>.(5)[1:swapper/0]calling classify_tg_init+0x0/0x20 @ 1 [ 8.143137] <5>.(5)[1:swapper/0]initcall classify_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.144176] <5>.(5)[1:swapper/0]calling connsecmark_tg_init+0x0/0x1c @ 1 [ 8.145021] <5>.(5)[1:swapper/0]initcall connsecmark_tg_init+0x0/0x1c returned 0 after 0 usecs [ 8.146091] <5>.(5)[1:swapper/0]calling xt_ct_tg_init+0x0/0x60 @ 1 [ 8.146872] <5>.(5)[1:swapper/0]initcall xt_ct_tg_init+0x0/0x60 returned 0 after 0 usecs [ 8.147882] <5>.(5)[1:swapper/0]calling hl_tg_init+0x0/0x20 @ 1 [ 8.148630] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.149563] <5>.(5)[1:swapper/0]initcall hl_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.150537] <5>.(5)[1:swapper/0]calling netmap_tg_init+0x0/0x20 @ 1 [ 8.151331] <5>.(5)[1:swapper/0]initcall netmap_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.152348] <5>.(5)[1:swapper/0]calling nflog_tg_init+0x0/0x1c @ 1 [ 8.153130] <5>.(5)[1:swapper/0]initcall nflog_tg_init+0x0/0x1c returned 0 after 0 usecs [ 8.154136] <5>.(5)[1:swapper/0]calling nfqueue_tg_init+0x0/0x20 @ 1 [ 8.154939] <5>.(5)[1:swapper/0]initcall nfqueue_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.155970] <5>.(5)[1:swapper/0]calling redirect_tg_init+0x0/0x20 @ 1 [ 8.156782] <5>.(5)[1:swapper/0]initcall redirect_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.157821] <5>.(5)[1:swapper/0]calling secmark_tg_init+0x0/0x1c @ 1 [ 8.158623] <5>.(5)[1:swapper/0]initcall secmark_tg_init+0x0/0x1c returned 0 after 0 usecs [ 8.159654] <5>.(5)[1:swapper/0]calling tproxy_tg_init+0x0/0x20 @ 1 [ 8.160446] <5>.(5)[1:swapper/0]initcall tproxy_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.161463] <5>.(5)[1:swapper/0]calling tcpmss_tg_init+0x0/0x20 @ 1 [ 8.162255] <5>.(5)[1:swapper/0]initcall tcpmss_tg_init+0x0/0x20 returned 0 after 0 usecs [ 8.163275] <5>.(5)[1:swapper/0]calling trace_tg_init+0x0/0x1c @ 1 [ 8.164056] <5>.(5)[1:swapper/0]initcall trace_tg_init+0x0/0x1c returned 0 after 0 usecs [ 8.165063] <5>.(5)[1:swapper/0]calling idletimer_tg_init+0x0/0x120 @ 1 [ 8.165897] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.166861] <5>.(5)[1:swapper/0]initcall idletimer_tg_init+0x0/0x120 returned 0 after 31 usecs [ 8.167938] <5>.(5)[1:swapper/0]calling bpf_mt_init+0x0/0x20 @ 1 [ 8.168698] <5>.(5)[1:swapper/0]initcall bpf_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.169682] <5>.(5)[1:swapper/0]calling comment_mt_init+0x0/0x1c @ 1 [ 8.170485] <5>.(5)[1:swapper/0]initcall comment_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.171516] <5>.(5)[1:swapper/0]calling connbytes_mt_init+0x0/0x1c @ 1 [ 8.172340] <5>.(5)[1:swapper/0]initcall connbytes_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.173389] <5>.(5)[1:swapper/0]calling connlimit_mt_init+0x0/0x1c @ 1 [ 8.174213] <5>.(5)[1:swapper/0]initcall connlimit_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.175266] <5>.(5)[1:swapper/0]calling conntrack_mt_init+0x0/0x20 @ 1 [ 8.176091] <5>.(5)[1:swapper/0]initcall conntrack_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.177140] <5>.(5)[1:swapper/0]calling ecn_mt_init+0x0/0x20 @ 1 [ 8.177899] <5>.(5)[1:swapper/0]initcall ecn_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.178884] <5>.(5)[1:swapper/0]calling esp_mt_init+0x0/0x20 @ 1 [ 8.179646] <5>.(5)[1:swapper/0]initcall esp_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.180631] <5>.(5)[1:swapper/0]calling hashlimit_mt_init+0x0/0xa8 @ 1 [ 8.181472] <5>.(5)[1:swapper/0]initcall hashlimit_mt_init+0x0/0xa8 returned 0 after 16 usecs [ 8.182534] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.183470] <5>.(5)[1:swapper/0]calling helper_mt_init+0x0/0x1c @ 1 [ 8.184262] <5>.(5)[1:swapper/0]initcall helper_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.185280] <5>.(5)[1:swapper/0]calling hl_mt_init+0x0/0x20 @ 1 [ 8.186029] <5>.(5)[1:swapper/0]initcall hl_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.187003] <5>.(5)[1:swapper/0]calling iprange_mt_init+0x0/0x20 @ 1 [ 8.187809] <5>.(5)[1:swapper/0]initcall iprange_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.188837] <5>.(5)[1:swapper/0]calling l2tp_mt_init+0x0/0x20 @ 1 [ 8.189607] <5>.(5)[1:swapper/0]initcall l2tp_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.190603] <5>.(5)[1:swapper/0]calling length_mt_init+0x0/0x20 @ 1 [ 8.191398] <5>.(5)[1:swapper/0]initcall length_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.192415] <5>.(5)[1:swapper/0]calling limit_mt_init+0x0/0x1c @ 1 [ 8.193195] <5>.(5)[1:swapper/0]initcall limit_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.194201] <5>.(5)[1:swapper/0]calling mac_mt_init+0x0/0x1c @ 1 [ 8.194960] <5>.(5)[1:swapper/0]initcall mac_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.195949] <5>.(5)[1:swapper/0]calling multiport_mt_init+0x0/0x20 @ 1 [ 8.196773] <5>.(5)[1:swapper/0]initcall multiport_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.197823] <5>.(5)[1:swapper/0]calling owner_mt_init+0x0/0x1c @ 1 [ 8.198603] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.199539] <5>.(5)[1:swapper/0]initcall owner_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.200546] <5>.(5)[1:swapper/0]calling physdev_mt_init+0x0/0x1c @ 1 [ 8.201349] <5>.(5)[1:swapper/0]initcall physdev_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.202377] <5>.(5)[1:swapper/0]calling pkttype_mt_init+0x0/0x1c @ 1 [ 8.203183] <5>.(5)[1:swapper/0]initcall pkttype_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.204211] <5>.(5)[1:swapper/0]calling policy_mt_init+0x0/0x20 @ 1 [ 8.205003] <5>.(5)[1:swapper/0]initcall policy_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.206020] <5>.(5)[1:swapper/0]calling quota_mt_init+0x0/0x1c @ 1 [ 8.206800] <5>.(5)[1:swapper/0]initcall quota_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.207808] <5>.(5)[1:swapper/0]calling quota_mt2_init+0x0/0xe0 @ 1 [ 8.208609] <5>.(5)[1:swapper/0]initcall quota_mt2_init+0x0/0xe0 returned 0 after 9 usecs [ 8.209627] <5>.(5)[1:swapper/0]calling realm_mt_init+0x0/0x1c @ 1 [ 8.210408] <5>.(5)[1:swapper/0]initcall realm_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.211419] <5>.(5)[1:swapper/0]calling recent_mt_init+0x0/0x8c @ 1 [ 8.212215] <5>.(5)[1:swapper/0]initcall recent_mt_init+0x0/0x8c returned 0 after 3 usecs [ 8.213233] <5>.(5)[1:swapper/0]calling sctp_mt_init+0x0/0x20 @ 1 [ 8.214003] <5>.(5)[1:swapper/0]initcall sctp_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.215000] <5>.(5)[1:swapper/0]calling socket_mt_init+0x0/0x20 @ 1 [ 8.215794] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.216728] <5>.(5)[1:swapper/0]initcall socket_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.217746] <5>.(5)[1:swapper/0]calling state_mt_init+0x0/0x1c @ 1 [ 8.218527] <5>.(5)[1:swapper/0]initcall state_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.219536] <5>.(5)[1:swapper/0]calling statistic_mt_init+0x0/0x1c @ 1 [ 8.220360] <5>.(5)[1:swapper/0]initcall statistic_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.221410] <5>.(5)[1:swapper/0]calling string_mt_init+0x0/0x1c @ 1 [ 8.222202] <5>.(5)[1:swapper/0]initcall string_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.223224] <5>.(5)[1:swapper/0]calling tcpmss_mt_init+0x0/0x20 @ 1 [ 8.224016] <5>.(5)[1:swapper/0]initcall tcpmss_mt_init+0x0/0x20 returned 0 after 0 usecs [ 8.225033] <5>.(5)[1:swapper/0]calling time_mt_init+0x0/0x80 @ 1 [ 8.225803] <5>.(5)[1:swapper/0]xt_time: kernel timezone is -0000 [ 8.226563] <5>.(5)[1:swapper/0]initcall time_mt_init+0x0/0x80 returned 0 after 741 usecs [ 8.227583] <5>.(5)[1:swapper/0]calling u32_mt_init+0x0/0x1c @ 1 [ 8.228342] <5>.(5)[1:swapper/0]initcall u32_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.229329] <5>.(5)[1:swapper/0]calling gre_offload_init+0x0/0x5c @ 1 [ 8.230143] <5>.(5)[1:swapper/0]initcall gre_offload_init+0x0/0x5c returned 0 after 1 usecs [ 8.231186] <5>.(5)[1:swapper/0]calling sysctl_ipv4_init+0x0/0x58 @ 1 [ 8.231999] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.232997] <5>.(5)[1:swapper/0]initcall sysctl_ipv4_init+0x0/0x58 returned 0 after 63 usecs [ 8.234046] <5>.(5)[1:swapper/0]calling ipip_init+0x0/0xa0 @ 1 [ 8.234785] <5>.(5)[1:swapper/0]ipip: IPv4 and MPLS over IPv4 tunneling driver [ 8.235847] <5>.(5)[1:swapper/0]initcall ipip_init+0x0/0xa0 returned 0 after 1036 usecs [ 8.236845] <5>.(5)[1:swapper/0]calling gre_init+0x0/0x48 @ 1 [ 8.237570] <5>.(5)[1:swapper/0]gre: GRE over IPv4 demultiplexor driver [ 8.238395] <5>.(5)[1:swapper/0]initcall gre_init+0x0/0x48 returned 0 after 804 usecs [ 8.239377] <5>.(5)[1:swapper/0]calling vti_init+0x0/0x150 @ 1 [ 8.240114] <5>.(5)[1:swapper/0]IPv4 over IPsec tunneling driver [ 8.240942] <5>.(5)[1:swapper/0]initcall vti_init+0x0/0x150 returned 0 after 807 usecs [ 8.241928] <5>.(5)[1:swapper/0]calling ah4_init+0x0/0x80 @ 1 [ 8.242656] <5>.(5)[1:swapper/0]initcall ah4_init+0x0/0x80 returned 0 after 1 usecs [ 8.243616] <5>.(5)[1:swapper/0]calling esp4_init+0x0/0x80 @ 1 [ 8.244355] <5>.(5)[1:swapper/0]initcall esp4_init+0x0/0x80 returned 0 after 0 usecs [ 8.245319] <5>.(5)[1:swapper/0]calling ipcomp4_init+0x0/0x80 @ 1 [ 8.246090] <5>.(5)[1:swapper/0]initcall ipcomp4_init+0x0/0x80 returned 0 after 0 usecs [ 8.247089] <5>.(5)[1:swapper/0]calling ipip_init+0x0/0xb8 @ 1 [ 8.247828] <5>.(5)[1:swapper/0]initcall ipip_init+0x0/0xb8 returned 0 after 1 usecs [ 8.248791] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.249723] <5>.(5)[1:swapper/0]calling xfrm4_beet_init+0x0/0x20 @ 1 [ 8.250525] <5>.(5)[1:swapper/0]initcall xfrm4_beet_init+0x0/0x20 returned 0 after 0 usecs [ 8.251557] <5>.(5)[1:swapper/0]calling tunnel4_init+0x0/0x64 @ 1 [ 8.252328] <5>.(5)[1:swapper/0]initcall tunnel4_init+0x0/0x64 returned 0 after 0 usecs [ 8.253325] <5>.(5)[1:swapper/0]calling xfrm4_transport_init+0x0/0x20 @ 1 [ 8.254181] <5>.(5)[1:swapper/0]initcall xfrm4_transport_init+0x0/0x20 returned 0 after 0 usecs [ 8.255268] <5>.(5)[1:swapper/0]calling xfrm4_mode_tunnel_init+0x0/0x20 @ 1 [ 8.256146] <5>.(5)[1:swapper/0]initcall xfrm4_mode_tunnel_init+0x0/0x20 returned 0 after 0 usecs [ 8.257249] <5>.(5)[1:swapper/0]calling nf_nat_l3proto_ipv4_init+0x0/0x5c @ 1 [ 8.258150] <5>.(5)[1:swapper/0]initcall nf_nat_l3proto_ipv4_init+0x0/0x5c returned 0 after 2 usecs [ 8.259279] <5>.(5)[1:swapper/0]calling nf_defrag_init+0x0/0x1c @ 1 [ 8.260071] <5>.(5)[1:swapper/0]initcall nf_defrag_init+0x0/0x1c returned 0 after 0 usecs [ 8.261089] <5>.(5)[1:swapper/0]calling init+0x0/0x128 @ 1 [ 8.261783] <5>.(5)[1:swapper/0]initcall init+0x0/0x128 returned 0 after 0 usecs [ 8.262705] <5>.(5)[1:swapper/0]calling nf_nat_helper_pptp_init+0x0/0x88 @ 1 [ 8.263598] <5>.(5)[1:swapper/0]initcall nf_nat_helper_pptp_init+0x0/0x88 returned 0 after 0 usecs [ 8.264713] <5>.(5)[1:swapper/0]calling nf_nat_proto_gre_init+0x0/0x20 @ 1 [ 8.265580] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.266513] <5>.(5)[1:swapper/0]initcall nf_nat_proto_gre_init+0x0/0x20 returned 0 after 0 usecs [ 8.267610] <5>.(5)[1:swapper/0]calling ip_tables_init+0x0/0xb4 @ 1 [ 8.268407] <5>.(5)[1:swapper/0]initcall ip_tables_init+0x0/0xb4 returned 0 after 6 usecs [ 8.269425] <5>.(5)[1:swapper/0]calling iptable_filter_init+0x0/0x64 @ 1 [ 8.270314] <5>.(5)[1:swapper/0]initcall iptable_filter_init+0x0/0x64 returned 0 after 40 usecs [ 8.271402] <5>.(5)[1:swapper/0]calling iptable_mangle_init+0x0/0x88 @ 1 [ 8.272258] <5>.(5)[1:swapper/0]initcall iptable_mangle_init+0x0/0x88 returned 0 after 9 usecs [ 8.273329] <5>.(5)[1:swapper/0]calling iptable_nat_init+0x0/0x50 @ 1 [ 8.274151] <5>.(5)[1:swapper/0]initcall iptable_nat_init+0x0/0x50 returned 0 after 9 usecs [ 8.275194] <5>.(5)[1:swapper/0]calling iptable_raw_init+0x0/0xac @ 1 [ 8.276022] <5>.(5)[1:swapper/0]initcall iptable_raw_init+0x0/0xac returned 0 after 13 usecs [ 8.277073] <5>.(5)[1:swapper/0]calling iptable_security_init+0x0/0x88 @ 1 [ 8.277946] <5>.(5)[1:swapper/0]initcall iptable_security_init+0x0/0x88 returned 0 after 6 usecs [ 8.279040] <5>.(5)[1:swapper/0]calling ah_mt_init+0x0/0x1c @ 1 [ 8.279798] <5>.(5)[1:swapper/0]initcall ah_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.280773] <5>.(5)[1:swapper/0]calling masquerade_tg_init+0x0/0x48 @ 1 [ 8.281613] <5>.(5)[1:swapper/0]initcall masquerade_tg_init+0x0/0x48 returned 0 after 5 usecs [ 8.282674] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.283611] <5>.(5)[1:swapper/0]calling reject_tg_init+0x0/0x1c @ 1 [ 8.284402] <5>.(5)[1:swapper/0]initcall reject_tg_init+0x0/0x1c returned 0 after 0 usecs [ 8.285419] <5>.(5)[1:swapper/0]calling arp_tables_init+0x0/0x88 @ 1 [ 8.286227] <5>.(5)[1:swapper/0]initcall arp_tables_init+0x0/0x88 returned 0 after 5 usecs [ 8.287260] <5>.(5)[1:swapper/0]calling arpt_mangle_init+0x0/0x1c @ 1 [ 8.288074] <5>.(5)[1:swapper/0]initcall arpt_mangle_init+0x0/0x1c returned 0 after 0 usecs [ 8.289113] <5>.(5)[1:swapper/0]calling arptable_filter_init+0x0/0x88 @ 1 [ 8.289982] <5>.(5)[1:swapper/0]initcall arptable_filter_init+0x0/0x88 returned 0 after 11 usecs [ 8.291081] <5>.(5)[1:swapper/0]calling inet_diag_init+0x0/0x94 @ 1 [ 8.291875] <5>.(5)[1:swapper/0]initcall inet_diag_init+0x0/0x94 returned 0 after 1 usecs [ 8.292892] <5>.(5)[1:swapper/0]calling tcp_diag_init+0x0/0x1c @ 1 [ 8.293674] <5>.(5)[1:swapper/0]initcall tcp_diag_init+0x0/0x1c returned 0 after 0 usecs [ 8.294681] <5>.(5)[1:swapper/0]calling udp_diag_init+0x0/0x50 @ 1 [ 8.295466] <5>.(5)[1:swapper/0]initcall udp_diag_init+0x0/0x50 returned 0 after 0 usecs [ 8.296474] <5>.(5)[1:swapper/0]calling bictcp_register+0x0/0x1c @ 1 [ 8.297278] <5>.(5)[1:swapper/0]initcall bictcp_register+0x0/0x1c returned 0 after 2 usecs [ 8.298307] <5>.(5)[1:swapper/0]calling cubictcp_register+0x0/0x80 @ 1 [ 8.299131] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.300066] <5>.(5)[1:swapper/0]initcall cubictcp_register+0x0/0x80 returned 0 after 0 usecs [ 8.301116] <5>.(5)[1:swapper/0]calling xfrm_user_init+0x0/0x60 @ 1 [ 8.301907] <5>.(5)[1:swapper/0]Initializing XFRM netlink socket [ 8.302664] <5>.(5)[1:swapper/0]initcall xfrm_user_init+0x0/0x60 returned 0 after 738 usecs [ 8.303707] <5>.(5)[1:swapper/0]calling xfrmi_init+0x0/0xc8 @ 1 [ 8.304455] <5>.(5)[1:swapper/0]IPsec XFRM device driver [ 8.305124] <5>.(5)[1:swapper/0]initcall xfrmi_init+0x0/0xc8 returned 0 after 652 usecs [ 8.306121] <5>.(5)[1:swapper/0]calling inet6_init+0x0/0x328 @ 1 [ 8.306974] <5>.(5)[1:swapper/0]NET: Registered protocol family 10 [ 8.308547] <5>.(5)[1:swapper/0]Segment Routing with IPv6 [ 8.309247] <5>.(5)[1:swapper/0]initcall inet6_init+0x0/0x328 returned 0 after 2306 usecs [ 8.310265] <5>.(5)[1:swapper/0]calling ah6_init+0x0/0x80 @ 1 [ 8.310994] <5>.(5)[1:swapper/0]initcall ah6_init+0x0/0x80 returned 0 after 2 usecs [ 8.311975] <5>.(5)[1:swapper/0]calling esp6_init+0x0/0x80 @ 1 [ 8.312714] <5>.(5)[1:swapper/0]initcall esp6_init+0x0/0x80 returned 0 after 0 usecs [ 8.313678] <5>.(5)[1:swapper/0]calling ipcomp6_init+0x0/0x80 @ 1 [ 8.314449] <5>.(5)[1:swapper/0]initcall ipcomp6_init+0x0/0x80 returned 0 after 0 usecs [ 8.315450] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.316383] <5>.(5)[1:swapper/0]calling xfrm6_tunnel_init+0x0/0xf0 @ 1 [ 8.317220] <5>.(5)[1:swapper/0]initcall xfrm6_tunnel_init+0x0/0xf0 returned 0 after 12 usecs [ 8.318280] <5>.(5)[1:swapper/0]calling tunnel6_init+0x0/0x7c @ 1 [ 8.319056] <5>.(5)[1:swapper/0]initcall tunnel6_init+0x0/0x7c returned 0 after 0 usecs [ 8.320053] <5>.(5)[1:swapper/0]calling xfrm6_transport_init+0x0/0x20 @ 1 [ 8.320910] <5>.(5)[1:swapper/0]initcall xfrm6_transport_init+0x0/0x20 returned 0 after 1 usecs [ 8.321992] <5>.(5)[1:swapper/0]calling xfrm6_mode_tunnel_init+0x0/0x20 @ 1 [ 8.322869] <5>.(5)[1:swapper/0]initcall xfrm6_mode_tunnel_init+0x0/0x20 returned 0 after 0 usecs [ 8.323976] <5>.(5)[1:swapper/0]calling xfrm6_ro_init+0x0/0x20 @ 1 [ 8.324756] <5>.(5)[1:swapper/0]initcall xfrm6_ro_init+0x0/0x20 returned 0 after 0 usecs [ 8.325762] <5>.(5)[1:swapper/0]calling xfrm6_beet_init+0x0/0x20 @ 1 [ 8.326565] <5>.(5)[1:swapper/0]initcall xfrm6_beet_init+0x0/0x20 returned 0 after 0 usecs [ 8.327596] <5>.(5)[1:swapper/0]calling mip6_init+0x0/0xc4 @ 1 [ 8.328333] <5>.(5)[1:swapper/0]mip6: Mobile IPv6 [ 8.328921] <5>.(5)[1:swapper/0]initcall mip6_init+0x0/0xc4 returned 0 after 573 usecs [ 8.329906] <5>.(5)[1:swapper/0]calling ip6_tables_init+0x0/0xb4 @ 1 [ 8.330715] <5>.(5)[1:swapper/0]initcall ip6_tables_init+0x0/0xb4 returned 0 after 7 usecs [ 8.331746] <5>.(5)[1:swapper/0]calling ip6table_filter_init+0x0/0x64 @ 1 [ 8.332602] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.333551] <5>.(5)[1:swapper/0]initcall ip6table_filter_init+0x0/0x64 returned 0 after 16 usecs [ 8.334644] <5>.(5)[1:swapper/0]calling ip6table_mangle_init+0x0/0x88 @ 1 [ 8.335517] <5>.(5)[1:swapper/0]initcall ip6table_mangle_init+0x0/0x88 returned 0 after 12 usecs [ 8.336609] <5>.(5)[1:swapper/0]calling ip6table_raw_init+0x0/0xac @ 1 [ 8.337448] <5>.(5)[1:swapper/0]initcall ip6table_raw_init+0x0/0xac returned 0 after 15 usecs [ 8.338510] <5>.(5)[1:swapper/0]calling nf_nat_l3proto_ipv6_init+0x0/0x5c @ 1 [ 8.339414] <5>.(5)[1:swapper/0]initcall nf_nat_l3proto_ipv6_init+0x0/0x5c returned 0 after 1 usecs [ 8.340539] <5>.(5)[1:swapper/0]calling nf_defrag_init+0x0/0x60 @ 1 [ 8.341347] <5>.(5)[1:swapper/0]initcall nf_defrag_init+0x0/0x60 returned 0 after 16 usecs [ 8.342375] <5>.(5)[1:swapper/0]calling frag_mt6_init+0x0/0x1c @ 1 [ 8.343161] <5>.(5)[1:swapper/0]initcall frag_mt6_init+0x0/0x1c returned 0 after 0 usecs [ 8.344167] <5>.(5)[1:swapper/0]calling ipv6header_mt6_init+0x0/0x1c @ 1 [ 8.345012] <5>.(5)[1:swapper/0]initcall ipv6header_mt6_init+0x0/0x1c returned 0 after 0 usecs [ 8.346083] <5>.(5)[1:swapper/0]calling rpfilter_mt_init+0x0/0x1c @ 1 [ 8.346896] <5>.(5)[1:swapper/0]initcall rpfilter_mt_init+0x0/0x1c returned 0 after 0 usecs [ 8.347938] <5>.(5)[1:swapper/0]calling reject_tg6_init+0x0/0x1c @ 1 [ 8.348741] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.349672] <5>.(5)[1:swapper/0]initcall reject_tg6_init+0x0/0x1c returned 0 after 0 usecs [ 8.350700] <5>.(5)[1:swapper/0]calling vti6_tunnel_init+0x0/0x118 @ 1 [ 8.351703] <5>.(5)[1:swapper/0]initcall vti6_tunnel_init+0x0/0x118 returned 0 after 168 usecs [ 8.352775] <5>.(5)[1:swapper/0]calling sit_init+0x0/0xe0 @ 1 [ 8.353502] <5>.(5)[1:swapper/0]sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 8.354544] <5>.(5)[1:swapper/0]initcall sit_init+0x0/0xe0 returned 0 after 1016 usecs [ 8.355540] <5>.(5)[1:swapper/0]calling ip6_tunnel_init+0x0/0xec @ 1 [ 8.356433] <5>.(5)[1:swapper/0]initcall ip6_tunnel_init+0x0/0xec returned 0 after 87 usecs [ 8.357473] <5>.(5)[1:swapper/0]calling packet_init+0x0/0x90 @ 1 [ 8.358233] <5>.(5)[1:swapper/0]NET: Registered protocol family 17 [ 8.359008] <5>.(5)[1:swapper/0]initcall packet_init+0x0/0x90 returned 0 after 759 usecs [ 8.360023] <5>.(5)[1:swapper/0]calling ipsec_pfkey_init+0x0/0x90 @ 1 [ 8.360839] <5>.(5)[1:swapper/0]NET: Registered protocol family 15 [ 8.361609] <5>.(5)[1:swapper/0]initcall ipsec_pfkey_init+0x0/0x90 returned 0 after 755 usecs [ 8.362669] <5>.(5)[1:swapper/0]calling br_init+0x0/0xc8 @ 1 [ 8.363406] <5>.(5)[1:swapper/0]initcall br_init+0x0/0xc8 returned 0 after 16 usecs [ 8.364360] <5>.(5)[1:swapper/0]calling br_netfilter_init+0x0/0xcc @ 1 [ 8.365184] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.366123] <5>.(5)[1:swapper/0]Bridge firewalling registered [ 8.366838] <5>.(5)[1:swapper/0]initcall br_netfilter_init+0x0/0xcc returned 0 after 705 usecs [ 8.367915] <5>.(5)[1:swapper/0]calling l2tp_init+0x0/0x84 @ 1 [ 8.368665] <5>.(5)[1:swapper/0]l2tp_core: L2TP core driver, V2.0 [ 8.369424] <5>.(5)[1:swapper/0]initcall l2tp_init+0x0/0x84 returned 0 after 754 usecs [ 8.370409] <5>.(5)[1:swapper/0]calling pppol2tp_init+0x0/0x90 @ 1 [ 8.371199] <5>.(5)[1:swapper/0]l2tp_ppp: PPPoL2TP kernel driver, V2.0 [ 8.372012] <5>.(5)[1:swapper/0]initcall pppol2tp_init+0x0/0x90 returned 0 after 796 usecs [ 8.373039] <5>.(5)[1:swapper/0]calling vlan_proto_init+0x0/0xcc @ 1 [ 8.373841] <5>.(5)[1:swapper/0]8021q: 802.1Q VLAN Support v1.8 [ 8.374585] <5>.(5)[1:swapper/0]initcall vlan_proto_init+0x0/0xcc returned 0 after 727 usecs [ 8.375639] <5>.(5)[1:swapper/0]calling sctp_init+0x0/0x588 @ 1 [ 8.376401] <5>.(5)[1:swapper/0]sctp: Hash tables configured (bind 256/256) [ 8.377349] <5>.(5)[1:swapper/0]initcall sctp_init+0x0/0x588 returned 0 after 939 usecs [ 8.378346] <5>.(5)[1:swapper/0]calling sctp_diag_init+0x0/0x1c @ 1 [ 8.379146] <5>.(5)[1:swapper/0]initcall sctp_diag_init+0x0/0x1c returned 0 after 1 usecs [ 8.380165] <5>.(5)[1:swapper/0]calling mt6360_init+0x0/0x80 @ 1 [ 8.380925] <5>.(5)[1:swapper/0]mt6360_init (2.0.3_MTK) [ 8.381670] <5>.(5)[1:swapper/0]mt6360_init usb_type_c node found [ 8.382431] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.383458] <5>.(5)[1:swapper/0]mt6360_i2c_probe [ 8.384036] <5>.(5)[1:swapper/0]mt6360_i2c_probe I2C functionality : ok [ 8.386457] <5>.(5)[1:swapper/0]0 [ 8.386590] <3>.(3)[70:pd_dbg_info]///PD dbg info 481d [ 8.386888] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 435 [ 8.386900] <3>.(5)[1:swapper/0]1 [ 8.387627] <5>.(3)[70:pd_dbg_info]< 8.386>0 [ 8.387627] <5>< 8.386>pd_dbg_info : t2-t1 = 15 [ 8.387627] <5>< 8.386>1 [ 8.387627] <5>< 8.386>pd_dbg_info : t2-t1 = 1 [ 8.387627] <5>< 8.386>2 [ 8.387627] <5>< 8.386>pd_dbg_ [ 8.387636] <3>.(5)[1:swapper/0]info : t2-t1 = 0 [ 8.387636] <3>< 8.386>3 [ 8.387636] <3>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.387636] <3>< 8.386>4 [ 8.387636] <3>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.387636] <3>< 8.386>5 [ 8.387636] <3>< [ 8.388238] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1338 [ 8.388665] <5>.(3)[70:pd_dbg_info] 8.386>pd_dbg_info : t2-t1 = 0 [ 8.388665] <5>< 8.386>6 [ 8.388665] <5>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.388665] <5>< 8.386>7 [ 8.388665] <5>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.388676] <5>.(3)[70:pd_dbg_info] [ 8.388676] <5>< 8.386>8 [ 8.388676] <5>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.388676] <5>< 8.386>9 [ 8.388676] <5>< 8.386>pd_dbg_info : t2-t1 = 0 [ 8.391514] <5>.(5)[1:swapper/0]2 [ 8.391517] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 2 [ 8.391518] <5>.(5)[1:swapper/0]3 [ 8.391520] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391522] <5>.(5)[1:swapper/0]4 [ 8.391524] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391526] <5>.(5)[1:swapper/0]5 [ 8.391528] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391530] <5>.(5)[1:swapper/0]6 [ 8.391531] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391533] <5>.(5)[1:swapper/0]7 [ 8.391535] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391537] <5>.(5)[1:swapper/0]8 [ 8.391539] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391541] <5>.(5)[1:swapper/0]9 [ 8.391543] <5>.(5)[1:swapper/0]pr_info : t2-t1 = 1 [ 8.391547] <5>.(5)[1:swapper/0]mt6360_parse_dt [ 8.391599] <5>.(5)[1:swapper/0]of_get_named_gpiod_flags: parsed 'mt6360pd,intr_gpio' property of node '/i2c@11d01000/usb_type_c@4e[ 0]' - status (0) [ 8.400194] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.411606] <5>.(5)[1:swapper/0]usb_type_c 6-004e: mt6360_i2c_probe chipID = 0x3493 [ 8.412563] <5>.(5)[1:swapper/0]tcpc_device_register register tcpc device (type_c_port0) [ 8.413635] <5>.(5)[1:swapper/0]PD Timer number = 59 [ 8.414984] <5>.(5)[1:swapper/0]tcpci_timer_init : init OK [ 8.415728] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.416678] <5>.(5)[1:swapper/0]pd_parse_pdata [ 8.417244] <5>.(5)[1:swapper/0]pd_parse_pdata src pdo data = [ 8.417964] <5>.(5)[1:swapper/0]pd_parse_pdata 0: 0x00019096 [ 8.418676] <5>.(5)[1:swapper/0]pd_parse_pdata snk pdo data = [ 8.419406] <5>.(5)[1:swapper/0]pd_parse_pdata 0: 0x000190c8 [ 8.420117] <5>.(5)[1:swapper/0]pd_parse_pdata id vdos data = [ 8.420836] <5>.(5)[1:swapper/0]pd_parse_pdata 0: 0xd10029cf [ 8.421545] <5>.(5)[1:swapper/0]pd_parse_pdata 1: 0x00000000 [ 8.422254] <5>.(5)[1:swapper/0]pd_parse_pdata 2: 0x63600000 [ 8.422963] <5>.(5)[1:swapper/0]pd_parse_pdata charging_policy = 49 [ 8.423759] <5>.(5)[1:swapper/0]pd_parse_pdata_bats Battery NR = 1 [ 8.424541] <5>.(5)[1:swapper/0]pd_parse_pdata_bats fix_bat_info[0].mfrs_info.vid = 0x29cf, .mfrs_info.pid = 0x6360, .mfrs_string = bat1, .bat_design_cap = 3000 [ 8.426328] <5>.(5)[1:swapper/0]pd_parse_pdata_countries get country nr fail [ 8.427226] <5>.(5)[1:swapper/0]pd_parse_log_src_cap_ext vid = 0x29cf, pid = 0x6360, xid = 0x0, fw_ver = 0x0, hw_ver = 0x0 [ 8.428602] <5>.(5)[1:swapper/0]pd_parse_log_src_cap_ext voltage_regulation = 0, hold_time_ms = 0, compliance = 0x0, touch_current = 0x0, peak_current = 0 0 0 [ 8.430362] <5>.(5)[1:swapper/0]pd_parse_log_src_cap_ext touch_temp = 0, source_inputs = 0x0, batteries = 0x0, source_pdp = 0x7 [ 8.431792] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.432724] <5>.(5)[1:swapper/0]pd_parse_pdata_mfrs VID = 0x29cf, PID = 0x6360 [ 8.433624] <5>.(5)[1:swapper/0]pd_parse_pdata_mfrs PD mfrs_string = RichtekTCPC [ 8.434548] <5>.(5)[1:swapper/0]dpm_caps: local_dr_power [ 8.435212] <5>.(5)[1:swapper/0]dpm_caps: local_dr_data [ 8.435863] <5>.(5)[1:swapper/0]dpm_caps: local_ext_power [ 8.436535] <5>.(5)[1:swapper/0]dpm_caps: local_usb_comm [ 8.437196] <5>.(5)[1:swapper/0]dpm_caps: local_usb_suspend [ 8.437891] <5>.(5)[1:swapper/0]dpm_caps: local_high_cap [ 8.438552] <5>.(5)[1:swapper/0]dpm_caps: local_give_back [ 8.439229] <5>.(5)[1:swapper/0]dpm_caps: local_no_suspend [ 8.439913] <5>.(5)[1:swapper/0]dpm_caps: local_vconn_supply [ 8.440617] <5>.(5)[1:swapper/0]dpm_caps: attemp_discover_cable_dfp [ 8.441397] <5>.(5)[1:swapper/0]dpm_caps: attemp_enter_dp_mode [ 8.442124] <5>.(5)[1:swapper/0]dpm_caps: attemp_discover_cable [ 8.442861] <5>.(5)[1:swapper/0]dpm_caps: attemp_discover_id [ 8.443570] <5>.(5)[1:swapper/0]dpm_caps: pr_reject_as_source [ 8.444285] <5>.(5)[1:swapper/0]dpm_caps: pr_reject_as_sink [ 8.444980] <5>.(5)[1:swapper/0]dpm_caps: pr_check_gp_source [ 8.445685] <5>.(5)[1:swapper/0]dpm_caps: pr_check_gp_sink [ 8.446369] <5>.(5)[1:swapper/0]dpm_caps: dr_reject_as_dfp [ 8.447055] <5>.(5)[1:swapper/0]dpm_caps: dr_reject_as_ufp [ 8.447739] <5>.(5)[1:swapper/0]dpm_caps = 0x0000e18b [ 8.448471] <5>-(5)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 8.449402] <5>.(5)[1:swapper/0]dp_parse_svid_data get displayport data fail [ 8.451004] <5>.(5)[1:swapper/0]tcpc type_c_port0: add typec_mux_switch-switch [ 8.451133] <3>.(3)[70:pd_dbg_info]///PD dbg info 33d [ 8.452057] <5>.(5)[1:swapper/0]usb_type_c 6-004e: mt6360_tcpcdev_init PD REV30 [ 8.452563] <3>.(3)[70:pd_dbg_info]< 8.450>TCPC- PE:pd_core_init [ 8.480346] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 9.416113] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 9.460350] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 9.972141] <5>-(5)[0:swapper/5]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 9.973167] <5>.(5)[1:swapper/0]usb_type_c 6-004e: mt6360_init_alert name = type_c_port0, gpio = 447 [ 9.974338] <5>.(5)[1:swapper/0]usb_type_c 6-004e: mt6360_init_alert IRQ number = 127 [ 9.976233] <1>.(1)[1:swapper/0]usb_type_c 6-004e: mt6360_i2c_probe successfully! [ 9.977215] <1>.(1)[1:swapper/0]BOOTPROF: 9977.212099:probe: probe=i2c_device_probe drv=usb_type_c(0xffffff80095f98e0) 1593.778158ms [ 9.978850] <1>.(1)[1:swapper/0]probe of 6-004e returned 1 after 1595452 usecs [ 9.979942] <1>.(1)[1:swapper/0]BOOTPROF: 9979.939099:initcall: mt6360_init 1599.006158ms [ 9.981036] <1>.(1)[1:swapper/0]initcall mt6360_init+0x0/0x80 returned 0 after 1562604 usecs [ 9.982098] <1>-(1)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 9.983049] <1>.(1)[1:swapper/0]calling mt8570_audio_ipi_driver_init+0x0/0x58 @ 1 [ 9.984016] <1>.(1)[1:swapper/0]scp_ipi_queue_init(), opendsp_id: could not found send handler for dsp 1!! [ 9.985321] <1>.(1)[1:swapper/0]initcall mt8570_audio_ipi_driver_init+0x0/0x58 returned 0 after 1273 usecs [ 9.986531] <1>.(1)[1:swapper/0]calling mt6360_pmu_chg_init+0x0/0x20 @ 1 [ 9.988710] <1>.(1)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: DMA mask not set [ 9.989685] <1>.(1)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_pmu_chg_probe [ 10.036228] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 10.416475] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 10.484352] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 11.508346] <5>.(5)[0:swapper/5][mtk_net][rtnl_lock]There is no process hold rtnl lock [ 11.508446] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 12.020396] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 12.052549] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 12.532471] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 13.556436] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 13.557773] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_chg_init_setting [ 13.558833] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_get_boot_mode: failed to get boot mode phandle [ 13.570110] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 14.036555] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 14.038035] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: __mt6360_enable_usbchgen: en = 0 [ 14.039241] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_set_usbsw_state: state = 1 [ 14.040452] <0>.(0)[1:swapper/0]mtk-tphy usb-phy0: u2_phy_instance_set_mode_ext submode(2) [ 14.580473] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 14.581811] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 15.604442] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 16.052559] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 16.372439] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 16.373628] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_read_zcv: zcv = (0x00, 0x25, 46mV) [ 16.375616] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_chg_init_setting: BATSYSUV occurred [ 16.378534] <0>.(0)[7:kworker/u16:0]accdet_init() done. [ 16.379402] <0>.(0)[7:kworker/u16:0]config_digital_init_by_mode() disable digital moisture. [ 16.380527] <0>.(0)[7:kworker/u16:0]accdet_init_once done! [ 16.381228] <0>.(0)[7:kworker/u16:0]delay_init_work_callback() done [ 16.382032] <0>-(0)[7:kworker/u16:0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 16.384248] <6>.(6)[176:mivr_thread.mt6]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_chg_mivr_task_threadfn ++ [ 16.385658] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_boost_set_current_limit: select otg_oc = 500000 [ 16.628383] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 17.652438] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.068558] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.084551] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.104548] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.124598] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.144603] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.164607] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.165596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.184556] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.204556] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.224600] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.244613] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.264603] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.265591] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.284559] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.304429] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.324598] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.344594] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.364597] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.365584] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.384551] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.404549] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.424601] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.444596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.464605] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.465594] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.484552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.504552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.524602] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.544604] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.564588] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.565575] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.584552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.604555] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.624463] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.644593] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.664614] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.665602] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.681822] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.704559] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.724610] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.744596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.764596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.765588] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.784555] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.804552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.824594] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.844605] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.864599] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.865589] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.884546] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.904552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.924592] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.944602] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.964599] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.965589] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 18.984549] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.004555] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.024608] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.044601] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.064599] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.065589] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.084554] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.104550] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.124604] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.144601] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.164596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.165587] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.184550] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.204550] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.224593] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.244606] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.264599] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.265590] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.284549] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.304551] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.324601] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.344599] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.364598] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.365587] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.384555] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.404556] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.424606] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.444596] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.464591] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.465581] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.484550] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.504563] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.524595] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.544598] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.564600] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.565588] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.584552] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.604556] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.624608] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.644602] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.664598] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.665587] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.684554] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.700431] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.715135] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.731801] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.743629] <0>.(0)[1:swapper/0]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_pmu_chg_probe: successfully probed [ 19.744908] <0>.(0)[1:swapper/0]BOOTPROF: 19744.897354:probe: probe=platform_drv_probe drv=mt6360_pmu_chg(0xffffff8009637620) 9755.183793ms [ 19.746612] <0>.(0)[1:swapper/0]probe of mt6360_chg.2.auto returned 1 after 9757937 usecs [ 19.747817] <0>.(0)[1:swapper/0]BOOTPROF: 19747.808123:initcall: mt6360_pmu_chg_init 9760.392639ms [ 19.749005] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.749959] <0>.(0)[1:swapper/0]initcall mt6360_pmu_chg_init+0x0/0x20 returned 0 after 9533742 usecs [ 19.751579] <0>.(0)[1:swapper/0]calling init_oops_id+0x0/0x3c @ 1 [ 19.752373] <0>.(0)[1:swapper/0]initcall init_oops_id+0x0/0x3c returned 0 after 9 usecs [ 19.753387] <0>.(0)[1:swapper/0]calling sched_init_debug+0x0/0x50 @ 1 [ 19.754278] <0>.(0)[1:swapper/0]initcall sched_init_debug+0x0/0x50 returned 0 after 61 usecs [ 19.755372] <0>.(0)[1:swapper/0]calling eas_stats_init+0x0/0x94 @ 1 [ 19.756200] <0>.(0)[1:swapper/0]initcall eas_stats_init+0x0/0x94 returned 0 after 19 usecs [ 19.757242] <0>.(0)[1:swapper/0]calling pm_qos_power_init+0x0/0xd8 @ 1 [ 19.758409] <0>.(0)[1:swapper/0]initcall pm_qos_power_init+0x0/0xd8 returned 0 after 318 usecs [ 19.759532] <0>.(0)[1:swapper/0]calling pm_debugfs_init+0x0/0x34 @ 1 [ 19.760356] <0>.(0)[1:swapper/0]initcall pm_debugfs_init+0x0/0x34 returned 0 after 9 usecs [ 19.761391] <0>.(0)[1:swapper/0]calling wakeup_reason_init+0x0/0xf8 @ 1 [ 19.762288] <0>.(0)[1:swapper/0]initcall wakeup_reason_init+0x0/0xf8 returned 0 after 52 usecs [ 19.763455] <0>.(0)[55:kworker/0:1]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_charger_get_online: online = 0 [ 19.764682] <0>.(0)[55:kworker/0:1]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_charger_get_online: online = 0 [ 19.765891] <0>-(0)[55:kworker/0:1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.766899] <0>.(0)[1:swapper/0]calling printk_late_init+0x0/0x170 @ 1 [ 19.767802] <0>.(0)[1:swapper/0]initcall printk_late_init+0x0/0x170 returned 0 after 42 usecs [ 19.768895] <0>.(0)[55:kworker/0:1]mt6360_pmu_chg mt6360_chg.2.auto: mt6360_charger_get_online: online = 0 [ 19.770136] <0>.(0)[1:swapper/0]calling tk_debug_sleep_time_init+0x0/0x4c @ 1 [ 19.771074] <0>.(0)[1:swapper/0]initcall tk_debug_sleep_time_init+0x0/0x4c returned 0 after 28 usecs [ 19.772218] <0>.(0)[1:swapper/0]calling taskstats_init+0x0/0x50 @ 1 [ 19.773056] <0>.(0)[1:swapper/0]registered taskstats version 1 [ 19.773788] <0>.(0)[1:swapper/0]initcall taskstats_init+0x0/0x50 returned 0 after 754 usecs [ 19.774834] <0>.(0)[1:swapper/0]calling load_system_certificate_list+0x0/0x130 @ 1 [ 19.775801] <0>.(0)[1:swapper/0]Loading compiled-in X.509 certificates [ 19.776620] <0>.(0)[1:swapper/0]initcall load_system_certificate_list+0x0/0x130 returned 0 after 798 usecs [ 19.777827] <0>.(0)[1:swapper/0]calling fault_around_debugfs+0x0/0x48 @ 1 [ 19.778703] <0>.(0)[1:swapper/0]initcall fault_around_debugfs+0x0/0x48 returned 0 after 13 usecs [ 19.779812] <0>.(0)[1:swapper/0]calling max_swapfiles_check+0x0/0x8 @ 1 [ 19.780653] <0>.(0)[1:swapper/0]initcall max_swapfiles_check+0x0/0x8 returned 0 after 0 usecs [ 19.781719] <0>.(0)[1:swapper/0]calling check_early_ioremap_leak+0x0/0x64 @ 1 [ 19.782623] <0>-(0)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.783573] <0>.(0)[1:swapper/0]initcall check_early_ioremap_leak+0x0/0x64 returned 0 after 1 usecs [ 19.784703] <0>.(0)[1:swapper/0]calling set_hardened_usercopy+0x0/0x7c @ 1 [ 19.785575] <0>.(0)[1:swapper/0]initcall set_hardened_usercopy+0x0/0x7c returned 1 after 0 usecs [ 19.786672] <0>.(0)[1:swapper/0]calling fscrypt_init+0x0/0xac @ 1 [ 19.787579] <0>.(0)[1:swapper/0]Key type ._fscrypt registered [ 19.788534] <6>.(6)[1:swapper/0]Key type .fscrypt registered [ 19.789251] <6>.(6)[1:swapper/0]Key type fscrypt-provisioning registered [ 19.790095] <6>.(6)[1:swapper/0]initcall fscrypt_init+0x0/0xac returned 0 after 2575 usecs [ 19.791210] <6>.(6)[1:swapper/0]calling fsverity_init+0x0/0x7c @ 1 [ 19.792093] <6>.(6)[1:swapper/0]initcall fsverity_init+0x0/0x7c returned 0 after 94 usecs [ 19.793114] <6>.(6)[1:swapper/0]calling pstore_init+0x0/0x88 @ 1 [ 19.794151] <6>.(6)[1:swapper/0]pstore: Using compression: deflate [ 19.794937] <6>.(6)[1:swapper/0]initcall pstore_init+0x0/0x88 returned 0 after 1038 usecs [ 19.795966] <6>.(6)[1:swapper/0]calling init_root_keyring+0x0/0x14 @ 1 [ 19.796804] <6>.(6)[1:swapper/0]initcall init_root_keyring+0x0/0x14 returned 0 after 12 usecs [ 19.797866] <6>.(6)[1:swapper/0]calling integrity_fs_init+0x0/0x10 @ 1 [ 19.798693] <6>-(6)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.799640] <6>.(6)[1:swapper/0]initcall integrity_fs_init+0x0/0x10 returned -19 after 0 usecs [ 19.800715] <6>.(6)[1:swapper/0]calling prandom_reseed+0x0/0x8c @ 1 [ 19.801515] <6>.(6)[1:swapper/0]initcall prandom_reseed+0x0/0x8c returned 0 after 7 usecs [ 19.802537] <6>.(6)[1:swapper/0]calling pinctrl_mtk_debug_v2_init+0x0/0xc8 @ 1 [ 19.803463] <6>.(6)[1:swapper/0]initcall pinctrl_mtk_debug_v2_init+0x0/0xc8 returned 0 after 7 usecs [ 19.804602] <6>.(6)[1:swapper/0]calling pci_resource_alignment_sysfs_init+0x0/ 0x24 @ 1 [ 19.805603] <6>.(6)[1:swapper/0]initcall pci_resource_alignment_sysfs_init+0x0/0x24 returned 0 after 3 usecs [ 19.806826] <6>.(6)[1:swapper/0]calling pci_sysfs_init+0x0/0x60 @ 1 [ 19.807627] <6>.(6)[1:swapper/0]initcall pci_sysfs_init+0x0/0x60 returned 0 after 1 usecs [ 19.808647] <6>.(6)[1:swapper/0]calling mtk_pcie_init+0x0/0x20 @ 1 [ 19.809616] <6>.(6)[1:swapper/0]probe of 112f0000.pcie returned -517 after 1 usecs [ 19.810904] <6>.(6)[1:swapper/0]initcall mtk_pcie_init+0x0/0x20 returned 0 after 1437 usecs [ 19.811954] <6>.(6)[1:swapper/0]calling clk_debug_init+0x0/0x124 @ 1 [ 19.815118] <6>-(6)[1:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.826105] <6>.(6)[1:swapper/0]initcall clk_debug_init+0x0/0x124 returned 0 after 13016 usecs [ 19.827212] <6>.(6)[1:swapper/0]calling sync_state_resume_initcall+0x0/0x18 @ 1 [ 19.828136] <6>.(6)[1:swapper/0]initcall sync_state_resume_initcall+0x0/0x18 returned 0 after 1 usecs [ 19.829285] <6>.(6)[1:swapper/0]calling deferred_probe_initcall+0x0/0x1a8 @ 1 [ 19.830305] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_probe [ 19.831815] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.832206] <6>.(6)[164:kworker/6:2][cmdq] [SEC]cmdq_sec_init_context [ 19.833571] <6>.(6)[164:kworker/6:2][cmdq] [SEC]init_context: status:0x0 [ 19.834407] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x000000001801cfda size:83224 idx:0 [ 19.835677] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x000000001801cfda size:1198816 idx:1 [ 19.836920] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x000000001801cfda size:520424 idx:2 [ 19.838164] <6>.(6)[164:kworker/6:2][cmdq] [SEC]open_session: status:0x0 [ 19.839154] <6>.(6)[164:kworker/6:2][cmdq] cmdq_util_track_ctrl cmdq:00000000dcd140b2 sec:true [ 19.840228] <6>.(6)[164:kworker/6:2]MMP: mmprofile_enable(): enable: 1 [ 19.841055] <6>.(6)[164:kworker/6:2]MMP: mmprofile_force_start(): start: 1 [ 19.841914] <6>.(6)[164:kworker/6:2][cmdq] cmdq:00000000dcd140b2(0) va:00000000d0908343 pa:0x0000000010320000 [ 19.843185] <6>.(6)[164:kworker/6:2]probe of 10320000.gce_mbox_sec returned 1 after 12932 usecs [ 19.844305] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_probe [ 19.846287] <6>.(6)[164:kworker/6:2][cmdq] [SEC]cmdq_sec_init_context [ 19.847119] <6>.(6)[164:kworker/6:2][cmdq] [SEC]init_context: status:0x0 [ 19.847955] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x00000000bb6c1cdc size:83224 idx:0 [ 19.849138] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 19.850149] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x00000000bb6c1cdc size:1198816 idx:1 [ 19.851394] <6>.(6)[164:kworker/6:2][cmdq] cmdq_sec_allocate_wsm tee:0x00000000bb6c1cdc size:520424 idx:2 [ 19.852621] <6>.(6)[164:kworker/6:2][cmdq] [SEC]open_session: status:0x0 [ 19.853512] <6>.(6)[164:kworker/6:2][cmdq] cmdq_util_track_ctrl cmdq:00000000ebd1ed19 sec:true [ 19.854584] <6>.(6)[164:kworker/6:2]MMP: mmprofile_enable(): enable: 1 [ 19.855410] <6>.(6)[164:kworker/6:2]MMP: mmprofile_force_start(): start: 1 [ 19.856266] <6>.(6)[164:kworker/6:2][cmdq] cmdq:00000000ebd1ed19(1) va:00000000ab39dbe3 pa:0x0000000010330000 [ 19.857526] <6>.(6)[164:kworker/6:2]probe of 10330000.gce_mbox_d_sec returned 1 after 13239 usecs [ 19.858719] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'gpio' property of node '/odm/audio_power[0]' - status (0) [ 20.052328] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 20.724363] <1>-(1)[0:swapper/1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.748346] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.749305] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.762010] <6>.(6)[164:kworker/6:2]BOOTPROF: 21762.000051:probe: probe=platform_drv_probe drv=reg-fixed- voltage(0xffffff80095b7cd0) 1903.282235ms [ 21.763824] <6>.(6)[164:kworker/6:2]probe of odm:audio_power returned 1 after 1905158 usecs [ 21.765007] <6>.(6)[164:kworker/6:2][MDP]CMDQ driver probe begin [ 21.765770] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.766881] <6>.(6)[164:kworker/6:2][MDP][CMDQ] platform_dev: dev:00000000a8b19995 PA:0x0000000010320000 VA:ffffff800ca90000 irqId:265 irqSecId:0 [ 21.768536] <6>.(6)[164:kworker/6:2][MDP]set dma mask bit:34 result:0 [ 21.769526] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mmsys_config):0xffffff800c3ea000 [ 21.770515] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mmsys2_config):0xffffff800c3ec000 [ 21.771530] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_split):0xffffff800c3ee000 [ 21.772486] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rdma0):0xffffff800c3f5000 [ 21.773439] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rdma1):0xffffff800c3fd000 [ 21.774391] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rdma2):0xffffff800c98c000 [ 21.775353] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rdma3):0xffffff800c98e000 [ 21.776305] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_stitch):0xffffff800c9b2000 [ 21.777264] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_fg0):0xffffff800c9b4000 [ 21.778192] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_fg1):0xffffff800c9b6000 [ 21.779131] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_fg2):0xffffff800c9bd000 [ 21.780063] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_fg3):0xffffff800c9c5000 [ 21.780993] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_hdr0):0xffffff800c9cd000 [ 21.781931] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.782916] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_hdr1):0xffffff800c9d5000 [ 21.783861] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_hdr2):0xffffff800c9dd000 [ 21.784800] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_hdr3):0xffffff800c9e5000 [ 21.785739] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_aal0):0xffffff800c9ed000 [ 21.786677] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_aal1):0xffffff800c9f5000 [ 21.787624] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_aal2):0xffffff800c9fd000 [ 21.788562] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_aal3):0xffffff800ca05000 [ 21.789498] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rsz0):0xffffff800ca61000 [ 21.790432] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rsz1):0xffffff800ca63000 [ 21.791370] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rsz2):0xffffff800ca65000 [ 21.792304] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_rsz3):0xffffff800ca6d000 [ 21.793239] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tdshp0):0xffffff800ca75000 [ 21.794195] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tdshp1):0xffffff800ca7d000 [ 21.795155] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tdshp2):0xffffff800ca85000 [ 21.796114] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tdshp3):0xffffff800ca8d000 [ 21.797072] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_color0):0xffffff800ca95000 [ 21.798029] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_color1):0xffffff800ca97000 [ 21.798984] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.799968] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_color2):0xffffff800ca99000 [ 21.800923] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_color3):0xffffff800ca9b000 [ 21.801879] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_ovl0):0xffffff800ca9d000 [ 21.802813] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_ovl1):0xffffff800ca9f000 [ 21.803750] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_pad0):0xffffff800caa1000 [ 21.804684] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_pad1):0xffffff800caa3000 [ 21.805618] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_pad2):0xffffff800caa5000 [ 21.806551] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_pad3):0xffffff800caa7000 [ 21.807488] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tcc0):0xffffff800caa9000 [ 21.808423] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_tcc1):0xffffff800caab000 [ 21.809357] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_wrot0):0xffffff800caad000 [ 21.810301] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_wrot1):0xffffff800caaf000 [ 21.811249] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_wrot2):0xffffff800cab1000 [ 21.812194] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mdp_wrot3):0xffffff800cab3000 [ 21.813139] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mm_mutex):0xffffff800cab5000 [ 21.814071] <6>.(6)[164:kworker/6:2][MDP]DEV: VA ref(mm_mutex2):0xffffff800cab7000 [ 21.815116] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.816421] <6>.(6)[164:kworker/6:2][MDP]DEV: PA ref(mm_mutex): start:0x000000001400f000 [ 21.817571] <6>.(6)[164:kworker/6:2]mtk_mdp 14001000.mdp_rdma0: Linked as a consumer to regulator.3 [ 21.818699] <6>.(6)[164:kworker/6:2][MDP]i:0, freq:218000000 [ 21.819410] <6>.(6)[164:kworker/6:2][MDP]i:1, freq:312000000 [ 21.820116] <6>.(6)[164:kworker/6:2][MDP]i:2, freq:416000000 [ 21.820821] <6>.(6)[164:kworker/6:2][MDP]i:3, freq:594000000 [ 21.822764] <6>.(6)[164:kworker/6:2][MDP]chan 11 0x00000000c4916618 dev:0x00000000a8b19995 [ 21.825002] <6>.(6)[164:kworker/6:2][MDP]chan 12 0x000000003e406df5 dev:0x00000000a8b19995 [ 21.826670] <6>.(6)[164:kworker/6:2][MDP]chan 13 0x0000000066a2aabf dev:0x00000000a8b19995 [ 21.832119] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.833137] <6>.(6)[164:kworker/6:2][MDP]chan 14 0x00000000d3e2f899 dev:0x00000000a8b19995 [ 21.834967] <6>.(6)[164:kworker/6:2][MDP]chan 16 0x00000000f849ac62 dev:0x00000000a8b19995 [ 21.840706] <6>.(6)[164:kworker/6:2][MDP]chan 21 0x0000000029a25023 dev:0x00000000a8b19995 [ 21.846563] <6>.(6)[164:kworker/6:2][MDP]chan 22 0x000000009137fdc3 dev:0x00000000a8b19995 [ 21.847692] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:7 @cmdq_mbox_create,181 [ 21.848849] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.849828] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:8 @cmdq_mbox_create,181 [ 21.850976] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:9 @cmdq_mbox_create,181 [ 21.852130] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:10 @cmdq_mbox_create,181 [ 21.853288] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:11 @cmdq_mbox_create,181 [ 21.854446] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:12 @cmdq_mbox_create,181 [ 21.855608] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:13 @cmdq_mbox_create,181 [ 21.856766] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:14 @cmdq_mbox_create,181 [ 21.857925] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:15 @cmdq_mbox_create,181 [ 21.859087] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:16 @cmdq_mbox_create,181 [ 21.860245] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:17 @cmdq_mbox_create,181 [ 21.861403] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:18 @cmdq_mbox_create,181 [ 21.862561] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:19 @cmdq_mbox_create,181 [ 21.863722] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:20 @cmdq_mbox_create,181 [ 21.864880] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:21 @cmdq_mbox_create,181 [ 21.866039] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.867015] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:22 @cmdq_mbox_create,181 [ 21.868175] <6>.(6)[164:kworker/6:2][cmdq][err] channel request fail:-19, idx:23 @cmdq_mbox_create,181 [ 21.869354] <6>.(6)[164:kworker/6:2][MDP]available thread pool: max:24 [ 21.882036] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.898646] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.916143] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.932349] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.952202] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.964314] <6>.(6)[164:kworker/6:2]MMP: mmprofile_enable(): enable: 1 [ 21.965149] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.966150] <6>.(6)[164:kworker/6:2]MMP: mmprofile_force_start(): start: 1 [ 21.967019] <6>.(6)[164:kworker/6:2][MDP]cmdq_mdp_init [ 21.977043] <6>.(6)[164:kworker/6:2][MDP]cmdq_core_register_status_dump notifier:0x0000000095de7b5d [ 21.978444] <6>.(6)[164:kworker/6:2][MDP]MDP limit dev create end [ 21.979254] <6>.(6)[164:kworker/6:2][MDP]CMDQ driver probe end [ 21.980020] <6>.(6)[164:kworker/6:2]BOOTPROF: 21980.016743:probe: probe=platform_drv_probe drv=mtk_mdp(0xffffff80095ed3a0) 214.996616ms [ 21.981645] <6>.(6)[164:kworker/6:2]probe of 14001000.mdp_rdma0 returned 1 after 216713 usecs [ 21.982718] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 21.983812] <6>.(6)[164:kworker/6:2]mediatek,mt7921_consys odm:consys7921: GPIO lookup for consumer 3v3 [ 21.984985] <6>.(6)[164:kworker/6:2]mediatek,mt7921_consys odm:consys7921: using device tree for GPIO lookup [ 21.986226] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed '3v3-gpios' property of node '/odm/consys7921[0]' - status (0) [ 22.068350] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 22.772267] <0>-(0)[0:swapper/0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 22.773449] <6>.(6)[164:kworker/6:2]mediatek,mt7921_consys odm:consys7921: GPIO lookup for consumer pmu [ 22.774631] <6>.(6)[164:kworker/6:2]mediatek,mt7921_consys odm:consys7921: using device tree for GPIO lookup [ 22.775977] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'pmu-gpios' property of node '/odm/consys7921[0]' - status (0) [ 23.474824] <6>-(6)[0:swapper/6][thread:0] 1970-01-01 00:00:23.451755 UTC;android time 1970-01-01 00:00:23.451755 [ 23.476208] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 23.796344] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.052319] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.053356] <6>.(6)[164:kworker/6:2]BOOTPROF: 24053.350672:probe: probe=platform_drv_probe drv=mediatek,mt7921_consys(0xffffff80095efbc0) 2069.521159ms [ 24.055211] <6>.(6)[164:kworker/6:2]probe of odm:consys7921 returned 1 after 2071440 usecs [ 24.056317] <6>.(6)[164:kworker/6:2]probe of ion returned -517 after 1 usecs [ 24.058767] <6>.(6)[164:kworker/6:2]mtk-tphy usb-phy1: Dropping the link to 1000c000.syscon [ 24.059886] <6>.(6)[164:kworker/6:2]probe of usb-phy1 returned 1 after 2647 usecs [ 24.060924] <6>.(6)[164:kworker/6:2]mtk-pcie-phy 11e80000.phy0: pcie pipe_clk not found [ 24.062089] <6>.(6)[164:kworker/6:2]probe of 11e80000.phy0 returned 1 after 1209 usecs [ 24.063356] <6>.(6)[164:kworker/6:2]mtk-svs 1100b000.svs: Linked as a consumer to 1100b000.lvts [ 24.064544] <6>.(6)[164:kworker/6:2]mtk-svs 1100b000.svs: Linked as a consumer to 13000000.mali [ 24.065633] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.066615] <6>.(6)[164:kworker/6:2]mtk-svs 1100b000.svs: fail to get svs platform data: -517 [ 24.067702] <6>.(6)[164:kworker/6:2]mtk-svs 1100b000.svs: Dropping the link to 13000000.mali [ 24.068757] <6>.(6)[164:kworker/6:2]mtk-svs 1100b000.svs: Dropping the link to 1100b000.lvts [ 24.069821] <6>.(6)[164:kworker/6:2]probe of 1100b000.svs returned 0 after 6628 usecs [ 24.071364] <6>.(6)[164:kworker/6:2]mtk-smi-common 14012000.smi: Linked as a consumer to 14018000.mm-iommu [ 24.073004] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 1c019000.larb (ops 0xffffff8008fdf788) [ 24.074244] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 1c103000.larb (ops 0xffffff8008fdf788) [ 24.075498] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 14013000.larb (ops 0xffffff8008fdf788) [ 24.076737] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 14f03000.larb (ops 0xffffff8008fdf788) [ 24.077975] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 14e05000.larb (ops 0xffffff8008fdf788) [ 24.079227] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 15340000.larb (ops 0xffffff8008fdf788) [ 24.080464] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 16002000.larb (ops 0xffffff8008fdf788) [ 24.081700] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 16012000.larb (ops 0xffffff8008fdf788) [ 24.082936] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.083919] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 17201000.larb (ops 0xffffff8008fdf788) [ 24.085156] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 1b010000.larb (ops 0xffffff8008fdf788) [ 24.086391] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 1803e000.larb (ops 0xffffff8008fdf788) [ 24.087633] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 1800e000.larb (ops 0xffffff8008fdf788) [ 24.088869] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 16142000.larb (ops 0xffffff8008fdf788) [ 24.090105] <6>.(6)[164:kworker/6:2]mtk-iommu 14018000.mm-iommu: bound 16014000.larb (ops 0xffffff8008fdf788) [ 24.091353] <6>.(6)[164:kworker/6:2]BOOTPROF: 24091.352210:probe: probe=platform_drv_probe drv=mtk- iommu(0xffffff80095c30d8) 20.178846ms [ 24.092963] <6>.(6)[164:kworker/6:2]probe of 14018000.mm-iommu returned 1 after 21811 usecs [ 24.094035] <6>.(6)[164:kworker/6:2]probe of 19010000.apu-iommu returned -517 after 0 usecs [ 24.095106] <6>.(6)[164:kworker/6:2]probe of 19015000.apu-iommu returned -517 after 0 usecs [ 24.096295] <6>.(6)[164:kworker/6:2]mtk-smi-common 1c01b000.smi: Linked as a consumer to 1c01f000.mm-iommu [ 24.097691] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 1c018000.larb (ops 0xffffff8008fdf788) [ 24.098926] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.099910] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 1c102000.larb (ops 0xffffff8008fdf788) [ 24.101145] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 14f02000.larb (ops 0xffffff8008fdf788) [ 24.102379] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 14e04000.larb (ops 0xffffff8008fdf788) [ 24.103617] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 15001000.larb (ops 0xffffff8008fdf788) [ 24.104852] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 15120000.larb (ops 0xffffff8008fdf788) [ 24.106087] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 15230000.larb (ops 0xffffff8008fdf788) [ 24.107325] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 16001000.larb (ops 0xffffff8008fdf788) [ 24.108560] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 16013000.larb (ops 0xffffff8008fdf788) [ 24.109795] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 1a010000.larb (ops 0xffffff8008fdf788) [ 24.111030] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 1802e000.larb (ops 0xffffff8008fdf788) [ 24.112266] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 1800d000.larb (ops 0xffffff8008fdf788) [ 24.113501] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 16141000.larb (ops 0xffffff8008fdf788) [ 24.114736] <6>.(6)[164:kworker/6:2]mtk-iommu 1c01f000.mm-iommu: bound 16015000.larb (ops 0xffffff8008fdf788) [ 24.115972] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.116950] <6>.(6)[164:kworker/6:2]BOOTPROF: 24116.949979:probe: probe=platform_drv_probe drv=mtk- iommu(0xffffff80095c30d8) 20.753077ms [ 24.118556] <6>.(6)[164:kworker/6:2]probe of 1c01f000.mm-iommu returned 1 after 22370 usecs [ 24.119780] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c01a000.vdosys_config to group 0 [ 24.120810] <6>.(6)[164:kworker/6:2]mediatek-drm 1c01a000.vdosys_config: Linked as a consumer to 1c018000.larb [ 24.122121] <6>.(6)[164:kworker/6:2]probe of 1c01a000.vdosys_config returned 0 after 2497 usecs [ 24.123373] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c000000.disp_ovl to group 0 [ 24.124348] <6>.(6)[164:kworker/6:2]mediatek-disp-ovl 1c000000.disp_ovl: Linked as a consumer to 1c018000.larb [ 24.125650] <6>.(6)[164:kworker/6:2]mediatek-disp-ovl 1c000000.disp_ovl: mtk_ddp_comp_set_larb: DDP_COMPONENT_OVL0 need larb device [ 24.127129] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_OVL0: smi-id:0 [ 24.127887] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=0 [ 24.129117] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.129995] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.131003] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.132013] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.133004] <6>.(6)[164:kworker/6:2]probe of 1c000000.disp_ovl returned 1 after 9681 usecs [ 24.134099] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c00a000.disp_ovl to group 0 [ 24.135078] <6>.(6)[164:kworker/6:2]mediatek-disp-ovl 1c00a000.disp_ovl: Linked as a consumer to 1c019000.larb [ 24.136366] <6>.(6)[164:kworker/6:2]mediatek-disp-ovl 1c00a000.disp_ovl: mtk_ddp_comp_set_larb: DDP_COMPONENT_OVL1 need larb device [ 24.137835] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_OVL1: smi-id:1 [ 24.138584] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=1 [ 24.138828] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.138829] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.138830] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.142701] <6>.(6)[164:kworker/6:2]probe of 1c00a000.disp_ovl returned 1 after 8645 usecs [ 24.143784] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c002000.disp_rdma to group 0 [ 24.144770] <6>.(6)[164:kworker/6:2]mediatek-disp-rdma 1c002000.disp_rdma: Linked as a consumer to 1c018000.larb [ 24.146077] <6>.(6)[164:kworker/6:2]mediatek-disp-rdma 1c002000.disp_rdma: mtk_ddp_comp_set_larb: DDP_COMPONENT_RDMA0 need larb device [ 24.147584] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_RDMA0: smi- id:0 [ 24.148358] <6>.(6)[164:kworker/6:2]probe of 1c002000.disp_rdma returned 1 after 4600 usecs [ 24.149397] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.150411] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c00c000.disp_rdma to group 0 [ 24.151401] <6>.(6)[164:kworker/6:2]mediatek-disp-rdma 1c00c000.disp_rdma: Linked as a consumer to 1c019000.larb [ 24.152703] <6>.(6)[164:kworker/6:2]mediatek-disp-rdma 1c00c000.disp_rdma: mtk_ddp_comp_set_larb: DDP_COMPONENT_RDMA1 need larb device [ 24.154206] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_RDMA1: smi- id:1 [ 24.154976] <6>.(6)[164:kworker/6:2]probe of 1c00c000.disp_rdma returned 1 after 4580 usecs [ 24.156021] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=2 [ 24.156265] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.156266] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.156267] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.160168] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c001000.disp_wdma to group 0 [ 24.161153] <6>.(6)[164:kworker/6:2]mediatek-disp-wdma 1c001000.disp_wdma: Linked as a consumer to 1c018000.larb [ 24.162424] <6>.(6)[164:kworker/6:2]mtk_disp_wdma_probe+ [ 24.163124] <6>.(6)[164:kworker/6:2]mediatek-disp-wdma 1c001000.disp_wdma: mtk_ddp_comp_set_larb: DDP_COMPONENT_WDMA0 need larb device [ 24.164627] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_WDMA0: smi- id:0 [ 24.165386] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.166370] <6>.(6)[164:kworker/6:2]mtk_disp_wdma_probe- [ 24.167036] <6>.(6)[164:kworker/6:2]probe of 1c001000.disp_wdma returned 1 after 6888 usecs [ 24.168118] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c00b000.disp_wdma to group 0 [ 24.169104] <6>.(6)[164:kworker/6:2]mediatek-disp-wdma 1c00b000.disp_wdma: Linked as a consumer to 1c019000.larb [ 24.170373] <6>.(6)[164:kworker/6:2]mtk_disp_wdma_probe+ [ 24.171071] <6>.(6)[164:kworker/6:2]mediatek-disp-wdma 1c00b000.disp_wdma: mtk_ddp_comp_set_larb: DDP_COMPONENT_WDMA1 need larb device [ 24.172576] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=3 [ 24.172817] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.172818] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.172819] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.176673] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_WDMA1: smi- id:1 [ 24.177440] <6>.(6)[164:kworker/6:2]mtk_disp_wdma_probe- [ 24.178105] <6>.(6)[164:kworker/6:2]probe of 1c00b000.disp_wdma returned 1 after 9999 usecs [ 24.179298] <6>.(6)[164:kworker/6:2]mt8195-pinctrl 10005000.pinctrl: pin_config_group_set op failed for group 108 [ 24.180575] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: Error applying setting, reverse things back [ 24.181969] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.182953] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: GPIO lookup for consumer avdd [ 24.184203] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: using device tree for GPIO lookup [ 24.185502] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'avdd-gpios' property of node '/disp_dsi0@1c008000/panel@0[0 ]' - status (0) [ 24.187122] <6>.(6)[164:kworker/6:2]gpio gpiochip0: Persistence not supported for GPIO 138 [ 24.188154] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: GPIO lookup for consumer avee [ 24.189398] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=4 [ 24.189635] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.189635] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.189636] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.193491] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: using device tree for GPIO lookup [ 24.194780] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'avee-gpios' property of node '/disp_dsi0@1c008000/panel@0[0 ]' - status (0) [ 24.196396] <6>.(6)[164:kworker/6:2]gpio gpiochip0: Persistence not supported for GPIO 139 [ 24.197464] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: Linked as a consumer to regulator.57 [ 24.198783] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.200056] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: GPIO lookup for consumer enable [ 24.201327] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: using device tree for GPIO lookup [ 24.202628] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/disp_dsi0@1c008000/panel@0 [0]' - status (0) [ 24.204291] <6>.(6)[164:kworker/6:2]gpio gpiochip0: Persistence not supported for GPIO 108 [ 24.205322] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=5 [ 24.205577] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.205579] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.205581] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.209453] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: GPIO lookup for consumer leden [ 24.210708] <6>.(6)[164:kworker/6:2]panel-boe-tv101wum-nl6 1c008000.disp_dsi0.0: using device tree for GPIO lookup [ 24.212001] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'leden-gpios' property of node '/disp_dsi0@1c008000/panel@0[ 0]' - status (0) [ 24.213626] <6>.(6)[164:kworker/6:2]gpio gpiochip0: Persistence not supported for GPIO 137 [ 24.214669] <6>.(6)[164:kworker/6:2]BOOTPROF: 24214.668441:probe: probe=mipi_dsi_drv_probe drv=panel-boe-tv101wum- nl6(0xffffff80095d9c00) 31.710154ms [ 24.216412] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.217395] <6>.(6)[164:kworker/6:2]probe of 1c008000.disp_dsi0.0 returned 1 after 38184 usecs [ 24.218597] <6>.(6)[164:kworker/6:2]BOOTPROF: 24218.596518:probe: probe=platform_drv_probe drv=mtk- dsi(0xffffff80095cb280) 39.409615ms [ 24.220184] <6>.(6)[164:kworker/6:2]mtk-dsi 1c008000.disp_dsi0: Dropping the link to 10005000.pinctrl [ 24.221334] <6>.(6)[164:kworker/6:2]mtk-dsi 1c008000.disp_dsi0: Dropping the link to mt6360_ldo.5.auto [ 24.222492] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=6 [ 24.222737] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.222738] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.222739] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.226600] <6>.(6)[164:kworker/6:2]probe of 1c008000.disp_dsi0 returned 1 after 47425 usecs [ 24.227719] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c104000.disp_pseudo_ovl0 to group 0 [ 24.228784] <6>.(6)[164:kworker/6:2]mediatek-disp-pseudo-ovl 1c104000.disp_pseudo_ovl0: Linked as a consumer to 1c102000.larb [ 24.230243] <6>.(6)[164:kworker/6:2]mediatek-disp-pseudo-ovl 1c104000.disp_pseudo_ovl0: mtk_ddp_comp_set_larb: DDP_COMPONENT_PSEUDO_OVL need larb device [ 24.231944] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.232919] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_PSEUDO_OVL: smi-id:0 [ 24.233821] <6>.(6)[164:kworker/6:2]probe of 1c104000.disp_pseudo_ovl0 returned 1 after 6129 usecs [ 24.234985] <6>.(6)[164:kworker/6:2]iommu: Adding device 1c114000.disp_ethdr to group 0 [ 24.235986] <6>.(6)[164:kworker/6:2]mediatek-disp-ethdr 1c114000.disp_ethdr: Linked as a consumer to 1c103000.larb [ 24.237318] <6>.(6)[164:kworker/6:2]mediatek-disp-ethdr 1c114000.disp_ethdr: mtk_ddp_comp_set_larb: DDP_COMPONENT_ETHDR need larb device [ 24.238843] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=7 [ 24.239084] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.239086] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.239087] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.242942] <6>.(6)[164:kworker/6:2]DDP_COMPONENT_ETHDR: smi- id:1 [ 24.243767] <6>.(6)[164:kworker/6:2]probe of 1c114000.disp_ethdr returned 1 after 8802 usecs [ 24.244869] <6>.(6)[164:kworker/6:2]iommu: Adding device vdosys0_client to group 0 [ 24.245812] <6>.(6)[164:kworker/6:2]mediatek-disp-power vdosys0_client: Linked as a consumer to 1c018000.larb [ 24.247066] <6>.(6)[164:kworker/6:2]probe of vdosys0_client returned 1 after 2221 usecs [ 24.248139] <6>.(6)[164:kworker/6:2]iommu: Adding device disp_pseudo_ovl_l2 to group 0 [ 24.249125] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.250100] <6>.(6)[164:kworker/6:2]mtk-pseudo-ovl-larb disp_pseudo_ovl_l2: Linked as a consumer to 1c102000.larb [ 24.251405] <6>.(6)[164:kworker/6:2]probe of disp_pseudo_ovl_l2 returned 1 after 3316 usecs [ 24.252498] <6>.(6)[164:kworker/6:2]iommu: Adding device disp_pseudo_ovl_l3 to group 0 [ 24.253485] <6>.(6)[164:kworker/6:2]mtk-pseudo-ovl-larb disp_pseudo_ovl_l3: Linked as a consumer to 1c103000.larb [ 24.254781] <6>.(6)[164:kworker/6:2]probe of disp_pseudo_ovl_l3 returned 1 after 2311 usecs [ 24.255826] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=8 [ 24.256065] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.256067] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.256069] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.259953] <6>.(6)[164:kworker/6:2]probe of ged returned -517 after 0 usecs [ 24.260868] <6>.(6)[164:kworker/6:2][GPU/DVFS] @__mt_gpufreq_pdrv_probe start [ 24.262155] <6>.(6)[164:kworker/6:2]gpufreq gpufreq: Linked as a consumer to regulator.49 [ 24.263200] <6>.(6)[164:kworker/6:2]gpufreq gpufreq: Linked as a consumer to regulator.29 [ 24.264396] <6>.(6)[164:kworker/6:2][GPU/DVFS] Preloader init freq is 700000 [ 24.265274] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.266609] <6>.(6)[164:kworker/6:2][GPU/DVFS] @__mt_gpufreq_pdrv_probe done [ 24.267500] <6>.(6)[164:kworker/6:2]probe of gpufreq returned 1 after 6644 usecs [ 24.268452] <6>.(6)[164:kworker/6:2]probe of 13000000.mali returned -517 after 0 usecs [ 24.269511] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: Linked as a consumer to regulator.41 [ 24.270973] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: try devm_regulator_get on apusys_top [ 24.272341] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=9 [ 24.272577] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.272578] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.272579] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.276466] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: Linked as a consumer to regulator.13 [ 24.278001] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: genpd add domains apusys_top [ 24.279284] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: try devm_regulator_get on apusys_vpu0 [ 24.280684] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: genpd add domains apusys_vpu0 [ 24.281970] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.282945] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: try devm_regulator_get on apusys_vpu1 [ 24.284326] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: genpd add domains apusys_vpu1 [ 24.285615] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: try devm_regulator_get on apusys_dla0 [ 24.286991] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: genpd add domains apusys_dla0 [ 24.288285] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: try devm_regulator_get on apusys_dla1 [ 24.289658] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=10 [ 24.289895] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.289896] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.289897] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.293768] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: genpd add domains apusys_dla1 [ 24.295064] <6>.(6)[164:kworker/6:2]BOOTPROF: 24295.063980:probe: probe=platform_drv_probe drv=apusys-power- controller(0xffffff80095e1e08) 25.583462ms [ 24.296816] <6>.(6)[164:kworker/6:2]apusys-power-controller apusys-power-controller: Dropping the link to 190f3000.syscon [ 24.298183] <6>.(6)[164:kworker/6:2]probe of apusys-power- controller returned 1 after 28712 usecs [ 24.299287] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.301899] <6>.(6)[164:kworker/6:2]probe of 190f1000.apusys_power returned 1 after 1600 usecs [ 24.303124] <6>.(6)[164:kworker/6:2]probe of 19021000.apusys_reviser returned -517 after 1 usecs [ 24.304751] <6>.(6)[164:kworker/6:2]probe of 1906e000.apusys_mnoc returned 1 after 446 usecs [ 24.305814] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=11 [ 24.306428] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.306431] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.306435] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.310397] <6>.(6)[164:kworker/6:2][apusys]mdw_probe + [ 24.311066] <6>.(6)[164:kworker/6:2][apusys]mdw_probe [mdw_probe] g_ion_device is NULL [ 24.312066] <6>.(6)[164:kworker/6:2]probe of apusys returned 0 after 1698 usecs [ 24.313076] <6>.(6)[164:kworker/6:2]apusys_sample apusys_sample: [sample_probe] apusys_init = 0 [ 24.314166] <6>.(6)[164:kworker/6:2]probe of apusys_sample returned 0 after 1106 usecs [ 24.315172] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.316186] <6>.(6)[164:kworker/6:2]probe of 19025000.edma0 returned -517 after 0 usecs [ 24.317201] <6>.(6)[164:kworker/6:2]probe of 19026000.edma1 returned -517 after 0 usecs [ 24.318226] <6>.(6)[164:kworker/6:2]edma edma: [edma_probe] apusys_init = 0 [ 24.319099] <6>.(6)[164:kworker/6:2]probe of edma returned 0 after 881 usecs [ 24.320058] <6>.(6)[164:kworker/6:2]scp_dvfs_pdrv_probe() [ 24.320750] <6>.(6)[164:kworker/6:2]scp_dvfs scp-dvfs.0: Linked as a consumer to regulator.4 [ 24.321827] <6>.(6)[164:kworker/6:2]scp_dvfs scp-dvfs.0: Linked as a consumer to regulator.14 [ 24.322888] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=12 [ 24.323132] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.323133] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.323134] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.327010] <6>.(6)[164:kworker/6:2]SCP_VREQ_VAO pinmux setting is correct - 0x55511111 [ 24.328096] <6>.(6)[164:kworker/6:2]probe of scp-dvfs.0 returned 1 after 8047 usecs [ 24.329125] <6>.(6)[164:kworker/6:2][cmdq] gce dev:000000002c49545f va:00000000534f8856 pa:0x0000000010320000 [ 24.330419] <6>.(6)[58:kworker/6:1]apusys_power 190f1000.apusys_power: Linked as a consumer to regulator.41 [ 24.331653] <6>.(6)[58:kworker/6:1]apusys_power 190f1000.apusys_power: Linked as a consumer to regulator.13 [ 24.332865] <6>-(6)[58:kworker/6:1]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.333840] <6>.(6)[58:kworker/6:1]apusys_power 190f1000.apusys_power: Linked as a consumer to regulator.12 [ 24.337210] <6>.(6)[58:kworker/6:1][apu_power_2.0][error] find_out_device_by_user empty list [ 24.338572] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=13 [ 24.339767] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.340602] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.341567] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.343161] <6>.(6)[164:kworker/6:2][cmdq] cmdq_test_probe test:00000000aba4591a dev:000000002e73aed1 clt:00000000144fee14 loop:00000000387207d3 sec:000000006d374135 [ 24.345015] <6>.(6)[164:kworker/6:2][cmdq] subsys[0]:99 [ 24.345668] <6>.(6)[164:kworker/6:2][cmdq] subsys[1]:0 [ 24.346336] <6>.(6)[164:kworker/6:2]BOOTPROF: 24346.335057:probe: probe=platform_drv_probe drv=cmdq- test(0xffffff80095ed120) 17.231077ms [ 24.347983] <6>.(6)[164:kworker/6:2]probe of cmdq-test returned 1 after 18894 usecs [ 24.348942] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.350035] <6>.(6)[164:kworker/6:2]iommu: Adding device mdp_larb4 to group 1 [ 24.350930] <6>.(6)[164:kworker/6:2]mdp-larb mdp_larb4: Linked as a consumer to 14013000.larb [ 24.352082] <6>.(6)[164:kworker/6:2]probe of mdp_larb4 returned 1 after 2103 usecs [ 24.353175] <6>.(6)[164:kworker/6:2]iommu: Adding device mdp_larb5 to group 1 [ 24.354067] <6>.(6)[164:kworker/6:2]mdp-larb mdp_larb5: Linked as a consumer to 14f02000.larb [ 24.355157] <6>.(6)[164:kworker/6:2]probe of mdp_larb5 returned 1 after 2081 usecs [ 24.356106] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=14 [ 24.356370] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.356371] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.356374] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.360307] <6>.(6)[164:kworker/6:2]iommu: Adding device mdp_larb6 to group 1 [ 24.361198] <6>.(6)[164:kworker/6:2]mdp-larb mdp_larb6: Linked as a consumer to 14f03000.larb [ 24.362267] <6>.(6)[164:kworker/6:2]probe of mdp_larb6 returned 1 after 1985 usecs [ 24.363307] <6>.(6)[164:kworker/6:2]iommu: Adding device 14e02000.wpe to group 1 [ 24.364230] <6>.(6)[164:kworker/6:2]vpp-wpe 14e02000.wpe: Linked as a consumer to 14e04000.larb [ 24.365313] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.366337] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] - E. WPE driver probe. [ 24.366343] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] clk_cnt:25 [ 24.368010] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] nr_WPE_devs=1, devnode(wpe) [ 24.368930] <6>.(6)[164:kworker/6:2][WPE][WPE_RegCharDev] - E. [ 24.368934] <6>.(6)[164:kworker/6:2][WPE][WPE_RegCharDev] - X. [ 24.369822] <6>.(6)[164:kworker/6:2]vpp-wpe 14e02000.wpe: Linked as a consumer to regulator.3 [ 24.371617] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] - X. WPE driver probe. [ 24.371626] <6>.(6)[164:kworker/6:2]probe of 14e02000.wpe returned 1 after 8365 usecs [ 24.372496] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=15 [ 24.372745] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.372746] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.372747] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.377671] <6>.(6)[164:kworker/6:2]iommu: Adding device 14e03000.wpe to group 1 [ 24.378594] <6>.(6)[164:kworker/6:2]vpp-wpe 14e03000.wpe: Linked as a consumer to 14e05000.larb [ 24.379687] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] - E. WPE driver probe. [ 24.379693] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] clk_cnt:24 [ 24.381345] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] nr_WPE_devs=2, devnode(wpe) [ 24.382267] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.383245] <6>.(6)[164:kworker/6:2][WPE][WPE_probe] - X. WPE driver probe. [ 24.383251] <6>.(6)[164:kworker/6:2]probe of 14e03000.wpe returned 1 after 5609 usecs [ 24.385157] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: Linked as a consumer to regulator.17 [ 24.386635] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: GPIO lookup for consumer enable [ 24.387650] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: using device tree for GPIO lookup [ 24.388680] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=16 [ 24.388925] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.388927] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.388928] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.392803] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/odm/fusb304[0]' - status (0) [ 24.820076] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=17 [ 24.821648] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.822489] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.823459] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 24.824453] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 24.825392] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=18 [ 24.826923] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 24.827763] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 24.828732] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 25.844301] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=19 [ 25.845886] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 25.846727] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 25.847696] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 25.848684] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 26.068281] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=20 [ 26.069864] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 26.070706] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 26.071675] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 26.072659] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 26.073635] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=21 [ 26.075165] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 26.076005] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 26.076973] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 26.078024] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: GPIO lookup for consumer sel [ 26.079001] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: using device tree for GPIO lookup [ 26.080089] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'sel-gpios' property of node '/odm/fusb304[0]' - status (0) [ 26.868098] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=22 [ 26.869674] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 26.870516] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 26.871486] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 26.872476] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 26.873454] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=23 [ 26.874988] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 26.875827] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 26.876795] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 27.892298] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=24 [ 27.893886] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 27.894727] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 27.895696] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 27.896685] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 28.084278] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=25 [ 28.085863] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 28.086703] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 28.087673] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 28.088657] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 28.089627] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=26 [ 28.091164] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 28.092004] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 28.092972] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 28.094010] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: fusb304_switch_set 0 [ 28.916261] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=27 [ 28.917838] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 28.918679] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 28.919649] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 28.920636] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 28.921613] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=28 [ 28.923147] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 28.923988] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 28.924956] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 29.940299] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=29 [ 29.941884] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 29.942726] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 29.943696] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 29.944686] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 29.945735] <6>.(6)[164:kworker/6:2]fusb304 odm:fusb304: fusb304_probe done [ 29.946639] <6>.(6)[164:kworker/6:2]BOOTPROF: 29946.634916:probe: probe=platform_drv_probe drv=fusb304(0xffffff80095f9ed8) 5561.471167ms [ 29.948346] <6>.(6)[164:kworker/6:2]probe of odm:fusb304 returned 1 after 5563217 usecs [ 29.949350] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 29.950621] <6>.(6)[164:kworker/6:2]hifi4dsp-8570: release mt8570 hw sysrst by pulling corresponding pin to high [ 29.951917] <6>.(6)[164:kworker/6:2]hifi4dsp-8570 hifi4dsp_8570: GPIO lookup for consumer mt8570_reset [ 29.953081] <6>.(6)[164:kworker/6:2]hifi4dsp-8570 hifi4dsp_8570: using device tree for GPIO lookup [ 29.954203] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=30 [ 29.954807] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 29.954810] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 29.954814] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 29.958725] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'mt8570_reset-gpios' property of node '/hifi4dsp_8570[0]' - status (0) [ 30.068248] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=31 [ 30.069701] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 30.070540] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 30.071508] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 30.072511] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=32 [ 30.074045] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 30.074884] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 30.075853] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 30.076833] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 30.964280] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=33 [ 30.965859] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 30.966699] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 30.967670] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 30.968693] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 31.988297] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=34 [ 31.989884] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 31.990726] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 31.991695] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 31.992683] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 31.993822] <6>.(6)[164:kworker/6:2]BOOTPROF: 31993.817306:probe: probe=platform_drv_probe drv=hifi4dsp- 8570(0xffffff80095faa58) 2043.172158ms [ 31.995603] <6>.(6)[164:kworker/6:2]probe of hifi4dsp_8570 returned 1 after 2045041 usecs [ 31.997809] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: Cannot get CSR clock [ 31.998847] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 31.999863] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: no reset control found [ 32.000934] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: GPIO lookup for consumer 3v3 [ 32.002054] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: using device tree for GPIO lookup [ 32.003230] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=35 [ 32.003839] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 32.003843] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 32.003846] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 32.007769] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed '3v3-gpios' property of node '/ethernet@11021000[0]' - status (0) [ 32.084264] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=36 [ 32.085773] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 32.086613] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 32.087583] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 32.088565] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 32.089538] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=37 [ 32.091072] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 32.091911] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 32.092879] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 33.012286] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=38 [ 33.013868] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 33.014709] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 33.015679] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 33.016666] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 34.036292] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=39 [ 34.037880] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 34.038722] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 34.039692] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 34.040681] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 34.041752] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: GPIO lookup for consumer 1v8 [ 34.042872] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: using device tree for GPIO lookup [ 34.044156] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse '1v8-gpios' property of node '/ethernet@11021000[0]' [ 34.045582] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse '1v8-gpio' property of node '/ethernet@11021000[0]' [ 34.046997] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: using lookup tables for GPIO lookup [ 34.048206] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: No GPIO consumer 1v8 found [ 34.049305] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 34.050290] <6>.(6)[164:kworker/6:2]------------[ cut here ]-- ---------- [ 34.051177] <6>-(6)[164:kworker/6:2]WARNING: CPU: 6 PID: 164 at devm_gpiod_put+0x64/0x70 [ 34.052188] <6>-(6)[164:kworker/6:2]Modules linked in: [ 34.052842] <6>-(6)[164:kworker/6:2]CPU: 6 PID: 164 Comm: kworker/6:2 Tainted: G S 4.19.127+ #6 [ 34.054091] <6>-(6)[164:kworker/6:2]Hardware name: MT8195V/C(ENG) (DT) [ 34.054922] <6>-(6)[164:kworker/6:2]Workqueue: events deferred_probe_work_func [ 34.055829] <6>-(6)[164:kworker/6:2]pstate: 60c00009 (nZCv daif +PAN +UAO) [ 34.056692] <6>-(6)[164:kworker/6:2]pc : devm_gpiod_put+0x64/0x70 [ 34.057457] <6>-(6)[164:kworker/6:2]lr : devm_gpiod_put+0x64/0x70 [ 34.058220] <6>-(6)[164:kworker/6:2]sp : ffffff800c3e3a70 [ 34.058896] <6>-(6)[164:kworker/6:2]x29: ffffff800c3e3a80 x28: 0000000000000402 [ 34.059823] <6>-(6)[164:kworker/6:2]x27: ffffff800950e018 x26: 00000000ffe7590d [ 34.060749] <6>-(6)[164:kworker/6:2]x25: ffffff80096b4000 x24: ffffff8009025fa8 [ 34.061676] <6>-(6)[164:kworker/6:2]x23: ffffffc1e048ee80 x22: 0000000000000000 [ 34.062601] <6>-(6)[164:kworker/6:2]x21: 0000000000000007 x20: 0000000000000000 [ 34.063526] <6>-(6)[164:kworker/6:2]x19: ffffffc1e5692010 x18: 0000000000003874 [ 34.064451] <6>-(6)[164:kworker/6:2]x17: 0000000000000000 x16: ffffff8008ee9bd4 [ 34.065377] <6>-(6)[164:kworker/6:2]x15: ffffff80090fdbaf x14: 000000000000003f [ 34.066302] <6>-(6)[164:kworker/6:2]x13: 0000000000000d34 x12: 0000000000000000 [ 34.067227] <6>-(6)[164:kworker/6:2]x11: 0000000000000000 x10: ffffffffffffffff [ 34.068152] <6>-(6)[164:kworker/6:2]x9 : 44fa49f344eccc00 x8 : 44fa49f344eccc00 [ 34.069077] <6>-(6)[164:kworker/6:2]x7 : 63205b2d2d2d2d2d x6 : ffffff800978fe58 [ 34.070002] <6>-(6)[164:kworker/6:2]x5 : 00000000000000a4 x4 : 000000000000000c [ 34.070928] <6>-(6)[164:kworker/6:2]x3 : 000000000000004c x2 : 0000000000000001 [ 34.071854] <6>-(6)[164:kworker/6:2]x1 : 0000000000000000 x0 : 0000000000000039 [ 34.072781] <6>-(6)[164:kworker/6:2]Call trace: [ 34.073354] <6>-(6)[164:kworker/6:2] devm_gpiod_put+0x64/0x70 [ 34.074081] <6>-(6)[164:kworker/6:2] external_phy_power_ctrl+0x9c/0xb4 [ 34.074900] <6>-(6)[164:kworker/6:2] mediatek_dwmac_init+0x1c0/0x1fc [ 34.075699] <6>-(6)[164:kworker/6:2] mediatek_dwmac_probe+0x338/0x41c [ 34.076509] <6>-(6)[164:kworker/6:2] platform_drv_probe+0x7c/0xb4 [ 34.077273] <6>-(6)[164:kworker/6:2] really_probe+0x500/0x6c0 [ 34.077995] <6>-(6)[164:kworker/6:2] driver_probe_device+0xbc/0x13c [ 34.078783] <6>-(6)[164:kworker/6:2] __device_attach_driver+0x11c/0x1b8 [ 34.079614] <6>-(6)[164:kworker/6:2] bus_for_each_drv+0x7c/0xc4 [ 34.080357] <6>-(6)[164:kworker/6:2] __device_attach+0xbc/0x180 [ 34.081101] <6>-(6)[164:kworker/6:2] device_initial_probe+0x10/0x18 [ 34.081887] <6>-(6)[164:kworker/6:2] bus_probe_device+0x30/0x90 [ 34.082630] <6>-(6)[164:kworker/6:2] deferred_probe_work_func+0xa0/0xf8 [ 34.083462] <6>-(6)[164:kworker/6:2] process_one_work+0x274/0x438 [ 34.084227] <6>-(6)[164:kworker/6:2] worker_thread+0x30c/0x4a8 [ 34.084960] <6>-(6)[164:kworker/6:2] kthread+0x114/0x124 [ 34.085629] <6>-(6)[164:kworker/6:2] ret_from_fork+0x10/0x18 [ 34.086340] <6>-(6)[164:kworker/6:2]---[ end trace 9f4d9a97f2dc25fb ]--- [ 34.087183] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=40 [ 34.088769] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 34.089653] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 34.090664] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 34.091692] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 34.093379] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: User ID: 0x11, Synopsys ID: 0x51 [ 34.094549] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: DWMAC4/5 [ 34.095475] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: DMA HW capability register supported [ 34.096677] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: RX Checksum Offload Engine supported [ 34.097878] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: TX Checksum insertion supported [ 34.099028] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 34.100009] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: Wake-Up On Lan supported [ 34.101102] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: TSO supported [ 34.102059] <6>.(6)[164:kworker/6:2]dwmac-mediatek 11021000.ethernet: Using 40 bits DMA width [ 34.103123] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=41 [ 34.103419] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 34.103420] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 34.103422] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 34.107377] <6>.(6)[164:kworker/6:2]mdio_bus stmmac-0: GPIO lookup for consumer reset [ 34.108352] <6>.(6)[164:kworker/6:2]mdio_bus stmmac-0: using device tree for GPIO lookup [ 34.109362] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@11021000/mdio [0]' [ 34.110855] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ethernet@11021000/mdio[ 0]' [ 34.112340] <6>.(6)[164:kworker/6:2]mdio_bus stmmac-0: using lookup tables for GPIO lookup [ 34.113368] <6>.(6)[164:kworker/6:2]mdio_bus stmmac-0: No GPIO consumer reset found [ 34.114331] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'snps,reset-gpio' property of node '/ethernet@11021000[0]' - status (0) [ 34.115902] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 35.060097] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=42 [ 35.061678] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 35.062519] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 35.063488] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 35.064480] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 35.065452] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 35.828356] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=43 [ 35.829937] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 35.830778] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 35.831747] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 35.832726] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 36.084301] <2>-(2)[0:swapper/2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 36.085300] <2>-(2)[0:swapper/2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=44 [ 36.088200] <2>-(2)[0:swapper/2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 36.089057] <2>-(2)[0:swapper/2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 36.090041] <2>-(2)[0:swapper/2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.108304] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=45 [ 37.109898] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.110741] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.111711] <6>-(6)[0:swapper/6][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.112697] <6>-(6)[0:swapper/6]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.113732] <6>.(6)[164:kworker/6:2]libphy: stmmac: probed [ 37.115154] <0>-(0)[225:kworker/u16:0]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.116803] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@11021000 /mdio/eth_phy0@1[0]' [ 37.118428] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=46 [ 37.118968] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.118972] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.118975] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.123067] <6>.(6)[164:kworker/6:2]probe of stmmac-0:01 returned 1 after 50 usecs [ 37.124673] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@11021000 /mdio/eth_phy2@4[0]' [ 37.126427] <6>.(6)[164:kworker/6:2]probe of stmmac-0:04 returned 1 after 31 usecs [ 37.127845] <6>.(6)[164:kworker/6:2][mtk_net][rtnl_unlock] rtnl_lock is held by [1] from [8374583096] to [37127840780] [ 37.129240] <6>.(6)[164:kworker/6:2]BOOTPROF: 37129.237087:probe: probe=platform_drv_probe drv=dwmac- mediatek(0xffffff8009605530) 5131.821012ms [ 37.130919] <6>.(6)[164:kworker/6:2]probe of 11021000.ethernet returned 1 after 5134021 usecs [ 37.132006] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.133348] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: Linked as a consumer to regulator.1 [ 37.134509] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: Linked as a consumer to regulator.19 [ 37.135631] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=47 [ 37.136128] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.136130] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.136133] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.140458] <6>.(6)[164:kworker/6:2]mtk-tphy usb-phy1: u2_phy_pll_26m_set [ 37.141324] <6>.(6)[164:kworker/6:2]phy phy-usb-phy1.5: u2_phy_props_set, bc12:0, src:0, vrt:0, term:0, rev6:1, dis:0 [ 37.143125] <6>.(6)[164:kworker/6:2]mtk-tphy usb-phy1: u2_phy_instance_set_mode_ext submode(2) [ 37.144211] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: xHCI Host Controller [ 37.145166] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: new USB bus registered, assigned bus number 3 [ 37.146592] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: hcc params 0x01400f99 hci version 0x110 quirks 0x0000000000210010 [ 37.148055] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: irq 293, io mem 0x11290000 [ 37.149066] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.150326] <6>.(6)[164:kworker/6:2]hub 3-0:1.0: USB hub found [ 37.151073] <6>.(6)[164:kworker/6:2]hub 3-0:1.0: 1 port detected [ 37.151826] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=48 [ 37.152176] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.152178] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.152180] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.156113] <6>.(6)[164:kworker/6:2]probe of 3-0:1.0 returned 1 after 5794 usecs [ 37.157056] <6>.(6)[164:kworker/6:2]probe of usb3 returned 1 after 6786 usecs [ 37.157957] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: xHCI Host Controller [ 37.158901] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: new USB bus registered, assigned bus number 4 [ 37.160122] <6>.(6)[164:kworker/6:2]xhci-mtk 11290000.xhci30: Host supports USB 3.2 Enhanced SuperSpeed [ 37.161304] <6>.(6)[164:kworker/6:2]usb usb4: We don't know the algorithms for LPM for this host, disabling LPM. [ 37.162652] <6>.(6)[164:kworker/6:2]hub 4-0:1.0: USB hub found [ 37.163391] <6>.(6)[164:kworker/6:2]hub 4-0:1.0: 1 port detected [ 37.164168] <6>.(6)[164:kworker/6:2]probe of 4-0:1.0 returned 1 after 1518 usecs [ 37.165104] <6>.(6)[164:kworker/6:2]probe of usb4 returned 1 after 2478 usecs [ 37.165994] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.166985] <6>.(6)[164:kworker/6:2]BOOTPROF: 37166.983857:probe: probe=platform_drv_probe drv=xhci- mtk(0xffffff800960b2d8) 33.708077ms [ 37.168582] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=49 [ 37.168881] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.168882] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.168884] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.172761] <6>.(6)[164:kworker/6:2]probe of 11290000.xhci30 returned 1 after 39511 usecs [ 37.173935] <6>.(6)[164:kworker/6:2][VCU] vdec_log_info 000000003248c1c4 1024 vcuid 0 vcu_ptr 00000000903ca4e0 [ 37.181799] <4>-(4)[0:swapper/4]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.185074] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=50 [ 37.186622] <5>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.186824] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.187463] <6>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.187467] <6>-(5)[0:swapper/5][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.190629] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.191822] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.192993] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.194162] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.195335] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.196504] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.197674] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.198849] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.199829] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.200999] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.202175] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=51 [ 37.202477] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.202478] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.202480] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.206347] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.207518] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.208688] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.209857] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.211026] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.212197] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.213367] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.214536] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.215707] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.216683] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.217852] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.219020] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=52 [ 37.219274] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.219275] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.219276] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.223143] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.224311] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.225480] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.226649] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.227822] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.228991] <6>.(6)[164:kworker/6:2][cmdq][err] can't parse gce- events property @cmdq_dev_get_event,367 [ 37.230160] <6>.(6)[164:kworker/6:2][cmdq][err] no gce-event- names property or no such event:venc_cmdq_pause_done @cmdq_dev_get_event,361 [ 37.231697] <6>.(6)[164:kworker/6:2][cmdq][err] no gce-event- names property or no such event:venc_mb_done @cmdq_dev_get_event,361 [ 37.233146] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.234121] <6>.(6)[164:kworker/6:2][cmdq][err] no gce-event- names property or no such event:venc_128B_cnt_done @cmdq_dev_get_event,361 [ 37.235635] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=53 [ 37.235870] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.235871] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.235871] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.239788] <6>.(6)[164:kworker/6:2]mtk_vcu 18000000.vcu: [VCU] Data extend memory (len:3145728) phy=0x220000000 virt=0x000000002ac948e6 iova=0x0 [ 37.241409] <6>.(6)[164:kworker/6:2]mtk_vcu 18000000.vcu: [VCU] initialization completed [ 37.242421] <6>.(6)[164:kworker/6:2]BOOTPROF: 37242.419857:probe: probe=platform_drv_probe drv=mtk_vcu(0xffffff800961a368) 68.491923ms [ 37.244022] <6>.(6)[164:kworker/6:2]probe of 18000000.vcu returned 1 after 70115 usecs [ 37.245165] <6>.(6)[164:kworker/6:2]iommu: Adding device 18000000.vdec to group 2 [ 37.246099] <6>.(6)[164:kworker/6:2]mtk-vcodec-dec 18000000.vdec: Linked as a consumer to 1800e000.larb [ 37.248403] <6>.(6)[164:kworker/6:2][MTK_V4L2] level=0 mtk_vcodec_dec_probe(),385: decoder registered as /dev/video0 [ 37.248473] <1>-(1)[234:mtk-vcodec-dec]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.249859] <6>.(6)[164:kworker/6:2]mtk-vcodec-dec 18000000.vdec: Linked as a consumer to regulator.3 [ 37.251902] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=54 [ 37.252140] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.252142] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.252143] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.256290] <6>.(6)[164:kworker/6:2]probe of 18000000.vdec returned 1 after 11189 usecs [ 37.257570] <6>.(6)[164:kworker/6:2]iommu: Adding device vdec_l21 to group 2 [ 37.258450] <6>.(6)[164:kworker/6:2]mtk-vdec-larb vdec_l21: Linked as a consumer to 1802e000.larb [ 37.259663] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_vdec_larb_probe:363: mtk_vdec_larb_probe enable larb 21 [ 37.259663] <6> [ 37.261162] <6>.(6)[164:kworker/6:2]probe of vdec_l21 returned 1 after 3788 usecs [ 37.262224] <6>.(6)[164:kworker/6:2]iommu: Adding device vdec_l22 to group 2 [ 37.263111] <6>.(6)[164:kworker/6:2]mtk-vdec-larb vdec_l22: Linked as a consumer to 1803e000.larb [ 37.264274] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_vdec_larb_probe:363: mtk_vdec_larb_probe enable larb 22 [ 37.264274] <6> [ 37.265767] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.266746] <6>.(6)[164:kworker/6:2]probe of vdec_l22 returned 1 after 4600 usecs [ 37.267751] <6>.(6)[164:kworker/6:2]iommu: Adding device vdec_l23 to group 2 [ 37.268631] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=55 [ 37.268875] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.268876] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.268877] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.272746] <6>.(6)[164:kworker/6:2]mtk-vdec-larb vdec_l23: Linked as a consumer to 1800e000.larb [ 37.273894] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_vdec_larb_probe:363: mtk_vdec_larb_probe enable larb 23 [ 37.273894] <6> [ 37.275395] <6>.(6)[164:kworker/6:2]probe of vdec_l23 returned 1 after 7668 usecs [ 37.276550] <6>.(6)[164:kworker/6:2]iommu: Adding device vdec_l24 to group 2 [ 37.277430] <6>.(6)[164:kworker/6:2]mtk-vdec-larb vdec_l24: Linked as a consumer to 1800d000.larb [ 37.278540] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_vdec_larb_probe:363: mtk_vdec_larb_probe enable larb 24 [ 37.278540] <6> [ 37.280040] <6>.(6)[164:kworker/6:2]probe of vdec_l24 returned 1 after 3666 usecs [ 37.281041] <6>.(6)[164:kworker/6:2]iommu: Adding device 1a020000.venc to group 2 [ 37.281974] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.282952] <6>.(6)[164:kworker/6:2]mtk-vcodec-enc 1a020000.venc: Linked as a consumer to 1a010000.larb [ 37.284907] <3>-(3)[0:swapper/3][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=56 [ 37.287736] <3>-(3)[0:swapper/3][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.288591] <3>-(3)[0:swapper/3][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.289208] <6>.(6)[164:kworker/6:2][MTK_V4L2] level=0 mtk_vcodec_enc_probe(),358: encoder registered as /dev/video1 [ 37.289575] <3>-(3)[0:swapper/3][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.291216] <6>.(6)[164:kworker/6:2]mtk-vcodec-enc 1a020000.venc: Linked as a consumer to regulator.3 [ 37.293862] <6>.(6)[164:kworker/6:2]probe of 1a020000.venc returned 1 after 12845 usecs [ 37.295770] <6>.(6)[164:kworker/6:2]iommu: Adding device venc_l19 to group 2 [ 37.296658] <6>.(6)[164:kworker/6:2]mtk-venc-larb venc_l19: Linked as a consumer to 1a010000.larb [ 37.297784] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_venc_larb_probe:246: mtk_venc_larb_probe enable larb 19 [ 37.297784] <6> [ 37.299284] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.300289] <6>.(6)[164:kworker/6:2]probe of venc_l19 returned 1 after 5275 usecs [ 37.301367] <6>.(6)[164:kworker/6:2]iommu: Adding device venc_l20 to group 2 [ 37.302245] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=57 [ 37.302485] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.302486] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.302487] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.306357] <6>.(6)[164:kworker/6:2]mtk-venc-larb venc_l20: Linked as a consumer to 1b010000.larb [ 37.307469] <6>.(6)[164:kworker/6:2][MTK_V4L2][ERROR] mtk_venc_larb_probe:246: mtk_venc_larb_probe enable larb 20 [ 37.307469] <6> [ 37.308964] <6>.(6)[164:kworker/6:2]probe of venc_l20 returned 1 after 7700 usecs [ 37.309994] <6>.(6)[164:kworker/6:2]iommu: Adding device 1a030000.jpgenc to group 2 [ 37.310948] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a030000.jpgenc: Linked as a consumer to 1a010000.larb [ 37.312182] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a030000.jpgenc: jpeg enc device registered as /dev/video2 (81,2) [ 37.313430] <6>.(6)[164:kworker/6:2]probe of 1a030000.jpgenc returned 1 after 3493 usecs [ 37.314556] <6>.(6)[164:kworker/6:2]iommu: Adding device 1a040000.jpgdec to group 2 [ 37.315514] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.316490] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a040000.jpgdec: Linked as a consumer to 1a010000.larb [ 37.317657] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a040000.jpgdec: jpeg dec device registered as /dev/video3 (81,3) [ 37.318903] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=58 [ 37.319148] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.319150] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.319151] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.323021] <6>.(6)[164:kworker/6:2]probe of 1a040000.jpgdec returned 1 after 8540 usecs [ 37.324148] <6>.(6)[164:kworker/6:2]iommu: Adding device 1a050000.jpgdec to group 2 [ 37.325102] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a050000.jpgdec: Linked as a consumer to 1a010000.larb [ 37.326265] <6>.(6)[164:kworker/6:2]mtk-jpeg 1a050000.jpgdec: jpeg dec device registered as /dev/video4 (81,4) [ 37.327517] <6>.(6)[164:kworker/6:2]probe of 1a050000.jpgdec returned 1 after 3447 usecs [ 37.328594] <6>.(6)[164:kworker/6:2]iommu: Adding device 1b030000.jpgenc to group 2 [ 37.329547] <6>.(6)[164:kworker/6:2]mtk-jpeg 1b030000.jpgenc: Linked as a consumer to 1b010000.larb [ 37.330713] <6>.(6)[164:kworker/6:2]mtk-jpeg 1b030000.jpgenc: jpeg enc device registered as /dev/video5 (81,5) [ 37.331962] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.332941] <6>.(6)[164:kworker/6:2]probe of 1b030000.jpgenc returned 1 after 4376 usecs [ 37.334027] <6>.(6)[164:kworker/6:2]iommu: Adding device 1b040000.jpgdec to group 2 [ 37.334982] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=59 [ 37.335215] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.335217] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.335217] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.339087] <6>.(6)[164:kworker/6:2]mtk-jpeg 1b040000.jpgdec: Linked as a consumer to 1b010000.larb [ 37.340253] <6>.(6)[164:kworker/6:2]mtk-jpeg 1b040000.jpgdec: jpeg dec device registered as /dev/video6 (81,6) [ 37.341500] <6>.(6)[164:kworker/6:2]probe of 1b040000.jpgdec returned 1 after 7509 usecs [ 37.342544] <6>.(6)[164:kworker/6:2]probe of hcp@0 returned -517 after 0 usecs [ 37.343498] <6>.(6)[164:kworker/6:2]probe of 15000000.imgsys_fw returned -517 after 0 usecs [ 37.344596] <6>.(6)[164:kworker/6:2]iommu: Adding device 15320000.ipesys_me to group 1 [ 37.345584] <6>.(6)[164:kworker/6:2]camera-me 15320000.ipesys_me: Linked as a consumer to 15340000.larb [ 37.346757] <6>.(6)[164:kworker/6:2]mtk imgsys me probe start [ 37.347489] <6>.(6)[164:kworker/6:2]mtk imgsys me probe done [ 37.348198] <6>.(6)[164:kworker/6:2]probe of 15320000.ipesys_me returned 1 after 3627 usecs [ 37.349237] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.350378] <6>.(6)[164:kworker/6:2]iommu: Adding device camisp_l13 to group 1 [ 37.351284] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l13: Linked as a consumer to 16001000.larb [ 37.352400] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=60 [ 37.352641] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.352643] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.352645] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.356517] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l13: mtk_cam_larb_probe [ 37.357453] <6>.(6)[164:kworker/6:2]probe of camisp_l13 returned 1 after 7193 usecs [ 37.358543] <6>.(6)[164:kworker/6:2]iommu: Adding device camisp_l14 to group 1 [ 37.359448] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l14: Linked as a consumer to 16002000.larb [ 37.360565] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l14: mtk_cam_larb_probe [ 37.361481] <6>.(6)[164:kworker/6:2]probe of camisp_l14 returned 1 after 3026 usecs [ 37.362538] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b0000.camsv1: mtk_camsv_probe [ 37.363574] <6>.(6)[164:kworker/6:2]probe of 160b0000.camsv1 returned 1 after 1094 usecs [ 37.364638] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b1000.camsv2: mtk_camsv_probe [ 37.365581] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.366583] <6>.(6)[164:kworker/6:2]probe of 160b1000.camsv2 returned 1 after 1956 usecs [ 37.367642] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b2000.camsv3: mtk_camsv_probe [ 37.368586] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=61 [ 37.368831] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.368832] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.368833] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.372728] <6>.(6)[164:kworker/6:2]probe of 160b2000.camsv3 returned 1 after 5094 usecs [ 37.373791] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b3000.camsv4: mtk_camsv_probe [ 37.374764] <6>.(6)[164:kworker/6:2]probe of 160b3000.camsv4 returned 1 after 984 usecs [ 37.375817] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b4000.camsv5: mtk_camsv_probe [ 37.376786] <6>.(6)[164:kworker/6:2]probe of 160b4000.camsv5 returned 1 after 978 usecs [ 37.377825] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b5000.camsv6: mtk_camsv_probe [ 37.378788] <6>.(6)[164:kworker/6:2]probe of 160b5000.camsv6 returned 1 after 970 usecs [ 37.379930] <6>.(6)[164:kworker/6:2]iommu: Adding device 16030000.cam_raw_a to group 1 [ 37.380918] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: Linked as a consumer to 16012000.larb [ 37.382108] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.383135] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: mtk_raw_probe [ 37.384089] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: clk_num:7 [ 37.384978] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=62 [ 37.385214] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.385215] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.385216] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.389099] <6>.(6)[164:kworker/6:2]probe of 16030000.cam_raw_a returned 1 after 9265 usecs [ 37.390274] <6>.(6)[164:kworker/6:2]iommu: Adding device 16070000.cam_raw_b to group 1 [ 37.391269] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: Linked as a consumer to 16014000.larb [ 37.392510] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: mtk_raw_probe [ 37.393464] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: clk_num:7 [ 37.394366] <6>.(6)[164:kworker/6:2]probe of 16070000.cam_raw_b returned 1 after 4185 usecs [ 37.395545] <6>.(6)[164:kworker/6:2]iommu: Adding device 16050000.cam_yuv_a to group 1 [ 37.396531] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16050000.cam_yuv_a: Linked as a consumer to 16013000.larb [ 37.397768] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16050000.cam_yuv_a: mtk_yuv_probe [ 37.398700] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.399698] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16050000.cam_yuv_a: clk_num:3 [ 37.400597] <6>.(6)[164:kworker/6:2]probe of 16050000.cam_yuv_a returned 1 after 5143 usecs [ 37.401637] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=63 [ 37.401884] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.401885] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.401887] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.405892] <6>.(6)[164:kworker/6:2]iommu: Adding device 16090000.cam_yuv_b to group 1 [ 37.406880] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16090000.cam_yuv_b: Linked as a consumer to 16015000.larb [ 37.408120] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16090000.cam_yuv_b: mtk_yuv_probe [ 37.409067] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16090000.cam_yuv_b: clk_num:3 [ 37.409968] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: mtk_cam_master_bind [ 37.410918] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: mtk_raw_component_bind: id=0 [ 37.412020] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16030000.cam_raw_a (ops 0xffffff800904ed28) [ 37.413264] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: mtk_raw_component_bind: id=1 [ 37.414358] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16070000.cam_raw_b (ops 0xffffff800904ed28) [ 37.415605] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.416580] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16050000.cam_yuv_a: mtk_yuv_component_bind: id=0 [ 37.417672] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16050000.cam_yuv_a (ops 0xffffff800904ed38) [ 37.418917] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=64 [ 37.419151] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.419152] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.419153] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.423016] <6>.(6)[164:kworker/6:2]mtk-cam yuv 16090000.cam_yuv_b: mtk_yuv_component_bind: id=1 [ 37.424111] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16090000.cam_yuv_b (ops 0xffffff800904ed38) [ 37.425356] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l13: mtk_cam_pm_component_bind: dev:0xe5754410, id=13 [ 37.426589] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound camisp_l13 (ops 0xffffff800904ef00) [ 37.427749] <6>.(6)[164:kworker/6:2]mtk-cam-larb camisp_l14: mtk_cam_pm_component_bind: dev:0xe5754810, id=14 [ 37.428982] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound camisp_l14 (ops 0xffffff800904ef00) [ 37.430141] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b0000.camsv1: mtk_camsv_component_bind: id=0 [ 37.431247] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b0000.camsv1 (ops 0xffffff8009051748) [ 37.432459] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.433433] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b1000.camsv2: mtk_camsv_component_bind: id=1 [ 37.434536] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b1000.camsv2 (ops 0xffffff8009051748) [ 37.435749] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=65 [ 37.435982] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.435983] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.435984] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.439849] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b2000.camsv3: mtk_camsv_component_bind: id=2 [ 37.440953] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b2000.camsv3 (ops 0xffffff8009051748) [ 37.442163] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b3000.camsv4: mtk_camsv_component_bind: id=3 [ 37.443269] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b3000.camsv4 (ops 0xffffff8009051748) [ 37.444481] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b4000.camsv5: mtk_camsv_component_bind: id=4 [ 37.445584] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b4000.camsv5 (ops 0xffffff8009051748) [ 37.446796] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b5000.camsv6: mtk_camsv_component_bind: id=5 [ 37.447901] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 160b5000.camsv6 (ops 0xffffff8009051748) [ 37.449113] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.450114] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16007000.seninf_top:seninf_csi_port_0 (ops 0xffffff800904f940) [ 37.451566] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=66 [ 37.451799] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.451800] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.451801] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.455671] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: bound 16007000.seninf_top:seninf_csi_port_1 (ops 0xffffff800904f940) [ 37.457121] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: Linked as a consumer to 16050000.cam_yuv_a [ 37.458365] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: Linked as a consumer to 16090000.cam_yuv_b [ 37.459612] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b0000.camsv1: Linked as a consumer to camisp_l13 [ 37.460758] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b1000.camsv2: Linked as a consumer to camisp_l14 [ 37.461907] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b2000.camsv3: Linked as a consumer to camisp_l13 [ 37.463055] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b3000.camsv4: Linked as a consumer to camisp_l14 [ 37.464202] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b4000.camsv5: Linked as a consumer to camisp_l13 [ 37.465349] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.466324] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b5000.camsv6: Linked as a consumer to camisp_l14 [ 37.467491] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: mtk_raw_pipeline_register: mtk-cam raw-0 [ 37.468713] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=67 [ 37.468948] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.468949] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.468950] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.473045] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: mtk_raw_pipeline_register: mtk-cam raw-1 [ 37.474457] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b0000.camsv1: mtk_camsv_pipeline_register: mtk-cam camsv-0 [ 37.475741] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b1000.camsv2: mtk_camsv_pipeline_register: mtk-cam camsv-1 [ 37.477004] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b2000.camsv3: mtk_camsv_pipeline_register: mtk-cam camsv-2 [ 37.478268] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b3000.camsv4: mtk_camsv_pipeline_register: mtk-cam camsv-3 [ 37.479540] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b4000.camsv5: mtk_camsv_pipeline_register: mtk-cam camsv-4 [ 37.480804] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b5000.camsv6: mtk_camsv_pipeline_register: mtk-cam camsv-5 [ 37.482058] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.483041] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam raw-0 [ 37.484170] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam raw-1 [ 37.485296] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=68 [ 37.485532] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.485533] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.485534] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.489398] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-0 [ 37.490544] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-1 [ 37.491695] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-2 [ 37.492842] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-3 [ 37.493989] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-4 [ 37.495137] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-0 mtk-cam camsv-5 [ 37.496284] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam raw-0 [ 37.497409] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam raw-1 [ 37.498534] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.499510] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-0 [ 37.500657] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-1 [ 37.501803] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=69 [ 37.502040] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.502040] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.502041] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.505904] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-2 [ 37.507054] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-3 [ 37.508200] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-4 [ 37.509347] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: create pad link seninf-1 mtk-cam camsv-5 [ 37.510763] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: Linked as a consumer to regulator.3 [ 37.511868] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: [mtk_cam_dvfs_init] idx=0, clk=273000000 volt=550000 [ 37.513143] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: [mtk_cam_dvfs_init] idx=1, clk=392000000 volt=600000 [ 37.514420] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: [mtk_cam_dvfs_init] idx=2, clk=416000000 volt=650000 [ 37.515699] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.516674] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: [mtk_cam_dvfs_init] idx=3, clk=499000000 volt=750000 [ 37.518046] <6>.(6)[164:kworker/6:2]mtk-cam raw 16030000.cam_raw_a: [mtk_cam_qos_init] raw_engine_id=0, port_num=23 [ 37.519344] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=70 [ 37.519583] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.519584] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.519585] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.523546] <6>.(6)[164:kworker/6:2]mtk-cam raw 16070000.cam_raw_b: [mtk_cam_qos_init] raw_engine_id=1, port_num=46 [ 37.524846] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b0000.camsv1: [mtk_cam_qos_init] sv_engine_id=0, port_num=1 [ 37.526114] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b1000.camsv2: [mtk_cam_qos_init] sv_engine_id=1, port_num=2 [ 37.527385] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b2000.camsv3: [mtk_cam_qos_init] sv_engine_id=2, port_num=3 [ 37.528652] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b3000.camsv4: [mtk_cam_qos_init] sv_engine_id=3, port_num=4 [ 37.529919] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b4000.camsv5: [mtk_cam_qos_init] sv_engine_id=4, port_num=5 [ 37.531189] <6>.(6)[164:kworker/6:2]mtk-cam camsv 160b5000.camsv6: [mtk_cam_qos_init] sv_engine_id=5, port_num=6 [ 37.532455] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.533430] <6>.(6)[164:kworker/6:2]mtk-cam 16000000.camisp: mtk_cam_master_bind success [ 37.534449] <6>.(6)[164:kworker/6:2]BOOTPROF: 37534.448088:probe: probe=platform_drv_probe drv=mtk-cam yuv(0xffffff800962af88) 126.357231ms [ 37.536071] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=71 [ 37.536310] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.536311] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.536312] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.540188] <6>.(6)[164:kworker/6:2]probe of 16090000.cam_yuv_b returned 1 after 134388 usecs [ 37.541358] <6>.(6)[164:kworker/6:2]iommu: Adding device 15310000.aie to group 1 [ 37.542281] <6>.(6)[164:kworker/6:2]mtk-aie-5.3 15310000.aie: Linked as a consumer to 15340000.larb [ 37.543740] <6>.(6)[164:kworker/6:2]mtk-aie-5.3 15310000.aie: Linked as a consumer to regulator.3 [ 37.545152] <6>.(6)[164:kworker/6:2]mtk_smi_sspm_init sspm smi resv va:0xffffff800de70000, pa:0x0x0000000080bf5000, size:0x9000 [ 37.546593] <6>.(6)[164:kworker/6:2]mtk-aie-5.3 15310000.aie: AIE : Success to mtk_aie_probe [ 37.547672] <6>.(6)[164:kworker/6:2]probe of 15310000.aie returned 1 after 6354 usecs [ 37.548647] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.549720] <6>.(6)[164:kworker/6:2]iommu: Adding device 17080000.ccu_rproc to group 3 [ 37.550708] <6>.(6)[164:kworker/6:2]ccu_rproc 17080000.ccu_rproc: Linked as a consumer to 17201000.larb [ 37.551882] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=72 [ 37.552114] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.552115] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.552116] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.556102] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] ccu_base pa: 0x17080000, size: 0x1000 [ 37.557238] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] ccu_base va: 0xffffff800cf53000 [ 37.558312] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] dmem_base pa: 0x17020000, size: 0x20000 [ 37.559474] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] dmem_base va: 0xffffff800de80000 [ 37.560559] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] pmem_base pa: 0x17000000, size: 0x20000 [ 37.561716] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] pmem_base va: 0xffffff800dec0000 [ 37.562850] <6>.(6)[164:kworker/6:2][ccu_rproc][mtk_ccu_probe] ccu_probe irq_num: 442 [ 37.565137] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.566650] <6>.(6)[164:kworker/6:2]ccu_rproc 17080000.ccu_rproc: success: size(400000), va(ffffff800e501000), mva(243c00000) [ 37.568127] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=73 [ 37.568724] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.568727] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.568732] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.572693] <6>.(6)[164:kworker/6:2]remoteproc remoteproc0: ccu_rproc is available [ 37.573712] <6>.(6)[164:kworker/6:2]BOOTPROF: 37573.708088:probe: probe=platform_drv_probe drv=ccu_rproc(0xffffff8009643df0) 17.624461ms [ 37.575365] <6>.(6)[164:kworker/6:2]probe of 17080000.ccu_rproc returned 1 after 25677 usecs [ 37.576662] <6>.(6)[164:kworker/6:2]iommu: Adding device ccu_rproc1 to group 4 [ 37.577564] <6>.(6)[164:kworker/6:2]ccu_rproc1 ccu_rproc1: Linked as a consumer to 17201000.larb [ 37.578735] <6>.(6)[164:kworker/6:2]probe of ccu_rproc1 returned 1 after 2163 usecs [ 37.580052] <6>.(6)[164:kworker/6:2]mt8195-sound sound: Linked as a consumer to regulator.43 [ 37.581147] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL2_FE [ 37.582025] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.583009] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL3_FE [ 37.583893] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL6_FE [ 37.584775] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=74 [ 37.585026] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.585027] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.585029] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.588903] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL7_FE [ 37.589783] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL8_FE [ 37.590664] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL10_FE [ 37.591557] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL11_FE [ 37.592447] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL1_FE [ 37.593325] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL2_FE [ 37.594204] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL3_FE [ 37.595085] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL4_FE [ 37.595964] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL5_FE [ 37.596844] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL6_FE [ 37.597725] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL8_FE [ 37.598603] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.599582] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL9_FE [ 37.600460] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding UL10_FE [ 37.601350] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding ADSP_HOSTLESS_VA [ 37.602336] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=75 [ 37.602573] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.602574] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.602575] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.606442] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding ADSP_VA_FE [ 37.607367] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding ADSP_MIC_RECORD [ 37.608342] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL_SRC_BE [ 37.609264] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DL_VIRTUAL_SOURCE BE [ 37.610294] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DMIC_BE [ 37.611187] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding DPTX_BE [ 37.612076] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: binding ETDM1_IN_BE [ 37.613009] <6>.(6)[164:kworker/6:2]mt8195-sound sound: ASoC: CODEC DAI DBMDX TDM0 not registered [ 37.614118] <6>.(6)[164:kworker/6:2]mt8195-sound sound: butterscotch_dev_probe snd_soc_register_card fail -517 [ 37.615365] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.616344] <6>.(6)[164:kworker/6:2]BOOTPROF: 37616.343550:probe: probe=platform_drv_probe drv=mt8195- sound(0xffffff800966ce50) 36.397231ms [ 37.618001] <6>.(6)[164:kworker/6:2]mt8195-sound sound: Dropping the link to regulator.43 [ 37.619018] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=76 [ 37.619254] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.619255] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.619256] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.623164] <6>.(6)[164:kworker/6:2]probe of sound returned 0 after 43361 usecs [ 37.624173] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: GPIO lookup for consumer dmic_clk_en_io [ 37.625374] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: using device tree for GPIO lookup [ 37.626525] <6>.(6)[164:kworker/6:2]of_get_named_gpiod_flags: parsed 'dmic_clk_en_io-gpios' property of node '/odm/mt8570_sound[0]' - status (0) [ 37.629547] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV0_FE [ 37.630624] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_MIC_FE [ 37.631725] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV1_FE [ 37.632783] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.633770] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV2_FE [ 37.634829] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=77 [ 37.635439] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.635443] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.635446] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.639354] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV3_FE [ 37.640412] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV4_FE [ 37.641470] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding PCMP_RSV1_FE [ 37.642538] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV6_FE [ 37.643609] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV7_FE [ 37.644662] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV8_FE [ 37.645712] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV1_FE [ 37.646794] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV2_FE [ 37.647880] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV3_FE [ 37.648962] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.649937] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding COMRPP_RSV4_FE [ 37.651020] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI MIC BE [ 37.652062] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=78 [ 37.652296] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.652297] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.652297] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.656163] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV1_BE [ 37.657214] <6>.(6)[164:kworker/6:2]mt8570-sound odm:mt8570_sound: ASoC: binding SPI_RSV2_BE [ 37.658312] <6>.(6)[164:kworker/6:2]mt8570-adsp-pcm odm:audio_spi: ASoC: adding FE_MICR widget [ 37.659387] <6>.(6)[164:kworker/6:2]mt8570-adsp-pcm odm:audio_spi: ASoC: adding SPI MIC Capture widget [ 37.665119] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.668086] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=79 [ 37.669296] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.670172] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.671179] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.681786] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL [ 37.684751] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: frame underflow! cnt=80 [ 37.685963] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: hw reset done! [ 37.686840] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L0 not complete until EOF! [ 37.687847] <6>-(6)[164:kworker/6:2][IRQ] DDP_COMPONENT_OVL0: L3 not complete until EOF! [ 37.698452] <6>-(6)[164:kworker/6:2]mediatek-dpi 1c112000.disp_dpi1: mtk_crtc is NULL9 lines not shown · raw message
13,528 lines not shown · raw message
Quoted 5 lines
5 lines not shown · raw message
7 lines not shown · raw message
Quoted 8 lines
4 lines not shown · raw message
513 lines not shown · raw message
Part of this message is not shown here. View the raw message.
PATCH v2 6/8 dt-bindings: mediatek: mt8195: add audio afe document
In reply to Trevor WuThis patch adds mt8195 audio afe document.
---
This patch depends on the following series that have not been accepted.
[1] Mediatek MT8195 clock support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=501923
(dt-bindings/clock/mt8195-clk.h is included)
[2] Mediatek MT8195 power domain support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=500709
(dt-bindings/power/mt8195-power.h is included)
--- .../bindings/sound/mt8195-afe-pcm.yaml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +136 -0
@@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek AFE PCM controller for mt8195 + +maintainers: + - Trevor Wu <[email protected]> + +properties: + compatible: + const: mediatek,mt8195-audio + + interrupts: + maxItems: 1 + + mediatek,topckgen: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek topckgen controller + + power-domains: + maxItems: 1 + + clocks: + items: + - description: audio 26M clock + - description: AFE clock + - description: audio infra sys clock + - description: audio infra 26M clock + + clock-names: + items: + - const: clk26m + - const: aud_afe + - const: infra_ao_audio + - const: infra_ao_audio_26m_b + + etdm-in1-chn-disabled: + $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 24 + description: Specify which input channel should be disabled. + + etdm-in2-chn-disabled: + $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 16 + description: Specify which input channel should be disabled. + +patternProperties: + "^etdm-in[1-2]-mclk-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk source clock. + enum: + - 0 # xtal_26m_ck + - 1 # apll1_ck + - 2 # apll2_ck + - 3 # apll3_ck + - 4 # apll4_ck + - 5 # apll5_ck + - 6 # hdmirx_apll_ck + + "^etdm-out[1-3]-mclk-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out mclk source clock. + + "^etdm-in[1-2]-mclk-alwasys-on-rate$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk output rate for always on case. + + "^etdm-out[1-3]-mclk-alwasys-on-rate$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out mclk output rate for always on case. + + "^etdm-in[1-2]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in data mode. + enum: + - 0 # one pin (TDM) + - 1 # multi pin (I2S) + + "^etdm-out[1-3]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out data mode. + + "^etdm-in[1-2]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm in moudule. + enum: + - 0 # etdm1_in + - 1 # etdm2_in + - 2 # etdm1_out + - 3 # etdm2_out + - 4 # etdm3_out + + "^etdm-out[1-3]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm out moudule. + +required: + - compatible + - interrupts + - mediatek,topckgen + - power-domains + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mt8195-clk.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/power/mt8195-power.h> + + afe: mt8195-afe-pcm { + compatible = "mediatek,mt8195-audio"; + interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; + mediatek,topckgen = <&topckgen>; + power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>; + clocks = <&clk26m>, + <&audsys CLK_AUD_AFE>, + <&infracfg_ao CLK_INFRA_AO_AUDIO>, + <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>; + clock-names = "clk26m", + "aud_afe", + "infra_ao_audio", + "infra_ao_audio_26m_b"; + }; + +...
Signature · 1 line
2.18.0
Rob Herring
maintainerRe: [PATCH v2 6/8] dt-bindings: mediatek: mt8195: add audio afe document
Quoted 54 lines · Trevor Wu
This patch adds mt8195 audio afe document.
Signed-off-by Trevor Wu <[email protected]>---
This patch depends on the following series that have not been accepted.[1] Mediatek MT8195 clock support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=501923
(dt-bindings/clock/mt8195-clk.his included)[2] Mediatek MT8195 power domain support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=500709
(dt-bindings/power/mt8195-power.his included)--- .../bindings/sound/mt8195-afe-pcm.yaml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yamlDocumentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +30
-0@@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek AFE PCM controller for mt8195 + +maintainers: + - Trevor Wu <[email protected]> + +properties: + compatible: + const: mediatek,mt8195-audio + + interrupts: + maxItems: 1 + + mediatek,topckgen: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek topckgen controller + + power-domains: + maxItems: 1 + + clocks: + items: + - description: audio 26M clock + - description: AFE clock + - description: audio infra sys clock
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 40
Quoted 10 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +10
-0+ - description: audio infra 26M clock + + clock-names: + items: + - const: clk26m + - const: aud_afe + - const: infra_ao_audio + - const: infra_ao_audio_26m_b + + etdm-in1-chn-disabled:
Needs a vendor prefix.
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 45
Quoted 5 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +5
-0+ $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 24 + description: Specify which input channel should be disabled. + + etdm-in2-chn-disabled:
Needs a vendor prefix.
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 51
Quoted 6 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +6
-0+ $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 16 + description: Specify which input channel should be disabled. + +patternProperties: + "^etdm-in[1-2]-mclk-source$":
And all these need a vendor prefix.
Quoted 8 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +8
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk source clock. + enum: + - 0 # xtal_26m_ck + - 1 # apll1_ck + - 2 # apll2_ck + - 3 # apll3_ck + - 4 # apll4_ck
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 69
Quoted 10 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +10
-0+ - 5 # apll5_ck + - 6 # hdmirx_apll_ck + + "^etdm-out[1-3]-mclk-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out mclk source clock. + + "^etdm-in[1-2]-mclk-alwasys-on-rate$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk output rate for always on case.
Hz? If so, '-hz' unit suffix and drop the type ref.
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 71
Quoted 2 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +2
-0+ + "^etdm-out[1-3]-mclk-alwasys-on-rate$":
typo: alwasys
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 73
Quoted 2 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +2
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out mclk output rate for always on case.
Hz?
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 80
Quoted 7 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +7
-0+ + "^etdm-in[1-2]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in data mode. + enum: + - 0 # one pin (TDM) + - 1 # multi pin (I2S)
Can be boolean?
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 84
Quoted 4 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +4
-0+ + "^etdm-out[1-3]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out data mode.
Constraints on values?
Quoted 8 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +8
-0+ + "^etdm-in[1-2]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm in moudule. + enum: + - 0 # etdm1_in
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 102
Quoted 10 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +10
-0+ - 1 # etdm2_in + - 2 # etdm1_out + - 3 # etdm2_out + - 4 # etdm3_out + + "^etdm-out[1-3]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm out moudule.
Constraints?
Quoted 38 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +34
-0+ +required: + - compatible + - interrupts + - mediatek,topckgen + - power-domains + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mt8195-clk.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/power/mt8195-power.h> + + afe: mt8195-afe-pcm { + compatible = "mediatek,mt8195-audio"; + interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; + mediatek,topckgen = <&topckgen>; + power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>; + clocks = <&clk26m>, + <&audsys CLK_AUD_AFE>, + <&infracfg_ao CLK_INFRA_AO_AUDIO>, + <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>; + clock-names = "clk26m", + "aud_afe", + "infra_ao_audio", + "infra_ao_audio_26m_b"; + }; + +...Signature · 1 line
2.18.0
Re: [PATCH v2 6/8] dt-bindings: mediatek: mt8195: add audio afe document
Quoted 10 lines · Rob Herring
Quoted 9 lines · Trevor Wu
This patch adds mt8195 audio afe document.
Signed-off-by Trevor Wu <[email protected]>---
This patch depends on the following series that have not been accepted.[1] Mediatek MT8195 clock support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=501923
Quoted 4 lines
Quoted 4 lines
(
dt-bindings/clock/mt8195-clk.his included)[2] Mediatek MT8195 power domain support
https://patchwork.kernel.org/project/linux-mediatek/list/?series=500709
Quoted 89 lines
Quoted 46 lines
(
dt-bindings/power/mt8195-power.his included)--- .../bindings/sound/mt8195-afe-pcm.yaml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-
afe-pcm.yaml(quoted diff) +0
-0
pcm.yamlb/Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
new file mode 100644
index 000000000000..a4fb5c7dd022Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +30
-0@@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8195-afe-pcm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek AFE PCM controller for mt8195 + +maintainers: + - Trevor Wu <[email protected]> + +properties: + compatible: + const: mediatek,mt8195-audio + + interrupts: + maxItems: 1 + + mediatek,topckgen: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek topckgen controller + + power-domains: + maxItems: 1 + + clocks: + items: + - description: audio 26M clock + - description: AFE clock + - description: audio infra sys clockDocumentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 40
Quoted 10 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +10
-0+ - description: audio infra 26M clock + + clock-names: + items: + - const: clk26m + - const: aud_afe + - const: infra_ao_audio + - const: infra_ao_audio_26m_b + + etdm-in1-chn-disabled:Needs a vendor prefix.
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 45
Quoted 5 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +5
-0+ $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 24 + description: Specify which input channel should be disabled. + + etdm-in2-chn-disabled:Needs a vendor prefix.
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 51
Quoted 6 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +6
-0+ $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 16 + description: Specify which input channel should be disabled. + +patternProperties: + "^etdm-in[1-2]-mclk-source$":And all these need a vendor prefix.
Quoted 13 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +13
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk source clock. + enum: + - 0 # xtal_26m_ck + - 1 # apll1_ck + - 2 # apll2_ck + - 3 # apll3_ck + - 4 # apll4_ck + - 5 # apll5_ck + - 6 # hdmirx_apll_ck + + "^etdm-out[1-3]-mclk-source$": + $ref: /schemas/types.yaml#/definitions/uint32
Quoted 9 lines
Quoted 6 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +5
-0+ description: Specify etdm out mclk source clock. + + "^etdm-in[1-2]-mclk-alwasys-on-rate$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in mclk output rate for always oncase.
Hz? If so, '-hz' unit suffix and drop the type ref.
Yes, it's Hz.
I will add unit suffix and drop the type.
Quoted 19 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml
Quoted 2 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +2
-0+ + "^etdm-out[1-3]-mclk-alwasys-on-rate$":typo: alwasys
Quoted 3 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +2
-0+ $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out mclk output rate for always oncase.
Hz?
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 80
Quoted 7 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +7
-0+ + "^etdm-in[1-2]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm in data mode. + enum: + - 0 # one pin (TDM) + - 1 # multi pin (I2S)
Quoted 2 lines
Can be boolean?
Yes, becasue only two options can be configured for data mode. I will replace it with a bool property like "mediatek,etdm-in[1-2]- multi-pin-mode".
Quoted 58 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml line 84
Quoted 4 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +4
-0+ + "^etdm-out[1-3]-data-mode$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Specify etdm out data mode.Constraints on values?
Quoted 18 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +18
-0+ + "^etdm-in[1-2]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm in moudule. + enum: + - 0 # etdm1_in + - 1 # etdm2_in + - 2 # etdm1_out + - 3 # etdm2_out + - 4 # etdm3_out + + "^etdm-out[1-3]-cowork-source$": + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + etdm modules can share the same external clock pin. Specify + which etdm clock source is required by this etdm outQuoted 1 line
moudule.
Constraints?
Quoted 29 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +29
-0+ +required: + - compatible + - interrupts + - mediatek,topckgen + - power-domains + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mt8195-clk.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/power/mt8195-power.h> + + afe: mt8195-afe-pcm { + compatible = "mediatek,mt8195-audio"; + interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>; + mediatek,topckgen = <&topckgen>; + power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>; + clocks = <&clk26m>, + <&audsys CLK_AUD_AFE>, + <&infracfg_ao CLK_INFRA_AO_AUDIO>, + <&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>; + clock-names = "clk26m", + "aud_afe",
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml new file +5
-0+ "infra_ao_audio", + "infra_ao_audio_26m_b"; + }; + +...Signature · 1 line
2.18.0
Thanks for your reviewing.
I will correct all problems on v3.
Thanks,
Trevor
Quoted 1 line
Quoted 1 line
PATCH v2 7/8 ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682
In reply to Trevor WuThis patch adds support for mt8195 board with mt6359, rt1019 and rt5682.
--- sound/soc/mediatek/Kconfig | 14 + sound/soc/mediatek/mt8195/Makefile | 3 + .../mt8195/mt8195-mt6359-rt1019-rt5682.c | 977 ++++++++++++++++++ 3 files changed, 994 insertions(+) create mode 100644 sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
sound/soc/mediatek/Kconfig +14 -0
@@ -193,3 +193,17 @@ config SND_SOC_MT8195 that can be used with other codecs. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8195_MT6359_RT1019_RT5682 + tristate "ASoC Audio driver for MT8195 with MT6359 RT1019 RT5682 codec" + depends on I2C + depends on SND_SOC_MT8195 + select SND_SOC_MT6359 + select SND_SOC_RT1015P + select SND_SOC_RT5682_I2C + select SND_SOC_DMIC + help + This adds ASoC driver for Mediatek MT8195 boards + with the MT6359 RT1019 RT5682 audio codec. + Select Y if you have such device. + If unsure select "N".
sound/soc/mediatek/mt8195/Makefile +3 -0
@@ -9,3 +9,6 @@ snd-soc-mt8195-afe-objs := \ mt8195-dai-pcm.o obj-$(CONFIG_SND_SOC_MT8195) += snd-soc-mt8195-afe.o + +# machine driver +obj-$(CONFIG_SND_SOC_MT8195_MT6359_RT1019_RT5682) += mt8195-mt6359-rt1019-rt5682.o
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c new file +977 -0
977 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v2 8/8 dt-bindings: mediatek: mt8195: add mt8195-mt6359-rt1019-rt5682 document
In reply to Trevor WuThis patch adds document for mt8195 board with mt6359, rt1019 and rt5682
--- .../sound/mt8195-mt6359-rt1019-rt5682.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml
Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml new file +39 -0
@@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8195-mt6359-rt1019-rt5682.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT8195 with MT6359, RT1019 and RT5682 ASoC sound card driver + +maintainers: + - Trevor Wu <[email protected]> + +description: + This binding describes the MT8195 sound card. + +properties: + compatible: + const: mediatek,mt8195_mt6359_rt1019_rt5682 + + mediatek,platform: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of MT8195 ASoC platform. + +additionalProperties: false + +required: + - compatible + - mediatek,platform + +examples: + - | + + sound: mt8195-sound { + compatible = "mediatek,mt8195_mt6359_rt1019_rt5682"; + mediatek,platform = <&afe>; + pinctrl-names = "default"; + pinctrl-0 = <&aud_pins_default>; + }; + +...
Signature · 1 line
2.18.0