Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 1 | |
| 2 | menuconfig NAND |
Miquel Raynal | 8115c45 | 2018-08-16 17:30:08 +0200 | [diff] [blame] | 3 | bool "Raw NAND Device Support" |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 4 | if NAND |
| 5 | |
| 6 | config SYS_NAND_SELF_INIT |
| 7 | bool |
| 8 | help |
| 9 | This option, if enabled, provides more flexible and linux-like |
| 10 | NAND initialization process. |
| 11 | |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 12 | config SYS_NAND_DRIVER_ECC_LAYOUT |
| 13 | bool |
| 14 | help |
| 15 | Omit standard ECC layouts to safe space. Select this if your driver |
| 16 | is known to provide its own ECC layout. |
| 17 | |
Stefan Roese | 23b37f9 | 2019-08-22 12:28:04 +0200 | [diff] [blame^] | 18 | config SYS_NAND_USE_FLASH_BBT |
| 19 | bool "Enable BBT (Bad Block Table) support" |
| 20 | help |
| 21 | Enable the BBT (Bad Block Table) usage. |
| 22 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 23 | config NAND_ATMEL |
| 24 | bool "Support Atmel NAND controller" |
| 25 | imply SYS_NAND_USE_FLASH_BBT |
| 26 | help |
| 27 | Enable this driver for NAND flash platforms using an Atmel NAND |
| 28 | controller. |
| 29 | |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 30 | if NAND_ATMEL |
| 31 | |
| 32 | config ATMEL_NAND_HWECC |
| 33 | bool "Atmel Hardware ECC" |
| 34 | default n |
| 35 | |
| 36 | config ATMEL_NAND_HW_PMECC |
| 37 | bool "Atmel Programmable Multibit ECC (PMECC)" |
| 38 | select ATMEL_NAND_HWECC |
| 39 | default n |
| 40 | help |
| 41 | The Programmable Multibit ECC (PMECC) controller is a programmable |
| 42 | binary BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. |
| 43 | |
| 44 | config PMECC_CAP |
| 45 | int "PMECC Correctable ECC Bits" |
| 46 | depends on ATMEL_NAND_HW_PMECC |
| 47 | default 2 |
| 48 | help |
| 49 | Correctable ECC bits, can be 2, 4, 8, 12, and 24. |
| 50 | |
| 51 | config PMECC_SECTOR_SIZE |
| 52 | int "PMECC Sector Size" |
| 53 | depends on ATMEL_NAND_HW_PMECC |
| 54 | default 512 |
| 55 | help |
| 56 | Sector size, in bytes, can be 512 or 1024. |
| 57 | |
| 58 | config SPL_GENERATE_ATMEL_PMECC_HEADER |
| 59 | bool "Atmel PMECC Header Generation" |
| 60 | select ATMEL_NAND_HWECC |
| 61 | select ATMEL_NAND_HW_PMECC |
| 62 | default n |
| 63 | help |
| 64 | Generate Programmable Multibit ECC (PMECC) header for SPL image. |
| 65 | |
| 66 | endif |
| 67 | |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 68 | config NAND_BRCMNAND |
| 69 | bool "Support Broadcom NAND controller" |
| 70 | depends on OF_CONTROL && DM && MTD |
| 71 | help |
| 72 | Enable the driver for NAND flash on platforms using a Broadcom NAND |
| 73 | controller. |
| 74 | |
| 75 | config NAND_BRCMNAND_6838 |
| 76 | bool "Support Broadcom NAND controller on bcm6838" |
| 77 | depends on NAND_BRCMNAND && ARCH_BMIPS && SOC_BMIPS_BCM6838 |
| 78 | help |
| 79 | Enable support for broadcom nand driver on bcm6838. |
| 80 | |
| 81 | config NAND_BRCMNAND_6858 |
| 82 | bool "Support Broadcom NAND controller on bcm6858" |
| 83 | depends on NAND_BRCMNAND && ARCH_BCM6858 |
| 84 | help |
| 85 | Enable support for broadcom nand driver on bcm6858. |
| 86 | |
| 87 | config NAND_BRCMNAND_63158 |
| 88 | bool "Support Broadcom NAND controller on bcm63158" |
| 89 | depends on NAND_BRCMNAND && ARCH_BCM63158 |
| 90 | help |
| 91 | Enable support for broadcom nand driver on bcm63158. |
| 92 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 93 | config NAND_DAVINCI |
| 94 | bool "Support TI Davinci NAND controller" |
| 95 | help |
| 96 | Enable this driver for NAND flash controllers available in TI Davinci |
| 97 | and Keystone2 platforms |
| 98 | |
| 99 | config NAND_DENALI |
| 100 | bool |
| 101 | select SYS_NAND_SELF_INIT |
| 102 | imply CMD_NAND |
| 103 | |
| 104 | config NAND_DENALI_DT |
| 105 | bool "Support Denali NAND controller as a DT device" |
| 106 | select NAND_DENALI |
| 107 | depends on OF_CONTROL && DM |
| 108 | help |
| 109 | Enable the driver for NAND flash on platforms using a Denali NAND |
| 110 | controller as a DT device. |
| 111 | |
| 112 | config NAND_DENALI_SPARE_AREA_SKIP_BYTES |
| 113 | int "Number of bytes skipped in OOB area" |
| 114 | depends on NAND_DENALI |
| 115 | range 0 63 |
| 116 | help |
| 117 | This option specifies the number of bytes to skip from the beginning |
| 118 | of OOB area before last ECC sector data starts. This is potentially |
| 119 | used to preserve the bad block marker in the OOB area. |
| 120 | |
| 121 | config NAND_LPC32XX_SLC |
| 122 | bool "Support LPC32XX_SLC controller" |
| 123 | help |
| 124 | Enable the LPC32XX SLC NAND controller. |
| 125 | |
| 126 | config NAND_OMAP_GPMC |
| 127 | bool "Support OMAP GPMC NAND controller" |
| 128 | depends on ARCH_OMAP2PLUS |
| 129 | help |
| 130 | Enables omap_gpmc.c driver for OMAPx and AMxxxx platforms. |
| 131 | GPMC controller is used for parallel NAND flash devices, and can |
| 132 | do ECC calculation (not ECC error detection) for HAM1, BCH4, BCH8 |
| 133 | and BCH16 ECC algorithms. |
| 134 | |
| 135 | config NAND_OMAP_GPMC_PREFETCH |
| 136 | bool "Enable GPMC Prefetch" |
| 137 | depends on NAND_OMAP_GPMC |
| 138 | default y |
| 139 | help |
| 140 | On OMAP platforms that use the GPMC controller |
| 141 | (CONFIG_NAND_OMAP_GPMC_PREFETCH), this options enables the code that |
| 142 | uses the prefetch mode to speed up read operations. |
| 143 | |
| 144 | config NAND_OMAP_ELM |
| 145 | bool "Enable ELM driver for OMAPxx and AMxx platforms." |
| 146 | depends on NAND_OMAP_GPMC && !OMAP34XX |
| 147 | help |
| 148 | ELM controller is used for ECC error detection (not ECC calculation) |
| 149 | of BCH4, BCH8 and BCH16 ECC algorithms. |
| 150 | Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine, |
| 151 | thus such SoC platforms need to depend on software library for ECC error |
| 152 | detection. However ECC calculation on such plaforms would still be |
| 153 | done by GPMC controller. |
| 154 | |
| 155 | config NAND_VF610_NFC |
| 156 | bool "Support for Freescale NFC for VF610" |
| 157 | select SYS_NAND_SELF_INIT |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 158 | select SYS_NAND_DRIVER_ECC_LAYOUT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 159 | imply CMD_NAND |
| 160 | help |
| 161 | Enables support for NAND Flash Controller on some Freescale |
| 162 | processors like the VF610, MCF54418 or Kinetis K70. |
| 163 | The driver supports a maximum 2k page size. The driver |
| 164 | currently does not support hardware ECC. |
| 165 | |
Lukasz Majewski | f006cb3 | 2018-12-03 10:24:50 +0100 | [diff] [blame] | 166 | if NAND_VF610_NFC |
| 167 | |
| 168 | config NAND_VF610_NFC_DT |
| 169 | bool "Support Vybrid's vf610 NAND controller as a DT device" |
| 170 | depends on OF_CONTROL && MTD |
| 171 | help |
| 172 | Enable the driver for Vybrid's vf610 NAND flash on platforms |
| 173 | using device tree. |
| 174 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 175 | choice |
| 176 | prompt "Hardware ECC strength" |
| 177 | depends on NAND_VF610_NFC |
| 178 | default SYS_NAND_VF610_NFC_45_ECC_BYTES |
| 179 | help |
| 180 | Select the ECC strength used in the hardware BCH ECC block. |
| 181 | |
| 182 | config SYS_NAND_VF610_NFC_45_ECC_BYTES |
| 183 | bool "24-error correction (45 ECC bytes)" |
| 184 | |
| 185 | config SYS_NAND_VF610_NFC_60_ECC_BYTES |
| 186 | bool "32-error correction (60 ECC bytes)" |
| 187 | |
| 188 | endchoice |
| 189 | |
Lukasz Majewski | f006cb3 | 2018-12-03 10:24:50 +0100 | [diff] [blame] | 190 | endif |
| 191 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 192 | config NAND_PXA3XX |
| 193 | bool "Support for NAND on PXA3xx and Armada 370/XP/38x" |
| 194 | select SYS_NAND_SELF_INIT |
| 195 | imply CMD_NAND |
| 196 | help |
| 197 | This enables the driver for the NAND flash device found on |
| 198 | PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2). |
| 199 | |
| 200 | config NAND_SUNXI |
| 201 | bool "Support for NAND on Allwinner SoCs" |
| 202 | default ARCH_SUNXI |
| 203 | depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I |
| 204 | select SYS_NAND_SELF_INIT |
| 205 | select SYS_NAND_U_BOOT_LOCATIONS |
| 206 | select SPL_NAND_SUPPORT |
| 207 | imply CMD_NAND |
| 208 | ---help--- |
| 209 | Enable support for NAND. This option enables the standard and |
| 210 | SPL drivers. |
| 211 | The SPL driver only supports reading from the NAND using DMA |
| 212 | transfers. |
| 213 | |
| 214 | if NAND_SUNXI |
| 215 | |
| 216 | config NAND_SUNXI_SPL_ECC_STRENGTH |
| 217 | int "Allwinner NAND SPL ECC Strength" |
| 218 | default 64 |
| 219 | |
| 220 | config NAND_SUNXI_SPL_ECC_SIZE |
| 221 | int "Allwinner NAND SPL ECC Step Size" |
| 222 | default 1024 |
| 223 | |
| 224 | config NAND_SUNXI_SPL_USABLE_PAGE_SIZE |
| 225 | int "Allwinner NAND SPL Usable Page Size" |
| 226 | default 1024 |
| 227 | |
| 228 | endif |
| 229 | |
| 230 | config NAND_ARASAN |
| 231 | bool "Configure Arasan Nand" |
| 232 | select SYS_NAND_SELF_INIT |
| 233 | imply CMD_NAND |
| 234 | help |
| 235 | This enables Nand driver support for Arasan nand flash |
| 236 | controller. This uses the hardware ECC for read and |
| 237 | write operations. |
| 238 | |
| 239 | config NAND_MXC |
| 240 | bool "MXC NAND support" |
| 241 | depends on CPU_ARM926EJS || CPU_ARM1136 || MX5 |
| 242 | imply CMD_NAND |
| 243 | help |
| 244 | This enables the NAND driver for the NAND flash controller on the |
| 245 | i.MX27 / i.MX31 / i.MX5 rocessors. |
| 246 | |
| 247 | config NAND_MXS |
| 248 | bool "MXS NAND support" |
| 249 | depends on MX23 || MX28 || MX6 || MX7 |
| 250 | select SYS_NAND_SELF_INIT |
| 251 | imply CMD_NAND |
| 252 | select APBH_DMA |
| 253 | select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 |
| 254 | select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7 |
| 255 | help |
| 256 | This enables NAND driver for the NAND flash controller on the |
| 257 | MXS processors. |
| 258 | |
| 259 | if NAND_MXS |
| 260 | |
| 261 | config NAND_MXS_DT |
| 262 | bool "Support MXS NAND controller as a DT device" |
| 263 | depends on OF_CONTROL && MTD |
| 264 | help |
| 265 | Enable the driver for MXS NAND flash on platforms using |
| 266 | device tree. |
| 267 | |
| 268 | config NAND_MXS_USE_MINIMUM_ECC |
| 269 | bool "Use minimum ECC strength supported by the controller" |
| 270 | default false |
| 271 | |
| 272 | endif |
| 273 | |
| 274 | config NAND_ZYNQ |
| 275 | bool "Support for Zynq Nand controller" |
| 276 | select SYS_NAND_SELF_INIT |
| 277 | imply CMD_NAND |
| 278 | help |
| 279 | This enables Nand driver support for Nand flash controller |
| 280 | found on Zynq SoC. |
| 281 | |
| 282 | config NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS |
| 283 | bool "Enable use of 1st stage bootloader timing for NAND" |
| 284 | depends on NAND_ZYNQ |
| 285 | help |
| 286 | This flag prevent U-boot reconfigure NAND flash controller and reuse |
| 287 | the NAND timing from 1st stage bootloader. |
| 288 | |
Christophe Kerello | da14168 | 2019-04-05 11:41:50 +0200 | [diff] [blame] | 289 | config NAND_STM32_FMC2 |
| 290 | bool "Support for NAND controller on STM32MP SoCs" |
| 291 | depends on ARCH_STM32MP |
| 292 | select SYS_NAND_SELF_INIT |
| 293 | imply CMD_NAND |
| 294 | help |
| 295 | Enables support for NAND Flash chips on SoCs containing the FMC2 |
| 296 | NAND controller. This controller is found on STM32MP SoCs. |
| 297 | The controller supports a maximum 8k page size and supports |
| 298 | a maximum 8-bit correction error per sector of 512 bytes. |
| 299 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 300 | comment "Generic NAND options" |
| 301 | |
| 302 | config SYS_NAND_BLOCK_SIZE |
| 303 | hex "NAND chip eraseblock size" |
| 304 | depends on ARCH_SUNXI |
| 305 | help |
| 306 | Number of data bytes in one eraseblock for the NAND chip on the |
| 307 | board. This is the multiple of NAND_PAGE_SIZE and the number of |
| 308 | pages. |
| 309 | |
| 310 | config SYS_NAND_PAGE_SIZE |
| 311 | hex "NAND chip page size" |
| 312 | depends on ARCH_SUNXI |
| 313 | help |
| 314 | Number of data bytes in one page for the NAND chip on the |
| 315 | board, not including the OOB area. |
| 316 | |
| 317 | config SYS_NAND_OOBSIZE |
| 318 | hex "NAND chip OOB size" |
| 319 | depends on ARCH_SUNXI |
| 320 | help |
| 321 | Number of bytes in the Out-Of-Band area for the NAND chip on |
| 322 | the board. |
| 323 | |
| 324 | # Enhance depends when converting drivers to Kconfig which use this config |
| 325 | # option (mxc_nand, ndfc, omap_gpmc). |
| 326 | config SYS_NAND_BUSWIDTH_16BIT |
| 327 | bool "Use 16-bit NAND interface" |
| 328 | depends on NAND_VF610_NFC || NAND_OMAP_GPMC || NAND_MXC || ARCH_DAVINCI |
| 329 | help |
| 330 | Indicates that NAND device has 16-bit wide data-bus. In absence of this |
| 331 | config, bus-width of NAND device is assumed to be either 8-bit and later |
| 332 | determined by reading ONFI params. |
| 333 | Above config is useful when NAND device's bus-width information cannot |
| 334 | be determined from on-chip ONFI params, like in following scenarios: |
| 335 | - SPL boot does not support reading of ONFI parameters. This is done to |
| 336 | keep SPL code foot-print small. |
| 337 | - In current U-Boot flow using nand_init(), driver initialization |
| 338 | happens in board_nand_init() which is called before any device probe |
| 339 | (nand_scan_ident + nand_scan_tail), thus device's ONFI parameters are |
| 340 | not available while configuring controller. So a static CONFIG_NAND_xx |
| 341 | is needed to know the device's bus-width in advance. |
| 342 | |
T Karthik Reddy | 7cd8522 | 2018-12-03 16:11:58 +0530 | [diff] [blame] | 343 | config SYS_NAND_MAX_CHIPS |
| 344 | int "NAND max chips" |
| 345 | default 1 |
| 346 | depends on NAND_ARASAN |
| 347 | help |
| 348 | The maximum number of NAND chips per device to be supported. |
| 349 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 350 | if SPL |
| 351 | |
| 352 | config SYS_NAND_U_BOOT_LOCATIONS |
| 353 | bool "Define U-boot binaries locations in NAND" |
| 354 | help |
| 355 | Enable CONFIG_SYS_NAND_U_BOOT_OFFS though Kconfig. |
| 356 | This option should not be enabled when compiling U-boot for boards |
| 357 | defining CONFIG_SYS_NAND_U_BOOT_OFFS in their include/configs/<board>.h |
| 358 | file. |
| 359 | |
| 360 | config SYS_NAND_U_BOOT_OFFS |
| 361 | hex "Location in NAND to read U-Boot from" |
| 362 | default 0x800000 if NAND_SUNXI |
| 363 | depends on SYS_NAND_U_BOOT_LOCATIONS |
| 364 | help |
| 365 | Set the offset from the start of the nand where u-boot should be |
| 366 | loaded from. |
| 367 | |
| 368 | config SYS_NAND_U_BOOT_OFFS_REDUND |
| 369 | hex "Location in NAND to read U-Boot from" |
| 370 | default SYS_NAND_U_BOOT_OFFS |
| 371 | depends on SYS_NAND_U_BOOT_LOCATIONS |
| 372 | help |
| 373 | Set the offset from the start of the nand where the redundant u-boot |
| 374 | should be loaded from. |
| 375 | |
| 376 | config SPL_NAND_AM33XX_BCH |
| 377 | bool "Enables SPL-NAND driver which supports ELM based" |
| 378 | depends on NAND_OMAP_GPMC && !OMAP34XX |
| 379 | default y |
| 380 | help |
| 381 | Hardware ECC correction. This is useful for platforms which have ELM |
| 382 | hardware engine and use NAND boot mode. |
| 383 | Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine, |
| 384 | so those platforms should use CONFIG_SPL_NAND_SIMPLE for enabling |
| 385 | SPL-NAND driver with software ECC correction support. |
| 386 | |
| 387 | config SPL_NAND_DENALI |
| 388 | bool "Support Denali NAND controller for SPL" |
| 389 | help |
| 390 | This is a small implementation of the Denali NAND controller |
| 391 | for use on SPL. |
| 392 | |
| 393 | config SPL_NAND_SIMPLE |
| 394 | bool "Use simple SPL NAND driver" |
| 395 | depends on !SPL_NAND_AM33XX_BCH |
| 396 | help |
| 397 | Support for NAND boot using simple NAND drivers that |
| 398 | expose the cmd_ctrl() interface. |
| 399 | endif |
| 400 | |
| 401 | endif # if NAND |