From 44f7928ecfd93f6c450d2d614fbf6e45bb282154 Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Tue, 20 Aug 2024 19:11:59 +0200 Subject: [PATCH] clock: mcux_ccm: add flexio clock Adds flexio1 and flexio2 clock definitions to get the clock rate Signed-off-by: Peter van der Perk --- drivers/clock_control/clock_control_mcux_ccm_rev2.c | 9 +++++++++ include/zephyr/dt-bindings/clock/imx_ccm_rev2.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/drivers/clock_control/clock_control_mcux_ccm_rev2.c b/drivers/clock_control/clock_control_mcux_ccm_rev2.c index bb2fc21b81f..5633f5f0cfe 100644 --- a/drivers/clock_control/clock_control_mcux_ccm_rev2.c +++ b/drivers/clock_control/clock_control_mcux_ccm_rev2.c @@ -178,6 +178,15 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, break; #endif +#ifdef CONFIG_MCUX_FLEXIO + case IMX_CCM_FLEXIO1_CLK: + clock_root = kCLOCK_Root_Flexio1; + break; + case IMX_CCM_FLEXIO2_CLK: + clock_root = kCLOCK_Root_Flexio2; + break; +#endif + #ifdef CONFIG_PWM_MCUX_QTMR case IMX_CCM_QTMR1_CLK: case IMX_CCM_QTMR2_CLK: diff --git a/include/zephyr/dt-bindings/clock/imx_ccm_rev2.h b/include/zephyr/dt-bindings/clock/imx_ccm_rev2.h index 3f1544e6377..738e5598a6f 100644 --- a/include/zephyr/dt-bindings/clock/imx_ccm_rev2.h +++ b/include/zephyr/dt-bindings/clock/imx_ccm_rev2.h @@ -126,6 +126,11 @@ #define IMX_CCM_TPM5_CLK 0x1604UL #define IMX_CCM_TPM6_CLK 0x1605UL +/* FLEXIO */ +#define IMX_CCM_FLEXIO_CLK 0x1700UL +#define IMX_CCM_FLEXIO1_CLK 0x1700UL +#define IMX_CCM_FLEXIO2_CLK 0x1701UL + /* QTMR */ #define IMX_CCM_QTMR_CLK 0x6000UL #define IMX_CCM_QTMR1_CLK 0x6000UL