mtd: nand: denali_dt: add a DT driver
[oweals/u-boot.git] / drivers / mtd / nand / Kconfig
index 65bb040407b2cccd619c85681c2fab26fa83e0fe..85b26d608851591cca14dd36e1229db845215918 100644 (file)
@@ -1,4 +1,7 @@
-menu "NAND Device Support"
+
+menuconfig NAND
+       bool "NAND Device Support"
+if NAND
 
 config SYS_NAND_SELF_INIT
        bool
@@ -9,9 +12,17 @@ config SYS_NAND_SELF_INIT
 config NAND_DENALI
        bool "Support Denali NAND controller"
        select SYS_NAND_SELF_INIT
+       imply CMD_NAND
        help
          Enable support for the Denali NAND controller.
 
+config NAND_DENALI_DT
+       bool "Support Denali NAND controller as a DT device"
+       depends on NAND_DENALI && OF_CONTROL && DM
+       help
+         Enable the driver for NAND flash on platforms using a Denali NAND
+         controller as a DT device.
+
 config SYS_NAND_DENALI_64BIT
        bool "Use 64-bit variant of Denali NAND controller"
        depends on NAND_DENALI
@@ -33,11 +44,12 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
          used to preserve the bad block marker in the OOB area.
 
 config NAND_VF610_NFC
-       bool "Support for Freescale NFC for VF610/MPC5125"
+       bool "Support for Freescale NFC for VF610"
        select SYS_NAND_SELF_INIT
+       imply CMD_NAND
        help
          Enables support for NAND Flash Controller on some Freescale
-         processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
+         processors like the VF610, MCF54418 or Kinetis K70.
          The driver supports a maximum 2k page size. The driver
          currently does not support hardware ECC.
 
@@ -59,6 +71,7 @@ endchoice
 config NAND_PXA3XX
        bool "Support for NAND on PXA3xx and Armada 370/XP/38x"
        select SYS_NAND_SELF_INIT
+       imply CMD_NAND
        help
          This enables the driver for the NAND flash device found on
          PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2).
@@ -67,14 +80,33 @@ config NAND_SUNXI
        bool "Support for NAND on Allwinner SoCs"
        depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
        select SYS_NAND_SELF_INIT
+       select SYS_NAND_U_BOOT_LOCATIONS
+       imply CMD_NAND
        ---help---
        Enable support for NAND. This option enables the standard and
        SPL drivers.
        The SPL driver only supports reading from the NAND using DMA
        transfers.
 
+if NAND_SUNXI
+
+config NAND_SUNXI_SPL_ECC_STRENGTH
+       int "Allwinner NAND SPL ECC Strength"
+       default 64
+
+config NAND_SUNXI_SPL_ECC_SIZE
+       int "Allwinner NAND SPL ECC Step Size"
+       default 1024
+
+config NAND_SUNXI_SPL_USABLE_PAGE_SIZE
+       int "Allwinner NAND SPL Usable Page Size"
+       default 1024
+
+endif
+
 config NAND_ARASAN
        bool "Configure Arasan Nand"
+       imply CMD_NAND
        help
          This enables Nand driver support for Arasan nand flash
          controller. This uses the hardware ECC for read and
@@ -82,7 +114,8 @@ config NAND_ARASAN
 
 config NAND_MXS
        bool "MXS NAND support"
-       depends on MX6
+       depends on MX6 || MX7
+       imply CMD_NAND
        help
          This enables NAND driver for the NAND flash controller on the
          MXS processors.
@@ -90,6 +123,7 @@ config NAND_MXS
 config NAND_ZYNQ
        bool "Support for Zynq Nand controller"
        select SYS_NAND_SELF_INIT
+       imply CMD_NAND
        help
          This enables Nand driver support for Nand flash controller
          found on Zynq SoC.
@@ -127,7 +161,7 @@ config SYS_NAND_U_BOOT_LOCATIONS
 
 config SYS_NAND_U_BOOT_OFFS
        hex "Location in NAND to read U-Boot from"
-       default 0x8000 if NAND_SUNXI
+       default 0x800000 if NAND_SUNXI
        depends on SYS_NAND_U_BOOT_LOCATIONS
        help
        Set the offset from the start of the nand where u-boot should be
@@ -149,4 +183,4 @@ config SPL_NAND_DENALI
 
 endif
 
-endmenu
+endif   # if NAND