162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_cimenuconfig MTD_RAW_NAND
362306a36Sopenharmony_ci	tristate "Raw/Parallel NAND Device Support"
462306a36Sopenharmony_ci	select MTD_NAND_CORE
562306a36Sopenharmony_ci	select MTD_NAND_ECC
662306a36Sopenharmony_ci	help
762306a36Sopenharmony_ci	  This enables support for accessing all type of raw/parallel
862306a36Sopenharmony_ci	  NAND flash devices. For further information see
962306a36Sopenharmony_ci	  <http://www.linux-mtd.infradead.org/doc/nand.html>.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciif MTD_RAW_NAND
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cicomment "Raw/parallel NAND flash controllers"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciconfig MTD_NAND_DENALI
1662306a36Sopenharmony_ci	tristate
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciconfig MTD_NAND_DENALI_PCI
1962306a36Sopenharmony_ci	tristate "Denali NAND controller on Intel Moorestown"
2062306a36Sopenharmony_ci	select MTD_NAND_DENALI
2162306a36Sopenharmony_ci	depends on PCI
2262306a36Sopenharmony_ci	help
2362306a36Sopenharmony_ci	  Enable the driver for NAND flash on Intel Moorestown, using the
2462306a36Sopenharmony_ci	  Denali NAND controller core.
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciconfig MTD_NAND_DENALI_DT
2762306a36Sopenharmony_ci	tristate "Denali NAND controller as a DT device"
2862306a36Sopenharmony_ci	select MTD_NAND_DENALI
2962306a36Sopenharmony_ci	depends on HAS_DMA && HAVE_CLK && OF && HAS_IOMEM
3062306a36Sopenharmony_ci	help
3162306a36Sopenharmony_ci	  Enable the driver for NAND flash on platforms using a Denali NAND
3262306a36Sopenharmony_ci	  controller as a DT device.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciconfig MTD_NAND_AMS_DELTA
3562306a36Sopenharmony_ci	tristate "Amstrad E3 NAND controller"
3662306a36Sopenharmony_ci	depends on MACH_AMS_DELTA || COMPILE_TEST
3762306a36Sopenharmony_ci	default y
3862306a36Sopenharmony_ci	help
3962306a36Sopenharmony_ci	  Support for NAND flash on Amstrad E3 (Delta).
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ciconfig MTD_NAND_OMAP2
4262306a36Sopenharmony_ci	tristate "OMAP2, OMAP3, OMAP4 and Keystone NAND controller"
4362306a36Sopenharmony_ci	depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
4462306a36Sopenharmony_ci	depends on HAS_IOMEM
4562306a36Sopenharmony_ci	depends on OMAP_GPMC
4662306a36Sopenharmony_ci	help
4762306a36Sopenharmony_ci	  Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
4862306a36Sopenharmony_ci	  and Keystone platforms.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciconfig MTD_NAND_OMAP_BCH
5162306a36Sopenharmony_ci	depends on MTD_NAND_OMAP2
5262306a36Sopenharmony_ci	bool "Support hardware based BCH error correction"
5362306a36Sopenharmony_ci	default n
5462306a36Sopenharmony_ci	select BCH
5562306a36Sopenharmony_ci	help
5662306a36Sopenharmony_ci	  This config enables the ELM hardware engine, which can be used to
5762306a36Sopenharmony_ci	  locate and correct errors when using BCH ECC scheme. This offloads
5862306a36Sopenharmony_ci	  the cpu from doing ECC error searching and correction. However some
5962306a36Sopenharmony_ci	  legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine
6062306a36Sopenharmony_ci	  so this is optional for them.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciconfig MTD_NAND_OMAP_BCH_BUILD
6362306a36Sopenharmony_ci	def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciconfig MTD_NAND_AU1550
6662306a36Sopenharmony_ci	tristate "Au1550/1200 NAND support"
6762306a36Sopenharmony_ci	depends on MIPS_ALCHEMY
6862306a36Sopenharmony_ci	help
6962306a36Sopenharmony_ci	  This enables the driver for the NAND flash controller on the
7062306a36Sopenharmony_ci	  AMD/Alchemy 1550 SOC.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciconfig MTD_NAND_NDFC
7362306a36Sopenharmony_ci	tristate "IBM/MCC 4xx NAND controller"
7462306a36Sopenharmony_ci	depends on 4xx
7562306a36Sopenharmony_ci	select MTD_NAND_ECC_SW_HAMMING
7662306a36Sopenharmony_ci	select MTD_NAND_ECC_SW_HAMMING_SMC
7762306a36Sopenharmony_ci	help
7862306a36Sopenharmony_ci	  NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciconfig MTD_NAND_S3C2410
8162306a36Sopenharmony_ci	tristate "Samsung S3C NAND controller"
8262306a36Sopenharmony_ci	depends on ARCH_S3C64XX
8362306a36Sopenharmony_ci	help
8462306a36Sopenharmony_ci	  This enables the NAND flash controller on the S3C24xx and S3C64xx
8562306a36Sopenharmony_ci	  SoCs
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ci	  No board specific support is done by this driver, each board
8862306a36Sopenharmony_ci	  must advertise a platform_device for the driver to attach.
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ciconfig MTD_NAND_S3C2410_DEBUG
9162306a36Sopenharmony_ci	bool "Samsung S3C NAND controller debug"
9262306a36Sopenharmony_ci	depends on MTD_NAND_S3C2410
9362306a36Sopenharmony_ci	help
9462306a36Sopenharmony_ci	  Enable debugging of the S3C NAND driver
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciconfig MTD_NAND_S3C2410_CLKSTOP
9762306a36Sopenharmony_ci	bool "Samsung S3C NAND IDLE clock stop"
9862306a36Sopenharmony_ci	depends on MTD_NAND_S3C2410
9962306a36Sopenharmony_ci	default n
10062306a36Sopenharmony_ci	help
10162306a36Sopenharmony_ci	  Stop the clock to the NAND controller when there is no chip
10262306a36Sopenharmony_ci	  selected to save power. This will mean there is a small delay
10362306a36Sopenharmony_ci	  when the is NAND chip selected or released, but will save
10462306a36Sopenharmony_ci	  approximately 5mA of power when there is nothing happening.
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciconfig MTD_NAND_SHARPSL
10762306a36Sopenharmony_ci	tristate "Sharp SL Series (C7xx + others) NAND controller"
10862306a36Sopenharmony_ci	depends on ARCH_PXA || COMPILE_TEST
10962306a36Sopenharmony_ci	depends on HAS_IOMEM
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciconfig MTD_NAND_CAFE
11262306a36Sopenharmony_ci	tristate "OLPC CAFÉ NAND controller"
11362306a36Sopenharmony_ci	depends on PCI
11462306a36Sopenharmony_ci	select REED_SOLOMON
11562306a36Sopenharmony_ci	select REED_SOLOMON_DEC16
11662306a36Sopenharmony_ci	help
11762306a36Sopenharmony_ci	  Use NAND flash attached to the CAFÉ chip designed for the OLPC
11862306a36Sopenharmony_ci	  laptop.
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ciconfig MTD_NAND_CS553X
12162306a36Sopenharmony_ci	tristate "CS5535/CS5536 (AMD Geode companion) NAND controller"
12262306a36Sopenharmony_ci	depends on X86_32
12362306a36Sopenharmony_ci	depends on !UML && HAS_IOMEM
12462306a36Sopenharmony_ci	help
12562306a36Sopenharmony_ci	  The CS553x companion chips for the AMD Geode processor
12662306a36Sopenharmony_ci	  include NAND flash controllers with built-in hardware ECC
12762306a36Sopenharmony_ci	  capabilities; enabling this option will allow you to use
12862306a36Sopenharmony_ci	  these. The driver will check the MSRs to verify that the
12962306a36Sopenharmony_ci	  controller is enabled for NAND, and currently requires that
13062306a36Sopenharmony_ci	  the controller be in MMIO mode.
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci	  If you say "m", the module will be called cs553x_nand.
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciconfig MTD_NAND_ATMEL
13562306a36Sopenharmony_ci	tristate "Atmel AT91 NAND Flash/SmartMedia NAND controller"
13662306a36Sopenharmony_ci	depends on ARCH_AT91 || COMPILE_TEST
13762306a36Sopenharmony_ci	depends on HAS_IOMEM
13862306a36Sopenharmony_ci	select GENERIC_ALLOCATOR
13962306a36Sopenharmony_ci	select MFD_ATMEL_SMC
14062306a36Sopenharmony_ci	help
14162306a36Sopenharmony_ci	  Enables support for NAND Flash / Smart Media Card interface
14262306a36Sopenharmony_ci	  on Atmel AT91 processors.
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ciconfig MTD_NAND_ORION
14562306a36Sopenharmony_ci	tristate "Marvell Orion NAND controller"
14662306a36Sopenharmony_ci	depends on PLAT_ORION
14762306a36Sopenharmony_ci	help
14862306a36Sopenharmony_ci	  This enables the NAND flash controller on Orion machines.
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci	  No board specific support is done by this driver, each board
15162306a36Sopenharmony_ci	  must advertise a platform_device for the driver to attach.
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ciconfig MTD_NAND_MARVELL
15462306a36Sopenharmony_ci	tristate "Marvell EBU NAND controller"
15562306a36Sopenharmony_ci	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
15662306a36Sopenharmony_ci		   COMPILE_TEST
15762306a36Sopenharmony_ci	depends on HAS_IOMEM
15862306a36Sopenharmony_ci	help
15962306a36Sopenharmony_ci	  This enables the NAND flash controller driver for Marvell boards,
16062306a36Sopenharmony_ci	  including:
16162306a36Sopenharmony_ci	  - PXA3xx processors (NFCv1)
16262306a36Sopenharmony_ci	  - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
16362306a36Sopenharmony_ci	  - 64-bit Aramda platforms (7k, 8k, ac5) (NFCv2)
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciconfig MTD_NAND_SLC_LPC32XX
16662306a36Sopenharmony_ci	tristate "NXP LPC32xx SLC NAND controller"
16762306a36Sopenharmony_ci	depends on ARCH_LPC32XX || COMPILE_TEST
16862306a36Sopenharmony_ci	depends on HAS_IOMEM
16962306a36Sopenharmony_ci	help
17062306a36Sopenharmony_ci	  Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell
17162306a36Sopenharmony_ci	  chips) NAND controller. This is the default for the PHYTEC 3250
17262306a36Sopenharmony_ci	  reference board which contains a NAND256R3A2CZA6 chip.
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ci	  Please check the actual NAND chip connected and its support
17562306a36Sopenharmony_ci	  by the SLC NAND controller.
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ciconfig MTD_NAND_MLC_LPC32XX
17862306a36Sopenharmony_ci	tristate "NXP LPC32xx MLC NAND controller"
17962306a36Sopenharmony_ci	depends on ARCH_LPC32XX || COMPILE_TEST
18062306a36Sopenharmony_ci	depends on HAS_IOMEM
18162306a36Sopenharmony_ci	help
18262306a36Sopenharmony_ci	  Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND
18362306a36Sopenharmony_ci	  controller. This is the default for the WORK92105 controller
18462306a36Sopenharmony_ci	  board.
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci	  Please check the actual NAND chip connected and its support
18762306a36Sopenharmony_ci	  by the MLC NAND controller.
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ciconfig MTD_NAND_PASEMI
19062306a36Sopenharmony_ci	tristate "PA Semi PWRficient NAND controller"
19162306a36Sopenharmony_ci	depends on PPC_PASEMI
19262306a36Sopenharmony_ci	help
19362306a36Sopenharmony_ci	  Enables support for NAND Flash interface on PA Semi PWRficient
19462306a36Sopenharmony_ci	  based boards
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_cisource "drivers/mtd/nand/raw/brcmnand/Kconfig"
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ciconfig MTD_NAND_BCM47XXNFLASH
19962306a36Sopenharmony_ci	tristate "BCM4706 BCMA NAND controller"
20062306a36Sopenharmony_ci	depends on BCMA_NFLASH
20162306a36Sopenharmony_ci	depends on BCMA
20262306a36Sopenharmony_ci	help
20362306a36Sopenharmony_ci	  BCMA bus can have various flash memories attached, they are
20462306a36Sopenharmony_ci	  registered by bcma as platform devices. This enables driver for
20562306a36Sopenharmony_ci	  NAND flash memories. For now only BCM4706 is supported.
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ciconfig MTD_NAND_MPC5121_NFC
20862306a36Sopenharmony_ci	tristate "MPC5121 NAND controller"
20962306a36Sopenharmony_ci	depends on PPC_MPC512x
21062306a36Sopenharmony_ci	help
21162306a36Sopenharmony_ci	  This enables the driver for the NAND flash controller on the
21262306a36Sopenharmony_ci	  MPC5121 SoC.
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ciconfig MTD_NAND_GPMI_NAND
21562306a36Sopenharmony_ci	tristate "Freescale GPMI NAND controller"
21662306a36Sopenharmony_ci	depends on MXS_DMA
21762306a36Sopenharmony_ci	help
21862306a36Sopenharmony_ci	  Enables NAND Flash support for IMX23, IMX28 or IMX6.
21962306a36Sopenharmony_ci	  The GPMI controller is very powerful, with the help of BCH
22062306a36Sopenharmony_ci	  module, it can do the hardware ECC. The GPMI supports several
22162306a36Sopenharmony_ci	  NAND flashs at the same time.
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ciconfig MTD_NAND_FSL_ELBC
22462306a36Sopenharmony_ci	tristate "Freescale eLBC NAND controller"
22562306a36Sopenharmony_ci	depends on FSL_SOC
22662306a36Sopenharmony_ci	select FSL_LBC
22762306a36Sopenharmony_ci	help
22862306a36Sopenharmony_ci	  Various Freescale chips, including the 8313, include a NAND Flash
22962306a36Sopenharmony_ci	  Controller Module with built-in hardware ECC capabilities.
23062306a36Sopenharmony_ci	  Enabling this option will enable you to use this to control
23162306a36Sopenharmony_ci	  external NAND devices.
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ciconfig MTD_NAND_FSL_IFC
23462306a36Sopenharmony_ci	tristate "Freescale IFC NAND controller"
23562306a36Sopenharmony_ci	depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST
23662306a36Sopenharmony_ci	depends on HAS_IOMEM
23762306a36Sopenharmony_ci	select FSL_IFC
23862306a36Sopenharmony_ci	select MEMORY
23962306a36Sopenharmony_ci	help
24062306a36Sopenharmony_ci	  Various Freescale chips e.g P1010, include a NAND Flash machine
24162306a36Sopenharmony_ci	  with built-in hardware ECC capabilities.
24262306a36Sopenharmony_ci	  Enabling this option will enable you to use this to control
24362306a36Sopenharmony_ci	  external NAND devices.
24462306a36Sopenharmony_ci
24562306a36Sopenharmony_ciconfig MTD_NAND_FSL_UPM
24662306a36Sopenharmony_ci	tristate "Freescale UPM NAND controller"
24762306a36Sopenharmony_ci	depends on PPC_83xx || PPC_85xx
24862306a36Sopenharmony_ci	select FSL_LBC
24962306a36Sopenharmony_ci	help
25062306a36Sopenharmony_ci	  Enables support for NAND Flash chips wired onto Freescale PowerPC
25162306a36Sopenharmony_ci	  processor localbus with User-Programmable Machine support.
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ciconfig MTD_NAND_VF610_NFC
25462306a36Sopenharmony_ci	tristate "Freescale VF610/MPC5125 NAND controller"
25562306a36Sopenharmony_ci	depends on (SOC_VF610 || COMPILE_TEST)
25662306a36Sopenharmony_ci	depends on HAS_IOMEM
25762306a36Sopenharmony_ci	help
25862306a36Sopenharmony_ci	  Enables support for NAND Flash Controller on some Freescale
25962306a36Sopenharmony_ci	  processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
26062306a36Sopenharmony_ci	  The driver supports a maximum 2k page size. With 2k pages and
26162306a36Sopenharmony_ci	  64 bytes or more of OOB, hardware ECC with up to 32-bit error
26262306a36Sopenharmony_ci	  correction is supported. Hardware ECC is only enabled through
26362306a36Sopenharmony_ci	  device tree.
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ciconfig MTD_NAND_MXC
26662306a36Sopenharmony_ci	tristate "Freescale MXC NAND controller"
26762306a36Sopenharmony_ci	depends on ARCH_MXC || COMPILE_TEST
26862306a36Sopenharmony_ci	depends on HAS_IOMEM && OF
26962306a36Sopenharmony_ci	help
27062306a36Sopenharmony_ci	  This enables the driver for the NAND flash controller on the
27162306a36Sopenharmony_ci	  MXC processors.
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ciconfig MTD_NAND_SH_FLCTL
27462306a36Sopenharmony_ci	tristate "Renesas SuperH FLCTL NAND controller"
27562306a36Sopenharmony_ci	depends on SUPERH || COMPILE_TEST
27662306a36Sopenharmony_ci	depends on HAS_IOMEM
27762306a36Sopenharmony_ci	help
27862306a36Sopenharmony_ci	  Several Renesas SuperH CPU has FLCTL. This option enables support
27962306a36Sopenharmony_ci	  for NAND Flash using FLCTL.
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ciconfig MTD_NAND_DAVINCI
28262306a36Sopenharmony_ci	tristate "DaVinci/Keystone NAND controller"
28362306a36Sopenharmony_ci	depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF) || COMPILE_TEST
28462306a36Sopenharmony_ci	depends on HAS_IOMEM
28562306a36Sopenharmony_ci	help
28662306a36Sopenharmony_ci	  Enable the driver for NAND flash chips on Texas Instruments
28762306a36Sopenharmony_ci	  DaVinci/Keystone processors.
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ciconfig MTD_NAND_TXX9NDFMC
29062306a36Sopenharmony_ci	tristate "TXx9 NAND controller"
29162306a36Sopenharmony_ci	depends on SOC_TX4938 || COMPILE_TEST
29262306a36Sopenharmony_ci	depends on HAS_IOMEM
29362306a36Sopenharmony_ci	help
29462306a36Sopenharmony_ci	  This enables the NAND flash controller on the TXx9 SoCs.
29562306a36Sopenharmony_ci
29662306a36Sopenharmony_ciconfig MTD_NAND_SOCRATES
29762306a36Sopenharmony_ci	tristate "Socrates NAND controller"
29862306a36Sopenharmony_ci	depends on SOCRATES
29962306a36Sopenharmony_ci	help
30062306a36Sopenharmony_ci	  Enables support for NAND Flash chips wired onto Socrates board.
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_cisource "drivers/mtd/nand/raw/ingenic/Kconfig"
30362306a36Sopenharmony_ci
30462306a36Sopenharmony_ciconfig MTD_NAND_FSMC
30562306a36Sopenharmony_ci	tristate "ST Micros FSMC NAND controller"
30662306a36Sopenharmony_ci	depends on OF && HAS_IOMEM
30762306a36Sopenharmony_ci	depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || COMPILE_TEST
30862306a36Sopenharmony_ci	help
30962306a36Sopenharmony_ci	  Enables support for NAND Flash chips on the ST Microelectronics
31062306a36Sopenharmony_ci	  Flexible Static Memory Controller (FSMC)
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ciconfig MTD_NAND_XWAY
31362306a36Sopenharmony_ci	bool "Lantiq XWAY NAND controller"
31462306a36Sopenharmony_ci	depends on LANTIQ && SOC_TYPE_XWAY
31562306a36Sopenharmony_ci	help
31662306a36Sopenharmony_ci	  Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached
31762306a36Sopenharmony_ci	  to the External Bus Unit (EBU).
31862306a36Sopenharmony_ci
31962306a36Sopenharmony_ciconfig MTD_NAND_SUNXI
32062306a36Sopenharmony_ci	tristate "Allwinner NAND controller"
32162306a36Sopenharmony_ci	depends on ARCH_SUNXI || COMPILE_TEST
32262306a36Sopenharmony_ci	depends on HAS_IOMEM
32362306a36Sopenharmony_ci	help
32462306a36Sopenharmony_ci	  Enables support for NAND Flash chips on Allwinner SoCs.
32562306a36Sopenharmony_ci
32662306a36Sopenharmony_ciconfig MTD_NAND_HISI504
32762306a36Sopenharmony_ci	tristate "Hisilicon Hip04 NAND controller"
32862306a36Sopenharmony_ci	depends on ARCH_HISI || COMPILE_TEST
32962306a36Sopenharmony_ci	depends on HAS_IOMEM
33062306a36Sopenharmony_ci	help
33162306a36Sopenharmony_ci	  Enables support for NAND controller on Hisilicon SoC Hip04.
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ciconfig MTD_NAND_QCOM
33462306a36Sopenharmony_ci	tristate "QCOM NAND controller"
33562306a36Sopenharmony_ci	depends on ARCH_QCOM || COMPILE_TEST
33662306a36Sopenharmony_ci	depends on HAS_IOMEM
33762306a36Sopenharmony_ci	help
33862306a36Sopenharmony_ci	  Enables support for NAND flash chips on SoCs containing the EBI2 NAND
33962306a36Sopenharmony_ci	  controller. This controller is found on IPQ806x SoC.
34062306a36Sopenharmony_ci
34162306a36Sopenharmony_ciconfig MTD_NAND_MTK
34262306a36Sopenharmony_ci	tristate "MTK NAND controller"
34362306a36Sopenharmony_ci	depends on MTD_NAND_ECC_MEDIATEK
34462306a36Sopenharmony_ci	depends on ARCH_MEDIATEK || COMPILE_TEST
34562306a36Sopenharmony_ci	depends on HAS_IOMEM
34662306a36Sopenharmony_ci	help
34762306a36Sopenharmony_ci	  Enables support for NAND controller on MTK SoCs.
34862306a36Sopenharmony_ci	  This controller is found on mt27xx, mt81xx, mt65xx SoCs.
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ciconfig MTD_NAND_MXIC
35162306a36Sopenharmony_ci	tristate "Macronix raw NAND controller"
35262306a36Sopenharmony_ci	depends on HAS_IOMEM || COMPILE_TEST
35362306a36Sopenharmony_ci	help
35462306a36Sopenharmony_ci	  This selects the Macronix raw NAND controller driver.
35562306a36Sopenharmony_ci
35662306a36Sopenharmony_ciconfig MTD_NAND_TEGRA
35762306a36Sopenharmony_ci	tristate "NVIDIA Tegra NAND controller"
35862306a36Sopenharmony_ci	depends on ARCH_TEGRA || COMPILE_TEST
35962306a36Sopenharmony_ci	depends on HAS_IOMEM
36062306a36Sopenharmony_ci	help
36162306a36Sopenharmony_ci	  Enables support for NAND flash controller on NVIDIA Tegra SoC.
36262306a36Sopenharmony_ci	  The driver has been developed and tested on a Tegra 2 SoC. DMA
36362306a36Sopenharmony_ci	  support, raw read/write page as well as HW ECC read/write page
36462306a36Sopenharmony_ci	  is supported. Extra OOB bytes when using HW ECC are currently
36562306a36Sopenharmony_ci	  not supported.
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_ciconfig MTD_NAND_STM32_FMC2
36862306a36Sopenharmony_ci	tristate "Support for NAND controller on STM32MP SoCs"
36962306a36Sopenharmony_ci	depends on ARCH_STM32 || COMPILE_TEST
37062306a36Sopenharmony_ci	select MFD_SYSCON
37162306a36Sopenharmony_ci	help
37262306a36Sopenharmony_ci	  Enables support for NAND Flash chips on SoCs containing the FMC2
37362306a36Sopenharmony_ci	  NAND controller. This controller is found on STM32MP SoCs.
37462306a36Sopenharmony_ci	  The controller supports a maximum 8k page size and supports
37562306a36Sopenharmony_ci	  a maximum 8-bit correction error per sector of 512 bytes.
37662306a36Sopenharmony_ci
37762306a36Sopenharmony_ciconfig MTD_NAND_MESON
37862306a36Sopenharmony_ci	tristate "Support for NAND controller on Amlogic's Meson SoCs"
37962306a36Sopenharmony_ci	depends on COMMON_CLK && (ARCH_MESON || COMPILE_TEST)
38062306a36Sopenharmony_ci	select MFD_SYSCON
38162306a36Sopenharmony_ci	help
38262306a36Sopenharmony_ci	  Enables support for NAND controller on Amlogic's Meson SoCs.
38362306a36Sopenharmony_ci	  This controller is found on Meson SoCs.
38462306a36Sopenharmony_ci
38562306a36Sopenharmony_ciconfig MTD_NAND_GPIO
38662306a36Sopenharmony_ci	tristate "GPIO assisted NAND controller"
38762306a36Sopenharmony_ci	depends on GPIOLIB || COMPILE_TEST
38862306a36Sopenharmony_ci	depends on HAS_IOMEM
38962306a36Sopenharmony_ci	help
39062306a36Sopenharmony_ci	  This enables a NAND flash driver where control signals are
39162306a36Sopenharmony_ci	  connected to GPIO pins, and commands and data are communicated
39262306a36Sopenharmony_ci	  via a memory mapped interface.
39362306a36Sopenharmony_ci
39462306a36Sopenharmony_ciconfig MTD_NAND_PLATFORM
39562306a36Sopenharmony_ci	tristate "Generic NAND controller"
39662306a36Sopenharmony_ci	depends on HAS_IOMEM
39762306a36Sopenharmony_ci	help
39862306a36Sopenharmony_ci	  This implements a generic NAND driver for on-SOC platform
39962306a36Sopenharmony_ci	  devices. You will need to provide platform-specific functions
40062306a36Sopenharmony_ci	  via platform_data.
40162306a36Sopenharmony_ci
40262306a36Sopenharmony_ciconfig MTD_NAND_CADENCE
40362306a36Sopenharmony_ci	tristate "Support Cadence NAND (HPNFC) controller"
40462306a36Sopenharmony_ci	depends on OF && HAS_IOMEM
40562306a36Sopenharmony_ci	help
40662306a36Sopenharmony_ci	  Enable the driver for NAND flash on platforms using a Cadence NAND
40762306a36Sopenharmony_ci	  controller.
40862306a36Sopenharmony_ci
40962306a36Sopenharmony_ciconfig MTD_NAND_ARASAN
41062306a36Sopenharmony_ci	tristate "Support for Arasan NAND flash controller"
41162306a36Sopenharmony_ci	depends on HAS_IOMEM && HAS_DMA
41262306a36Sopenharmony_ci	select BCH
41362306a36Sopenharmony_ci	help
41462306a36Sopenharmony_ci	  Enables the driver for the Arasan NAND flash controller on
41562306a36Sopenharmony_ci	  Zynq Ultrascale+ MPSoC.
41662306a36Sopenharmony_ci
41762306a36Sopenharmony_ciconfig MTD_NAND_INTEL_LGM
41862306a36Sopenharmony_ci	tristate "Support for NAND controller on Intel LGM SoC"
41962306a36Sopenharmony_ci	depends on OF
42062306a36Sopenharmony_ci	depends on HAS_IOMEM
42162306a36Sopenharmony_ci	help
42262306a36Sopenharmony_ci	  Enables support for NAND Flash chips on Intel's LGM SoC.
42362306a36Sopenharmony_ci	  NAND flash controller interfaced through the External Bus Unit.
42462306a36Sopenharmony_ci
42562306a36Sopenharmony_ciconfig MTD_NAND_ROCKCHIP
42662306a36Sopenharmony_ci	tristate "Rockchip NAND controller"
42762306a36Sopenharmony_ci	depends on ARCH_ROCKCHIP && HAS_IOMEM
42862306a36Sopenharmony_ci	help
42962306a36Sopenharmony_ci	  Enables support for NAND controller on Rockchip SoCs.
43062306a36Sopenharmony_ci	  There are four different versions of NAND FLASH Controllers,
43162306a36Sopenharmony_ci	  including:
43262306a36Sopenharmony_ci	    NFC v600: RK2928, RK3066, RK3188
43362306a36Sopenharmony_ci	    NFC v622: RK3036, RK3128
43462306a36Sopenharmony_ci	    NFC v800: RK3308, RV1108
43562306a36Sopenharmony_ci	    NFC v900: PX30, RK3326
43662306a36Sopenharmony_ci
43762306a36Sopenharmony_ciconfig MTD_NAND_PL35X
43862306a36Sopenharmony_ci	tristate "ARM PL35X NAND controller"
43962306a36Sopenharmony_ci	depends on OF
44062306a36Sopenharmony_ci	depends on PL353_SMC
44162306a36Sopenharmony_ci	help
44262306a36Sopenharmony_ci	  Enables support for PrimeCell SMC PL351 and PL353 NAND
44362306a36Sopenharmony_ci	  controller found on Zynq7000.
44462306a36Sopenharmony_ci
44562306a36Sopenharmony_ciconfig MTD_NAND_RENESAS
44662306a36Sopenharmony_ci	tristate "Renesas R-Car Gen3 & RZ/N1 NAND controller"
44762306a36Sopenharmony_ci	depends on ARCH_RENESAS || COMPILE_TEST
44862306a36Sopenharmony_ci	help
44962306a36Sopenharmony_ci	  Enables support for the NAND controller found on Renesas R-Car
45062306a36Sopenharmony_ci	  Gen3 and RZ/N1 SoC families.
45162306a36Sopenharmony_ci
45262306a36Sopenharmony_cicomment "Misc"
45362306a36Sopenharmony_ci
45462306a36Sopenharmony_ciconfig MTD_SM_COMMON
45562306a36Sopenharmony_ci	tristate
45662306a36Sopenharmony_ci	default n
45762306a36Sopenharmony_ci
45862306a36Sopenharmony_ciconfig MTD_NAND_NANDSIM
45962306a36Sopenharmony_ci	tristate "Support for NAND Flash Simulator"
46062306a36Sopenharmony_ci	help
46162306a36Sopenharmony_ci	  The simulator may simulate various NAND flash chips for the
46262306a36Sopenharmony_ci	  MTD nand layer.
46362306a36Sopenharmony_ci
46462306a36Sopenharmony_ciconfig MTD_NAND_RICOH
46562306a36Sopenharmony_ci	tristate "Ricoh xD card reader"
46662306a36Sopenharmony_ci	default n
46762306a36Sopenharmony_ci	depends on PCI
46862306a36Sopenharmony_ci	select MTD_SM_COMMON
46962306a36Sopenharmony_ci	help
47062306a36Sopenharmony_ci	  Enable support for Ricoh R5C852 xD card reader
47162306a36Sopenharmony_ci	  You also need to enable either
47262306a36Sopenharmony_ci	  NAND SSFDC (SmartMedia) read only translation layer' or new
47362306a36Sopenharmony_ci	  experimental, readwrite
47462306a36Sopenharmony_ci	  'SmartMedia/xD new translation layer'
47562306a36Sopenharmony_ci
47662306a36Sopenharmony_ciconfig MTD_NAND_DISKONCHIP
47762306a36Sopenharmony_ci	tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)"
47862306a36Sopenharmony_ci	depends on HAS_IOMEM
47962306a36Sopenharmony_ci	select REED_SOLOMON
48062306a36Sopenharmony_ci	select REED_SOLOMON_DEC16
48162306a36Sopenharmony_ci	help
48262306a36Sopenharmony_ci	  This is a reimplementation of M-Systems DiskOnChip 2000,
48362306a36Sopenharmony_ci	  Millennium and Millennium Plus as a standard NAND device driver,
48462306a36Sopenharmony_ci	  as opposed to the earlier self-contained MTD device drivers.
48562306a36Sopenharmony_ci	  This should enable, among other things, proper JFFS2 operation on
48662306a36Sopenharmony_ci	  these devices.
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ciconfig MTD_NAND_DISKONCHIP_PROBE_ADVANCED
48962306a36Sopenharmony_ci	bool "Advanced detection options for DiskOnChip"
49062306a36Sopenharmony_ci	depends on MTD_NAND_DISKONCHIP
49162306a36Sopenharmony_ci	help
49262306a36Sopenharmony_ci	  This option allows you to specify nonstandard address at which to
49362306a36Sopenharmony_ci	  probe for a DiskOnChip, or to change the detection options.  You
49462306a36Sopenharmony_ci	  are unlikely to need any of this unless you are using LinuxBIOS.
49562306a36Sopenharmony_ci	  Say 'N'.
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ciconfig MTD_NAND_DISKONCHIP_PROBE_ADDRESS
49862306a36Sopenharmony_ci	hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
49962306a36Sopenharmony_ci	depends on MTD_NAND_DISKONCHIP
50062306a36Sopenharmony_ci	default "0"
50162306a36Sopenharmony_ci	help
50262306a36Sopenharmony_ci	  By default, the probe for DiskOnChip devices will look for a
50362306a36Sopenharmony_ci	  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
50462306a36Sopenharmony_ci	  This option allows you to specify a single address at which to probe
50562306a36Sopenharmony_ci	  for the device, which is useful if you have other devices in that
50662306a36Sopenharmony_ci	  range which get upset when they are probed.
50762306a36Sopenharmony_ci
50862306a36Sopenharmony_ci	  (Note that on PowerPC, the normal probe will only check at
50962306a36Sopenharmony_ci	  0xE4000000.)
51062306a36Sopenharmony_ci
51162306a36Sopenharmony_ci	  Normally, you should leave this set to zero, to allow the probe at
51262306a36Sopenharmony_ci	  the normal addresses.
51362306a36Sopenharmony_ci
51462306a36Sopenharmony_ciconfig MTD_NAND_DISKONCHIP_PROBE_HIGH
51562306a36Sopenharmony_ci	bool "Probe high addresses"
51662306a36Sopenharmony_ci	depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED
51762306a36Sopenharmony_ci	help
51862306a36Sopenharmony_ci	  By default, the probe for DiskOnChip devices will look for a
51962306a36Sopenharmony_ci	  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
52062306a36Sopenharmony_ci	  This option changes to make it probe between 0xFFFC8000 and
52162306a36Sopenharmony_ci	  0xFFFEE000.  Unless you are using LinuxBIOS, this is unlikely to be
52262306a36Sopenharmony_ci	  useful to you.  Say 'N'.
52362306a36Sopenharmony_ci
52462306a36Sopenharmony_ciconfig MTD_NAND_DISKONCHIP_BBTWRITE
52562306a36Sopenharmony_ci	bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP"
52662306a36Sopenharmony_ci	depends on MTD_NAND_DISKONCHIP
52762306a36Sopenharmony_ci	help
52862306a36Sopenharmony_ci	  On DiskOnChip devices shipped with the INFTL filesystem (Millennium
52962306a36Sopenharmony_ci	  and 2000 TSOP/Alon), Linux reserves some space at the end of the
53062306a36Sopenharmony_ci	  device for the Bad Block Table (BBT).  If you have existing INFTL
53162306a36Sopenharmony_ci	  data on your device (created by non-Linux tools such as M-Systems'
53262306a36Sopenharmony_ci	  DOS drivers), your data might overlap the area Linux wants to use for
53362306a36Sopenharmony_ci	  the BBT.  If this is a concern for you, leave this option disabled and
53462306a36Sopenharmony_ci	  Linux will not write BBT data into this area.
53562306a36Sopenharmony_ci	  The downside of leaving this option disabled is that if bad blocks
53662306a36Sopenharmony_ci	  are detected by Linux, they will not be recorded in the BBT, which
53762306a36Sopenharmony_ci	  could cause future problems.
53862306a36Sopenharmony_ci	  Once you enable this option, new filesystems (INFTL or others, created
53962306a36Sopenharmony_ci	  in Linux or other operating systems) will not use the reserved area.
54062306a36Sopenharmony_ci	  The only reason not to enable this option is to prevent damage to
54162306a36Sopenharmony_ci	  preexisting filesystems.
54262306a36Sopenharmony_ci	  Even if you leave this disabled, you can enable BBT writes at module
54362306a36Sopenharmony_ci	  load time (assuming you build diskonchip as a module) with the module
54462306a36Sopenharmony_ci	  parameter "inftl_bbt_write=1".
54562306a36Sopenharmony_ci
54662306a36Sopenharmony_ciendif # MTD_RAW_NAND
547