diff --git a/drivers/clock_control/clock_control_mcux_ccm_rev2.c b/drivers/clock_control/clock_control_mcux_ccm_rev2.c index 188fe976df4f9a..c01909ea9607c9 100644 --- a/drivers/clock_control/clock_control_mcux_ccm_rev2.c +++ b/drivers/clock_control/clock_control_mcux_ccm_rev2.c @@ -155,10 +155,8 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, #ifdef CONFIG_MEMC_MCUX_FLEXSPI case IMX_CCM_FLEXSPI_CLK: - clock_root = kCLOCK_Root_Flexspi1; - break; case IMX_CCM_FLEXSPI2_CLK: - clock_root = kCLOCK_Root_Flexspi2; + clock_root = kCLOCK_Root_Flexspi1 + instance; break; #endif #ifdef CONFIG_COUNTER_NXP_PIT