]> Git Repo - J-u-boot.git/blame - drivers/mtd/nand/raw/Kconfig
Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians...
[J-u-boot.git] / drivers / mtd / nand / raw / Kconfig
CommitLineData
88718be3 1menuconfig MTD_RAW_NAND
3657b2f4 2 bool "Raw NAND Device Support"
e3b7545e 3
88718be3 4if MTD_RAW_NAND
a430fa06
MR
5
6config SYS_NAND_SELF_INIT
7 bool
8 help
9 This option, if enabled, provides more flexible and linux-like
10 NAND initialization process.
11
068c41f1
TR
12config SPL_SYS_NAND_SELF_INIT
13 bool
14 depends on !SPL_NAND_SIMPLE
15 help
16 This option, if enabled, provides more flexible and linux-like
17 NAND initialization process, in SPL.
18
19config TPL_SYS_NAND_SELF_INIT
20 bool
21 depends on TPL_NAND_SUPPORT
22 help
23 This option, if enabled, provides more flexible and linux-like
24 NAND initialization process, in SPL.
25
90e1fd09
TR
26config TPL_NAND_INIT
27 bool
28
b7470907
RQ
29config SPL_NAND_INIT
30 bool
31
a918df21
TR
32config SYS_MAX_NAND_DEVICE
33 int "Maximum number of NAND devices to support"
34 default 1
35
a38c3af8 36config SYS_NAND_DRIVER_ECC_LAYOUT
4d693032 37 bool "Omit standard ECC layouts to save space"
a38c3af8 38 help
4d693032 39 Omit standard ECC layouts to save space. Select this if your driver
a38c3af8
SA
40 is known to provide its own ECC layout.
41
c680df7e
SR
42config SYS_NAND_USE_FLASH_BBT
43 bool "Enable BBT (Bad Block Table) support"
44 help
45 Enable the BBT (Bad Block Table) usage.
46
1a792803
TR
47config SYS_NAND_NO_SUBPAGE_WRITE
48 bool "Disable subpage write support"
49 depends on NAND_ARASAN || NAND_DAVINCI || NAND_KIRKWOOD
50
6a8dfd57 51config DM_NAND_ATMEL
e3b7545e
AD
52 bool "Support Atmel NAND controller with DM support"
53 select SYS_NAND_SELF_INIT
54 imply SYS_NAND_USE_FLASH_BBT
55 help
56 Enable this driver for NAND flash platforms using an Atmel NAND
57 controller.
6a8dfd57 58
a430fa06
MR
59config NAND_ATMEL
60 bool "Support Atmel NAND controller"
068c41f1 61 select SYS_NAND_SELF_INIT
a430fa06
MR
62 imply SYS_NAND_USE_FLASH_BBT
63 help
64 Enable this driver for NAND flash platforms using an Atmel NAND
65 controller.
66
49ad4029
DW
67if NAND_ATMEL
68
69config ATMEL_NAND_HWECC
70 bool "Atmel Hardware ECC"
49ad4029
DW
71
72config ATMEL_NAND_HW_PMECC
73 bool "Atmel Programmable Multibit ECC (PMECC)"
74 select ATMEL_NAND_HWECC
49ad4029
DW
75 help
76 The Programmable Multibit ECC (PMECC) controller is a programmable
77 binary BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder.
78
79config PMECC_CAP
80 int "PMECC Correctable ECC Bits"
81 depends on ATMEL_NAND_HW_PMECC
82 default 2
83 help
84 Correctable ECC bits, can be 2, 4, 8, 12, and 24.
85
86config PMECC_SECTOR_SIZE
87 int "PMECC Sector Size"
88 depends on ATMEL_NAND_HW_PMECC
89 default 512
90 help
91 Sector size, in bytes, can be 512 or 1024.
92
93config SPL_GENERATE_ATMEL_PMECC_HEADER
94 bool "Atmel PMECC Header Generation"
b340199f 95 depends on SPL
49ad4029
DW
96 select ATMEL_NAND_HWECC
97 select ATMEL_NAND_HW_PMECC
49ad4029
DW
98 help
99 Generate Programmable Multibit ECC (PMECC) header for SPL image.
100
715cce65
TR
101choice
102 prompt "NAND bus width (bits)"
103 default SYS_NAND_DBW_8
104
105config SYS_NAND_DBW_8
106 bool "NAND bus width is 8 bits"
107
108config SYS_NAND_DBW_16
109 bool "NAND bus width is 16 bits"
110
111endchoice
112
49ad4029
DW
113endif
114
22daafba
PR
115config NAND_BRCMNAND
116 bool "Support Broadcom NAND controller"
1de770d5 117 depends on OF_CONTROL && DM && DM_MTD
068c41f1 118 select SYS_NAND_SELF_INIT
22daafba
PR
119 help
120 Enable the driver for NAND flash on platforms using a Broadcom NAND
121 controller.
122
a4951953
LW
123config NAND_BRCMNAND_BCMBCA
124 bool "Support Broadcom NAND controller on BCMBCA platforms"
125 depends on NAND_BRCMNAND && ARCH_BCMBCA
126 help
127 Enable support for broadcom nand driver on BCA (broadband
128 access) platforms such as BCM6846.
129
a9f80cf9
ÁFR
130config NAND_BRCMNAND_6368
131 bool "Support Broadcom NAND controller on bcm6368"
132 depends on NAND_BRCMNAND && ARCH_BMIPS
133 help
134 Enable support for broadcom nand driver on bcm6368.
135
22daafba 136config NAND_BRCMNAND_6838
e3b7545e
AD
137 bool "Support Broadcom NAND controller on bcm6838"
138 depends on NAND_BRCMNAND && ARCH_BMIPS && SOC_BMIPS_BCM6838
139 help
140 Enable support for broadcom nand driver on bcm6838.
22daafba 141
eb3a6e32 142config NAND_BRCMNAND_IPROC
e3b7545e
AD
143 bool "Support Broadcom NAND controller on the iproc family"
144 depends on NAND_BRCMNAND
145 help
146 Enable support for broadcom nand driver on the Broadcom
147 iproc family such as Northstar (BCM5301x, BCM4708...)
eb3a6e32 148
a430fa06
MR
149config NAND_DAVINCI
150 bool "Support TI Davinci NAND controller"
068c41f1 151 select SYS_NAND_SELF_INIT if TARGET_DA850EVM
a430fa06
MR
152 help
153 Enable this driver for NAND flash controllers available in TI Davinci
154 and Keystone2 platforms
155
41fa8f47
TR
156choice
157 prompt "Type of ECC used on NAND"
158 default SYS_NAND_4BIT_HW_ECC_OOBFIRST
159 depends on NAND_DAVINCI
160
161config SYS_NAND_HW_ECC
162 bool "Use 1-bit HW ECC"
163
d236210c
TR
164config SYS_NAND_4BIT_HW_ECC_OOBFIRST
165 bool "Use 4-bit HW ECC with OOB at the front"
41fa8f47
TR
166
167config SYS_NAND_SOFT_ECC
168 bool "Use software ECC"
169
170endchoice
d236210c 171
a9f03760
TR
172choice
173 prompt "NAND page size"
174 depends on NAND_DAVINCI
175 default SYS_NAND_PAGE_2K
176
177config SYS_NAND_PAGE_2K
178 bool "Page size is 2K"
179
180config SYS_NAND_PAGE_4K
181 bool "Page size is 4K"
182
183endchoice
184
c8c934b9
TR
185config KEYSTONE_RBL_NAND
186 depends on ARCH_KEYSTONE
187 def_bool y
188
a0de0753
TR
189config SPL_NAND_LOAD
190 def_bool y
191 depends on NAND_DAVINCI && ARCH_DAVINCI && SPL_NAND_SUPPORT
192
a430fa06
MR
193config NAND_DENALI
194 bool
195 select SYS_NAND_SELF_INIT
196 imply CMD_NAND
197
198config NAND_DENALI_DT
199 bool "Support Denali NAND controller as a DT device"
200 select NAND_DENALI
357c352c 201 select SPL_SYS_NAND_SELF_INIT
407b01b3 202 depends on OF_CONTROL && DM_MTD
a430fa06
MR
203 help
204 Enable the driver for NAND flash on platforms using a Denali NAND
205 controller as a DT device.
206
53f06134
TR
207config NAND_FSL_ELBC
208 bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver"
068c41f1
TR
209 select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
210 select SPL_SYS_NAND_SELF_INIT
211 select SYS_NAND_SELF_INIT
53f06134
TR
212 depends on FSL_ELBC
213 help
214 Enable the Freescale Enhanced Local Bus Controller FCM NAND driver.
215
da98ddaf
T
216config NAND_FSL_ELBC_DT
217 bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver (DT mode)"
218 depends on NAND_FSL_ELBC
219
53f06134
TR
220config NAND_FSL_IFC
221 bool "Support Freescale Integrated Flash Controller NAND driver"
068c41f1 222 select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
90e1fd09 223 select TPL_NAND_INIT if TPL && !TPL_FRAMEWORK
068c41f1
TR
224 select SPL_SYS_NAND_SELF_INIT
225 select SYS_NAND_SELF_INIT
98ab831d 226 select FSL_IFC
53f06134
TR
227 help
228 Enable the Freescale Integrated Flash Controller NAND driver.
229
9200011e
TR
230config NAND_KIRKWOOD
231 bool "Support for Kirkwood NAND controller"
232 depends on ARCH_KIRKWOOD
233 default y
234
235config NAND_ECC_BCH
236 bool
237
238config NAND_KMETER1
239 bool "Support KMETER1 NAND controller"
240 depends on VENDOR_KM
241 select NAND_ECC_BCH
242
ccdc7cfb
TR
243config NAND_LPC32XX_MLC
244 bool "Support LPC32XX_MLC controller"
068c41f1 245 select SYS_NAND_SELF_INIT
ccdc7cfb
TR
246 help
247 Enable the LPC32XX MLC NAND controller.
248
a430fa06
MR
249config NAND_LPC32XX_SLC
250 bool "Support LPC32XX_SLC controller"
251 help
252 Enable the LPC32XX SLC NAND controller.
253
254config NAND_OMAP_GPMC
255 bool "Support OMAP GPMC NAND controller"
472229fc 256 depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3
ff0d0789 257 select SYS_NAND_SELF_INIT if ARCH_K3
b7470907
RQ
258 select SPL_NAND_INIT if ARCH_K3
259 select SPL_SYS_NAND_SELF_INIT if ARCH_K3
a430fa06
MR
260 help
261 Enables omap_gpmc.c driver for OMAPx and AMxxxx platforms.
262 GPMC controller is used for parallel NAND flash devices, and can
263 do ECC calculation (not ECC error detection) for HAM1, BCH4, BCH8
264 and BCH16 ECC algorithms.
265
6115f1c4
TR
266if NAND_OMAP_GPMC
267
a430fa06
MR
268config NAND_OMAP_GPMC_PREFETCH
269 bool "Enable GPMC Prefetch"
a430fa06
MR
270 default y
271 help
272 On OMAP platforms that use the GPMC controller
273 (CONFIG_NAND_OMAP_GPMC_PREFETCH), this options enables the code that
274 uses the prefetch mode to speed up read operations.
275
276config NAND_OMAP_ELM
277 bool "Enable ELM driver for OMAPxx and AMxx platforms."
6115f1c4 278 depends on !OMAP34XX
a430fa06
MR
279 help
280 ELM controller is used for ECC error detection (not ECC calculation)
281 of BCH4, BCH8 and BCH16 ECC algorithms.
282 Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine,
283 thus such SoC platforms need to depend on software library for ECC error
284 detection. However ECC calculation on such plaforms would still be
285 done by GPMC controller.
286
6115f1c4
TR
287choice
288 prompt "ECC scheme"
289 default NAND_OMAP_ECCSCHEME_BCH8_CODE_HW
290 help
291 On OMAP platforms, this CONFIG specifies NAND ECC scheme.
292 It can take following values:
293 OMAP_ECC_HAM1_CODE_SW
294 1-bit Hamming code using software lib.
295 (for legacy devices only)
296 OMAP_ECC_HAM1_CODE_HW
297 1-bit Hamming code using GPMC hardware.
298 (for legacy devices only)
299 OMAP_ECC_BCH4_CODE_HW_DETECTION_SW
300 4-bit BCH code (unsupported)
301 OMAP_ECC_BCH4_CODE_HW
302 4-bit BCH code (unsupported)
303 OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
304 8-bit BCH code with
305 - ecc calculation using GPMC hardware engine,
306 - error detection using software library.
307 - requires CONFIG_BCH to enable software BCH library
308 (For legacy device which do not have ELM h/w engine)
309 OMAP_ECC_BCH8_CODE_HW
310 8-bit BCH code with
311 - ecc calculation using GPMC hardware engine,
312 - error detection using ELM hardware engine.
313 OMAP_ECC_BCH16_CODE_HW
314 16-bit BCH code with
315 - ecc calculation using GPMC hardware engine,
316 - error detection using ELM hardware engine.
317
318 How to select ECC scheme on OMAP and AMxx platforms ?
319 -----------------------------------------------------
320 Though higher ECC schemes have more capability to detect and correct
321 bit-flips, but still selection of ECC scheme is dependent on following
322 - hardware engines present in SoC.
323 Some legacy OMAP SoC do not have ELM h/w engine thus such
324 SoC cannot support BCHx_HW ECC schemes.
325 - size of OOB/Spare region
326 With higher ECC schemes, more OOB/Spare area is required to
327 store ECC. So choice of ECC scheme is limited by NAND oobsize.
328
329 In general following expression can help:
330 NAND_OOBSIZE >= 2 + (NAND_PAGESIZE / 512) * ECC_BYTES
331 where
332 NAND_OOBSIZE = number of bytes available in
333 OOB/spare area per NAND page.
334 NAND_PAGESIZE = bytes in main-area of NAND page.
335 ECC_BYTES = number of ECC bytes generated to
336 protect 512 bytes of data, which is:
337 3 for HAM1_xx ecc schemes
338 7 for BCH4_xx ecc schemes
339 14 for BCH8_xx ecc schemes
340 26 for BCH16_xx ecc schemes
341
342 example to check for BCH16 on 2K page NAND
343 NAND_PAGESIZE = 2048
344 NAND_OOBSIZE = 64
345 2 + (2048 / 512) * 26 = 106 > NAND_OOBSIZE
346 Thus BCH16 cannot be supported on 2K page NAND.
347
348 However, for 4K pagesize NAND
349 NAND_PAGESIZE = 4096
350 NAND_OOBSIZE = 224
351 ECC_BYTES = 26
352 2 + (4096 / 512) * 26 = 210 < NAND_OOBSIZE
353 Thus BCH16 can be supported on 4K page NAND.
354
355config NAND_OMAP_ECCSCHEME_HAM1_CODE_SW
356 bool "1-bit Hamming code using software lib"
357
358config NAND_OMAP_ECCSCHEME_HAM1_CODE_HW
359 bool "1-bit Hamming code using GPMC hardware"
360
361config NAND_OMAP_ECCSCHEME_BCH8_CODE_HW_DETECTION_SW
362 bool "8-bit BCH code with HW calculation SW error detection"
363
364config NAND_OMAP_ECCSCHEME_BCH8_CODE_HW
365 bool "8-bit BCH code with HW calculation and error detection"
366
367config NAND_OMAP_ECCSCHEME_BCH16_CODE_HW
368 bool "16-bit BCH code with HW calculation and error detection"
369
370endchoice
371
372config NAND_OMAP_ECCSCHEME
373 int
374 default 1 if NAND_OMAP_ECCSCHEME_HAM1_CODE_SW
375 default 2 if NAND_OMAP_ECCSCHEME_HAM1_CODE_HW
376 default 5 if NAND_OMAP_ECCSCHEME_BCH8_CODE_HW_DETECTION_SW
377 default 6 if NAND_OMAP_ECCSCHEME_BCH8_CODE_HW
378 default 7 if NAND_OMAP_ECCSCHEME_BCH16_CODE_HW
379 help
380 This must be kept in sync with the enum in
381 include/linux/mtd/omap_gpmc.h
382
383endif
384
a430fa06
MR
385config NAND_VF610_NFC
386 bool "Support for Freescale NFC for VF610"
387 select SYS_NAND_SELF_INIT
a38c3af8 388 select SYS_NAND_DRIVER_ECC_LAYOUT
a430fa06
MR
389 imply CMD_NAND
390 help
391 Enables support for NAND Flash Controller on some Freescale
392 processors like the VF610, MCF54418 or Kinetis K70.
393 The driver supports a maximum 2k page size. The driver
394 currently does not support hardware ECC.
395
8a12d127
LM
396if NAND_VF610_NFC
397
398config NAND_VF610_NFC_DT
e3b7545e
AD
399 bool "Support Vybrid's vf610 NAND controller as a DT device"
400 depends on OF_CONTROL && DM_MTD
401 help
402 Enable the driver for Vybrid's vf610 NAND flash on platforms
8a12d127
LM
403 using device tree.
404
a430fa06
MR
405choice
406 prompt "Hardware ECC strength"
407 depends on NAND_VF610_NFC
408 default SYS_NAND_VF610_NFC_45_ECC_BYTES
409 help
410 Select the ECC strength used in the hardware BCH ECC block.
411
412config SYS_NAND_VF610_NFC_45_ECC_BYTES
413 bool "24-error correction (45 ECC bytes)"
414
415config SYS_NAND_VF610_NFC_60_ECC_BYTES
416 bool "32-error correction (60 ECC bytes)"
417
418endchoice
419
8a12d127
LM
420endif
421
a430fa06
MR
422config NAND_PXA3XX
423 bool "Support for NAND on PXA3xx and Armada 370/XP/38x"
424 select SYS_NAND_SELF_INIT
8dddfff4 425 select DM_MTD
aaedaaae
SH
426 select REGMAP
427 select SYSCON
a430fa06
MR
428 imply CMD_NAND
429 help
430 This enables the driver for the NAND flash device found on
431 PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2).
432
bc8e8a4b
SA
433config NAND_SANDBOX
434 bool "Support for NAND in sandbox"
435 depends on SANDBOX
436 select SYS_NAND_SELF_INIT
8502b5bf
SA
437 select SPL_SYS_NAND_SELF_INIT
438 select SPL_NAND_INIT
bc8e8a4b
SA
439 select SYS_NAND_SOFT_ECC
440 select BCH
441 select NAND_ECC_BCH
442 imply CMD_NAND
443 help
444 Enable a dummy NAND driver for sandbox. It simulates any number of
445 arbitrary NAND chips with a RAM buffer. It will also inject errors to
446 test ECC. At the moment, only 8-bit busses and single-chip devices are
447 supported.
448
a430fa06
MR
449config NAND_SUNXI
450 bool "Support for NAND on Allwinner SoCs"
451 default ARCH_SUNXI
452 depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I
453 select SYS_NAND_SELF_INIT
454 select SYS_NAND_U_BOOT_LOCATIONS
455 select SPL_NAND_SUPPORT
068c41f1 456 select SPL_SYS_NAND_SELF_INIT
a430fa06 457 imply CMD_NAND
e3b7545e
AD
458 help
459 Enable support for NAND. This option enables the standard and
460 SPL drivers.
461 The SPL driver only supports reading from the NAND using DMA
462 transfers.
a430fa06
MR
463
464if NAND_SUNXI
465
466config NAND_SUNXI_SPL_ECC_STRENGTH
467 int "Allwinner NAND SPL ECC Strength"
468 default 64
469
470config NAND_SUNXI_SPL_ECC_SIZE
471 int "Allwinner NAND SPL ECC Step Size"
472 default 1024
473
474config NAND_SUNXI_SPL_USABLE_PAGE_SIZE
475 int "Allwinner NAND SPL Usable Page Size"
476 default 1024
477
478endif
479
480config NAND_ARASAN
481 bool "Configure Arasan Nand"
482 select SYS_NAND_SELF_INIT
a253092d 483 depends on DM_MTD
a430fa06
MR
484 imply CMD_NAND
485 help
486 This enables Nand driver support for Arasan nand flash
487 controller. This uses the hardware ECC for read and
488 write operations.
489
c2e8c4d0
AK
490config NAND_MESON
491 bool "Meson NAND support"
492 select SYS_NAND_SELF_INIT
493 depends on DM_MTD && ARCH_MESON
494 imply CMD_NAND
495 help
496 This enables Nand driver support for Meson raw NAND flash
497 controller.
498
a430fa06
MR
499config NAND_MXC
500 bool "MXC NAND support"
501 depends on CPU_ARM926EJS || CPU_ARM1136 || MX5
502 imply CMD_NAND
503 help
504 This enables the NAND driver for the NAND flash controller on the
7d4541cd 505 i.MX27 / i.MX31 / i.MX5 processors.
a430fa06 506
0cd03259
TR
507config SYS_NAND_SIZE
508 int "Size of NAND in kilobytes"
509 depends on NAND_MXC && SPL_NAND_SUPPORT
510 default 268435456
511
71894173
TR
512config MXC_NAND_HWECC
513 bool "Hardware ECC support in MXC NAND"
514 depends on NAND_MXC
515
a430fa06
MR
516config NAND_MXS
517 bool "MXS NAND support"
39320e72 518 depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M
068c41f1 519 select SPL_SYS_NAND_SELF_INIT
a430fa06
MR
520 select SYS_NAND_SELF_INIT
521 imply CMD_NAND
522 select APBH_DMA
39320e72
PF
523 select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M
524 select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M
a430fa06
MR
525 help
526 This enables NAND driver for the NAND flash controller on the
527 MXS processors.
528
529if NAND_MXS
530
531config NAND_MXS_DT
532 bool "Support MXS NAND controller as a DT device"
1de770d5 533 depends on OF_CONTROL && DM_MTD
a430fa06
MR
534 help
535 Enable the driver for MXS NAND flash on platforms using
536 device tree.
537
538config NAND_MXS_USE_MINIMUM_ECC
539 bool "Use minimum ECC strength supported by the controller"
540 default false
541
542endif
543
0892a7e5
ZL
544config NAND_MXIC
545 bool "Macronix raw NAND controller"
546 select SYS_NAND_SELF_INIT
547 help
548 This selects the Macronix raw NAND controller driver.
549
a430fa06
MR
550config NAND_ZYNQ
551 bool "Support for Zynq Nand controller"
068c41f1 552 select SPL_SYS_NAND_SELF_INIT
a430fa06 553 select SYS_NAND_SELF_INIT
45397a6e 554 select DM_MTD
a430fa06
MR
555 imply CMD_NAND
556 help
557 This enables Nand driver support for Nand flash controller
558 found on Zynq SoC.
559
560config NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS
561 bool "Enable use of 1st stage bootloader timing for NAND"
562 depends on NAND_ZYNQ
563 help
1be82afa 564 This flag prevent U-Boot reconfigure NAND flash controller and reuse
a430fa06
MR
565 the NAND timing from 1st stage bootloader.
566
05c7606a
SG
567config NAND_OCTEONTX
568 bool "Support for OcteonTX NAND controller"
569 select SYS_NAND_SELF_INIT
570 imply CMD_NAND
571 help
e3b7545e
AD
572 This enables Nand flash controller hardware found on the OcteonTX
573 processors.
05c7606a
SG
574
575config NAND_OCTEONTX_HW_ECC
576 bool "Support Hardware ECC for OcteonTX NAND controller"
577 depends on NAND_OCTEONTX
578 default y
579 help
e3b7545e
AD
580 This enables Hardware BCH engine found on the OcteonTX processors to
581 support ECC for NAND flash controller.
05c7606a 582
7bb75023
CK
583config NAND_STM32_FMC2
584 bool "Support for NAND controller on STM32MP SoCs"
585 depends on ARCH_STM32MP
586 select SYS_NAND_SELF_INIT
587 imply CMD_NAND
588 help
589 Enables support for NAND Flash chips on SoCs containing the FMC2
590 NAND controller. This controller is found on STM32MP SoCs.
591 The controller supports a maximum 8k page size and supports
592 a maximum 8-bit correction error per sector of 512 bytes.
593
161df94b
KL
594config CORTINA_NAND
595 bool "Support for NAND controller on Cortina-Access SoCs"
596 depends on CORTINA_PLATFORM
597 select SYS_NAND_SELF_INIT
598 select DM_MTD
599 imply CMD_NAND
600 help
601 Enables support for NAND Flash chips on Coartina-Access SoCs platform
602 This controller is found on Presidio/Venus SoCs.
603 The controller supports a maximum 8k page size and supports
604 a maximum 40-bit error correction per sector of 1024 bytes.
605
b12dc5d6
YZ
606config ROCKCHIP_NAND
607 bool "Support for NAND controller on Rockchip SoCs"
608 depends on ARCH_ROCKCHIP
609 select SYS_NAND_SELF_INIT
610 select DM_MTD
611 imply CMD_NAND
612 help
613 Enables support for NAND Flash chips on Rockchip SoCs platform.
614 This controller is found on Rockchip SoCs.
615 There are four different versions of NAND FLASH Controllers,
616 including:
617 NFC v600: RK2928, RK3066, RK3188
618 NFC v622: RK3036, RK3128
619 NFC v800: RK3308, RV1108
620 NFC v900: PX30, RK3326
621
d27f2272
JJ
622config ROCKCHIP_NAND_SKIP_BBTSCAN
623 bool "Skip the automatic BBT scan with Rockchip NAND controllers"
624 depends on ROCKCHIP_NAND
d27f2272
JJ
625 help
626 Skip the automatic BBT scan with the NAND_SKIP_BBTSCAN
627 option when data content is not in MTD format or
628 must remain unchanged.
629
bfb5387f
TR
630config TEGRA_NAND
631 bool "Support for NAND controller on Tegra SoCs"
632 depends on ARCH_TEGRA
633 select SYS_NAND_SELF_INIT
634 imply CMD_NAND
635 help
636 Enables support for NAND Flash chips on Tegra SoCs platforms.
637
3ab8beaa
WG
638config NAND_MT7621
639 bool "Support for MediaTek MT7621 NAND flash controller"
640 depends on SOC_MT7621
641 select SYS_NAND_SELF_INIT
642 select SPL_SYS_NAND_SELF_INIT
643 imply CMD_NAND
644 help
645 This enables NAND driver for the NAND flash controller on MediaTek
646 MT7621 platform.
647 The controller supports 4~12 bits correction per 512 bytes with a
648 maximum 4KB page size.
649
a430fa06
MR
650comment "Generic NAND options"
651
652config SYS_NAND_BLOCK_SIZE
653 hex "NAND chip eraseblock size"
67bd6158
T
654 depends on ARCH_SUNXI || SPL_NAND_SUPPORT || TPL_NAND_SUPPORT || \
655 MVEBU_SPL_BOOT_DEVICE_NAND
3ab8beaa
WG
656 depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && \
657 !NAND_FSL_IFC && !NAND_MT7621
a430fa06
MR
658 help
659 Number of data bytes in one eraseblock for the NAND chip on the
660 board. This is the multiple of NAND_PAGE_SIZE and the number of
661 pages.
662
c0ad62c5
TR
663config SYS_NAND_ONFI_DETECTION
664 bool "Enable detection of ONFI compliant devices during probe"
665 help
666 Enables detection of ONFI compliant devices during probe.
667 And fetching device parameters flashed on device, by parsing
668 ONFI parameter page.
669
a430fa06
MR
670config SYS_NAND_PAGE_SIZE
671 hex "NAND chip page size"
a0de0753
TR
672 depends on ARCH_SUNXI || NAND_OMAP_GPMC || NAND_LPC32XX_SLC || \
673 SPL_NAND_SIMPLE || (NAND_MXC && SPL_NAND_SUPPORT) || \
67bd6158 674 MVEBU_SPL_BOOT_DEVICE_NAND || \
8502b5bf
SA
675 (NAND_ATMEL && SPL_NAND_SUPPORT) || \
676 SPL_GENERATE_ATMEL_PMECC_HEADER || NAND_SANDBOX
3ab8beaa 677 depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && !NAND_MT7621
a430fa06
MR
678 help
679 Number of data bytes in one page for the NAND chip on the
680 board, not including the OOB area.
681
682config SYS_NAND_OOBSIZE
683 hex "NAND chip OOB size"
a0de0753
TR
684 depends on ARCH_SUNXI || NAND_OMAP_GPMC || NAND_LPC32XX_SLC || \
685 SPL_NAND_SIMPLE || (NAND_MXC && SPL_NAND_SUPPORT) || \
686 (NAND_ATMEL && SPL_NAND_SUPPORT) || SPL_GENERATE_ATMEL_PMECC_HEADER
16166264 687 depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC
a430fa06
MR
688 help
689 Number of bytes in the Out-Of-Band area for the NAND chip on
690 the board.
691
692# Enhance depends when converting drivers to Kconfig which use this config
693# option (mxc_nand, ndfc, omap_gpmc).
694config SYS_NAND_BUSWIDTH_16BIT
695 bool "Use 16-bit NAND interface"
696 depends on NAND_VF610_NFC || NAND_OMAP_GPMC || NAND_MXC || ARCH_DAVINCI
697 help
698 Indicates that NAND device has 16-bit wide data-bus. In absence of this
699 config, bus-width of NAND device is assumed to be either 8-bit and later
700 determined by reading ONFI params.
701 Above config is useful when NAND device's bus-width information cannot
702 be determined from on-chip ONFI params, like in following scenarios:
703 - SPL boot does not support reading of ONFI parameters. This is done to
704 keep SPL code foot-print small.
705 - In current U-Boot flow using nand_init(), driver initialization
706 happens in board_nand_init() which is called before any device probe
707 (nand_scan_ident + nand_scan_tail), thus device's ONFI parameters are
708 not available while configuring controller. So a static CONFIG_NAND_xx
709 is needed to know the device's bus-width in advance.
710
711if SPL
712
4884d829
TR
713config SYS_NAND_5_ADDR_CYCLE
714 bool "Wait 5 address cycles during NAND commands"
715 depends on SPL_NAND_AM33XX_BCH || SPL_NAND_SIMPLE || \
716 (SPL_NAND_SUPPORT && NAND_ATMEL)
717 default y
718 help
719 Some controllers require waiting for 5 address cycles when issuing
720 some commands, on NAND chips larger than 128MiB.
721
9d9f59dd 722choice
c0ad62c5 723 prompt "NAND bad block marker/indicator position in the OOB"
9d9f59dd
TR
724 depends on SPL_NAND_AM33XX_BCH || SPL_NAND_DENALI || SPL_NAND_SIMPLE || \
725 SPL_NAND_SUPPORT && (NAND_ATMEL || NAND_MXC)
726 default HAS_NAND_LARGE_BADBLOCK_POS
727 help
728 In the OOB, which position contains the badblock information.
729
730config HAS_NAND_LARGE_BADBLOCK_POS
731 bool "Set the bad block marker/indicator to the 'large' position"
732
733config HAS_NAND_SMALL_BADBLOCK_POS
734 bool "Set the bad block marker/indicator to the 'small' position"
735
736endchoice
737
738config SYS_NAND_BAD_BLOCK_POS
739 int
740 default 0 if HAS_NAND_LARGE_BADBLOCK_POS
741 default 5 if HAS_NAND_SMALL_BADBLOCK_POS
742
a430fa06 743config SYS_NAND_U_BOOT_LOCATIONS
1be82afa 744 bool "Define U-Boot binaries locations in NAND"
a430fa06 745 help
e3b7545e
AD
746 Enable CONFIG_SYS_NAND_U_BOOT_OFFS though Kconfig.
747 This option should not be enabled when compiling U-Boot for boards
748 defining CONFIG_SYS_NAND_U_BOOT_OFFS in their include/configs/<board>.h
749 file.
a430fa06
MR
750
751config SYS_NAND_U_BOOT_OFFS
752 hex "Location in NAND to read U-Boot from"
753 default 0x800000 if NAND_SUNXI
754 depends on SYS_NAND_U_BOOT_LOCATIONS
755 help
e3b7545e
AD
756 Set the offset from the start of the nand where u-boot should be
757 loaded from.
a430fa06
MR
758
759config SYS_NAND_U_BOOT_OFFS_REDUND
760 hex "Location in NAND to read U-Boot from"
761 default SYS_NAND_U_BOOT_OFFS
762 depends on SYS_NAND_U_BOOT_LOCATIONS
763 help
e3b7545e
AD
764 Set the offset from the start of the nand where the redundant u-boot
765 should be loaded from.
a430fa06
MR
766
767config SPL_NAND_AM33XX_BCH
768 bool "Enables SPL-NAND driver which supports ELM based"
b340199f 769 depends on SPL_NAND_SUPPORT && NAND_OMAP_GPMC && !OMAP34XX
a430fa06 770 default y
e3b7545e 771 help
a430fa06
MR
772 Hardware ECC correction. This is useful for platforms which have ELM
773 hardware engine and use NAND boot mode.
774 Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine,
775 so those platforms should use CONFIG_SPL_NAND_SIMPLE for enabling
e3b7545e 776 SPL-NAND driver with software ECC correction support.
a430fa06
MR
777
778config SPL_NAND_DENALI
779 bool "Support Denali NAND controller for SPL"
b340199f 780 depends on SPL_NAND_SUPPORT
a430fa06
MR
781 help
782 This is a small implementation of the Denali NAND controller
783 for use on SPL.
784
7a270436
MY
785config NAND_DENALI_SPARE_AREA_SKIP_BYTES
786 int "Number of bytes skipped in OOB area"
787 depends on SPL_NAND_DENALI
788 range 0 63
789 help
790 This option specifies the number of bytes to skip from the beginning
791 of OOB area before last ECC sector data starts. This is potentially
792 used to preserve the bad block marker in the OOB area.
793
a430fa06
MR
794config SPL_NAND_SIMPLE
795 bool "Use simple SPL NAND driver"
b340199f 796 depends on !SPL_NAND_AM33XX_BCH && SPL_NAND_SUPPORT
a430fa06
MR
797 help
798 Support for NAND boot using simple NAND drivers that
799 expose the cmd_ctrl() interface.
60db3250
TR
800
801config SYS_NAND_HW_ECC_OOBFIRST
802 bool "In SPL, read the OOB first and then the data from NAND"
803 depends on SPL_NAND_SIMPLE
804
e3b7545e 805endif # if SPL
a430fa06 806
e3b7545e 807endif # if MTD_RAW_NAND
This page took 0.348427 seconds and 5 git commands to generate.