Merge tag 'v2023.01-rc4' into next
[platform/kernel/u-boot.git] / drivers / mtd / nand / raw / Kconfig
index 8aaba8b..25b829f 100644 (file)
@@ -41,6 +41,10 @@ config SYS_NAND_USE_FLASH_BBT
        help
          Enable the BBT (Bad Block Table) usage.
 
+config SYS_NAND_NO_SUBPAGE_WRITE
+       bool "Disable subpage write support"
+       depends on NAND_ARASAN || NAND_DAVINCI || NAND_KIRKWOOD
+
 config NAND_ATMEL
        bool "Support Atmel NAND controller"
        select SYS_NAND_SELF_INIT
@@ -83,6 +87,18 @@ config SPL_GENERATE_ATMEL_PMECC_HEADER
        help
          Generate Programmable Multibit ECC (PMECC) header for SPL image.
 
+choice
+       prompt "NAND bus width (bits)"
+       default SYS_NAND_DBW_8
+
+config SYS_NAND_DBW_8
+       bool "NAND bus width is 8 bits"
+
+config SYS_NAND_DBW_16
+       bool "NAND bus width is 16 bits"
+
+endchoice
+
 endif
 
 config NAND_BRCMNAND
@@ -136,9 +152,34 @@ config NAND_DAVINCI
          Enable this driver for NAND flash controllers available in TI Davinci
          and Keystone2 platforms
 
+choice
+       prompt "Type of ECC used on NAND"
+       default SYS_NAND_4BIT_HW_ECC_OOBFIRST
+       depends on NAND_DAVINCI
+
+config SYS_NAND_HW_ECC
+       bool "Use 1-bit HW ECC"
+
 config SYS_NAND_4BIT_HW_ECC_OOBFIRST
        bool "Use 4-bit HW ECC with OOB at the front"
+
+config SYS_NAND_SOFT_ECC
+       bool "Use software ECC"
+
+endchoice
+
+choice
+       prompt "NAND page size"
        depends on NAND_DAVINCI
+       default SYS_NAND_PAGE_2K
+
+config SYS_NAND_PAGE_2K
+       bool "Page size is 2K"
+
+config SYS_NAND_PAGE_4K
+       bool "Page size is 4K"
+
+endchoice
 
 config KEYSTONE_RBL_NAND
        depends on ARCH_KEYSTONE
@@ -184,6 +225,19 @@ config NAND_FSL_IFC
        help
          Enable the Freescale Integrated Flash Controller NAND driver.
 
+config NAND_KIRKWOOD
+       bool "Support for Kirkwood NAND controller"
+       depends on ARCH_KIRKWOOD
+       default y
+
+config NAND_ECC_BCH
+       bool
+
+config NAND_KMETER1
+       bool "Support KMETER1 NAND controller"
+       depends on VENDOR_KM
+       select NAND_ECC_BCH
+
 config NAND_LPC32XX_MLC
        bool "Support LPC32XX_MLC controller"
        select SYS_NAND_SELF_INIT
@@ -420,6 +474,11 @@ config NAND_MXC
          This enables the NAND driver for the NAND flash controller on the
          i.MX27 / i.MX31 / i.MX5 processors.
 
+config SYS_NAND_SIZE
+       int "Size of NAND in kilobytes"
+       depends on NAND_MXC && SPL_NAND_SUPPORT
+       default 268435456
+
 config NAND_MXS
        bool "MXS NAND support"
        depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M
@@ -700,6 +759,11 @@ config SPL_NAND_SIMPLE
        help
          Support for NAND boot using simple NAND drivers that
          expose the cmd_ctrl() interface.
+
+config SYS_NAND_HW_ECC_OOBFIRST
+       bool "In SPL, read the OOB first and then the data from NAND"
+       depends on SPL_NAND_SIMPLE
+
 endif
 
 endif   # if NAND