From: Santhosh Kumar K <s-k6@ti.com>
To: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
<quic_sridsn@quicinc.com>, <quic_mdalam@quicinc.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<p-mantena@ti.com>, <s-k6@ti.com>
Subject: [PATCH 1/3] mtd: spinand: Define OctalIO ops
Date: Thu, 2 Jan 2025 17:21:08 +0530 [thread overview]
Message-ID: <20250102115110.1402440-2-s-k6@ti.com> (raw)
In-Reply-To: <20250102115110.1402440-1-s-k6@ti.com>
Define the macros for Octal-based read and load operations on OSPI
NAND flashes.
Signed-off-by: Santhosh Kumar K <s-k6@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 cbbcd44ac225..b730e334e399 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_OP(addr, ndummy, buf, len) \
+ SPI_MEM_OP(SPI_MEM_OP_CMD(0xcb, 1), \
+ SPI_MEM_OP_ADDR(2, addr, 8), \
+ SPI_MEM_OP_DUMMY(ndummy, 8), \
+ SPI_MEM_OP_DATA_IN(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(reset, addr, buf, len) \
+ SPI_MEM_OP(SPI_MEM_OP_CMD(reset ? 0xc2 : 0xc4, 1), \
+ SPI_MEM_OP_ADDR(2, addr, 8), \
+ SPI_MEM_OP_NO_DUMMY, \
+ SPI_MEM_OP_DATA_OUT(len, buf, 8))
+
/**
* Standard SPI NAND flash commands
*/
--
2.34.1
next prev parent reply other threads:[~2025-01-02 11:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 11:51 [PATCH 0/3] Add OSPI NAND support Santhosh Kumar K
2025-01-02 11:51 ` Santhosh Kumar K [this message]
2025-01-15 19:19 ` [PATCH 1/3] mtd: spinand: Define OctalIO ops Miquel Raynal
2025-01-27 6:48 ` Santhosh Kumar K
2025-01-02 11:51 ` [PATCH 2/3] mtd: spinand: winbond: Add support for W35N01JW Santhosh Kumar K
2025-01-02 11:51 ` [PATCH 3/3] mtd: spinand: winbond: Fix oob_layout for W25N01JW Santhosh Kumar K
2025-01-15 19:16 ` Miquel Raynal
2025-01-27 6:48 ` Santhosh Kumar K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250102115110.1402440-2-s-k6@ti.com \
--to=s-k6@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=p-mantena@ti.com \
--cc=quic_mdalam@quicinc.com \
--cc=quic_sridsn@quicinc.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®