1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 226777d37SBoris Brezillonmenuconfig MTD_ONENAND 326777d37SBoris Brezillon tristate "OneNAND Device Support" 426777d37SBoris Brezillon depends on HAS_IOMEM 526777d37SBoris Brezillon help 626777d37SBoris Brezillon This enables support for accessing all type of OneNAND flash 726777d37SBoris Brezillon devices. 826777d37SBoris Brezillon 926777d37SBoris Brezillonif MTD_ONENAND 1026777d37SBoris Brezillon 1126777d37SBoris Brezillonconfig MTD_ONENAND_VERIFY_WRITE 1226777d37SBoris Brezillon bool "Verify OneNAND page writes" 1326777d37SBoris Brezillon help 1426777d37SBoris Brezillon This adds an extra check when data is written to the flash. The 1526777d37SBoris Brezillon OneNAND flash device internally checks only bits transitioning 1626777d37SBoris Brezillon from 1 to 0. There is a rare possibility that even though the 1726777d37SBoris Brezillon device thinks the write was successful, a bit could have been 1826777d37SBoris Brezillon flipped accidentally due to device wear or something else. 1926777d37SBoris Brezillon 2026777d37SBoris Brezillonconfig MTD_ONENAND_GENERIC 2126777d37SBoris Brezillon tristate "OneNAND Flash device via platform device driver" 2226777d37SBoris Brezillon help 2326777d37SBoris Brezillon Support for OneNAND flash via platform device driver. 2426777d37SBoris Brezillon 2526777d37SBoris Brezillonconfig MTD_ONENAND_OMAP2 2626777d37SBoris Brezillon tristate "OneNAND on OMAP2/OMAP3 support" 2705a5a6e5SKrzysztof Kozlowski depends on ARCH_OMAP2 || ARCH_OMAP3 || (COMPILE_TEST && ARM) 28*94b8f77fSJean Delvare depends on OF 29c717b9b7SKrzysztof Kozlowski depends on OMAP_GPMC 3026777d37SBoris Brezillon help 3126777d37SBoris Brezillon Support for a OneNAND flash device connected to an OMAP2/OMAP3 SoC 3226777d37SBoris Brezillon via the GPMC memory controller. 3326777d37SBoris Brezillon Enable dmaengine and gpiolib for better performance. 3426777d37SBoris Brezillon 3526777d37SBoris Brezillonconfig MTD_ONENAND_SAMSUNG 3626777d37SBoris Brezillon tristate "OneNAND on Samsung SOC controller support" 37c2606ddcSKrzysztof Kozlowski depends on ARCH_S3C64XX || ARCH_S5PV210 || COMPILE_TEST 3826777d37SBoris Brezillon help 39c2606ddcSKrzysztof Kozlowski Support for a OneNAND flash device connected to Samsung S3C64XX 40c2606ddcSKrzysztof Kozlowski (using command mapping method) and S5PC110/S5PC210 (using generic 41c2606ddcSKrzysztof Kozlowski OneNAND method) SoCs. 42c2606ddcSKrzysztof Kozlowski Choose Y here only if you build for such Samsung SoC. 4326777d37SBoris Brezillon 4426777d37SBoris Brezillonconfig MTD_ONENAND_OTP 4526777d37SBoris Brezillon bool "OneNAND OTP Support" 4626777d37SBoris Brezillon help 4726777d37SBoris Brezillon One Block of the NAND Flash Array memory is reserved as 4826777d37SBoris Brezillon a One-Time Programmable Block memory area. 4926777d37SBoris Brezillon Also, 1st Block of NAND Flash Array can be used as OTP. 5026777d37SBoris Brezillon 5126777d37SBoris Brezillon The OTP block can be read, programmed and locked using the same 5226777d37SBoris Brezillon operations as any other NAND Flash Array memory block. 5326777d37SBoris Brezillon OTP block cannot be erased. 5426777d37SBoris Brezillon 5526777d37SBoris Brezillon OTP block is fully-guaranteed to be a valid block. 5626777d37SBoris Brezillon 5726777d37SBoris Brezillonconfig MTD_ONENAND_2X_PROGRAM 5826777d37SBoris Brezillon bool "OneNAND 2X program support" 5926777d37SBoris Brezillon help 6026777d37SBoris Brezillon The 2X Program is an extension of Program Operation. 6126777d37SBoris Brezillon Since the device is equipped with two DataRAMs, and two-plane NAND 6226777d37SBoris Brezillon Flash memory array, these two component enables simultaneous program 6326777d37SBoris Brezillon of 4KiB. Plane1 has only even blocks such as block0, block2, block4 6426777d37SBoris Brezillon while Plane2 has only odd blocks such as block1, block3, block5. 6526777d37SBoris Brezillon So MTD regards it as 4KiB page size and 256KiB block size 6626777d37SBoris Brezillon 6726777d37SBoris Brezillon Now the following chips support it. (KFXXX16Q2M) 6826777d37SBoris Brezillon Demux: KFG2G16Q2M, KFH4G16Q2M, KFW8G16Q2M, 6926777d37SBoris Brezillon Mux: KFM2G16Q2M, KFN4G16Q2M, 7026777d37SBoris Brezillon 7126777d37SBoris Brezillon And more recent chips 7226777d37SBoris Brezillon 7326777d37SBoris Brezillonendif # MTD_ONENAND 74