Lines Matching +full:1 +full:- +full:512

1 // SPDX-License-Identifier: GPL-2.0
46 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_8S_OP(0, 1, NULL, 0, 133 * HZ_PER_MHZ),
47 SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0),
48 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0));
64 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0),
68 SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP(0, 1, NULL, 0, 104 * HZ_PER_MHZ),
69 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_2S_OP(0, 1, NULL, 0, 0),
71 SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0),
72 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 54 * HZ_PER_MHZ));
76 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0),
77 SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP(0, 1, NULL, 0, 0),
78 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_2S_OP(0, 1, NULL, 0, 0),
79 SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0),
80 SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0));
94 return -ERANGE; in w25m02gv_ooblayout_ecc()
96 region->offset = (16 * section) + 8; in w25m02gv_ooblayout_ecc()
97 region->length = 8; in w25m02gv_ooblayout_ecc()
106 return -ERANGE; in w25m02gv_ooblayout_free()
108 region->offset = (16 * section) + 2; in w25m02gv_ooblayout_free()
109 region->length = 6; in w25m02gv_ooblayout_free()
122 struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(0xc2, 1), in w25m02gv_select_target()
125 SPI_MEM_OP_DATA_OUT(1, in w25m02gv_select_target()
126 spinand->scratchbuf, in w25m02gv_select_target()
127 1)); in w25m02gv_select_target()
129 *spinand->scratchbuf = target; in w25m02gv_select_target()
130 return spi_mem_exec_op(spinand->spimem, &op); in w25m02gv_select_target()
137 return -ERANGE; in w25n01kv_ooblayout_ecc()
139 region->offset = 64 + (8 * section); in w25n01kv_ooblayout_ecc()
140 region->length = 7; in w25n01kv_ooblayout_ecc()
149 return -ERANGE; in w25n02kv_ooblayout_ecc()
151 region->offset = 64 + (16 * section); in w25n02kv_ooblayout_ecc()
152 region->length = 13; in w25n02kv_ooblayout_ecc()
161 return -ERANGE; in w25n02kv_ooblayout_free()
163 region->offset = (16 * section) + 2; in w25n02kv_ooblayout_free()
164 region->length = 14; in w25n02kv_ooblayout_free()
183 return -ERANGE; in w25n01jw_ooblayout_ecc()
185 region->offset = (16 * section) + 12; in w25n01jw_ooblayout_ecc()
186 region->length = 4; in w25n01jw_ooblayout_ecc()
195 return -ERANGE; in w25n01jw_ooblayout_free()
197 region->offset = (16 * section); in w25n01jw_ooblayout_free()
198 region->length = 12; in w25n01jw_ooblayout_free()
202 region->offset += 2; in w25n01jw_ooblayout_free()
203 region->length -= 2; in w25n01jw_ooblayout_free()
213 return -ERANGE; in w35n01jw_ooblayout_ecc()
215 region->offset = (16 * section) + 12; in w35n01jw_ooblayout_ecc()
216 region->length = 4; in w35n01jw_ooblayout_ecc()
225 return -ERANGE; in w35n01jw_ooblayout_free()
227 region->offset = 16 * section; in w35n01jw_ooblayout_free()
228 region->length = 12; in w35n01jw_ooblayout_free()
232 region->offset += 2; in w35n01jw_ooblayout_free()
233 region->length -= 2; in w35n01jw_ooblayout_free()
254 struct spi_mem_op op = SPINAND_GET_FEATURE_1S_1S_1S_OP(0x30, spinand->scratchbuf); in w25n02kv_ecc_get_status()
261 return -EBADMSG; in w25n02kv_ecc_get_status()
267 * in order to avoid forcing the wear-leveling layer to move in w25n02kv_ecc_get_status()
270 if (spi_mem_exec_op(spinand->spimem, &op)) in w25n02kv_ecc_get_status()
271 return nanddev_get_ecc_conf(nand)->strength; in w25n02kv_ecc_get_status()
273 mbf = *(spinand->scratchbuf) >> 4; in w25n02kv_ecc_get_status()
275 if (WARN_ON(mbf > nanddev_get_ecc_conf(nand)->strength || !mbf)) in w25n02kv_ecc_get_status()
276 return nanddev_get_ecc_conf(nand)->strength; in w25n02kv_ecc_get_status()
284 return -EINVAL; in w25n02kv_ecc_get_status()
294 op = spinand->op_templates.read_cache; in w25n0xjw_hs_cfg()
295 if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr) in w25n0xjw_hs_cfg()
297 else if (op->cmd.buswidth == 1 && op->addr.buswidth == 1 && in w25n0xjw_hs_cfg()
298 op->dummy.buswidth == 1 && op->data.buswidth == 1) in w25n0xjw_hs_cfg()
300 else if (!op->max_freq) in w25n0xjw_hs_cfg()
324 SPI_MEM_OP(SPI_MEM_OP_CMD(0x81, 1), in w35n0xjw_write_vcr()
325 SPI_MEM_OP_ADDR(3, reg, 1), in w35n0xjw_write_vcr()
327 SPI_MEM_OP_DATA_OUT(1, spinand->scratchbuf, 1)); in w35n0xjw_write_vcr()
330 *spinand->scratchbuf = val; in w35n0xjw_write_vcr()
336 ret = spi_mem_exec_op(spinand->spimem, &op); in w35n0xjw_write_vcr()
358 op = spinand->op_templates.read_cache; in w35n0xjw_vcr_cfg()
360 single = (op->cmd.buswidth == 1 && op->addr.buswidth == 1 && op->data.buswidth == 1); in w35n0xjw_vcr_cfg()
361 dtr = (op->cmd.dtr || op->addr.dtr || op->data.dtr); in w35n0xjw_vcr_cfg()
369 return -EINVAL; in w35n0xjw_vcr_cfg()
375 dummy_cycles = ((op->dummy.nbytes * 8) / op->dummy.buswidth) / (op->dummy.dtr ? 2 : 1); in w35n0xjw_vcr_cfg()
385 return -EINVAL; in w35n0xjw_vcr_cfg()
395 /* 512M-bit densities */
398 NAND_MEMORG(1, 2048, 64, 64, 512, 10, 1, 1, 1),
399 NAND_ECCREQ(1, 512),
405 /* 1G-bit densities */
408 NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
409 NAND_ECCREQ(1, 512),
417 NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
418 NAND_ECCREQ(1, 512),
424 SPINAND_INFO("W25N01JW", /* high-speed 1.8V */
426 NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
427 NAND_ECCREQ(1, 512),
436 NAND_MEMORG(1, 2048, 96, 64, 1024, 20, 1, 1, 1),
437 NAND_ECCREQ(4, 512),
445 NAND_MEMORG(1, 4096, 128, 64, 512, 10, 1, 1, 1),
446 NAND_ECCREQ(1, 512),
455 NAND_MEMORG(1, 4096, 128, 64, 512, 10, 1, 2, 1),
456 NAND_ECCREQ(1, 512),
465 NAND_MEMORG(1, 4096, 128, 64, 512, 10, 1, 4, 1),
466 NAND_ECCREQ(1, 512),
473 /* 2G-bit densities */
474 SPINAND_INFO("W25M02GV", /* 2x1G-bit 3.3V */
476 NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 2),
477 NAND_ECCREQ(1, 512),
484 SPINAND_INFO("W25N02JW", /* high-speed 1.8V */
486 NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 2, 1),
487 NAND_ECCREQ(1, 512),
496 NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
497 NAND_ECCREQ(8, 512),
505 NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1),
506 NAND_ECCREQ(8, 512),
512 /* 4G-bit densities */
515 NAND_MEMORG(1, 2048, 128, 64, 4096, 40, 2, 1, 1),
516 NAND_ECCREQ(8, 512),
524 NAND_MEMORG(1, 2048, 128, 64, 4096, 40, 1, 1, 1),
525 NAND_ECCREQ(8, 512),
542 for (i = 0; i < nand->memorg.ntargets; i++) { in winbond_spinand_init()