From: Md Sadre Alam <md.alam@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Md Sadre Alam <mdalam@qti.qualcomm.com>,
Md Sadre Alam <md.alam@oss.qualcomm.com>
Subject: [PATCH v2 3/3] spi: spi-qpic-snand: Handle Macronix quad read opcode 0x6b
Date: Fri, 07 Aug 2026 21:33:57 +0530 [thread overview]
Message-ID: <20260807-quad-v2-3-8ec821e2f22b@oss.qualcomm.com> (raw)
In-Reply-To: <20260807-quad-v2-0-8ec821e2f22b@oss.qualcomm.com>
Macronix SPI-NAND devices use opcode 0x6b for quad output cache reads,
while most other devices use opcode 0xeb. The QPIC SPI-NAND driver does
not currently recognize opcode 0x6b, causing read operations to fail
when Macronix devices select this cache read variant.
Add the Macronix-specific read opcode to the command mapping logic and
treat it the same as the existing quad read operations.
This allows Macronix SPI-NAND devices to operate correctly in quad read
mode.
Signed-off-by: Md Sadre Alam <md.alam@oss.qualcomm.com>
---
drivers/spi/spi-qpic-snand.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index 6ad2f96dde8c..61b1f2eb19ce 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -52,6 +52,7 @@
#define SPINAND_READ_CACHE 0x0b
#define SPINAND_READ 0x13
#define SPINAND_READ_QUAD 0xeb
+#define SPINAND_READ_MACRONIX 0x6b
#define SPINAND_ERASE 0xd8
#define SPINAND_WRITE_EN 0x06
#define SPINAND_PROGRAM_EXECUTE 0x10
@@ -1036,6 +1037,7 @@ static int qcom_spi_cmd_mapping(struct qcom_nand_controller *snandc,
case SPINAND_READ:
case SPINAND_READ_QUAD:
case SPINAND_READ_CACHE:
+ case SPINAND_READ_MACRONIX:
if (snandc->qspi->raw_rw) {
*cmd = (PAGE_ACC | LAST_PAGE | transfer_mode |
SPI_WP | SPI_HOLD | OP_PAGE_READ);
--
2.34.1
next prev parent reply other threads:[~2026-08-07 16:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 16:03 [PATCH v2 0/3] Add quad mode support for QPIC SNAND Md Sadre Alam
2026-08-07 16:03 ` [PATCH v2 1/3] spi: spi-qpic-snand: move command mapping helper Md Sadre Alam
2026-08-07 16:03 ` [PATCH v2 2/3] spi: spi-qpic-snand: add quad mode support Md Sadre Alam
2026-08-07 16:03 ` Md Sadre Alam [this message]
2026-08-11 21:15 ` [PATCH v2 0/3] Add quad mode support for QPIC SNAND Mark Brown
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=20260807-quad-v2-3-8ec821e2f22b@oss.qualcomm.com \
--to=md.alam@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mdalam@qti.qualcomm.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®