diff --git a/boards/arm/mimxrt1020_evk/Kconfig.defconfig b/boards/arm/mimxrt1020_evk/Kconfig.defconfig index 8e24316f56e..0203d01d0c0 100644 --- a/boards/arm/mimxrt1020_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1020_evk/Kconfig.defconfig @@ -15,12 +15,12 @@ endchoice config DISK_DRIVER_SDMMC default y if DISK_DRIVERS -config FLASH_MCUX_FLEXSPI_NOR - default y if FLASH && BOARD_MIMXRT1020_EVK +if FLASH -config FLASH_MCUX_FLEXSPI_XIP - default y if FLASH && BOARD_MIMXRT1020_EVK - depends on MEMC_MCUX_FLEXSPI +config FLASH_MCUX_FLEXSPI_NOR + default y + +endif #FLASH if NETWORKING diff --git a/boards/arm/mimxrt1024_evk/Kconfig.defconfig b/boards/arm/mimxrt1024_evk/Kconfig.defconfig index c5fb8213659..38c820eb17c 100644 --- a/boards/arm/mimxrt1024_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1024_evk/Kconfig.defconfig @@ -12,12 +12,12 @@ choice CODE_LOCATION default CODE_FLEXSPI endchoice -config FLASH_MCUX_FLEXSPI_NOR - default y if FLASH +if FLASH -config FLASH_MCUX_FLEXSPI_XIP - default y if FLASH - depends on MEMC_MCUX_FLEXSPI +config FLASH_MCUX_FLEXSPI_NOR + default y + +endif #FLASH if NETWORKING diff --git a/boards/arm/mimxrt1050_evk/Kconfig.defconfig b/boards/arm/mimxrt1050_evk/Kconfig.defconfig index 830a46e323f..3e659b30009 100644 --- a/boards/arm/mimxrt1050_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1050_evk/Kconfig.defconfig @@ -15,18 +15,17 @@ endchoice config DISK_DRIVER_SDMMC default y if DISK_DRIVERS +if FLASH config FLASH_MCUX_FLEXSPI_HYPERFLASH - default y if FLASH && BOARD_MIMXRT1050_EVK - default n if FLASH && BOARD_MIMXRT1050_EVK_QSPI + default y if BOARD_MIMXRT1050_EVK + default n if BOARD_MIMXRT1050_EVK_QSPI config FLASH_MCUX_FLEXSPI_NOR - default y if FLASH && BOARD_MIMXRT1050_EVK_QSPI - default n if FLASH && BOARD_MIMXRT1050_EVK + default y if BOARD_MIMXRT1050_EVK_QSPI + default n if BOARD_MIMXRT1050_EVK -config FLASH_MCUX_FLEXSPI_XIP - default y if FLASH - depends on MEMC_MCUX_FLEXSPI +endif #FLASH config I2C default y if KSCAN diff --git a/boards/arm/mimxrt1060_evk/Kconfig.defconfig b/boards/arm/mimxrt1060_evk/Kconfig.defconfig index 6d67a48c2d9..fa8a70611ba 100644 --- a/boards/arm/mimxrt1060_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1060_evk/Kconfig.defconfig @@ -16,6 +16,8 @@ endchoice config DISK_DRIVER_SDMMC default y if DISK_DRIVERS +if FLASH + config FLASH_MCUX_FLEXSPI_NOR default y if BOARD_MIMXRT1060_EVK default n if BOARD_MIMXRT1060_EVK_HYPERFLASH @@ -24,9 +26,7 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH default y if BOARD_MIMXRT1060_EVK_HYPERFLASH default n if BOARD_MIMXRT1060_EVK -config FLASH_MCUX_FLEXSPI_XIP - default y if FLASH - depends on MEMC_MCUX_FLEXSPI +endif #FLASH config I2C default y if KSCAN diff --git a/boards/arm/mimxrt1064_evk/Kconfig.defconfig b/boards/arm/mimxrt1064_evk/Kconfig.defconfig index e84d0eac01f..1ed5e380bea 100644 --- a/boards/arm/mimxrt1064_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1064_evk/Kconfig.defconfig @@ -15,12 +15,12 @@ endchoice config DISK_DRIVER_SDMMC default y if DISK_DRIVERS -config FLASH_MCUX_FLEXSPI_NOR - default y if FLASH +if FLASH -config FLASH_MCUX_FLEXSPI_XIP - default y if FLASH - depends on MEMC_MCUX_FLEXSPI +config FLASH_MCUX_FLEXSPI_NOR + default y + +endif # FLASH config I2C default y if KSCAN diff --git a/boards/arm/mimxrt1160_evk/Kconfig.defconfig b/boards/arm/mimxrt1160_evk/Kconfig.defconfig index 7dbd0fd69c3..4be16e72bbb 100644 --- a/boards/arm/mimxrt1160_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1160_evk/Kconfig.defconfig @@ -23,10 +23,6 @@ if FLASH config FLASH_MCUX_FLEXSPI_NOR default y -# XIP will not be enabled if CPU is cortex m4, since code is flashed to SRAM -config FLASH_MCUX_FLEXSPI_XIP - default y if CPU_CORTEX_M7 - choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET default FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM if CPU_CORTEX_M7 default FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM if CPU_CORTEX_M4 diff --git a/boards/arm/mimxrt1170_evk/Kconfig.defconfig b/boards/arm/mimxrt1170_evk/Kconfig.defconfig index 744a5cca51d..666461c0a0a 100644 --- a/boards/arm/mimxrt1170_evk/Kconfig.defconfig +++ b/boards/arm/mimxrt1170_evk/Kconfig.defconfig @@ -29,9 +29,6 @@ if FLASH config FLASH_MCUX_FLEXSPI_NOR default y -config FLASH_MCUX_FLEXSPI_XIP - default y if CPU_CORTEX_M7 - choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET default FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM if CPU_CORTEX_M7 default FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM if CPU_CORTEX_M4 diff --git a/drivers/flash/Kconfig.mcux b/drivers/flash/Kconfig.mcux index bb30aef74b4..b085d76ec78 100644 --- a/drivers/flash/Kconfig.mcux +++ b/drivers/flash/Kconfig.mcux @@ -72,6 +72,7 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH_WRITE_BUFFER config FLASH_MCUX_FLEXSPI_XIP bool "MCUX FlexSPI flash access with xip" + default y depends on MEMC_MCUX_FLEXSPI depends on (CODE_FLEXSPI || CODE_FLEXSPI2 || SOC_SERIES_IMX_RT6XX) select XIP