1# SPDX-License-Identifier: GPL-2.0-only 2menuconfig MTD_RAW_NAND 3 tristate "Raw/Parallel NAND Device Support" 4 select MTD_NAND_CORE 5 select MTD_NAND_ECC 6 help 7 This enables support for accessing all type of raw/parallel 8 NAND flash devices. For further information see 9 <http://www.linux-mtd.infradead.org/doc/nand.html>. 10 11if MTD_RAW_NAND 12 13comment "Raw/parallel NAND flash controllers" 14 15config MTD_NAND_DENALI 16 tristate 17 18config MTD_NAND_DENALI_PCI 19 tristate "Denali NAND controller on Intel Moorestown" 20 select MTD_NAND_DENALI 21 depends on PCI 22 help 23 Enable the driver for NAND flash on Intel Moorestown, using the 24 Denali NAND controller core. 25 26config MTD_NAND_DENALI_DT 27 tristate "Denali NAND controller as a DT device" 28 select MTD_NAND_DENALI 29 depends on HAS_DMA && HAVE_CLK && OF 30 help 31 Enable the driver for NAND flash on platforms using a Denali NAND 32 controller as a DT device. 33 34config MTD_NAND_AMS_DELTA 35 tristate "Amstrad E3 NAND controller" 36 depends on MACH_AMS_DELTA || COMPILE_TEST 37 default y 38 help 39 Support for NAND flash on Amstrad E3 (Delta). 40 41config MTD_NAND_OMAP2 42 tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller" 43 depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || COMPILE_TEST 44 depends on HAS_IOMEM 45 help 46 Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4 47 and Keystone platforms. 48 49config MTD_NAND_OMAP_BCH 50 depends on MTD_NAND_OMAP2 51 bool "Support hardware based BCH error correction" 52 default n 53 select BCH 54 help 55 This config enables the ELM hardware engine, which can be used to 56 locate and correct errors when using BCH ECC scheme. This offloads 57 the cpu from doing ECC error searching and correction. However some 58 legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine 59 so this is optional for them. 60 61config MTD_NAND_OMAP_BCH_BUILD 62 def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH 63 64config MTD_NAND_AU1550 65 tristate "Au1550/1200 NAND support" 66 depends on MIPS_ALCHEMY 67 help 68 This enables the driver for the NAND flash controller on the 69 AMD/Alchemy 1550 SOC. 70 71config MTD_NAND_NDFC 72 tristate "IBM/MCC 4xx NAND controller" 73 depends on 4xx 74 select MTD_NAND_ECC_SW_HAMMING 75 select MTD_NAND_ECC_SW_HAMMING_SMC 76 help 77 NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs 78 79config MTD_NAND_S3C2410 80 tristate "Samsung S3C NAND controller" 81 depends on ARCH_S3C24XX || ARCH_S3C64XX 82 help 83 This enables the NAND flash controller on the S3C24xx and S3C64xx 84 SoCs 85 86 No board specific support is done by this driver, each board 87 must advertise a platform_device for the driver to attach. 88 89config MTD_NAND_S3C2410_DEBUG 90 bool "Samsung S3C NAND controller debug" 91 depends on MTD_NAND_S3C2410 92 help 93 Enable debugging of the S3C NAND driver 94 95config MTD_NAND_S3C2410_CLKSTOP 96 bool "Samsung S3C NAND IDLE clock stop" 97 depends on MTD_NAND_S3C2410 98 default n 99 help 100 Stop the clock to the NAND controller when there is no chip 101 selected to save power. This will mean there is a small delay 102 when the is NAND chip selected or released, but will save 103 approximately 5mA of power when there is nothing happening. 104 105config MTD_NAND_TANGO 106 tristate "Tango NAND controller" 107 depends on ARCH_TANGO || COMPILE_TEST 108 depends on HAS_IOMEM 109 help 110 Enables the NAND Flash controller on Tango chips. 111 112config MTD_NAND_SHARPSL 113 tristate "Sharp SL Series (C7xx + others) NAND controller" 114 depends on ARCH_PXA || COMPILE_TEST 115 depends on HAS_IOMEM 116 117config MTD_NAND_CAFE 118 tristate "OLPC CAFÉ NAND controller" 119 depends on PCI 120 select REED_SOLOMON 121 select REED_SOLOMON_DEC16 122 help 123 Use NAND flash attached to the CAFÉ chip designed for the OLPC 124 laptop. 125 126config MTD_NAND_CS553X 127 tristate "CS5535/CS5536 (AMD Geode companion) NAND controller" 128 depends on X86_32 129 depends on !UML && HAS_IOMEM 130 help 131 The CS553x companion chips for the AMD Geode processor 132 include NAND flash controllers with built-in hardware ECC 133 capabilities; enabling this option will allow you to use 134 these. The driver will check the MSRs to verify that the 135 controller is enabled for NAND, and currently requires that 136 the controller be in MMIO mode. 137 138 If you say "m", the module will be called cs553x_nand. 139 140config MTD_NAND_ATMEL 141 tristate "Atmel AT91 NAND Flash/SmartMedia NAND controller" 142 depends on ARCH_AT91 || COMPILE_TEST 143 depends on HAS_IOMEM 144 select GENERIC_ALLOCATOR 145 select MFD_ATMEL_SMC 146 help 147 Enables support for NAND Flash / Smart Media Card interface 148 on Atmel AT91 processors. 149 150config MTD_NAND_ORION 151 tristate "Marvell Orion NAND controller" 152 depends on PLAT_ORION 153 help 154 This enables the NAND flash controller on Orion machines. 155 156 No board specific support is done by this driver, each board 157 must advertise a platform_device for the driver to attach. 158 159config MTD_NAND_MARVELL 160 tristate "Marvell EBU NAND controller" 161 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \ 162 COMPILE_TEST 163 depends on HAS_IOMEM 164 help 165 This enables the NAND flash controller driver for Marvell boards, 166 including: 167 - PXA3xx processors (NFCv1) 168 - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2) 169 - 64-bit Aramda platforms (7k, 8k) (NFCv2) 170 171config MTD_NAND_SLC_LPC32XX 172 tristate "NXP LPC32xx SLC NAND controller" 173 depends on ARCH_LPC32XX || COMPILE_TEST 174 depends on HAS_IOMEM 175 help 176 Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell 177 chips) NAND controller. This is the default for the PHYTEC 3250 178 reference board which contains a NAND256R3A2CZA6 chip. 179 180 Please check the actual NAND chip connected and its support 181 by the SLC NAND controller. 182 183config MTD_NAND_MLC_LPC32XX 184 tristate "NXP LPC32xx MLC NAND controller" 185 depends on ARCH_LPC32XX || COMPILE_TEST 186 depends on HAS_IOMEM 187 help 188 Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND 189 controller. This is the default for the WORK92105 controller 190 board. 191 192 Please check the actual NAND chip connected and its support 193 by the MLC NAND controller. 194 195config MTD_NAND_PASEMI 196 tristate "PA Semi PWRficient NAND controller" 197 depends on PPC_PASEMI 198 help 199 Enables support for NAND Flash interface on PA Semi PWRficient 200 based boards 201 202config MTD_NAND_TMIO 203 tristate "Toshiba Mobile IO NAND controller" 204 depends on MFD_TMIO 205 help 206 Support for NAND flash connected to a Toshiba Mobile IO 207 Controller in some PDAs, including the Sharp SL6000x. 208 209config MTD_NAND_BRCMNAND 210 tristate "Broadcom STB NAND controller" 211 depends on ARM || ARM64 || MIPS || COMPILE_TEST 212 depends on HAS_IOMEM 213 help 214 Enables the Broadcom NAND controller driver. The controller was 215 originally designed for Set-Top Box but is used on various BCM7xxx, 216 BCM3xxx, BCM63xxx, iProc/Cygnus and more. 217 218config MTD_NAND_BCM47XXNFLASH 219 tristate "BCM4706 BCMA NAND controller" 220 depends on BCMA_NFLASH 221 depends on BCMA 222 help 223 BCMA bus can have various flash memories attached, they are 224 registered by bcma as platform devices. This enables driver for 225 NAND flash memories. For now only BCM4706 is supported. 226 227config MTD_NAND_OXNAS 228 tristate "Oxford Semiconductor NAND controller" 229 depends on ARCH_OXNAS || COMPILE_TEST 230 depends on HAS_IOMEM 231 help 232 This enables the NAND flash controller on Oxford Semiconductor SoCs. 233 234config MTD_NAND_MPC5121_NFC 235 tristate "MPC5121 NAND controller" 236 depends on PPC_MPC512x 237 help 238 This enables the driver for the NAND flash controller on the 239 MPC5121 SoC. 240 241config MTD_NAND_GPMI_NAND 242 tristate "Freescale GPMI NAND controller" 243 depends on MXS_DMA 244 help 245 Enables NAND Flash support for IMX23, IMX28 or IMX6. 246 The GPMI controller is very powerful, with the help of BCH 247 module, it can do the hardware ECC. The GPMI supports several 248 NAND flashs at the same time. 249 250config MTD_NAND_FSL_ELBC 251 tristate "Freescale eLBC NAND controller" 252 depends on FSL_SOC 253 select FSL_LBC 254 help 255 Various Freescale chips, including the 8313, include a NAND Flash 256 Controller Module with built-in hardware ECC capabilities. 257 Enabling this option will enable you to use this to control 258 external NAND devices. 259 260config MTD_NAND_FSL_IFC 261 tristate "Freescale IFC NAND controller" 262 depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST 263 depends on HAS_IOMEM 264 select FSL_IFC 265 select MEMORY 266 help 267 Various Freescale chips e.g P1010, include a NAND Flash machine 268 with built-in hardware ECC capabilities. 269 Enabling this option will enable you to use this to control 270 external NAND devices. 271 272config MTD_NAND_FSL_UPM 273 tristate "Freescale UPM NAND controller" 274 depends on PPC_83xx || PPC_85xx 275 select FSL_LBC 276 help 277 Enables support for NAND Flash chips wired onto Freescale PowerPC 278 processor localbus with User-Programmable Machine support. 279 280config MTD_NAND_VF610_NFC 281 tristate "Freescale VF610/MPC5125 NAND controller" 282 depends on (SOC_VF610 || COMPILE_TEST) 283 depends on HAS_IOMEM 284 help 285 Enables support for NAND Flash Controller on some Freescale 286 processors like the VF610, MPC5125, MCF54418 or Kinetis K70. 287 The driver supports a maximum 2k page size. With 2k pages and 288 64 bytes or more of OOB, hardware ECC with up to 32-bit error 289 correction is supported. Hardware ECC is only enabled through 290 device tree. 291 292config MTD_NAND_MXC 293 tristate "Freescale MXC NAND controller" 294 depends on ARCH_MXC || COMPILE_TEST 295 depends on HAS_IOMEM && OF 296 help 297 This enables the driver for the NAND flash controller on the 298 MXC processors. 299 300config MTD_NAND_SH_FLCTL 301 tristate "Renesas SuperH FLCTL NAND controller" 302 depends on SUPERH || COMPILE_TEST 303 depends on HAS_IOMEM 304 help 305 Several Renesas SuperH CPU has FLCTL. This option enables support 306 for NAND Flash using FLCTL. 307 308config MTD_NAND_DAVINCI 309 tristate "DaVinci/Keystone NAND controller" 310 depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF) || COMPILE_TEST 311 depends on HAS_IOMEM 312 help 313 Enable the driver for NAND flash chips on Texas Instruments 314 DaVinci/Keystone processors. 315 316config MTD_NAND_TXX9NDFMC 317 tristate "TXx9 NAND controller" 318 depends on SOC_TX4938 || SOC_TX4939 || COMPILE_TEST 319 depends on HAS_IOMEM 320 help 321 This enables the NAND flash controller on the TXx9 SoCs. 322 323config MTD_NAND_SOCRATES 324 tristate "Socrates NAND controller" 325 depends on SOCRATES 326 help 327 Enables support for NAND Flash chips wired onto Socrates board. 328 329source "drivers/mtd/nand/raw/ingenic/Kconfig" 330 331config MTD_NAND_FSMC 332 tristate "ST Micros FSMC NAND controller" 333 depends on OF && HAS_IOMEM 334 depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300 || \ 335 COMPILE_TEST 336 help 337 Enables support for NAND Flash chips on the ST Microelectronics 338 Flexible Static Memory Controller (FSMC) 339 340config MTD_NAND_XWAY 341 bool "Lantiq XWAY NAND controller" 342 depends on LANTIQ && SOC_TYPE_XWAY 343 help 344 Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached 345 to the External Bus Unit (EBU). 346 347config MTD_NAND_SUNXI 348 tristate "Allwinner NAND controller" 349 depends on ARCH_SUNXI || COMPILE_TEST 350 depends on HAS_IOMEM 351 help 352 Enables support for NAND Flash chips on Allwinner SoCs. 353 354config MTD_NAND_HISI504 355 tristate "Hisilicon Hip04 NAND controller" 356 depends on ARCH_HISI || COMPILE_TEST 357 depends on HAS_IOMEM 358 help 359 Enables support for NAND controller on Hisilicon SoC Hip04. 360 361config MTD_NAND_QCOM 362 tristate "QCOM NAND controller" 363 depends on ARCH_QCOM || COMPILE_TEST 364 depends on HAS_IOMEM 365 help 366 Enables support for NAND flash chips on SoCs containing the EBI2 NAND 367 controller. This controller is found on IPQ806x SoC. 368 369config MTD_NAND_MTK 370 tristate "MTK NAND controller" 371 depends on ARCH_MEDIATEK || COMPILE_TEST 372 depends on HAS_IOMEM 373 help 374 Enables support for NAND controller on MTK SoCs. 375 This controller is found on mt27xx, mt81xx, mt65xx SoCs. 376 377config MTD_NAND_MXIC 378 tristate "Macronix raw NAND controller" 379 depends on HAS_IOMEM || COMPILE_TEST 380 help 381 This selects the Macronix raw NAND controller driver. 382 383config MTD_NAND_TEGRA 384 tristate "NVIDIA Tegra NAND controller" 385 depends on ARCH_TEGRA || COMPILE_TEST 386 depends on HAS_IOMEM 387 help 388 Enables support for NAND flash controller on NVIDIA Tegra SoC. 389 The driver has been developed and tested on a Tegra 2 SoC. DMA 390 support, raw read/write page as well as HW ECC read/write page 391 is supported. Extra OOB bytes when using HW ECC are currently 392 not supported. 393 394config MTD_NAND_STM32_FMC2 395 tristate "Support for NAND controller on STM32MP SoCs" 396 depends on MACH_STM32MP157 || COMPILE_TEST 397 select MFD_SYSCON 398 help 399 Enables support for NAND Flash chips on SoCs containing the FMC2 400 NAND controller. This controller is found on STM32MP SoCs. 401 The controller supports a maximum 8k page size and supports 402 a maximum 8-bit correction error per sector of 512 bytes. 403 404config MTD_NAND_MESON 405 tristate "Support for NAND controller on Amlogic's Meson SoCs" 406 depends on ARCH_MESON || COMPILE_TEST 407 select MFD_SYSCON 408 help 409 Enables support for NAND controller on Amlogic's Meson SoCs. 410 This controller is found on Meson SoCs. 411 412config MTD_NAND_GPIO 413 tristate "GPIO assisted NAND controller" 414 depends on GPIOLIB || COMPILE_TEST 415 depends on HAS_IOMEM 416 help 417 This enables a NAND flash driver where control signals are 418 connected to GPIO pins, and commands and data are communicated 419 via a memory mapped interface. 420 421config MTD_NAND_PLATFORM 422 tristate "Generic NAND controller" 423 depends on HAS_IOMEM 424 help 425 This implements a generic NAND driver for on-SOC platform 426 devices. You will need to provide platform-specific functions 427 via platform_data. 428 429config MTD_NAND_CADENCE 430 tristate "Support Cadence NAND (HPNFC) controller" 431 depends on (OF || COMPILE_TEST) && HAS_IOMEM 432 help 433 Enable the driver for NAND flash on platforms using a Cadence NAND 434 controller. 435 436config MTD_NAND_ARASAN 437 tristate "Support for Arasan NAND flash controller" 438 depends on HAS_IOMEM && HAS_DMA 439 select BCH 440 help 441 Enables the driver for the Arasan NAND flash controller on 442 Zynq Ultrascale+ MPSoC. 443 444config MTD_NAND_INTEL_LGM 445 tristate "Support for NAND controller on Intel LGM SoC" 446 depends on OF || COMPILE_TEST 447 depends on HAS_IOMEM 448 help 449 Enables support for NAND Flash chips on Intel's LGM SoC. 450 NAND flash controller interfaced through the External Bus Unit. 451 452config MTD_NAND_ROCKCHIP 453 tristate "Rockchip NAND controller" 454 depends on ARCH_ROCKCHIP && HAS_IOMEM 455 help 456 Enables support for NAND controller on Rockchip SoCs. 457 There are four different versions of NAND FLASH Controllers, 458 including: 459 NFC v600: RK2928, RK3066, RK3188 460 NFC v622: RK3036, RK3128 461 NFC v800: RK3308, RV1108 462 NFC v900: PX30, RK3326 463 464comment "Misc" 465 466config MTD_SM_COMMON 467 tristate 468 default n 469 470config MTD_NAND_NANDSIM 471 tristate "Support for NAND Flash Simulator" 472 help 473 The simulator may simulate various NAND flash chips for the 474 MTD nand layer. 475 476config MTD_NAND_RICOH 477 tristate "Ricoh xD card reader" 478 default n 479 depends on PCI 480 select MTD_SM_COMMON 481 help 482 Enable support for Ricoh R5C852 xD card reader 483 You also need to enable ether 484 NAND SSFDC (SmartMedia) read only translation layer' or new 485 expermental, readwrite 486 'SmartMedia/xD new translation layer' 487 488config MTD_NAND_DISKONCHIP 489 tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)" 490 depends on HAS_IOMEM 491 select REED_SOLOMON 492 select REED_SOLOMON_DEC16 493 help 494 This is a reimplementation of M-Systems DiskOnChip 2000, 495 Millennium and Millennium Plus as a standard NAND device driver, 496 as opposed to the earlier self-contained MTD device drivers. 497 This should enable, among other things, proper JFFS2 operation on 498 these devices. 499 500config MTD_NAND_DISKONCHIP_PROBE_ADVANCED 501 bool "Advanced detection options for DiskOnChip" 502 depends on MTD_NAND_DISKONCHIP 503 help 504 This option allows you to specify nonstandard address at which to 505 probe for a DiskOnChip, or to change the detection options. You 506 are unlikely to need any of this unless you are using LinuxBIOS. 507 Say 'N'. 508 509config MTD_NAND_DISKONCHIP_PROBE_ADDRESS 510 hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED 511 depends on MTD_NAND_DISKONCHIP 512 default "0" 513 help 514 By default, the probe for DiskOnChip devices will look for a 515 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000. 516 This option allows you to specify a single address at which to probe 517 for the device, which is useful if you have other devices in that 518 range which get upset when they are probed. 519 520 (Note that on PowerPC, the normal probe will only check at 521 0xE4000000.) 522 523 Normally, you should leave this set to zero, to allow the probe at 524 the normal addresses. 525 526config MTD_NAND_DISKONCHIP_PROBE_HIGH 527 bool "Probe high addresses" 528 depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED 529 help 530 By default, the probe for DiskOnChip devices will look for a 531 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000. 532 This option changes to make it probe between 0xFFFC8000 and 533 0xFFFEE000. Unless you are using LinuxBIOS, this is unlikely to be 534 useful to you. Say 'N'. 535 536config MTD_NAND_DISKONCHIP_BBTWRITE 537 bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP" 538 depends on MTD_NAND_DISKONCHIP 539 help 540 On DiskOnChip devices shipped with the INFTL filesystem (Millennium 541 and 2000 TSOP/Alon), Linux reserves some space at the end of the 542 device for the Bad Block Table (BBT). If you have existing INFTL 543 data on your device (created by non-Linux tools such as M-Systems' 544 DOS drivers), your data might overlap the area Linux wants to use for 545 the BBT. If this is a concern for you, leave this option disabled and 546 Linux will not write BBT data into this area. 547 The downside of leaving this option disabled is that if bad blocks 548 are detected by Linux, they will not be recorded in the BBT, which 549 could cause future problems. 550 Once you enable this option, new filesystems (INFTL or others, created 551 in Linux or other operating systems) will not use the reserved area. 552 The only reason not to enable this option is to prevent damage to 553 preexisting filesystems. 554 Even if you leave this disabled, you can enable BBT writes at module 555 load time (assuming you build diskonchip as a module) with the module 556 parameter "inftl_bbt_write=1". 557 558endif # MTD_RAW_NAND 559