clock: ccmv2: add SAI CCM clocks for RT11xx

add SAI CCMV2 clocks for RT11xx series

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
This commit is contained in:
Hake Huang 2022-01-19 22:56:54 +08:00 committed by David Leach
parent 2f7c2333c8
commit 0525ad3d46

View file

@ -87,6 +87,25 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
clock_root = kCLOCK_Root_Gpt1 + instance;
break;
#endif
#ifdef CONFIG_I2S_MCUX_SAI
case IMX_CCM_SAI1_CLK:
*rate = CLOCK_GetFreq(kCLOCK_AudioPll)
/ CLOCK_GetRootClockDiv(kCLOCK_Root_Sai1);
break;
case IMX_CCM_SAI2_CLK:
*rate = CLOCK_GetFreq(kCLOCK_AudioPll)
/ CLOCK_GetRootClockDiv(kCLOCK_Root_Sai2);
break;
case IMX_CCM_SAI3_CLK:
*rate = CLOCK_GetFreq(kCLOCK_AudioPll);
/ CLOCK_GetRootClockDiv(kCLOCK_Root_Sai3);
break;
case IMX_CCM_SAI4_CLK:
*rate = CLOCK_GetFreq(kCLOCK_AudioPll);
/ CLOCK_GetRootClockDiv(kCLOCK_Root_Sai4);
break;
#endif
default:
return -EINVAL;
}