Skip to content

Commit 9f2f4a4

Browse files
fschramekkartben
authored andcommitted
soc: add FlexSPI2 clock configuration in clock_init for rt11xx
The current soc clock_init only configures the FlexSPI1 interface and not the FlexSPI2. This Commit adds the clock configuration for the second FlexSPI in case one boots from the FlexSPI2. Signed-off-by: Felix Schramek <[email protected]>
1 parent 2594eae commit 9f2f4a4

File tree

1 file changed

+8
-0
lines changed
  • soc/nxp/imxrt/imxrt11xx

1 file changed

+8
-0
lines changed

soc/nxp/imxrt/imxrt11xx/soc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,14 @@ static ALWAYS_INLINE void clock_init(void)
567567
CLOCK_SetRootClock(kCLOCK_Root_Flexspi1, &rootCfg);
568568
#endif
569569

570+
#if !(DT_NODE_HAS_COMPAT(DT_PARENT(DT_CHOSEN(zephyr_flash)), nxp_imx_flexspi)) && \
571+
defined(CONFIG_MEMC_MCUX_FLEXSPI) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi2))
572+
/* Configure FLEXSPI2 using OSC_RC_48M_DIV2 */
573+
rootCfg.mux = kCLOCK_FLEXSPI2_ClockRoot_MuxOscRc48MDiv2;
574+
rootCfg.div = 1;
575+
CLOCK_SetRootClock(kCLOCK_Root_Flexspi2, &rootCfg);
576+
#endif
577+
570578
/* Keep core clock ungated during WFI */
571579
CCM->GPR_PRIVATE1_SET = 0x1;
572580
/* Keep the system clock running so SYSTICK can wake up the system from

0 commit comments

Comments
 (0)