lkml.org 
[lkml]   [2021]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 06/13] mtd: spinand: Add macros for Octal DTR page read and write operations
Hi Apurva,

Apurva Nandan <a-nandan@ti.com> wrote on Tue, 13 Jul 2021 13:05:31
+0000:

> Define new PAGE_READ_FROM_CACHE and PROG_LOAD op templates for Octal
> DTR SPI mode. These templates would used in op_variants and

will be

> op_templates for defining Octal DTR read from cache and write to
> cache operations.
>
> Datasheet: https://www.winbond.com/export/sites/winbond/datasheet/W35N01JW_Datasheet_Brief.pdf
>
> Signed-off-by: Apurva Nandan <a-nandan@ti.com>
> ---
> include/linux/mtd/spinand.h | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
> index ebb19b2cec84..35816b8cfe81 100644
> --- a/include/linux/mtd/spinand.h
> +++ b/include/linux/mtd/spinand.h
> @@ -122,6 +122,12 @@
> SPI_MEM_OP_DUMMY(ndummy, 4), \
> SPI_MEM_OP_DATA_IN(len, buf, 4))
>
> +#define SPINAND_PAGE_READ_FROM_CACHE_OCTALIO_DTR_OP(addr, ndummy, buf, len) \
> + SPI_MEM_OP(SPI_MEM_OP_CMD_DTR(2, 0x9d9d, 8), \
> + SPI_MEM_OP_ADDR_DTR(2, addr, 8), \
> + SPI_MEM_OP_DUMMY_DTR(ndummy, 8), \
> + SPI_MEM_OP_DATA_IN_DTR(len, buf, 8))
> +
> #define SPINAND_PROG_EXEC_OP(addr) \
> SPI_MEM_OP(SPI_MEM_OP_CMD(0x10, 1), \
> SPI_MEM_OP_ADDR(3, addr, 1), \
> @@ -140,6 +146,12 @@
> SPI_MEM_OP_NO_DUMMY, \
> SPI_MEM_OP_DATA_OUT(len, buf, 4))
>
> +#define SPINAND_PROG_LOAD_OCTALIO_DTR(reset, addr, buf, len) \
> + SPI_MEM_OP(SPI_MEM_OP_CMD_DTR(2, reset ? 0x0202 : 0x8484, 8), \
> + SPI_MEM_OP_ADDR_DTR(2, addr, 8), \
> + SPI_MEM_OP_NO_DUMMY, \
> + SPI_MEM_OP_DATA_OUT_DTR(len, buf, 8))
> +
> #define SPINAND_PROTO_BUSWIDTH_MASK GENMASK(6, 0)
> #define SPINAND_PROTO_DTR_BIT BIT(7)
>

Thanks,
Miquèl

\
 
 \ /
  Last update: 2021-08-06 20:55    [W:0.038 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site