18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_cimenuconfig MTD_ONENAND
38c2ecf20Sopenharmony_ci	tristate "OneNAND Device Support"
48c2ecf20Sopenharmony_ci	depends on HAS_IOMEM
58c2ecf20Sopenharmony_ci	help
68c2ecf20Sopenharmony_ci	  This enables support for accessing all type of OneNAND flash
78c2ecf20Sopenharmony_ci	  devices.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciif MTD_ONENAND
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciconfig MTD_ONENAND_VERIFY_WRITE
128c2ecf20Sopenharmony_ci	bool "Verify OneNAND page writes"
138c2ecf20Sopenharmony_ci	help
148c2ecf20Sopenharmony_ci	  This adds an extra check when data is written to the flash. The
158c2ecf20Sopenharmony_ci	  OneNAND flash device internally checks only bits transitioning
168c2ecf20Sopenharmony_ci	  from 1 to 0. There is a rare possibility that even though the
178c2ecf20Sopenharmony_ci	  device thinks the write was successful, a bit could have been
188c2ecf20Sopenharmony_ci	  flipped accidentally due to device wear or something else.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciconfig MTD_ONENAND_GENERIC
218c2ecf20Sopenharmony_ci	tristate "OneNAND Flash device via platform device driver"
228c2ecf20Sopenharmony_ci	help
238c2ecf20Sopenharmony_ci	  Support for OneNAND flash via platform device driver.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciconfig MTD_ONENAND_OMAP2
268c2ecf20Sopenharmony_ci	tristate "OneNAND on OMAP2/OMAP3 support"
278c2ecf20Sopenharmony_ci	depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM)
288c2ecf20Sopenharmony_ci	depends on OF || COMPILE_TEST
298c2ecf20Sopenharmony_ci	help
308c2ecf20Sopenharmony_ci	  Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC
318c2ecf20Sopenharmony_ci	  via the GPMC memory controller.
328c2ecf20Sopenharmony_ci	  Enable dmaengine and gpiolib for better performance.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciconfig MTD_ONENAND_SAMSUNG
358c2ecf20Sopenharmony_ci	tristate "OneNAND on Samsung SOC controller support"
368c2ecf20Sopenharmony_ci	depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS4 || COMPILE_TEST
378c2ecf20Sopenharmony_ci	help
388c2ecf20Sopenharmony_ci	  Support for a OneNAND flash device connected to an Samsung SOC.
398c2ecf20Sopenharmony_ci	  S3C64XX uses command mapping method.
408c2ecf20Sopenharmony_ci	  S5PC110/S5PC210 use generic OneNAND method.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciconfig MTD_ONENAND_OTP
438c2ecf20Sopenharmony_ci	bool "OneNAND OTP Support"
448c2ecf20Sopenharmony_ci	help
458c2ecf20Sopenharmony_ci	  One Block of the NAND Flash Array memory is reserved as
468c2ecf20Sopenharmony_ci	  a One-Time Programmable Block memory area.
478c2ecf20Sopenharmony_ci	  Also, 1st Block of NAND Flash Array can be used as OTP.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci	  The OTP block can be read, programmed and locked using the same
508c2ecf20Sopenharmony_ci	  operations as any other NAND Flash Array memory block.
518c2ecf20Sopenharmony_ci	  OTP block cannot be erased.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci	  OTP block is fully-guaranteed to be a valid block.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciconfig MTD_ONENAND_2X_PROGRAM
568c2ecf20Sopenharmony_ci	bool "OneNAND 2X program support"
578c2ecf20Sopenharmony_ci	help
588c2ecf20Sopenharmony_ci	  The 2X Program is an extension of Program Operation.
598c2ecf20Sopenharmony_ci	  Since the device is equipped with two DataRAMs, and two-plane NAND
608c2ecf20Sopenharmony_ci	  Flash memory array, these two component enables simultaneous program
618c2ecf20Sopenharmony_ci	  of 4KiB. Plane1 has only even blocks such as block0, block2, block4
628c2ecf20Sopenharmony_ci	  while Plane2 has only odd blocks such as block1, block3, block5.
638c2ecf20Sopenharmony_ci	  So MTD regards it as 4KiB page size and 256KiB block size
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	  Now the following chips support it. (KFXXX16Q2M)
668c2ecf20Sopenharmony_ci	    Demux: KFG2G16Q2M, KFH4G16Q2M, KFW8G16Q2M,
678c2ecf20Sopenharmony_ci	    Mux:   KFM2G16Q2M, KFN4G16Q2M,
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci	  And more recent chips
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciendif # MTD_ONENAND
72