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