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