0001 # SPDX-License-Identifier: GPL-2.0-only
0002 menuconfig MTD_RAW_NAND
0003 tristate "Raw/Parallel NAND Device Support"
0004 select MTD_NAND_CORE
0005 select MTD_NAND_ECC
0006 help
0007 This enables support for accessing all type of raw/parallel
0008 NAND flash devices. For further information see
0009 <http://www.linux-mtd.infradead.org/doc/nand.html>.
0010
0011 if MTD_RAW_NAND
0012
0013 comment "Raw/parallel NAND flash controllers"
0014
0015 config MTD_NAND_DENALI
0016 tristate
0017
0018 config MTD_NAND_DENALI_PCI
0019 tristate "Denali NAND controller on Intel Moorestown"
0020 select MTD_NAND_DENALI
0021 depends on PCI
0022 help
0023 Enable the driver for NAND flash on Intel Moorestown, using the
0024 Denali NAND controller core.
0025
0026 config MTD_NAND_DENALI_DT
0027 tristate "Denali NAND controller as a DT device"
0028 select MTD_NAND_DENALI
0029 depends on HAS_DMA && HAVE_CLK && OF && HAS_IOMEM
0030 help
0031 Enable the driver for NAND flash on platforms using a Denali NAND
0032 controller as a DT device.
0033
0034 config MTD_NAND_AMS_DELTA
0035 tristate "Amstrad E3 NAND controller"
0036 depends on MACH_AMS_DELTA || COMPILE_TEST
0037 default y
0038 help
0039 Support for NAND flash on Amstrad E3 (Delta).
0040
0041 config MTD_NAND_OMAP2
0042 tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller"
0043 depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
0044 depends on HAS_IOMEM
0045 depends on OMAP_GPMC
0046 help
0047 Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
0048 and Keystone platforms.
0049
0050 config MTD_NAND_OMAP_BCH
0051 depends on MTD_NAND_OMAP2
0052 bool "Support hardware based BCH error correction"
0053 default n
0054 select BCH
0055 help
0056 This config enables the ELM hardware engine, which can be used to
0057 locate and correct errors when using BCH ECC scheme. This offloads
0058 the cpu from doing ECC error searching and correction. However some
0059 legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine
0060 so this is optional for them.
0061
0062 config MTD_NAND_OMAP_BCH_BUILD
0063 def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
0064
0065 config MTD_NAND_AU1550
0066 tristate "Au1550/1200 NAND support"
0067 depends on MIPS_ALCHEMY
0068 help
0069 This enables the driver for the NAND flash controller on the
0070 AMD/Alchemy 1550 SOC.
0071
0072 config MTD_NAND_NDFC
0073 tristate "IBM/MCC 4xx NAND controller"
0074 depends on 4xx
0075 select MTD_NAND_ECC_SW_HAMMING
0076 select MTD_NAND_ECC_SW_HAMMING_SMC
0077 help
0078 NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs
0079
0080 config MTD_NAND_S3C2410
0081 tristate "Samsung S3C NAND controller"
0082 depends on ARCH_S3C24XX || ARCH_S3C64XX
0083 help
0084 This enables the NAND flash controller on the S3C24xx and S3C64xx
0085 SoCs
0086
0087 No board specific support is done by this driver, each board
0088 must advertise a platform_device for the driver to attach.
0089
0090 config MTD_NAND_S3C2410_DEBUG
0091 bool "Samsung S3C NAND controller debug"
0092 depends on MTD_NAND_S3C2410
0093 help
0094 Enable debugging of the S3C NAND driver
0095
0096 config MTD_NAND_S3C2410_CLKSTOP
0097 bool "Samsung S3C NAND IDLE clock stop"
0098 depends on MTD_NAND_S3C2410
0099 default n
0100 help
0101 Stop the clock to the NAND controller when there is no chip
0102 selected to save power. This will mean there is a small delay
0103 when the is NAND chip selected or released, but will save
0104 approximately 5mA of power when there is nothing happening.
0105
0106 config MTD_NAND_SHARPSL
0107 tristate "Sharp SL Series (C7xx + others) NAND controller"
0108 depends on ARCH_PXA || COMPILE_TEST
0109 depends on HAS_IOMEM
0110
0111 config MTD_NAND_CAFE
0112 tristate "OLPC CAFÉ NAND controller"
0113 depends on PCI
0114 select REED_SOLOMON
0115 select REED_SOLOMON_DEC16
0116 help
0117 Use NAND flash attached to the CAFÉ chip designed for the OLPC
0118 laptop.
0119
0120 config MTD_NAND_CS553X
0121 tristate "CS5535/CS5536 (AMD Geode companion) NAND controller"
0122 depends on X86_32
0123 depends on !UML && HAS_IOMEM
0124 help
0125 The CS553x companion chips for the AMD Geode processor
0126 include NAND flash controllers with built-in hardware ECC
0127 capabilities; enabling this option will allow you to use
0128 these. The driver will check the MSRs to verify that the
0129 controller is enabled for NAND, and currently requires that
0130 the controller be in MMIO mode.
0131
0132 If you say "m", the module will be called cs553x_nand.
0133
0134 config MTD_NAND_ATMEL
0135 tristate "Atmel AT91 NAND Flash/SmartMedia NAND controller"
0136 depends on ARCH_AT91 || COMPILE_TEST
0137 depends on HAS_IOMEM
0138 select GENERIC_ALLOCATOR
0139 select MFD_ATMEL_SMC
0140 help
0141 Enables support for NAND Flash / Smart Media Card interface
0142 on Atmel AT91 processors.
0143
0144 config MTD_NAND_ORION
0145 tristate "Marvell Orion NAND controller"
0146 depends on PLAT_ORION
0147 help
0148 This enables the NAND flash controller on Orion machines.
0149
0150 No board specific support is done by this driver, each board
0151 must advertise a platform_device for the driver to attach.
0152
0153 config MTD_NAND_MARVELL
0154 tristate "Marvell EBU NAND controller"
0155 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
0156 COMPILE_TEST
0157 depends on HAS_IOMEM
0158 help
0159 This enables the NAND flash controller driver for Marvell boards,
0160 including:
0161 - PXA3xx processors (NFCv1)
0162 - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
0163 - 64-bit Aramda platforms (7k, 8k) (NFCv2)
0164
0165 config MTD_NAND_SLC_LPC32XX
0166 tristate "NXP LPC32xx SLC NAND controller"
0167 depends on ARCH_LPC32XX || COMPILE_TEST
0168 depends on HAS_IOMEM
0169 help
0170 Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell
0171 chips) NAND controller. This is the default for the PHYTEC 3250
0172 reference board which contains a NAND256R3A2CZA6 chip.
0173
0174 Please check the actual NAND chip connected and its support
0175 by the SLC NAND controller.
0176
0177 config MTD_NAND_MLC_LPC32XX
0178 tristate "NXP LPC32xx MLC NAND controller"
0179 depends on ARCH_LPC32XX || COMPILE_TEST
0180 depends on HAS_IOMEM
0181 help
0182 Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND
0183 controller. This is the default for the WORK92105 controller
0184 board.
0185
0186 Please check the actual NAND chip connected and its support
0187 by the MLC NAND controller.
0188
0189 config MTD_NAND_PASEMI
0190 tristate "PA Semi PWRficient NAND controller"
0191 depends on PPC_PASEMI
0192 help
0193 Enables support for NAND Flash interface on PA Semi PWRficient
0194 based boards
0195
0196 config MTD_NAND_TMIO
0197 tristate "Toshiba Mobile IO NAND controller"
0198 depends on MFD_TMIO
0199 help
0200 Support for NAND flash connected to a Toshiba Mobile IO
0201 Controller in some PDAs, including the Sharp SL6000x.
0202
0203 config MTD_NAND_BRCMNAND
0204 tristate "Broadcom STB NAND controller"
0205 depends on ARM || ARM64 || MIPS || COMPILE_TEST
0206 depends on HAS_IOMEM
0207 help
0208 Enables the Broadcom NAND controller driver. The controller was
0209 originally designed for Set-Top Box but is used on various BCM7xxx,
0210 BCM3xxx, BCM63xxx, iProc/Cygnus and more.
0211
0212 if MTD_NAND_BRCMNAND
0213
0214 config MTD_NAND_BRCMNAND_BCMA
0215 tristate "Broadcom BCMA NAND controller"
0216 depends on BCMA_NFLASH
0217 depends on BCMA
0218 help
0219 Enables the BRCMNAND controller over BCMA on BCM47186/BCM5358 SoCs.
0220 The glue driver will take care of performing the low-level I/O
0221 operations to interface the BRCMNAND controller over the BCMA bus.
0222
0223 endif # MTD_NAND_BRCMNAND
0224
0225 config MTD_NAND_BCM47XXNFLASH
0226 tristate "BCM4706 BCMA NAND controller"
0227 depends on BCMA_NFLASH
0228 depends on BCMA
0229 help
0230 BCMA bus can have various flash memories attached, they are
0231 registered by bcma as platform devices. This enables driver for
0232 NAND flash memories. For now only BCM4706 is supported.
0233
0234 config MTD_NAND_OXNAS
0235 tristate "Oxford Semiconductor NAND controller"
0236 depends on ARCH_OXNAS || COMPILE_TEST
0237 depends on HAS_IOMEM
0238 help
0239 This enables the NAND flash controller on Oxford Semiconductor SoCs.
0240
0241 config MTD_NAND_MPC5121_NFC
0242 tristate "MPC5121 NAND controller"
0243 depends on PPC_MPC512x
0244 help
0245 This enables the driver for the NAND flash controller on the
0246 MPC5121 SoC.
0247
0248 config MTD_NAND_GPMI_NAND
0249 tristate "Freescale GPMI NAND controller"
0250 depends on MXS_DMA
0251 help
0252 Enables NAND Flash support for IMX23, IMX28 or IMX6.
0253 The GPMI controller is very powerful, with the help of BCH
0254 module, it can do the hardware ECC. The GPMI supports several
0255 NAND flashs at the same time.
0256
0257 config MTD_NAND_FSL_ELBC
0258 tristate "Freescale eLBC NAND controller"
0259 depends on FSL_SOC
0260 select FSL_LBC
0261 help
0262 Various Freescale chips, including the 8313, include a NAND Flash
0263 Controller Module with built-in hardware ECC capabilities.
0264 Enabling this option will enable you to use this to control
0265 external NAND devices.
0266
0267 config MTD_NAND_FSL_IFC
0268 tristate "Freescale IFC NAND controller"
0269 depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST
0270 depends on HAS_IOMEM
0271 select FSL_IFC
0272 select MEMORY
0273 help
0274 Various Freescale chips e.g P1010, include a NAND Flash machine
0275 with built-in hardware ECC capabilities.
0276 Enabling this option will enable you to use this to control
0277 external NAND devices.
0278
0279 config MTD_NAND_FSL_UPM
0280 tristate "Freescale UPM NAND controller"
0281 depends on PPC_83xx || PPC_85xx
0282 select FSL_LBC
0283 help
0284 Enables support for NAND Flash chips wired onto Freescale PowerPC
0285 processor localbus with User-Programmable Machine support.
0286
0287 config MTD_NAND_VF610_NFC
0288 tristate "Freescale VF610/MPC5125 NAND controller"
0289 depends on (SOC_VF610 || COMPILE_TEST)
0290 depends on HAS_IOMEM
0291 help
0292 Enables support for NAND Flash Controller on some Freescale
0293 processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
0294 The driver supports a maximum 2k page size. With 2k pages and
0295 64 bytes or more of OOB, hardware ECC with up to 32-bit error
0296 correction is supported. Hardware ECC is only enabled through
0297 device tree.
0298
0299 config MTD_NAND_MXC
0300 tristate "Freescale MXC NAND controller"
0301 depends on ARCH_MXC || COMPILE_TEST
0302 depends on HAS_IOMEM && OF
0303 help
0304 This enables the driver for the NAND flash controller on the
0305 MXC processors.
0306
0307 config MTD_NAND_SH_FLCTL
0308 tristate "Renesas SuperH FLCTL NAND controller"
0309 depends on SUPERH || COMPILE_TEST
0310 depends on HAS_IOMEM
0311 help
0312 Several Renesas SuperH CPU has FLCTL. This option enables support
0313 for NAND Flash using FLCTL.
0314
0315 config MTD_NAND_DAVINCI
0316 tristate "DaVinci/Keystone NAND controller"
0317 depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF) || COMPILE_TEST
0318 depends on HAS_IOMEM
0319 help
0320 Enable the driver for NAND flash chips on Texas Instruments
0321 DaVinci/Keystone processors.
0322
0323 config MTD_NAND_TXX9NDFMC
0324 tristate "TXx9 NAND controller"
0325 depends on SOC_TX4938 || COMPILE_TEST
0326 depends on HAS_IOMEM
0327 help
0328 This enables the NAND flash controller on the TXx9 SoCs.
0329
0330 config MTD_NAND_SOCRATES
0331 tristate "Socrates NAND controller"
0332 depends on SOCRATES
0333 help
0334 Enables support for NAND Flash chips wired onto Socrates board.
0335
0336 source "drivers/mtd/nand/raw/ingenic/Kconfig"
0337
0338 config MTD_NAND_FSMC
0339 tristate "ST Micros FSMC NAND controller"
0340 depends on OF && HAS_IOMEM
0341 depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || COMPILE_TEST
0342 help
0343 Enables support for NAND Flash chips on the ST Microelectronics
0344 Flexible Static Memory Controller (FSMC)
0345
0346 config MTD_NAND_XWAY
0347 bool "Lantiq XWAY NAND controller"
0348 depends on LANTIQ && SOC_TYPE_XWAY
0349 help
0350 Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached
0351 to the External Bus Unit (EBU).
0352
0353 config MTD_NAND_SUNXI
0354 tristate "Allwinner NAND controller"
0355 depends on ARCH_SUNXI || COMPILE_TEST
0356 depends on HAS_IOMEM
0357 help
0358 Enables support for NAND Flash chips on Allwinner SoCs.
0359
0360 config MTD_NAND_HISI504
0361 tristate "Hisilicon Hip04 NAND controller"
0362 depends on ARCH_HISI || COMPILE_TEST
0363 depends on HAS_IOMEM
0364 help
0365 Enables support for NAND controller on Hisilicon SoC Hip04.
0366
0367 config MTD_NAND_QCOM
0368 tristate "QCOM NAND controller"
0369 depends on ARCH_QCOM || COMPILE_TEST
0370 depends on HAS_IOMEM
0371 help
0372 Enables support for NAND flash chips on SoCs containing the EBI2 NAND
0373 controller. This controller is found on IPQ806x SoC.
0374
0375 config MTD_NAND_MTK
0376 tristate "MTK NAND controller"
0377 depends on MTD_NAND_ECC_MEDIATEK
0378 depends on ARCH_MEDIATEK || COMPILE_TEST
0379 depends on HAS_IOMEM
0380 help
0381 Enables support for NAND controller on MTK SoCs.
0382 This controller is found on mt27xx, mt81xx, mt65xx SoCs.
0383
0384 config MTD_NAND_MXIC
0385 tristate "Macronix raw NAND controller"
0386 depends on HAS_IOMEM || COMPILE_TEST
0387 help
0388 This selects the Macronix raw NAND controller driver.
0389
0390 config MTD_NAND_TEGRA
0391 tristate "NVIDIA Tegra NAND controller"
0392 depends on ARCH_TEGRA || COMPILE_TEST
0393 depends on HAS_IOMEM
0394 help
0395 Enables support for NAND flash controller on NVIDIA Tegra SoC.
0396 The driver has been developed and tested on a Tegra 2 SoC. DMA
0397 support, raw read/write page as well as HW ECC read/write page
0398 is supported. Extra OOB bytes when using HW ECC are currently
0399 not supported.
0400
0401 config MTD_NAND_STM32_FMC2
0402 tristate "Support for NAND controller on STM32MP SoCs"
0403 depends on MACH_STM32MP157 || COMPILE_TEST
0404 select MFD_SYSCON
0405 help
0406 Enables support for NAND Flash chips on SoCs containing the FMC2
0407 NAND controller. This controller is found on STM32MP SoCs.
0408 The controller supports a maximum 8k page size and supports
0409 a maximum 8-bit correction error per sector of 512 bytes.
0410
0411 config MTD_NAND_MESON
0412 tristate "Support for NAND controller on Amlogic's Meson SoCs"
0413 depends on ARCH_MESON || COMPILE_TEST
0414 select MFD_SYSCON
0415 help
0416 Enables support for NAND controller on Amlogic's Meson SoCs.
0417 This controller is found on Meson SoCs.
0418
0419 config MTD_NAND_GPIO
0420 tristate "GPIO assisted NAND controller"
0421 depends on GPIOLIB || COMPILE_TEST
0422 depends on HAS_IOMEM
0423 help
0424 This enables a NAND flash driver where control signals are
0425 connected to GPIO pins, and commands and data are communicated
0426 via a memory mapped interface.
0427
0428 config MTD_NAND_PLATFORM
0429 tristate "Generic NAND controller"
0430 depends on HAS_IOMEM
0431 help
0432 This implements a generic NAND driver for on-SOC platform
0433 devices. You will need to provide platform-specific functions
0434 via platform_data.
0435
0436 config MTD_NAND_CADENCE
0437 tristate "Support Cadence NAND (HPNFC) controller"
0438 depends on (OF || COMPILE_TEST) && HAS_IOMEM
0439 help
0440 Enable the driver for NAND flash on platforms using a Cadence NAND
0441 controller.
0442
0443 config MTD_NAND_ARASAN
0444 tristate "Support for Arasan NAND flash controller"
0445 depends on HAS_IOMEM && HAS_DMA
0446 select BCH
0447 help
0448 Enables the driver for the Arasan NAND flash controller on
0449 Zynq Ultrascale+ MPSoC.
0450
0451 config MTD_NAND_INTEL_LGM
0452 tristate "Support for NAND controller on Intel LGM SoC"
0453 depends on OF || COMPILE_TEST
0454 depends on HAS_IOMEM
0455 help
0456 Enables support for NAND Flash chips on Intel's LGM SoC.
0457 NAND flash controller interfaced through the External Bus Unit.
0458
0459 config MTD_NAND_ROCKCHIP
0460 tristate "Rockchip NAND controller"
0461 depends on ARCH_ROCKCHIP && HAS_IOMEM
0462 help
0463 Enables support for NAND controller on Rockchip SoCs.
0464 There are four different versions of NAND FLASH Controllers,
0465 including:
0466 NFC v600: RK2928, RK3066, RK3188
0467 NFC v622: RK3036, RK3128
0468 NFC v800: RK3308, RV1108
0469 NFC v900: PX30, RK3326
0470
0471 config MTD_NAND_PL35X
0472 tristate "ARM PL35X NAND controller"
0473 depends on OF || COMPILE_TEST
0474 depends on PL353_SMC
0475 help
0476 Enables support for PrimeCell SMC PL351 and PL353 NAND
0477 controller found on Zynq7000.
0478
0479 config MTD_NAND_RENESAS
0480 tristate "Renesas R-Car Gen3 & RZ/N1 NAND controller"
0481 depends on ARCH_RENESAS || COMPILE_TEST
0482 help
0483 Enables support for the NAND controller found on Renesas R-Car
0484 Gen3 and RZ/N1 SoC families.
0485
0486 comment "Misc"
0487
0488 config MTD_SM_COMMON
0489 tristate
0490 default n
0491
0492 config MTD_NAND_NANDSIM
0493 tristate "Support for NAND Flash Simulator"
0494 help
0495 The simulator may simulate various NAND flash chips for the
0496 MTD nand layer.
0497
0498 config MTD_NAND_RICOH
0499 tristate "Ricoh xD card reader"
0500 default n
0501 depends on PCI
0502 select MTD_SM_COMMON
0503 help
0504 Enable support for Ricoh R5C852 xD card reader
0505 You also need to enable either
0506 NAND SSFDC (SmartMedia) read only translation layer' or new
0507 experimental, readwrite
0508 'SmartMedia/xD new translation layer'
0509
0510 config MTD_NAND_DISKONCHIP
0511 tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)"
0512 depends on HAS_IOMEM
0513 select REED_SOLOMON
0514 select REED_SOLOMON_DEC16
0515 help
0516 This is a reimplementation of M-Systems DiskOnChip 2000,
0517 Millennium and Millennium Plus as a standard NAND device driver,
0518 as opposed to the earlier self-contained MTD device drivers.
0519 This should enable, among other things, proper JFFS2 operation on
0520 these devices.
0521
0522 config MTD_NAND_DISKONCHIP_PROBE_ADVANCED
0523 bool "Advanced detection options for DiskOnChip"
0524 depends on MTD_NAND_DISKONCHIP
0525 help
0526 This option allows you to specify nonstandard address at which to
0527 probe for a DiskOnChip, or to change the detection options. You
0528 are unlikely to need any of this unless you are using LinuxBIOS.
0529 Say 'N'.
0530
0531 config MTD_NAND_DISKONCHIP_PROBE_ADDRESS
0532 hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
0533 depends on MTD_NAND_DISKONCHIP
0534 default "0"
0535 help
0536 By default, the probe for DiskOnChip devices will look for a
0537 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
0538 This option allows you to specify a single address at which to probe
0539 for the device, which is useful if you have other devices in that
0540 range which get upset when they are probed.
0541
0542 (Note that on PowerPC, the normal probe will only check at
0543 0xE4000000.)
0544
0545 Normally, you should leave this set to zero, to allow the probe at
0546 the normal addresses.
0547
0548 config MTD_NAND_DISKONCHIP_PROBE_HIGH
0549 bool "Probe high addresses"
0550 depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED
0551 help
0552 By default, the probe for DiskOnChip devices will look for a
0553 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
0554 This option changes to make it probe between 0xFFFC8000 and
0555 0xFFFEE000. Unless you are using LinuxBIOS, this is unlikely to be
0556 useful to you. Say 'N'.
0557
0558 config MTD_NAND_DISKONCHIP_BBTWRITE
0559 bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP"
0560 depends on MTD_NAND_DISKONCHIP
0561 help
0562 On DiskOnChip devices shipped with the INFTL filesystem (Millennium
0563 and 2000 TSOP/Alon), Linux reserves some space at the end of the
0564 device for the Bad Block Table (BBT). If you have existing INFTL
0565 data on your device (created by non-Linux tools such as M-Systems'
0566 DOS drivers), your data might overlap the area Linux wants to use for
0567 the BBT. If this is a concern for you, leave this option disabled and
0568 Linux will not write BBT data into this area.
0569 The downside of leaving this option disabled is that if bad blocks
0570 are detected by Linux, they will not be recorded in the BBT, which
0571 could cause future problems.
0572 Once you enable this option, new filesystems (INFTL or others, created
0573 in Linux or other operating systems) will not use the reserved area.
0574 The only reason not to enable this option is to prevent damage to
0575 preexisting filesystems.
0576 Even if you leave this disabled, you can enable BBT writes at module
0577 load time (assuming you build diskonchip as a module) with the module
0578 parameter "inftl_bbt_write=1".
0579
0580 endif # MTD_RAW_NAND