From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Maarten Zanders <maarten@zanders.be>
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>,
Pratyush Yadav <pratyush@kernel.org>,
linux-mtd@lists.infradead.org
Subject: Re: [spi-nor] Macronix MX25L requires CR read opcode 0x15 (not 0x35)
Date: Tue, 02 Jun 2026 15:16:19 +0200 [thread overview]
Message-ID: <87bjdt13rw.fsf@bootlin.com> (raw)
In-Reply-To: <CAPB_pELpdie+=VB3h3tqZCkdTd9cKyhnYNmXjeP1vYODDricLw@mail.gmail.com> (Maarten Zanders's message of "Fri, 22 Aug 2025 14:03:02 +0200")
Hello,
On 22/08/2025 at 14:03:02 +02, Maarten Zanders <maarten@zanders.be> wrote:
> Hi all,
>
> On the Macronix MX25L12833F (ID 0xC22018) & others of this family/mfg,
> the CR (condition register) must be read with opcode 0x15. The driver
> currently uses 0x35, which the chip does not recognize.
>
> Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/8934/MX25L12833F,%203V,%20128Mb,%20v1.0.pdf
> (p.27, RDCR).
>
> With 0x35 the data line floats and the driver reads CR as 0xFF
> (depending on previous state of the line or pull up/down). This value
> is then written back in spi_nor_write_16bit_sr_and_check(), setting CR
> to 0xFF. One consequence is flipping the OTP Top/Bottom protection
> bit, so from then on, locking the top block actually locks the bottom
> sector. This breaks bootloader updates (in my case) and similar flows.
>
> Possible fixes:
> - Make CR read opcode configurable per device.
FYI I just proposed a series which goes into that direction, with quite
a deep rework of the QER SFDP field handling. This rework allows on a
per chip basis to indicate:
- what are the status operations supported
- what are the opcodes for these operations
Link: https://lore.kernel.org/linux-mtd/20260529-winbond-v7-1-spi-nor-rv-addition-v1-0-f3ae18502d5a@bootlin.com/T/#m0058d07965ba8c91a2438c5512e2b7b2693a6909
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2026-06-02 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 12:03 [spi-nor] Macronix MX25L requires CR read opcode 0x15 (not 0x35) Maarten Zanders
2025-09-01 14:46 ` Pratyush Yadav
2025-09-02 11:18 ` Maarten Zanders
2025-09-09 15:29 ` Pratyush Yadav
2025-09-10 11:21 ` Maarten Zanders
2026-06-02 13:16 ` Miquel Raynal [this message]
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=87bjdt13rw.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-mtd@lists.infradead.org \
--cc=maarten@zanders.be \
--cc=pratyush@kernel.org \
--cc=tudor.ambarus@microchip.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