2019-04-06 15:08:09 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-02-15 14:42:39 +01:00
|
|
|
config SOC_FLASH_MCUX
|
|
|
|
bool "MCUX flash shim driver"
|
2022-07-22 08:53:16 +02:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_LPC_IAP_ENABLED || \
|
|
|
|
DT_HAS_NXP_KINETIS_FTFA_ENABLED || \
|
|
|
|
DT_HAS_NXP_KINETIS_FTFE_ENABLED || \
|
2022-08-12 16:05:25 +02:00
|
|
|
DT_HAS_NXP_KINETIS_FTFL_ENABLED || \
|
|
|
|
DT_HAS_NXP_IAP_FMC55_ENABLED || \
|
|
|
|
DT_HAS_NXP_IAP_FMC553_ENABLED
|
2019-02-15 14:42:39 +01:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2019-11-04 15:49:21 +01:00
|
|
|
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
|
2019-02-15 14:42:39 +01:00
|
|
|
help
|
|
|
|
Enables the MCUX flash shim driver.
|
|
|
|
WARNING: This driver will disable the system interrupts for
|
|
|
|
the duration of the flash erase/write operations. This will
|
|
|
|
have an impact on the overall system performance - whether
|
|
|
|
this is acceptable or not will depend on the use case.
|
2020-05-11 16:40:53 +02:00
|
|
|
|
|
|
|
if SOC_FLASH_MCUX
|
|
|
|
|
|
|
|
config CHECK_BEFORE_READING
|
|
|
|
bool "Verify area before reading it"
|
|
|
|
default y if SOC_SERIES_LPC55XXX
|
|
|
|
help
|
|
|
|
Do a margin check flash command before reading an area.
|
|
|
|
This feature prevents erroneous/forbidden reading. Some ECC enabled
|
|
|
|
devices will crash when reading an erased or wrongly programmed area.
|
|
|
|
|
|
|
|
endif # SOC_FLASH_MCUX
|
2020-12-18 03:55:28 +01:00
|
|
|
|
2022-07-22 08:53:16 +02:00
|
|
|
if DT_HAS_NXP_IMX_FLEXSPI_ENABLED
|
2020-12-18 03:55:28 +01:00
|
|
|
|
2021-09-20 12:55:57 +02:00
|
|
|
menu "Flexspi flash driver"
|
|
|
|
|
2020-12-18 03:55:28 +01:00
|
|
|
config FLASH_MCUX_FLEXSPI_NOR
|
|
|
|
bool "MCUX FlexSPI NOR driver"
|
2022-07-22 08:53:16 +02:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_NOR_ENABLED
|
2020-12-18 03:55:28 +01:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2021-03-31 13:46:34 +02:00
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
2020-12-18 03:55:28 +01:00
|
|
|
|
2021-04-22 21:17:23 +02:00
|
|
|
config FLASH_MCUX_FLEXSPI_MX25UM51345G
|
|
|
|
bool "MCUX FlexSPI MX25UM51345G driver"
|
2022-07-22 08:53:16 +02:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_MX25UM51345G_ENABLED
|
2021-04-22 21:17:23 +02:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
|
|
|
|
2021-09-20 12:55:57 +02:00
|
|
|
config FLASH_MCUX_FLEXSPI_HYPERFLASH
|
|
|
|
bool "MCUX FlexSPI HYPERFLASH driver"
|
2022-07-22 08:53:16 +02:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_HYPERFLASH_ENABLED
|
2021-09-20 12:55:57 +02:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2022-05-17 09:53:59 +02:00
|
|
|
if FLASH_MCUX_FLEXSPI_MX25UM51345G
|
|
|
|
|
|
|
|
choice FLASH_MCUX_FLEXSPI_MX25UM51345G_OPI_MODE
|
|
|
|
prompt "FlexSPI MX25UM51345G OPI mode"
|
|
|
|
default FLASH_MCUX_FLEXSPI_MX25UM51345G_OPI_DTR
|
|
|
|
help
|
|
|
|
Select the MX25UM51345G octal flash operation mode(Octal I/O STR
|
|
|
|
or Octal I/O DTR).
|
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_MX25UM51345G_OPI_STR
|
|
|
|
bool "STR"
|
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_MX25UM51345G_OPI_DTR
|
|
|
|
bool "DTR"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
endif # FLASH_MCUX_FLEXSPI_MX25UM51345G
|
|
|
|
|
2021-04-07 20:51:34 +02:00
|
|
|
config FLASH_MCUX_FLEXSPI_NOR_WRITE_BUFFER
|
|
|
|
bool "MCUX FlexSPI NOR write RAM buffer"
|
|
|
|
default y
|
2021-04-22 21:17:23 +02:00
|
|
|
depends on (FLASH_MCUX_FLEXSPI_NOR || FLASH_MCUX_FLEXSPI_MX25UM51345G)
|
2021-04-07 20:51:34 +02:00
|
|
|
help
|
|
|
|
Copy the data to a RAM buffer before writing it to the flash.
|
|
|
|
This prevents faults when the data to write would be located on the
|
2021-09-20 12:55:57 +02:00
|
|
|
flash itself.
|
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_HYPERFLASH_WRITE_BUFFER
|
|
|
|
bool "MCUX FlexSPI HYPERFLASH write RAM buffer"
|
|
|
|
default y
|
|
|
|
depends on FLASH_MCUX_FLEXSPI_HYPERFLASH
|
|
|
|
help
|
|
|
|
Copy the data to a RAM buffer before writing it to the flash.
|
|
|
|
This prevents faults when the data to write would be located on the
|
2021-04-07 20:51:34 +02:00
|
|
|
flash itself.
|
|
|
|
|
2021-04-15 07:48:57 +02:00
|
|
|
config FLASH_MCUX_FLEXSPI_XIP
|
|
|
|
bool "MCUX FlexSPI flash access with xip"
|
2022-04-28 23:01:59 +02:00
|
|
|
default y
|
2021-04-15 07:48:57 +02:00
|
|
|
depends on MEMC_MCUX_FLEXSPI
|
2021-04-22 21:17:23 +02:00
|
|
|
depends on (CODE_FLEXSPI || CODE_FLEXSPI2 || SOC_SERIES_IMX_RT6XX)
|
2021-04-15 07:48:57 +02:00
|
|
|
select XIP
|
|
|
|
help
|
|
|
|
Allows using the flash API while running in XIP.
|
|
|
|
WARNING: It is possible to overwrite the running application itself.
|
|
|
|
|
|
|
|
if FLASH_MCUX_FLEXSPI_XIP
|
|
|
|
|
|
|
|
choice FLASH_MCUX_FLEXSPI_XIP_MEM_TARGET
|
|
|
|
prompt "FlexSPI drivers relocation target"
|
|
|
|
default FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM
|
|
|
|
help
|
|
|
|
Select the location to run the FlexSPI drivers when using
|
|
|
|
the flash API.
|
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM
|
|
|
|
bool "ITCM"
|
2021-04-29 00:15:30 +02:00
|
|
|
select CODE_DATA_RELOCATION
|
2021-04-15 07:48:57 +02:00
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM
|
|
|
|
bool "SRAM"
|
2021-04-29 00:15:30 +02:00
|
|
|
select CODE_DATA_RELOCATION_SRAM
|
2021-04-15 07:48:57 +02:00
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config FLASH_MCUX_FLEXSPI_XIP_MEM
|
|
|
|
string
|
|
|
|
default "ITCM" if FLASH_MCUX_FLEXSPI_XIP_MEM_ITCM
|
|
|
|
default "SRAM" if FLASH_MCUX_FLEXSPI_XIP_MEM_SRAM
|
|
|
|
|
|
|
|
endif # FLASH_MCUX_FLEXSPI_XIP
|
|
|
|
|
2020-12-18 03:55:28 +01:00
|
|
|
endif # HAS_MCUX_FLEXSPI
|