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