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