Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 1 | |
Miquel Raynal | d093536 | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 2 | menuconfig MTD_RAW_NAND |
Miquel Raynal | 8115c45 | 2018-08-16 17:30:08 +0200 | [diff] [blame] | 3 | bool "Raw NAND Device Support" |
Miquel Raynal | d093536 | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 4 | if MTD_RAW_NAND |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 5 | |
| 6 | config SYS_NAND_SELF_INIT |
| 7 | bool |
| 8 | help |
| 9 | This option, if enabled, provides more flexible and linux-like |
| 10 | NAND initialization process. |
| 11 | |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 12 | config SPL_SYS_NAND_SELF_INIT |
| 13 | bool |
| 14 | depends on !SPL_NAND_SIMPLE |
| 15 | help |
| 16 | This option, if enabled, provides more flexible and linux-like |
| 17 | NAND initialization process, in SPL. |
| 18 | |
| 19 | config TPL_SYS_NAND_SELF_INIT |
| 20 | bool |
| 21 | depends on TPL_NAND_SUPPORT |
| 22 | help |
| 23 | This option, if enabled, provides more flexible and linux-like |
| 24 | NAND initialization process, in SPL. |
| 25 | |
Tom Rini | 1a9f23d | 2022-05-26 14:31:57 -0400 | [diff] [blame] | 26 | config TPL_NAND_INIT |
| 27 | bool |
| 28 | |
Tom Rini | ac164de | 2022-10-28 20:27:04 -0400 | [diff] [blame] | 29 | config SYS_MAX_NAND_DEVICE |
| 30 | int "Maximum number of NAND devices to support" |
| 31 | default 1 |
| 32 | |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 33 | config SYS_NAND_DRIVER_ECC_LAYOUT |
Tom Rini | d03e14e | 2021-12-11 14:55:54 -0500 | [diff] [blame] | 34 | bool "Omit standard ECC layouts to save space" |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 35 | help |
Tom Rini | d03e14e | 2021-12-11 14:55:54 -0500 | [diff] [blame] | 36 | Omit standard ECC layouts to save space. Select this if your driver |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 37 | is known to provide its own ECC layout. |
| 38 | |
Stefan Roese | 23b37f9 | 2019-08-22 12:28:04 +0200 | [diff] [blame] | 39 | config SYS_NAND_USE_FLASH_BBT |
| 40 | bool "Enable BBT (Bad Block Table) support" |
| 41 | help |
| 42 | Enable the BBT (Bad Block Table) usage. |
| 43 | |
Tom Rini | 2b2696a | 2022-11-12 17:36:48 -0500 | [diff] [blame] | 44 | config SYS_NAND_NO_SUBPAGE_WRITE |
| 45 | bool "Disable subpage write support" |
| 46 | depends on NAND_ARASAN || NAND_DAVINCI || NAND_KIRKWOOD |
| 47 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 48 | config NAND_ATMEL |
| 49 | bool "Support Atmel NAND controller" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 50 | select SYS_NAND_SELF_INIT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 51 | imply SYS_NAND_USE_FLASH_BBT |
| 52 | help |
| 53 | Enable this driver for NAND flash platforms using an Atmel NAND |
| 54 | controller. |
| 55 | |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 56 | if NAND_ATMEL |
| 57 | |
| 58 | config ATMEL_NAND_HWECC |
| 59 | bool "Atmel Hardware ECC" |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 60 | |
| 61 | config ATMEL_NAND_HW_PMECC |
| 62 | bool "Atmel Programmable Multibit ECC (PMECC)" |
| 63 | select ATMEL_NAND_HWECC |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 64 | help |
| 65 | The Programmable Multibit ECC (PMECC) controller is a programmable |
| 66 | binary BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. |
| 67 | |
| 68 | config PMECC_CAP |
| 69 | int "PMECC Correctable ECC Bits" |
| 70 | depends on ATMEL_NAND_HW_PMECC |
| 71 | default 2 |
| 72 | help |
| 73 | Correctable ECC bits, can be 2, 4, 8, 12, and 24. |
| 74 | |
| 75 | config PMECC_SECTOR_SIZE |
| 76 | int "PMECC Sector Size" |
| 77 | depends on ATMEL_NAND_HW_PMECC |
| 78 | default 512 |
| 79 | help |
| 80 | Sector size, in bytes, can be 512 or 1024. |
| 81 | |
| 82 | config SPL_GENERATE_ATMEL_PMECC_HEADER |
| 83 | bool "Atmel PMECC Header Generation" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 84 | depends on SPL |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 85 | select ATMEL_NAND_HWECC |
| 86 | select ATMEL_NAND_HW_PMECC |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 87 | help |
| 88 | Generate Programmable Multibit ECC (PMECC) header for SPL image. |
| 89 | |
Tom Rini | 70aa87d | 2022-11-12 17:36:42 -0500 | [diff] [blame] | 90 | choice |
| 91 | prompt "NAND bus width (bits)" |
| 92 | default SYS_NAND_DBW_8 |
| 93 | |
| 94 | config SYS_NAND_DBW_8 |
| 95 | bool "NAND bus width is 8 bits" |
| 96 | |
| 97 | config SYS_NAND_DBW_16 |
| 98 | bool "NAND bus width is 16 bits" |
| 99 | |
| 100 | endchoice |
| 101 | |
Derald D. Woods | 7830fc5 | 2018-12-15 01:36:46 -0600 | [diff] [blame] | 102 | endif |
| 103 | |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 104 | config NAND_BRCMNAND |
| 105 | bool "Support Broadcom NAND controller" |
Miquel Raynal | a903be4 | 2019-10-03 19:50:04 +0200 | [diff] [blame] | 106 | depends on OF_CONTROL && DM && DM_MTD |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 107 | select SYS_NAND_SELF_INIT |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 108 | help |
| 109 | Enable the driver for NAND flash on platforms using a Broadcom NAND |
| 110 | controller. |
| 111 | |
Álvaro Fernández Rojas | d9f9bfc | 2019-08-28 19:12:15 +0200 | [diff] [blame] | 112 | config NAND_BRCMNAND_6368 |
| 113 | bool "Support Broadcom NAND controller on bcm6368" |
| 114 | depends on NAND_BRCMNAND && ARCH_BMIPS |
| 115 | help |
| 116 | Enable support for broadcom nand driver on bcm6368. |
| 117 | |
Philippe Reynes | e175c32 | 2022-02-11 19:18:36 +0100 | [diff] [blame] | 118 | config NAND_BRCMNAND_6753 |
| 119 | bool "Support Broadcom NAND controller on bcm6753" |
William Zhang | 3892182 | 2022-08-22 11:49:08 -0700 | [diff] [blame] | 120 | depends on NAND_BRCMNAND && BCM6855 |
Philippe Reynes | e175c32 | 2022-02-11 19:18:36 +0100 | [diff] [blame] | 121 | help |
| 122 | Enable support for broadcom nand driver on bcm6753. |
| 123 | |
Philippe Reynes | 74ead74 | 2020-01-07 20:14:13 +0100 | [diff] [blame] | 124 | config NAND_BRCMNAND_68360 |
| 125 | bool "Support Broadcom NAND controller on bcm68360" |
William Zhang | df0b5bb | 2022-08-22 11:31:43 -0700 | [diff] [blame] | 126 | depends on NAND_BRCMNAND && BCM6856 |
Philippe Reynes | 74ead74 | 2020-01-07 20:14:13 +0100 | [diff] [blame] | 127 | help |
| 128 | Enable support for broadcom nand driver on bcm68360. |
| 129 | |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 130 | config NAND_BRCMNAND_6838 |
| 131 | bool "Support Broadcom NAND controller on bcm6838" |
| 132 | depends on NAND_BRCMNAND && ARCH_BMIPS && SOC_BMIPS_BCM6838 |
| 133 | help |
| 134 | Enable support for broadcom nand driver on bcm6838. |
| 135 | |
| 136 | config NAND_BRCMNAND_6858 |
| 137 | bool "Support Broadcom NAND controller on bcm6858" |
William Zhang | 6b45fa6 | 2022-08-22 11:39:45 -0700 | [diff] [blame] | 138 | depends on NAND_BRCMNAND && BCM6858 |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 139 | help |
| 140 | Enable support for broadcom nand driver on bcm6858. |
| 141 | |
| 142 | config NAND_BRCMNAND_63158 |
| 143 | bool "Support Broadcom NAND controller on bcm63158" |
William Zhang | 35a3ec1b | 2022-08-22 11:19:46 -0700 | [diff] [blame] | 144 | depends on NAND_BRCMNAND && BCM63158 |
Philippe Reynes | 5aa6cfb | 2019-03-15 15:14:36 +0100 | [diff] [blame] | 145 | help |
| 146 | Enable support for broadcom nand driver on bcm63158. |
| 147 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 148 | config NAND_DAVINCI |
| 149 | bool "Support TI Davinci NAND controller" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 150 | select SYS_NAND_SELF_INIT if TARGET_DA850EVM |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 151 | help |
| 152 | Enable this driver for NAND flash controllers available in TI Davinci |
| 153 | and Keystone2 platforms |
| 154 | |
Tom Rini | d1286e1 | 2022-11-12 17:36:45 -0500 | [diff] [blame] | 155 | choice |
| 156 | prompt "Type of ECC used on NAND" |
| 157 | default SYS_NAND_4BIT_HW_ECC_OOBFIRST |
| 158 | depends on NAND_DAVINCI |
| 159 | |
| 160 | config SYS_NAND_HW_ECC |
| 161 | bool "Use 1-bit HW ECC" |
| 162 | |
Tom Rini | 7f750f8 | 2022-10-28 20:27:11 -0400 | [diff] [blame] | 163 | config SYS_NAND_4BIT_HW_ECC_OOBFIRST |
| 164 | bool "Use 4-bit HW ECC with OOB at the front" |
Tom Rini | d1286e1 | 2022-11-12 17:36:45 -0500 | [diff] [blame] | 165 | |
| 166 | config SYS_NAND_SOFT_ECC |
| 167 | bool "Use software ECC" |
| 168 | |
| 169 | endchoice |
Tom Rini | 7f750f8 | 2022-10-28 20:27:11 -0400 | [diff] [blame] | 170 | |
Tom Rini | 33adefd | 2022-11-12 17:36:49 -0500 | [diff] [blame] | 171 | choice |
| 172 | prompt "NAND page size" |
| 173 | depends on NAND_DAVINCI |
| 174 | default SYS_NAND_PAGE_2K |
| 175 | |
| 176 | config SYS_NAND_PAGE_2K |
| 177 | bool "Page size is 2K" |
| 178 | |
| 179 | config SYS_NAND_PAGE_4K |
| 180 | bool "Page size is 4K" |
| 181 | |
| 182 | endchoice |
| 183 | |
Tom Rini | dada0e3 | 2021-09-12 20:32:24 -0400 | [diff] [blame] | 184 | config KEYSTONE_RBL_NAND |
| 185 | depends on ARCH_KEYSTONE |
| 186 | def_bool y |
| 187 | |
Tom Rini | fae1dab | 2021-09-22 14:50:29 -0400 | [diff] [blame] | 188 | config SPL_NAND_LOAD |
| 189 | def_bool y |
| 190 | depends on NAND_DAVINCI && ARCH_DAVINCI && SPL_NAND_SUPPORT |
| 191 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 192 | config NAND_DENALI |
| 193 | bool |
| 194 | select SYS_NAND_SELF_INIT |
| 195 | imply CMD_NAND |
| 196 | |
| 197 | config NAND_DENALI_DT |
| 198 | bool "Support Denali NAND controller as a DT device" |
| 199 | select NAND_DENALI |
Lokanathan, Raaj | 791edf7 | 2022-12-11 23:37:42 +0800 | [diff] [blame] | 200 | select SPL_SYS_NAND_SELF_INIT |
Masahiro Yamada | 8fc5382 | 2020-01-30 22:07:59 +0900 | [diff] [blame] | 201 | depends on OF_CONTROL && DM_MTD |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 202 | help |
| 203 | Enable the driver for NAND flash on platforms using a Denali NAND |
| 204 | controller as a DT device. |
| 205 | |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 206 | config NAND_FSL_ELBC |
| 207 | bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 208 | select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT |
| 209 | select SPL_SYS_NAND_SELF_INIT |
| 210 | select SYS_NAND_SELF_INIT |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 211 | depends on FSL_ELBC |
| 212 | help |
| 213 | Enable the Freescale Enhanced Local Bus Controller FCM NAND driver. |
| 214 | |
Pali Rohár | bb834db | 2022-04-04 18:17:19 +0200 | [diff] [blame] | 215 | config NAND_FSL_ELBC_DT |
| 216 | bool "Support Freescale Enhanced Local Bus Controller FCM NAND driver (DT mode)" |
| 217 | depends on NAND_FSL_ELBC |
| 218 | |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 219 | config NAND_FSL_IFC |
| 220 | bool "Support Freescale Integrated Flash Controller NAND driver" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 221 | select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT |
Tom Rini | 1a9f23d | 2022-05-26 14:31:57 -0400 | [diff] [blame] | 222 | select TPL_NAND_INIT if TPL && !TPL_FRAMEWORK |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 223 | select SPL_SYS_NAND_SELF_INIT |
| 224 | select SYS_NAND_SELF_INIT |
Tom Rini | 05b419e | 2021-12-11 14:55:49 -0500 | [diff] [blame] | 225 | select FSL_IFC |
Tom Rini | a73788c | 2021-09-22 14:50:37 -0400 | [diff] [blame] | 226 | help |
| 227 | Enable the Freescale Integrated Flash Controller NAND driver. |
| 228 | |
Tom Rini | b91baf6 | 2022-11-19 18:45:29 -0500 | [diff] [blame] | 229 | config NAND_KIRKWOOD |
| 230 | bool "Support for Kirkwood NAND controller" |
| 231 | depends on ARCH_KIRKWOOD |
| 232 | default y |
| 233 | |
| 234 | config NAND_ECC_BCH |
| 235 | bool |
| 236 | |
| 237 | config NAND_KMETER1 |
| 238 | bool "Support KMETER1 NAND controller" |
| 239 | depends on VENDOR_KM |
| 240 | select NAND_ECC_BCH |
| 241 | |
Tom Rini | 0820427 | 2021-09-22 14:50:28 -0400 | [diff] [blame] | 242 | config NAND_LPC32XX_MLC |
| 243 | bool "Support LPC32XX_MLC controller" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 244 | select SYS_NAND_SELF_INIT |
Tom Rini | 0820427 | 2021-09-22 14:50:28 -0400 | [diff] [blame] | 245 | help |
| 246 | Enable the LPC32XX MLC NAND controller. |
| 247 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 248 | config NAND_LPC32XX_SLC |
| 249 | bool "Support LPC32XX_SLC controller" |
| 250 | help |
| 251 | Enable the LPC32XX SLC NAND controller. |
| 252 | |
| 253 | config NAND_OMAP_GPMC |
| 254 | bool "Support OMAP GPMC NAND controller" |
Roger Quadros | 0bde497 | 2022-10-11 14:50:00 +0300 | [diff] [blame] | 255 | depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 256 | help |
| 257 | Enables omap_gpmc.c driver for OMAPx and AMxxxx platforms. |
| 258 | GPMC controller is used for parallel NAND flash devices, and can |
| 259 | do ECC calculation (not ECC error detection) for HAM1, BCH4, BCH8 |
| 260 | and BCH16 ECC algorithms. |
| 261 | |
Tom Rini | f6d26d8 | 2021-09-22 14:50:39 -0400 | [diff] [blame] | 262 | if NAND_OMAP_GPMC |
| 263 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 264 | config NAND_OMAP_GPMC_PREFETCH |
| 265 | bool "Enable GPMC Prefetch" |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 266 | default y |
| 267 | help |
| 268 | On OMAP platforms that use the GPMC controller |
| 269 | (CONFIG_NAND_OMAP_GPMC_PREFETCH), this options enables the code that |
| 270 | uses the prefetch mode to speed up read operations. |
| 271 | |
| 272 | config NAND_OMAP_ELM |
| 273 | bool "Enable ELM driver for OMAPxx and AMxx platforms." |
Tom Rini | f6d26d8 | 2021-09-22 14:50:39 -0400 | [diff] [blame] | 274 | depends on !OMAP34XX |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 275 | help |
| 276 | ELM controller is used for ECC error detection (not ECC calculation) |
| 277 | of BCH4, BCH8 and BCH16 ECC algorithms. |
| 278 | Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine, |
| 279 | thus such SoC platforms need to depend on software library for ECC error |
| 280 | detection. However ECC calculation on such plaforms would still be |
| 281 | done by GPMC controller. |
| 282 | |
Tom Rini | f6d26d8 | 2021-09-22 14:50:39 -0400 | [diff] [blame] | 283 | choice |
| 284 | prompt "ECC scheme" |
| 285 | default NAND_OMAP_ECCSCHEME_BCH8_CODE_HW |
| 286 | help |
| 287 | On OMAP platforms, this CONFIG specifies NAND ECC scheme. |
| 288 | It can take following values: |
| 289 | OMAP_ECC_HAM1_CODE_SW |
| 290 | 1-bit Hamming code using software lib. |
| 291 | (for legacy devices only) |
| 292 | OMAP_ECC_HAM1_CODE_HW |
| 293 | 1-bit Hamming code using GPMC hardware. |
| 294 | (for legacy devices only) |
| 295 | OMAP_ECC_BCH4_CODE_HW_DETECTION_SW |
| 296 | 4-bit BCH code (unsupported) |
| 297 | OMAP_ECC_BCH4_CODE_HW |
| 298 | 4-bit BCH code (unsupported) |
| 299 | OMAP_ECC_BCH8_CODE_HW_DETECTION_SW |
| 300 | 8-bit BCH code with |
| 301 | - ecc calculation using GPMC hardware engine, |
| 302 | - error detection using software library. |
| 303 | - requires CONFIG_BCH to enable software BCH library |
| 304 | (For legacy device which do not have ELM h/w engine) |
| 305 | OMAP_ECC_BCH8_CODE_HW |
| 306 | 8-bit BCH code with |
| 307 | - ecc calculation using GPMC hardware engine, |
| 308 | - error detection using ELM hardware engine. |
| 309 | OMAP_ECC_BCH16_CODE_HW |
| 310 | 16-bit BCH code with |
| 311 | - ecc calculation using GPMC hardware engine, |
| 312 | - error detection using ELM hardware engine. |
| 313 | |
| 314 | How to select ECC scheme on OMAP and AMxx platforms ? |
| 315 | ----------------------------------------------------- |
| 316 | Though higher ECC schemes have more capability to detect and correct |
| 317 | bit-flips, but still selection of ECC scheme is dependent on following |
| 318 | - hardware engines present in SoC. |
| 319 | Some legacy OMAP SoC do not have ELM h/w engine thus such |
| 320 | SoC cannot support BCHx_HW ECC schemes. |
| 321 | - size of OOB/Spare region |
| 322 | With higher ECC schemes, more OOB/Spare area is required to |
| 323 | store ECC. So choice of ECC scheme is limited by NAND oobsize. |
| 324 | |
| 325 | In general following expression can help: |
| 326 | NAND_OOBSIZE >= 2 + (NAND_PAGESIZE / 512) * ECC_BYTES |
| 327 | where |
| 328 | NAND_OOBSIZE = number of bytes available in |
| 329 | OOB/spare area per NAND page. |
| 330 | NAND_PAGESIZE = bytes in main-area of NAND page. |
| 331 | ECC_BYTES = number of ECC bytes generated to |
| 332 | protect 512 bytes of data, which is: |
| 333 | 3 for HAM1_xx ecc schemes |
| 334 | 7 for BCH4_xx ecc schemes |
| 335 | 14 for BCH8_xx ecc schemes |
| 336 | 26 for BCH16_xx ecc schemes |
| 337 | |
| 338 | example to check for BCH16 on 2K page NAND |
| 339 | NAND_PAGESIZE = 2048 |
| 340 | NAND_OOBSIZE = 64 |
| 341 | 2 + (2048 / 512) * 26 = 106 > NAND_OOBSIZE |
| 342 | Thus BCH16 cannot be supported on 2K page NAND. |
| 343 | |
| 344 | However, for 4K pagesize NAND |
| 345 | NAND_PAGESIZE = 4096 |
| 346 | NAND_OOBSIZE = 224 |
| 347 | ECC_BYTES = 26 |
| 348 | 2 + (4096 / 512) * 26 = 210 < NAND_OOBSIZE |
| 349 | Thus BCH16 can be supported on 4K page NAND. |
| 350 | |
| 351 | config NAND_OMAP_ECCSCHEME_HAM1_CODE_SW |
| 352 | bool "1-bit Hamming code using software lib" |
| 353 | |
| 354 | config NAND_OMAP_ECCSCHEME_HAM1_CODE_HW |
| 355 | bool "1-bit Hamming code using GPMC hardware" |
| 356 | |
| 357 | config NAND_OMAP_ECCSCHEME_BCH8_CODE_HW_DETECTION_SW |
| 358 | bool "8-bit BCH code with HW calculation SW error detection" |
| 359 | |
| 360 | config NAND_OMAP_ECCSCHEME_BCH8_CODE_HW |
| 361 | bool "8-bit BCH code with HW calculation and error detection" |
| 362 | |
| 363 | config NAND_OMAP_ECCSCHEME_BCH16_CODE_HW |
| 364 | bool "16-bit BCH code with HW calculation and error detection" |
| 365 | |
| 366 | endchoice |
| 367 | |
| 368 | config NAND_OMAP_ECCSCHEME |
| 369 | int |
| 370 | default 1 if NAND_OMAP_ECCSCHEME_HAM1_CODE_SW |
| 371 | default 2 if NAND_OMAP_ECCSCHEME_HAM1_CODE_HW |
| 372 | default 5 if NAND_OMAP_ECCSCHEME_BCH8_CODE_HW_DETECTION_SW |
| 373 | default 6 if NAND_OMAP_ECCSCHEME_BCH8_CODE_HW |
| 374 | default 7 if NAND_OMAP_ECCSCHEME_BCH16_CODE_HW |
| 375 | help |
| 376 | This must be kept in sync with the enum in |
| 377 | include/linux/mtd/omap_gpmc.h |
| 378 | |
| 379 | endif |
| 380 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 381 | config NAND_VF610_NFC |
| 382 | bool "Support for Freescale NFC for VF610" |
| 383 | select SYS_NAND_SELF_INIT |
Stefan Agner | bd18614 | 2018-12-06 14:57:09 +0100 | [diff] [blame] | 384 | select SYS_NAND_DRIVER_ECC_LAYOUT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 385 | imply CMD_NAND |
| 386 | help |
| 387 | Enables support for NAND Flash Controller on some Freescale |
| 388 | processors like the VF610, MCF54418 or Kinetis K70. |
| 389 | The driver supports a maximum 2k page size. The driver |
| 390 | currently does not support hardware ECC. |
| 391 | |
Lukasz Majewski | f006cb3 | 2018-12-03 10:24:50 +0100 | [diff] [blame] | 392 | if NAND_VF610_NFC |
| 393 | |
| 394 | config NAND_VF610_NFC_DT |
| 395 | bool "Support Vybrid's vf610 NAND controller as a DT device" |
Miquel Raynal | a903be4 | 2019-10-03 19:50:04 +0200 | [diff] [blame] | 396 | depends on OF_CONTROL && DM_MTD |
Lukasz Majewski | f006cb3 | 2018-12-03 10:24:50 +0100 | [diff] [blame] | 397 | help |
| 398 | Enable the driver for Vybrid's vf610 NAND flash on platforms |
| 399 | using device tree. |
| 400 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 401 | choice |
| 402 | prompt "Hardware ECC strength" |
| 403 | depends on NAND_VF610_NFC |
| 404 | default SYS_NAND_VF610_NFC_45_ECC_BYTES |
| 405 | help |
| 406 | Select the ECC strength used in the hardware BCH ECC block. |
| 407 | |
| 408 | config SYS_NAND_VF610_NFC_45_ECC_BYTES |
| 409 | bool "24-error correction (45 ECC bytes)" |
| 410 | |
| 411 | config SYS_NAND_VF610_NFC_60_ECC_BYTES |
| 412 | bool "32-error correction (60 ECC bytes)" |
| 413 | |
| 414 | endchoice |
| 415 | |
Lukasz Majewski | f006cb3 | 2018-12-03 10:24:50 +0100 | [diff] [blame] | 416 | endif |
| 417 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 418 | config NAND_PXA3XX |
| 419 | bool "Support for NAND on PXA3xx and Armada 370/XP/38x" |
| 420 | select SYS_NAND_SELF_INIT |
Shmuel Hazan | 759349e | 2020-10-29 08:52:18 +0200 | [diff] [blame] | 421 | select DM_MTD |
Shmuel Hazan | 5898322 | 2020-10-29 08:52:20 +0200 | [diff] [blame] | 422 | select REGMAP |
| 423 | select SYSCON |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 424 | imply CMD_NAND |
| 425 | help |
| 426 | This enables the driver for the NAND flash device found on |
| 427 | PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2). |
| 428 | |
| 429 | config NAND_SUNXI |
| 430 | bool "Support for NAND on Allwinner SoCs" |
| 431 | default ARCH_SUNXI |
| 432 | depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I |
| 433 | select SYS_NAND_SELF_INIT |
| 434 | select SYS_NAND_U_BOOT_LOCATIONS |
| 435 | select SPL_NAND_SUPPORT |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 436 | select SPL_SYS_NAND_SELF_INIT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 437 | imply CMD_NAND |
| 438 | ---help--- |
| 439 | Enable support for NAND. This option enables the standard and |
| 440 | SPL drivers. |
| 441 | The SPL driver only supports reading from the NAND using DMA |
| 442 | transfers. |
| 443 | |
| 444 | if NAND_SUNXI |
| 445 | |
| 446 | config NAND_SUNXI_SPL_ECC_STRENGTH |
| 447 | int "Allwinner NAND SPL ECC Strength" |
| 448 | default 64 |
| 449 | |
| 450 | config NAND_SUNXI_SPL_ECC_SIZE |
| 451 | int "Allwinner NAND SPL ECC Step Size" |
| 452 | default 1024 |
| 453 | |
| 454 | config NAND_SUNXI_SPL_USABLE_PAGE_SIZE |
| 455 | int "Allwinner NAND SPL Usable Page Size" |
| 456 | default 1024 |
| 457 | |
| 458 | endif |
| 459 | |
| 460 | config NAND_ARASAN |
| 461 | bool "Configure Arasan Nand" |
| 462 | select SYS_NAND_SELF_INIT |
Michal Simek | c558783 | 2020-08-19 09:59:52 +0200 | [diff] [blame] | 463 | depends on DM_MTD |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 464 | imply CMD_NAND |
| 465 | help |
| 466 | This enables Nand driver support for Arasan nand flash |
| 467 | controller. This uses the hardware ECC for read and |
| 468 | write operations. |
| 469 | |
| 470 | config NAND_MXC |
| 471 | bool "MXC NAND support" |
| 472 | depends on CPU_ARM926EJS || CPU_ARM1136 || MX5 |
| 473 | imply CMD_NAND |
| 474 | help |
| 475 | This enables the NAND driver for the NAND flash controller on the |
Haolin Li | e8df55b | 2021-07-18 10:13:39 +0800 | [diff] [blame] | 476 | i.MX27 / i.MX31 / i.MX5 processors. |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 477 | |
Tom Rini | 1ba2a00 | 2022-11-12 17:36:50 -0500 | [diff] [blame] | 478 | config SYS_NAND_SIZE |
| 479 | int "Size of NAND in kilobytes" |
| 480 | depends on NAND_MXC && SPL_NAND_SUPPORT |
| 481 | default 268435456 |
| 482 | |
Tom Rini | 17e6700 | 2022-12-02 16:42:37 -0500 | [diff] [blame] | 483 | config MXC_NAND_HWECC |
| 484 | bool "Hardware ECC support in MXC NAND" |
| 485 | depends on NAND_MXC |
| 486 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 487 | config NAND_MXS |
| 488 | bool "MXS NAND support" |
Peng Fan | 128abf4 | 2020-05-04 22:09:00 +0800 | [diff] [blame] | 489 | depends on MX23 || MX28 || MX6 || MX7 || IMX8 || IMX8M |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 490 | select SPL_SYS_NAND_SELF_INIT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 491 | select SYS_NAND_SELF_INIT |
| 492 | imply CMD_NAND |
| 493 | select APBH_DMA |
Peng Fan | 128abf4 | 2020-05-04 22:09:00 +0800 | [diff] [blame] | 494 | select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M |
| 495 | select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7 || ARCH_IMX8 || ARCH_IMX8M |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 496 | help |
| 497 | This enables NAND driver for the NAND flash controller on the |
| 498 | MXS processors. |
| 499 | |
| 500 | if NAND_MXS |
| 501 | |
| 502 | config NAND_MXS_DT |
| 503 | bool "Support MXS NAND controller as a DT device" |
Miquel Raynal | a903be4 | 2019-10-03 19:50:04 +0200 | [diff] [blame] | 504 | depends on OF_CONTROL && DM_MTD |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 505 | help |
| 506 | Enable the driver for MXS NAND flash on platforms using |
| 507 | device tree. |
| 508 | |
| 509 | config NAND_MXS_USE_MINIMUM_ECC |
| 510 | bool "Use minimum ECC strength supported by the controller" |
| 511 | default false |
| 512 | |
| 513 | endif |
| 514 | |
Zhengxun Li | 0155171 | 2021-09-14 13:43:51 +0800 | [diff] [blame] | 515 | config NAND_MXIC |
| 516 | bool "Macronix raw NAND controller" |
| 517 | select SYS_NAND_SELF_INIT |
| 518 | help |
| 519 | This selects the Macronix raw NAND controller driver. |
| 520 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 521 | config NAND_ZYNQ |
| 522 | bool "Support for Zynq Nand controller" |
Tom Rini | 9837245 | 2021-12-12 22:12:36 -0500 | [diff] [blame] | 523 | select SPL_SYS_NAND_SELF_INIT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 524 | select SYS_NAND_SELF_INIT |
Ashok Reddy Soma | bb8448a | 2019-12-27 04:47:12 -0700 | [diff] [blame] | 525 | select DM_MTD |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 526 | imply CMD_NAND |
| 527 | help |
| 528 | This enables Nand driver support for Nand flash controller |
| 529 | found on Zynq SoC. |
| 530 | |
| 531 | config NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS |
| 532 | bool "Enable use of 1st stage bootloader timing for NAND" |
| 533 | depends on NAND_ZYNQ |
| 534 | help |
| 535 | This flag prevent U-boot reconfigure NAND flash controller and reuse |
| 536 | the NAND timing from 1st stage bootloader. |
| 537 | |
Suneel Garapati | 9de7d2b | 2020-08-26 14:37:22 +0200 | [diff] [blame] | 538 | config NAND_OCTEONTX |
| 539 | bool "Support for OcteonTX NAND controller" |
| 540 | select SYS_NAND_SELF_INIT |
| 541 | imply CMD_NAND |
| 542 | help |
| 543 | This enables Nand flash controller hardware found on the OcteonTX |
| 544 | processors. |
| 545 | |
| 546 | config NAND_OCTEONTX_HW_ECC |
| 547 | bool "Support Hardware ECC for OcteonTX NAND controller" |
| 548 | depends on NAND_OCTEONTX |
| 549 | default y |
| 550 | help |
| 551 | This enables Hardware BCH engine found on the OcteonTX processors to |
| 552 | support ECC for NAND flash controller. |
| 553 | |
Christophe Kerello | da14168 | 2019-04-05 11:41:50 +0200 | [diff] [blame] | 554 | config NAND_STM32_FMC2 |
| 555 | bool "Support for NAND controller on STM32MP SoCs" |
| 556 | depends on ARCH_STM32MP |
| 557 | select SYS_NAND_SELF_INIT |
| 558 | imply CMD_NAND |
| 559 | help |
| 560 | Enables support for NAND Flash chips on SoCs containing the FMC2 |
| 561 | NAND controller. This controller is found on STM32MP SoCs. |
| 562 | The controller supports a maximum 8k page size and supports |
| 563 | a maximum 8-bit correction error per sector of 512 bytes. |
| 564 | |
Kate Liu | 41ccd2e | 2020-12-11 13:46:12 -0800 | [diff] [blame] | 565 | config CORTINA_NAND |
| 566 | bool "Support for NAND controller on Cortina-Access SoCs" |
| 567 | depends on CORTINA_PLATFORM |
| 568 | select SYS_NAND_SELF_INIT |
| 569 | select DM_MTD |
| 570 | imply CMD_NAND |
| 571 | help |
| 572 | Enables support for NAND Flash chips on Coartina-Access SoCs platform |
| 573 | This controller is found on Presidio/Venus SoCs. |
| 574 | The controller supports a maximum 8k page size and supports |
| 575 | a maximum 40-bit error correction per sector of 1024 bytes. |
| 576 | |
Yifeng Zhao | 9e9021e | 2021-06-07 16:40:29 +0800 | [diff] [blame] | 577 | config ROCKCHIP_NAND |
| 578 | bool "Support for NAND controller on Rockchip SoCs" |
| 579 | depends on ARCH_ROCKCHIP |
| 580 | select SYS_NAND_SELF_INIT |
| 581 | select DM_MTD |
| 582 | imply CMD_NAND |
| 583 | help |
| 584 | Enables support for NAND Flash chips on Rockchip SoCs platform. |
| 585 | This controller is found on Rockchip SoCs. |
| 586 | There are four different versions of NAND FLASH Controllers, |
| 587 | including: |
| 588 | NFC v600: RK2928, RK3066, RK3188 |
| 589 | NFC v622: RK3036, RK3128 |
| 590 | NFC v800: RK3308, RV1108 |
| 591 | NFC v900: PX30, RK3326 |
| 592 | |
Tom Rini | 8f37ac4 | 2021-12-12 22:12:35 -0500 | [diff] [blame] | 593 | config TEGRA_NAND |
| 594 | bool "Support for NAND controller on Tegra SoCs" |
| 595 | depends on ARCH_TEGRA |
| 596 | select SYS_NAND_SELF_INIT |
| 597 | imply CMD_NAND |
| 598 | help |
| 599 | Enables support for NAND Flash chips on Tegra SoCs platforms. |
| 600 | |
developer | 10a61df | 2022-05-20 11:23:47 +0800 | [diff] [blame] | 601 | config NAND_MT7621 |
| 602 | bool "Support for MediaTek MT7621 NAND flash controller" |
| 603 | depends on SOC_MT7621 |
| 604 | select SYS_NAND_SELF_INIT |
| 605 | select SPL_SYS_NAND_SELF_INIT |
| 606 | imply CMD_NAND |
| 607 | help |
| 608 | This enables NAND driver for the NAND flash controller on MediaTek |
| 609 | MT7621 platform. |
| 610 | The controller supports 4~12 bits correction per 512 bytes with a |
| 611 | maximum 4KB page size. |
| 612 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 613 | comment "Generic NAND options" |
| 614 | |
| 615 | config SYS_NAND_BLOCK_SIZE |
| 616 | hex "NAND chip eraseblock size" |
Tom Rini | fae1dab | 2021-09-22 14:50:29 -0400 | [diff] [blame] | 617 | depends on ARCH_SUNXI || SPL_NAND_SUPPORT || TPL_NAND_SUPPORT |
developer | 10a61df | 2022-05-20 11:23:47 +0800 | [diff] [blame] | 618 | depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && \ |
| 619 | !NAND_FSL_IFC && !NAND_MT7621 |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 620 | help |
| 621 | Number of data bytes in one eraseblock for the NAND chip on the |
| 622 | board. This is the multiple of NAND_PAGE_SIZE and the number of |
| 623 | pages. |
| 624 | |
Tom Rini | fdae007 | 2021-09-22 14:50:34 -0400 | [diff] [blame] | 625 | config SYS_NAND_ONFI_DETECTION |
| 626 | bool "Enable detection of ONFI compliant devices during probe" |
| 627 | help |
| 628 | Enables detection of ONFI compliant devices during probe. |
| 629 | And fetching device parameters flashed on device, by parsing |
| 630 | ONFI parameter page. |
| 631 | |
Tom Rini | 2510a81 | 2021-09-22 14:50:30 -0400 | [diff] [blame] | 632 | config SYS_NAND_PAGE_COUNT |
| 633 | hex "NAND chip page count" |
| 634 | depends on SPL_NAND_SUPPORT && (NAND_ATMEL || NAND_MXC || \ |
| 635 | SPL_NAND_AM33XX_BCH || SPL_NAND_LOAD || SPL_NAND_SIMPLE) |
| 636 | help |
| 637 | Number of pages in the NAND chip. |
| 638 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 639 | config SYS_NAND_PAGE_SIZE |
| 640 | hex "NAND chip page size" |
Tom Rini | fae1dab | 2021-09-22 14:50:29 -0400 | [diff] [blame] | 641 | depends on ARCH_SUNXI || NAND_OMAP_GPMC || NAND_LPC32XX_SLC || \ |
| 642 | SPL_NAND_SIMPLE || (NAND_MXC && SPL_NAND_SUPPORT) || \ |
| 643 | (NAND_ATMEL && SPL_NAND_SUPPORT) || SPL_GENERATE_ATMEL_PMECC_HEADER |
developer | 10a61df | 2022-05-20 11:23:47 +0800 | [diff] [blame] | 644 | depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC && !NAND_MT7621 |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 645 | help |
| 646 | Number of data bytes in one page for the NAND chip on the |
| 647 | board, not including the OOB area. |
| 648 | |
| 649 | config SYS_NAND_OOBSIZE |
| 650 | hex "NAND chip OOB size" |
Tom Rini | fae1dab | 2021-09-22 14:50:29 -0400 | [diff] [blame] | 651 | depends on ARCH_SUNXI || NAND_OMAP_GPMC || NAND_LPC32XX_SLC || \ |
| 652 | SPL_NAND_SIMPLE || (NAND_MXC && SPL_NAND_SUPPORT) || \ |
| 653 | (NAND_ATMEL && SPL_NAND_SUPPORT) || SPL_GENERATE_ATMEL_PMECC_HEADER |
Tom Rini | d24700f | 2021-10-30 23:03:56 -0400 | [diff] [blame] | 654 | depends on !NAND_MXS && !NAND_DENALI_DT && !NAND_LPC32XX_MLC |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 655 | help |
| 656 | Number of bytes in the Out-Of-Band area for the NAND chip on |
| 657 | the board. |
| 658 | |
| 659 | # Enhance depends when converting drivers to Kconfig which use this config |
| 660 | # option (mxc_nand, ndfc, omap_gpmc). |
| 661 | config SYS_NAND_BUSWIDTH_16BIT |
| 662 | bool "Use 16-bit NAND interface" |
| 663 | depends on NAND_VF610_NFC || NAND_OMAP_GPMC || NAND_MXC || ARCH_DAVINCI |
| 664 | help |
| 665 | Indicates that NAND device has 16-bit wide data-bus. In absence of this |
| 666 | config, bus-width of NAND device is assumed to be either 8-bit and later |
| 667 | determined by reading ONFI params. |
| 668 | Above config is useful when NAND device's bus-width information cannot |
| 669 | be determined from on-chip ONFI params, like in following scenarios: |
| 670 | - SPL boot does not support reading of ONFI parameters. This is done to |
| 671 | keep SPL code foot-print small. |
| 672 | - In current U-Boot flow using nand_init(), driver initialization |
| 673 | happens in board_nand_init() which is called before any device probe |
| 674 | (nand_scan_ident + nand_scan_tail), thus device's ONFI parameters are |
| 675 | not available while configuring controller. So a static CONFIG_NAND_xx |
| 676 | is needed to know the device's bus-width in advance. |
| 677 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 678 | if SPL |
| 679 | |
Tom Rini | 8e6d9c7 | 2021-09-22 14:50:33 -0400 | [diff] [blame] | 680 | config SYS_NAND_5_ADDR_CYCLE |
| 681 | bool "Wait 5 address cycles during NAND commands" |
| 682 | depends on SPL_NAND_AM33XX_BCH || SPL_NAND_SIMPLE || \ |
| 683 | (SPL_NAND_SUPPORT && NAND_ATMEL) |
| 684 | default y |
| 685 | help |
| 686 | Some controllers require waiting for 5 address cycles when issuing |
| 687 | some commands, on NAND chips larger than 128MiB. |
| 688 | |
Tom Rini | a2fbd4a | 2021-09-22 14:50:32 -0400 | [diff] [blame] | 689 | choice |
Tom Rini | fdae007 | 2021-09-22 14:50:34 -0400 | [diff] [blame] | 690 | prompt "NAND bad block marker/indicator position in the OOB" |
Tom Rini | a2fbd4a | 2021-09-22 14:50:32 -0400 | [diff] [blame] | 691 | depends on SPL_NAND_AM33XX_BCH || SPL_NAND_DENALI || SPL_NAND_SIMPLE || \ |
| 692 | SPL_NAND_SUPPORT && (NAND_ATMEL || NAND_MXC) |
| 693 | default HAS_NAND_LARGE_BADBLOCK_POS |
| 694 | help |
| 695 | In the OOB, which position contains the badblock information. |
| 696 | |
| 697 | config HAS_NAND_LARGE_BADBLOCK_POS |
| 698 | bool "Set the bad block marker/indicator to the 'large' position" |
| 699 | |
| 700 | config HAS_NAND_SMALL_BADBLOCK_POS |
| 701 | bool "Set the bad block marker/indicator to the 'small' position" |
| 702 | |
| 703 | endchoice |
| 704 | |
| 705 | config SYS_NAND_BAD_BLOCK_POS |
| 706 | int |
| 707 | default 0 if HAS_NAND_LARGE_BADBLOCK_POS |
| 708 | default 5 if HAS_NAND_SMALL_BADBLOCK_POS |
| 709 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 710 | config SYS_NAND_U_BOOT_LOCATIONS |
| 711 | bool "Define U-boot binaries locations in NAND" |
| 712 | help |
| 713 | Enable CONFIG_SYS_NAND_U_BOOT_OFFS though Kconfig. |
| 714 | This option should not be enabled when compiling U-boot for boards |
| 715 | defining CONFIG_SYS_NAND_U_BOOT_OFFS in their include/configs/<board>.h |
| 716 | file. |
| 717 | |
| 718 | config SYS_NAND_U_BOOT_OFFS |
| 719 | hex "Location in NAND to read U-Boot from" |
| 720 | default 0x800000 if NAND_SUNXI |
| 721 | depends on SYS_NAND_U_BOOT_LOCATIONS |
| 722 | help |
| 723 | Set the offset from the start of the nand where u-boot should be |
| 724 | loaded from. |
| 725 | |
| 726 | config SYS_NAND_U_BOOT_OFFS_REDUND |
| 727 | hex "Location in NAND to read U-Boot from" |
| 728 | default SYS_NAND_U_BOOT_OFFS |
| 729 | depends on SYS_NAND_U_BOOT_LOCATIONS |
| 730 | help |
| 731 | Set the offset from the start of the nand where the redundant u-boot |
| 732 | should be loaded from. |
| 733 | |
| 734 | config SPL_NAND_AM33XX_BCH |
| 735 | bool "Enables SPL-NAND driver which supports ELM based" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 736 | depends on SPL_NAND_SUPPORT && NAND_OMAP_GPMC && !OMAP34XX |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 737 | default y |
| 738 | help |
| 739 | Hardware ECC correction. This is useful for platforms which have ELM |
| 740 | hardware engine and use NAND boot mode. |
| 741 | Some legacy platforms like OMAP3xx do not have in-built ELM h/w engine, |
| 742 | so those platforms should use CONFIG_SPL_NAND_SIMPLE for enabling |
| 743 | SPL-NAND driver with software ECC correction support. |
| 744 | |
| 745 | config SPL_NAND_DENALI |
| 746 | bool "Support Denali NAND controller for SPL" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 747 | depends on SPL_NAND_SUPPORT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 748 | help |
| 749 | This is a small implementation of the Denali NAND controller |
| 750 | for use on SPL. |
| 751 | |
Masahiro Yamada | 64648cb | 2020-04-17 16:51:42 +0900 | [diff] [blame] | 752 | config NAND_DENALI_SPARE_AREA_SKIP_BYTES |
| 753 | int "Number of bytes skipped in OOB area" |
| 754 | depends on SPL_NAND_DENALI |
| 755 | range 0 63 |
| 756 | help |
| 757 | This option specifies the number of bytes to skip from the beginning |
| 758 | of OOB area before last ECC sector data starts. This is potentially |
| 759 | used to preserve the bad block marker in the OOB area. |
| 760 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 761 | config SPL_NAND_SIMPLE |
| 762 | bool "Use simple SPL NAND driver" |
Tom Rini | 0a83cc2 | 2022-06-10 23:03:09 -0400 | [diff] [blame] | 763 | depends on !SPL_NAND_AM33XX_BCH && SPL_NAND_SUPPORT |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 764 | help |
| 765 | Support for NAND boot using simple NAND drivers that |
| 766 | expose the cmd_ctrl() interface. |
Tom Rini | 4251f7d | 2022-11-12 17:36:44 -0500 | [diff] [blame] | 767 | |
| 768 | config SYS_NAND_HW_ECC_OOBFIRST |
| 769 | bool "In SPL, read the OOB first and then the data from NAND" |
| 770 | depends on SPL_NAND_SIMPLE |
| 771 | |
Miquel Raynal | 1f1ae15 | 2018-08-16 17:30:07 +0200 | [diff] [blame] | 772 | endif |
| 773 | |
| 774 | endif # if NAND |