Skip to content

Commit

Permalink
[nrf fromlist] drivers: flash: Add generic NOR flash driver for MSPI …
Browse files Browse the repository at this point in the history
…devices

Add a flash driver intended to handle various flash devices
connected over MSPI bus as long as they support JEDEC SFDP.
This is an initial commit providing only basic operations
in Octal I/O mode with some hard-coded values for Macronix
MX25Ux series chips.

Upstream PR #: 80042

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl authored and jukkar committed Dec 16, 2024
1 parent e957c23 commit c6ace4b
Show file tree
Hide file tree
Showing 4 changed files with 661 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_MX25UM51345G flash_mcux_f
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_NOR flash_mcux_flexspi_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_ATXP032 flash_mspi_atxp032.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_EMUL_DEVICE flash_mspi_emul_device.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_NOR flash_mspi_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_NOR flash_npcx_fiu_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_QSPI flash_npcx_fiu_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RPI_PICO flash_rpi_pico.c)
Expand Down
18 changes: 18 additions & 0 deletions drivers/flash/Kconfig.mspi
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,22 @@ config FLASH_MSPI_ATXP032
select FLASH_JESD216
select MSPI_AMBIQ_AP3 if SOC_SERIES_APOLLO3X

menuconfig FLASH_MSPI_NOR
bool "Generic MSPI NOR Flash"
default y
depends on DT_HAS_JEDEC_MSPI_NOR_ENABLED
select FLASH_MSPI
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_JESD216
select GPIO if $(dt_compat_any_has_prop,$(DT_COMPAT_JEDEC_MSPI_NOR),reset-gpios)

config FLASH_MSPI_NOR_INIT_PRIORITY
int
depends on FLASH_MSPI_NOR
default 80
help
Device driver initialization priority.
Device is connected to MSPI bus, it has to
be initialized after MSPI driver.

endmenu
Loading

0 comments on commit c6ace4b

Please sign in to comment.