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