Skip to content

Commit 7212365

Browse files
committed
[nrf fromlist] drivers: flash: Add generic NOR flash driver for MSPI devices
Add a flash driver with intent to handle variuos flash devices connected over MSPI bus as long as they support JEDEC SFDP. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit 21c32872cf50da2811f783ef4d53ba8c776c053c) Upstream PR: zephyrproject-rtos/zephyr#80042
1 parent d1e0427 commit 7212365

File tree

4 files changed

+592
-0
lines changed

4 files changed

+592
-0
lines changed

drivers/flash/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_MX25UM51345G flash_mcux_f
3434
zephyr_library_sources_ifdef(CONFIG_FLASH_MCUX_FLEXSPI_NOR flash_mcux_flexspi_nor.c)
3535
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_ATXP032 flash_mspi_atxp032.c)
3636
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_EMUL_DEVICE flash_mspi_emul_device.c)
37+
zephyr_library_sources_ifdef(CONFIG_FLASH_MSPI_NOR flash_mspi_nor.c)
3738
zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_NOR flash_npcx_fiu_nor.c)
3839
zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_QSPI flash_npcx_fiu_qspi.c)
3940
zephyr_library_sources_ifdef(CONFIG_FLASH_RPI_PICO flash_rpi_pico.c)

drivers/flash/Kconfig.mspi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,22 @@ config FLASH_MSPI_ATXP032
2828
select FLASH_JESD216
2929
select MSPI_AMBIQ_AP3 if SOC_SERIES_APOLLO3X
3030

31+
menuconfig FLASH_MSPI_NOR
32+
bool "Generic MSPI NOR Flash"
33+
default y
34+
depends on DT_HAS_JEDEC_MSPI_NOR_ENABLED
35+
select FLASH_MSPI
36+
select FLASH_HAS_EXPLICIT_ERASE
37+
select FLASH_JESD216
38+
39+
config FLASH_MSPI_NOR_INIT_PRIORITY
40+
int
41+
depends on FLASH_MSPI_NOR
42+
default 80
43+
help
44+
Device driver initialization priority.
45+
Device is connected to MSPI bus, it has to
46+
be initialized after MSPI driver.
47+
48+
3149
endmenu

0 commit comments

Comments
 (0)