soc: arm: Enable FlexSPI flash driver on i.MX RT family

Enables the FlexSPI flash driver on the i.MX RT SoC family and
configures the peripheral clocks accordingly. We are careful to only
configure the peripheral clocks if we are not executing in place from
the FlexSPI flash.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2020-12-21 08:58:47 -06:00 committed by Anas Nashif
commit c489cf99e2

View file

@ -216,6 +216,13 @@ static ALWAYS_INLINE void clock_init(void)
CLOCK_SetMux(kCLOCK_CanMux, 2); /* Set Can clock source. */
#endif
#if defined(CONFIG_FLASH_MCUX_FLEXSPI) && DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi), okay)
CLOCK_DisableClock(kCLOCK_FlexSpi);
CLOCK_InitUsb1Pfd(kCLOCK_Pfd0, 24);
CLOCK_SetMux(kCLOCK_FlexspiMux, 3);
CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2);
#endif
/* Keep the system clock running so SYSTICK can wake up the system from
* wfi.
*/