2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-02-15 21:42:39 +08:00
|
|
|
config SOC_FLASH_MCUX
|
|
|
|
bool "MCUX flash shim driver"
|
2022-07-22 14:53:16 +08:00
|
|
|
default y
|
2022-08-16 22:48:47 +08:00
|
|
|
depends on DT_HAS_NXP_KINETIS_FTFA_ENABLED || \
|
2022-07-22 14:53:16 +08:00
|
|
|
DT_HAS_NXP_KINETIS_FTFE_ENABLED || \
|
2022-08-12 22:05:25 +08:00
|
|
|
DT_HAS_NXP_KINETIS_FTFL_ENABLED || \
|
|
|
|
DT_HAS_NXP_IAP_FMC55_ENABLED || \
|
2023-03-07 04:28:27 +08:00
|
|
|
DT_HAS_NXP_IAP_FMC553_ENABLED || \
|
2024-09-25 23:50:43 +08:00
|
|
|
DT_HAS_NXP_MSF1_ENABLED
|
2019-02-15 21:42:39 +08:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2024-02-02 21:46:29 +08:00
|
|
|
select FLASH_HAS_EXPLICIT_ERASE
|
2019-11-04 22:49:21 +08:00
|
|
|
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
|
2019-02-15 21:42:39 +08: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 22:40:53 +08: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.
|
|
|
|
|
2024-09-06 21:27:06 +08:00
|
|
|
config MCUX_FLASH_K4_API
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
Set from SOC level configuration if the platform is meant to use the
|
|
|
|
flash_k4 SDK IAP API.
|
|
|
|
|
2020-05-11 22:40:53 +08:00
|
|
|
endif # SOC_FLASH_MCUX
|
2020-12-18 10:55:28 +08:00
|
|
|
|
2022-07-22 14:53:16 +08:00
|
|
|
if DT_HAS_NXP_IMX_FLEXSPI_ENABLED
|
2020-12-18 10:55:28 +08:00
|
|
|
|
2021-09-20 18:55:57 +08:00
|
|
|
menu "Flexspi flash driver"
|
|
|
|
|
2020-12-18 10:55:28 +08:00
|
|
|
config FLASH_MCUX_FLEXSPI_NOR
|
|
|
|
bool "MCUX FlexSPI NOR driver"
|
2022-07-22 14:53:16 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_NOR_ENABLED
|
2020-12-18 10:55:28 +08:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2024-02-02 21:46:29 +08:00
|
|
|
select FLASH_HAS_EXPLICIT_ERASE
|
2023-08-19 04:29:54 +08:00
|
|
|
select FLASH_JESD216
|
2021-03-31 19:46:34 +08:00
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
2020-12-18 10:55:28 +08:00
|
|
|
|
2021-04-23 03:17:23 +08:00
|
|
|
config FLASH_MCUX_FLEXSPI_MX25UM51345G
|
|
|
|
bool "MCUX FlexSPI MX25UM51345G driver"
|
2022-07-22 14:53:16 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_MX25UM51345G_ENABLED
|
2021-04-23 03:17:23 +08:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2024-02-02 21:46:29 +08:00
|
|
|
select FLASH_HAS_EXPLICIT_ERASE
|
2021-04-23 03:17:23 +08:00
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
|
|
|
|
2021-09-20 18:55:57 +08:00
|
|
|
config FLASH_MCUX_FLEXSPI_HYPERFLASH
|
|
|
|
bool "MCUX FlexSPI HYPERFLASH driver"
|
2022-07-22 14:53:16 +08:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NXP_IMX_FLEXSPI_HYPERFLASH_ENABLED
|
2021-09-20 18:55:57 +08:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2024-02-02 21:46:29 +08:00
|
|
|
select FLASH_HAS_EXPLICIT_ERASE
|
2021-09-20 18:55:57 +08:00
|
|
|
select MEMC
|
|
|
|
select MEMC_MCUX_FLEXSPI
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2022-05-17 15:53:59 +08: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-08 02:51:34 +08:00
|
|
|
config FLASH_MCUX_FLEXSPI_NOR_WRITE_BUFFER
|
|
|
|
bool "MCUX FlexSPI NOR write RAM buffer"
|
|
|
|
default y
|
2021-04-23 03:17:23 +08:00
|
|
|
depends on (FLASH_MCUX_FLEXSPI_NOR || FLASH_MCUX_FLEXSPI_MX25UM51345G)
|
2021-04-08 02:51:34 +08: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 18:55:57 +08: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-08 02:51:34 +08:00
|
|
|
flash itself.
|
|
|
|
|
2024-08-10 04:33:18 +08:00
|
|
|
# Avoid RWW hazards by defaulting logging to disabled
|
|
|
|
choice FLASH_LOG_LEVEL_CHOICE
|
|
|
|
default FLASH_LOG_LEVEL_OFF if FLASH_MCUX_FLEXSPI_XIP
|
|
|
|
endchoice
|
|
|
|
|
2020-12-18 10:55:28 +08:00
|
|
|
endif # HAS_MCUX_FLEXSPI
|