diff --git a/boards/nxp/tropic-community/nuttx-config/include/board.h b/boards/nxp/tropic-community/nuttx-config/include/board.h index 21ded1ea38..69778b2b5d 100644 --- a/boards/nxp/tropic-community/nuttx-config/include/board.h +++ b/boards/nxp/tropic-community/nuttx-config/include/board.h @@ -138,6 +138,9 @@ #define CONFIG_FLEXIO1_CLK 1 #define CONFIG_FLEXIO1_PRED_DIVIDER 5 #define CONFIG_FLEXIO1_PODF_DIVIDER 1 +#define CONFIG_FLEXIO2_CLK 1 +#define CONFIG_FLEXIO2_PRED_DIVIDER 5 +#define CONFIG_FLEXIO2_PODF_DIVIDER 1 #define CONFIG_PLL3_PFD2_FRAC 16 #define BOARD_FLEXIO_PREQ 108000000 diff --git a/boards/nxp/tropic-community/src/init.c b/boards/nxp/tropic-community/src/init.c index a9c326f39c..5c29323220 100644 --- a/boards/nxp/tropic-community/src/init.c +++ b/boards/nxp/tropic-community/src/init.c @@ -301,6 +301,20 @@ void imxrt_flexio_clocking(void) reg |= CCM_CDCDR_FLEXIO1_CLK_PRED (CCM_PRED_FROM_DIVISOR(CONFIG_FLEXIO1_PRED_DIVIDER)); putreg32(reg, IMXRT_CCM_CDCDR); + + reg = getreg32(IMXRT_CCM_CSCMR2); + reg &= ~(CCM_CSCMR2_FLEXIO2_CLK_SEL_MASK); + reg |= CCM_CSCMR2_FLEXIO2_CLK_SEL(CONFIG_FLEXIO2_CLK); + putreg32(reg, IMXRT_CCM_CSCMR2); + + reg = getreg32(IMXRT_CCM_CS1CDR); + reg &= ~(CCM_CS1CDR_FLEXIO2_CLK_PRED_MASK | + CCM_CS1CDR_FLEXIO2_CLK_PODF_MASK); + reg |= CCM_CS1CDR_FLEXIO2_CLK_PODF + (CCM_PODF_FROM_DIVISOR(CONFIG_FLEXIO2_PODF_DIVIDER)); + reg |= CCM_CS1CDR_FLEXIO2_CLK_PRED + (CCM_PRED_FROM_DIVISOR(CONFIG_FLEXIO2_PRED_DIVIDER)); + putreg32(reg, IMXRT_CCM_CS1CDR); }