Re: [PATCH] [v3] mtd: spi-nor: gigadevice: Add support for GD25LQ255E

From: Michael Walle

Date: Wed May 27 2026 - 05:42:11 EST


Hi,

On Tue May 26, 2026 at 3:30 PM CEST, Weimin Wu wrote:
> Hi, sorry for the late reply.

Please do not top post, see https://docs.kernel.org/process/submitting-patches.html


> I consulted GD's engineers, and they replied that jedec_id=0xC86019
> corresponds to several FlashROM models: GD25LQ255E, GD25LB256F,
> GD25LQ256H, GD25LE256H, and GD25LR256F. It has been confirmed that we
> are currently using the GD25LQ256HYIGR chip, and the corresponding
> datasheet is https://download.gigadevice.com/Datasheet/DS-01085-GD25LQ256H-Rev1.3.pdf.
> It seems that the model I previously read as GD25LQ255E using Google's
> tool was incorrect. I used .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP
> | SPI_NOR_HAS_TB | The SPI_NOR_TB_SR_BIT6 configuration verification
> passed Google's flashrom_tester program test, indicating that
> read/write and write protection meet the requirements. For these
> reasons, I will modify the title and remove the description of the
> name; therefore, I will submit a separate patch v4 update. Thanks.


No this won't work. You have to find a way to differentiate between
all these flashes with the same id because the locking is different.
As you've noticed, one needs the SPI_NOR_4BIT_BP and one doesn't. So
either way, it's wrong. You'll need to have a fixup which needs to
detect that particular type at runtime and fix the locking.

So please work with GD's how to fingerprint a particular flash
using it's SFDP data (which is hopefully different between the
devices).

-michael

Attachment: signature.asc
Description: PGP signature