File tree Expand file tree Collapse file tree 8 files changed +1660
-0
lines changed Expand file tree Collapse file tree 8 files changed +1660
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_SMARTBOND flash_smartbond.c)
67
67
zephyr_library_sources_ifdef (CONFIG_SOC_FLASH_TELINK_B91 soc_flash_b91.c )
68
68
zephyr_library_sources_ifdef (CONFIG_SOC_FLASH_XMC4XXX soc_flash_xmc4xxx.c )
69
69
zephyr_library_sources_ifdef (CONFIG_SPI_FLASH_AT45 spi_flash_at45.c )
70
+ zephyr_library_sources_ifdef (CONFIG_SPI_NAND bch.c )
71
+ zephyr_library_sources_ifdef (CONFIG_SPI_NAND spi_nand.c )
70
72
zephyr_library_sources_ifdef (CONFIG_SPI_NOR spi_nor.c )
71
73
# zephyr-keep-sorted-stop
72
74
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ source "drivers/flash/Kconfig.lpc"
181
181
source "drivers/flash/Kconfig.max32"
182
182
source "drivers/flash/Kconfig.mcux"
183
183
source "drivers/flash/Kconfig.mspi"
184
+ source "drivers/flash/Kconfig.nand"
184
185
source "drivers/flash/Kconfig.nor"
185
186
source "drivers/flash/Kconfig.nordic_qspi_nor"
186
187
source "drivers/flash/Kconfig.npcx_fiu"
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2022-2025 Macronix International Co., Ltd.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ menuconfig SPI_NAND
5
+ bool "SPI NAND Flash"
6
+ default y
7
+ depends on DT_HAS_JEDEC_SPI_NAND_ENABLED
8
+ select FLASH_HAS_DRIVER_ENABLED
9
+ select FLASH_HAS_EXPLICIT_ERASE
10
+ select FLASH_HAS_PAGE_LAYOUT
11
+ select SPI
12
+
13
+ if SPI_NAND
14
+
15
+ config SPI_NAND_INIT_PRIORITY
16
+ int
17
+ default 80
18
+ help
19
+ Device driver initialization priority.
20
+ Device is connected to SPI bus, it has to
21
+ be initialized after SPI driver.
22
+
23
+ config SPI_NAND_SOFTWARE_ECC
24
+ bool
25
+ default n
26
+ help
27
+ Enable this option to use software-based ECC (Error Correction Code)
28
+ when accessing SPI NAND flash devices. This is useful for platforms
29
+ that do not support hardware ECC, or when additional software control
30
+ over ECC handling is required.
31
+
32
+ config SPI_NAND_ECC_STEP_SIZE
33
+ int
34
+ default 512
35
+ depends on SPI_NAND_SOFTWARE_ECC
36
+ help
37
+ Specifies the ECC (Error Correction Code) step size in bytes for SPI NAND
38
+ flash operations. This value determines how many bytes of data are protected
39
+ by one ECC block.
40
+
41
+ config SPI_NAND_BCH_HEAP_SIZE
42
+ int
43
+ default 51200
44
+ help
45
+ Specify the heap size (in bytes) reserved for BCH (Bose-Chaudhuri-Hocquenghem)
46
+ error correction in SPI NAND flash operations.
47
+
48
+ endif # SPI_NAND
You can’t perform that action at this time.
0 commit comments