Lines Matching +full:otp +full:- +full:2
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016-2017 Micron Technology, Inc.
17 #include <linux/spi/spi-mem.h>
67 SPI_MEM_OP_ADDR(2, addr, 1), \
74 SPI_MEM_OP_ADDR(2, addr, 1), \
92 SPI_MEM_DTR_OP_ADDR(2, addr, 1), \
99 SPI_MEM_OP_ADDR(2, addr, 1), \
101 SPI_MEM_OP_DATA_IN(len, buf, 2))
107 SPI_MEM_OP_DATA_IN(len, buf, 2))
111 SPI_MEM_DTR_OP_ADDR(2, addr, 1), \
113 SPI_MEM_DTR_OP_DATA_IN(len, buf, 2), \
118 SPI_MEM_OP_ADDR(2, addr, 1), \
130 SPI_MEM_DTR_OP_ADDR(2, addr, 1), \
137 SPI_MEM_OP_ADDR(2, addr, 2), \
138 SPI_MEM_OP_DUMMY(ndummy, 2), \
139 SPI_MEM_OP_DATA_IN(len, buf, 2))
143 SPI_MEM_OP_ADDR(3, addr, 2), \
144 SPI_MEM_OP_DUMMY(ndummy, 2), \
145 SPI_MEM_OP_DATA_IN(len, buf, 2))
149 SPI_MEM_DTR_OP_ADDR(2, addr, 2), \
150 SPI_MEM_DTR_OP_DUMMY(ndummy, 2), \
151 SPI_MEM_DTR_OP_DATA_IN(len, buf, 2), \
156 SPI_MEM_OP_ADDR(2, addr, 4), \
168 SPI_MEM_DTR_OP_ADDR(2, addr, 4), \
181 SPI_MEM_OP_ADDR(2, addr, 1), \
187 SPI_MEM_OP_ADDR(2, addr, 1), \
210 #define STATUS_ERASE_FAILED BIT(2)
215 #define STATUS_ECC_UNCOR_ERROR (2 << 4)
245 * struct spinand_id - SPI NAND id structure
262 * struct spinand_devid - SPI NAND device id structure
270 * read_id opcode + 1-byte address.
281 * struct manufacurer_ops - SPI NAND manufacturer specific operations
294 * struct spinand_manufacturer - SPI NAND manufacturer instance
325 * struct spinand_op_variants - SPI NAND operation variants
329 * Some operations like read-from-cache/write-to-cache have several variants
348 * spinand_ecc_info - description of the on-die ECC implemented by a SPI NAND
352 * -EBADMSG if there are uncorrectable errors. I can also return
355 * @ooblayout: the OOB layout used by the on-die ECC implementation
364 #define SPINAND_HAS_PROG_PLANE_SELECT_BIT BIT(2)
369 * struct spinand_ondie_ecc_conf - private SPI-NAND on-die ECC engine structure
371 * ->get_status() is not populated by the spinand device.
378 * struct spinand_otp_layout - structure to describe the SPI NAND OTP area
379 * @npages: number of pages in the OTP
380 * @start_page: start page of the user/factory OTP area.
388 * struct spinand_fact_otp_ops - SPI NAND OTP methods for factory area
389 * @info: get the OTP area information
390 * @read: read from the SPI NAND OTP area
400 * struct spinand_user_otp_ops - SPI NAND OTP methods for user area
401 * @info: get the OTP area information
402 * @lock: lock an OTP region
403 * @erase: erase an OTP region
404 * @read: read from the SPI NAND OTP area
405 * @write: write to the SPI NAND OTP area
419 * struct spinand_fact_otp - SPI NAND OTP grouping structure for factory area
420 * @layout: OTP region layout
421 * @ops: OTP access ops
429 * struct spinand_user_otp - SPI NAND OTP grouping structure for user area
430 * @layout: OTP region layout
431 * @ops: OTP access ops
439 * struct spinand_info - Structure used to describe SPI NAND chips
442 * @flags: OR-ing of the SPINAND_XXX flags
445 * @eccinfo: on-die ECC info
447 * @op_variants.read_cache: variants of the read-cache operation
448 * @op_variants.write_cache: variants of the write-cache operation
449 * @op_variants.update_cache: variants of the update-cache operation
451 * multi-die chips
453 * @fact_otp: SPI NAND factory OTP info.
454 * @user_otp: SPI NAND user OTP info.
552 * struct spinand_device - SPI NAND device instance
566 * @eccinfo: on-die ECC information
571 * because the spi-mem interface explicitly requests that buffers
572 * passed in spi_mem_op be DMA-able, so we can't based the bufs on
578 * A per-transfer check must of course be done to ensure it is
582 * @fact_otp: SPI NAND factory OTP info.
583 * @user_otp: SPI NAND user OTP info.
628 * mtd_to_spinand() - Get the SPI NAND device attached to an MTD instance
639 * spinand_to_mtd() - Get the MTD device embedded in a SPI NAND device
646 return nanddev_to_mtd(&spinand->base); in spinand_to_mtd()
650 * nand_to_spinand() - Get the SPI NAND device embedding an NAND object
661 * spinand_to_nand() - Get the NAND device embedded in a SPI NAND object
669 return &spinand->base; in spinand_to_nand()
673 * spinand_set_of_node - Attach a DT node to a SPI NAND device
682 nanddev_set_of_node(&spinand->base, np); in spinand_set_of_node()