mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Takahiro.Kuwano@infineon.com>
To: <changhuang.liang@starfivetech.com>, <pratyush@kernel.org>,
	<mwalle@kernel.org>, <broonie@kernel.org>,
	<miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>
Cc: <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-mtd@lists.infradead.org>
Subject: RE: [PATCH v2 5/5] mtd: spi-nor: macronix: Add 1-4-4 DTR read support for MX66L1G45G
Date: Mon, 9 Nov 2026 05:44:44 +0000	[thread overview]
Message-ID: <fd16660e38f24049af5db47d726744d5@infineon.com> (raw)
In-Reply-To: <20261028121100.79667-6-changhuang.liang@starfivetech.com>

Hi,

> The MX66L1G45G supports the 1-4-4 DTR read mode. This flash uses 6
> dummy cycles by default in 1-4-4 DTR mode.
> 
> For 1S-4D-4D, its support bit is located in the 21st DWORD of the
> BFPT table, while the dummy cycles are described in the 23rd DWORD.
> Unfortunately, the BFPT of this flash model currently only supports
> 16 DWORDs, and the kernel's SFDP parser does not derive any
> SNOR_HWCAPS_READ_1_4_4_DTR capability from the BFPT table.
> 
> Therefore, implement late_init to initialize support for this opcode,
> configuring the read settings with the default 6 dummy cycles.
> 
Since the 1S-4D-4D support and dummy cycles are expected to be in BFPT,
this fix should be done in post_bfpt.

> The SFDP of this part provides a 4BAIT table, which also advertises
> the 4-byte 1-4-4 DTR opcode (0xEE). SFDP parsing converts the read
> opcodes to their 4-byte variants and spi_nor_set_4byte_opcodes() is
> skipped later on, but the 1-4-4 DTR read is only added in late_init,
> after 4BAIT has been parsed, so it is not converted there. Select
> the 4-byte opcode directly in that case.
> 
If 1S-4D-4D support is added in post_bfpt, conversion to 4-byte opcode
is done during 4BAIT table parse, right?

> Also set SPI_NOR_4B_OPCODES like MX66L51235F (0xc2 0x20 0x1a). The
> part supports the 4-byte opcode set, so if 4BAIT parsing does not
> complete, spi_nor_set_4byte_opcodes() still picks the 4-byte variants,
> including 0xEE for 1-4-4 DTR. With 4BAIT parsed, as on the tested
> part, the flag has no further effect.
> 
> Add a dedicated fixup for the part (SNOR_ID 0xc2, 0x20, 0x1b) that
> keeps the existing QPP 4-byte post-SFDP fixup and additionally
> advertises the 1-4-4 DTR read capability in late_init.
> 
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> 

Thanks,
Takahiro


  reply	other threads:[~2026-11-09  5:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:10 [PATCH v2 0/5] Add DDR (Dual Data-Rate) support for DW SPI controller Changhuang Liang
2026-10-28 12:10 ` [PATCH v2 1/5] spi: dw: Detect DDR support in enhanced SPI mode Changhuang Liang
2026-10-28 12:10 ` [PATCH v2 2/5] spi: dw: Add DDR (Dual Data-Rate) support for " Changhuang Liang
2026-10-28 16:39   ` Miquel Raynal
2026-10-28 12:10 ` [PATCH v2 3/5] mtd: spi-nor: Support mixed 1S-xD-xD DTR protocols in spi_nor_spimem_setup_op() Changhuang Liang
2026-10-28 12:10 ` [PATCH v2 4/5] mtd: spi-nor: debugfs: Correct DTR protocol names for 1S-xD-xD modes Changhuang Liang
2026-10-28 12:11 ` [PATCH v2 5/5] mtd: spi-nor: macronix: Add 1-4-4 DTR read support for MX66L1G45G Changhuang Liang
2026-11-09  5:44   ` Takahiro.Kuwano [this message]
2026-11-07 15:04 ` (subset) [PATCH v2 0/5] Add DDR (Dual Data-Rate) support for DW SPI controller 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=fd16660e38f24049af5db47d726744d5@infineon.com \
    --to=takahiro.kuwano@infineon.com \
    --cc=broonie@kernel.org \
    --cc=changhuang.liang@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=pratyush@kernel.org \
    --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®