soc: nxp_imx: Add on-chip flash code location support

iMXRT1064 has 4MB on-chip Flash memory (flexspi2) mapped to 0x70000000.
Add it as configurable code location for MIMXRT1064-EVK board.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
This commit is contained in:
Loic Poulain 2019-02-21 13:18:06 +01:00 committed by Maureen Helm
commit e980ef8a8e
3 changed files with 16 additions and 0 deletions

View file

@ -96,6 +96,16 @@ config FLASH_BASE_ADDRESS
endif # CODE_FLEXSPI
if CODE_FLEXSPI2
config FLASH_SIZE
default $(dt_int_val,DT_NXP_IMX_FLEXSPI_402A4000_SIZE_1,K)
config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_NXP_IMX_FLEXSPI_402A4000_BASE_ADDRESS_1)
endif # CODE_FLEXSPI2
if DATA_DTCM
config SRAM_SIZE

View file

@ -257,6 +257,10 @@ config CODE_FLEXSPI
bool "Link code into external FlexSPI-controlled memory"
select NXP_IMX_RT_BOOT_HEADER
config CODE_FLEXSPI2
bool "Link code into internal FlexSPI-controlled memory"
select NXP_IMX_RT_BOOT_HEADER
endchoice
choice DATA_LOCATION

View file

@ -22,6 +22,8 @@
#define REGION_FLASH_SIZE REGION_1M
#elif CONFIG_FLASH_SIZE == 2048
#define REGION_FLASH_SIZE REGION_2M
#elif CONFIG_FLASH_SIZE == 4096
#define REGION_FLASH_SIZE REGION_4M
#elif CONFIG_FLASH_SIZE == 8192
#define REGION_FLASH_SIZE REGION_8M
#elif CONFIG_FLASH_SIZE == 65536