|
23 | 23 | * "X4" in the core is equivalent to "quad output" in the datasheets.
|
24 | 24 | */
|
25 | 25 |
|
| 26 | +static SPINAND_OP_VARIANTS(read_cache_octal_variants, |
| 27 | + SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0), |
| 28 | + SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0)); |
| 29 | + |
| 30 | +static SPINAND_OP_VARIANTS(write_cache_octal_variants, |
| 31 | + SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0)); |
| 32 | + |
| 33 | +static SPINAND_OP_VARIANTS(update_cache_octal_variants, |
| 34 | + SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0)); |
| 35 | + |
26 | 36 | static SPINAND_OP_VARIANTS(read_cache_dual_quad_dtr_variants,
|
27 | 37 | SPINAND_PAGE_READ_FROM_CACHE_1S_4D_4D_OP(0, 8, NULL, 0, 80 * HZ_PER_MHZ),
|
28 | 38 | SPINAND_PAGE_READ_FROM_CACHE_1S_1D_4D_OP(0, 2, NULL, 0, 80 * HZ_PER_MHZ),
|
@@ -141,6 +151,41 @@ static const struct mtd_ooblayout_ops w25n02kv_ooblayout = {
|
141 | 151 | .free = w25n02kv_ooblayout_free,
|
142 | 152 | };
|
143 | 153 |
|
| 154 | +static int w35n01jw_ooblayout_ecc(struct mtd_info *mtd, int section, |
| 155 | + struct mtd_oob_region *region) |
| 156 | +{ |
| 157 | + if (section > 7) |
| 158 | + return -ERANGE; |
| 159 | + |
| 160 | + region->offset = (16 * section) + 12; |
| 161 | + region->length = 4; |
| 162 | + |
| 163 | + return 0; |
| 164 | +} |
| 165 | + |
| 166 | +static int w35n01jw_ooblayout_free(struct mtd_info *mtd, int section, |
| 167 | + struct mtd_oob_region *region) |
| 168 | +{ |
| 169 | + if (section > 7) |
| 170 | + return -ERANGE; |
| 171 | + |
| 172 | + region->offset = 16 * section; |
| 173 | + region->length = 12; |
| 174 | + |
| 175 | + /* Extract BBM */ |
| 176 | + if (!section) { |
| 177 | + region->offset += 2; |
| 178 | + region->length -= 2; |
| 179 | + } |
| 180 | + |
| 181 | + return 0; |
| 182 | +} |
| 183 | + |
| 184 | +static const struct mtd_ooblayout_ops w35n01jw_ooblayout = { |
| 185 | + .ecc = w35n01jw_ooblayout_ecc, |
| 186 | + .free = w35n01jw_ooblayout_free, |
| 187 | +}; |
| 188 | + |
144 | 189 | static int w25n02kv_ecc_get_status(struct spinand_device *spinand,
|
145 | 190 | u8 status)
|
146 | 191 | {
|
@@ -227,6 +272,15 @@ static const struct spinand_info winbond_spinand_table[] = {
|
227 | 272 | &update_cache_variants),
|
228 | 273 | 0,
|
229 | 274 | SPINAND_ECCINFO(&w25n01kv_ooblayout, w25n02kv_ecc_get_status)),
|
| 275 | + SPINAND_INFO("W35N01JW", /* 1.8V */ |
| 276 | + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xdc, 0x21), |
| 277 | + NAND_MEMORG(1, 4096, 128, 64, 512, 10, 1, 1, 1), |
| 278 | + NAND_ECCREQ(1, 512), |
| 279 | + SPINAND_INFO_OP_VARIANTS(&read_cache_octal_variants, |
| 280 | + &write_cache_octal_variants, |
| 281 | + &update_cache_octal_variants), |
| 282 | + 0, |
| 283 | + SPINAND_ECCINFO(&w35n01jw_ooblayout, NULL)), |
230 | 284 | /* 2G-bit densities */
|
231 | 285 | SPINAND_INFO("W25M02GV", /* 2x1G-bit 3.3V */
|
232 | 286 | SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xab, 0x21),
|
|
0 commit comments