From adb83d26bf2705c7512bcd36704bbf0a5cd5bb32 Mon Sep 17 00:00:00 2001 From: Vit Stanicek Date: Mon, 9 Sep 2024 09:06:08 +0200 Subject: [PATCH] soc: mimxrt685s/cm33: Fix lockup on clock config Imply CONFIG_INIT_AUDIO_PLL on nxp,dmic driver selection on mimxrt685s/cm33. Make DMIC clock config dependent on the use of the RT685's audio PLL. Fixes a regression described in #77851. Signed-off-by: Vit Stanicek --- soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig | 3 +++ soc/nxp/imxrt/imxrt6xx/cm33/soc.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig b/soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig index bfcc7d29f54..4a961be41cf 100644 --- a/soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig +++ b/soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig @@ -55,6 +55,9 @@ endif # MBEDTLS config I2S_MCUX_FLEXCOMM select INIT_AUDIO_PLL +config AUDIO_DMIC_MCUX + select INIT_AUDIO_PLL + if MCUX_OS_TIMER config SYS_CLOCK_HW_CYCLES_PER_SEC diff --git a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c index 3bbf672c372..d829558754e 100644 --- a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c +++ b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c @@ -317,7 +317,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetClkDiv(kCLOCK_DivAdcClk, DT_PROP(DT_NODELABEL(lpadc0), clk_divider)); #endif -#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(dmic0), nxp_dmic, okay) +#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(dmic0), nxp_dmic, okay) && CONFIG_INIT_AUDIO_PLL /* Using the Audio PLL as input clock leads to better clock dividers * for typical PCM sample rates ({8,16,24,32,48,96} kHz. */