From: "Michael Walle" <mwalle@kernel.org>
To: "Weimin Wu" <wuweimin@huaqin.corp-partner.google.com>
Cc: <Takahiro.Kuwano@infineon.com>, <tudor.ambarus@linaro.org>,
<pratyush@kernel.org>, <linux-mtd@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v3] mtd: spi-nor: gigadevice: Add support for GD25LQ255E
Date: Wed, 27 May 2026 11:39:35 +0200 [thread overview]
Message-ID: <DITCY7X2NFWI.2SUAC9UISD6X3@kernel.org> (raw)
In-Reply-To: <CAB2WukQjU=ik5fom=5B=C_R-Tsxwcx+Y78ON5qZt6zAtV7sjhg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1545 bytes --]
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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 144 bytes --]
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: "Michael Walle" <mwalle@kernel.org>
To: "Weimin Wu" <wuweimin@huaqin.corp-partner.google.com>
Cc: <Takahiro.Kuwano@infineon.com>, <tudor.ambarus@linaro.org>,
<pratyush@kernel.org>, <linux-mtd@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v3] mtd: spi-nor: gigadevice: Add support for GD25LQ255E
Date: Wed, 27 May 2026 11:39:35 +0200 [thread overview]
Message-ID: <DITCY7X2NFWI.2SUAC9UISD6X3@kernel.org> (raw)
In-Reply-To: <CAB2WukQjU=ik5fom=5B=C_R-Tsxwcx+Y78ON5qZt6zAtV7sjhg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
next prev parent reply other threads:[~2026-05-27 9:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-18 8:42 [PATCH] [v3] mtd: spi-nor: gigadevice: Add support for GD25LQ255E Weimin Wu
2026-04-18 8:42 ` Weimin Wu
2026-04-20 7:57 ` Michael Walle
2026-04-20 7:57 ` Michael Walle
2026-04-20 9:42 ` Tudor Ambarus
2026-04-20 9:42 ` Tudor Ambarus
2026-04-20 9:51 ` Takahiro.Kuwano
2026-04-20 9:51 ` Takahiro.Kuwano
2026-04-20 10:44 ` Michael Walle
2026-04-20 10:44 ` Michael Walle
2026-05-26 13:30 ` Weimin Wu
2026-05-26 13:30 ` Weimin Wu
2026-05-27 9:39 ` Michael Walle [this message]
2026-05-27 9:39 ` Michael Walle
2026-05-27 3:28 ` [PATCH] [v4] mtd: spi-nor: gigadevice: Add support for GD25LQ256H Weimin Wu
2026-05-27 3:28 ` Weimin Wu
2026-05-27 9:43 ` Michael Walle
2026-05-27 9:43 ` Michael Walle
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=DITCY7X2NFWI.2SUAC9UISD6X3@kernel.org \
--to=mwalle@kernel.org \
--cc=Takahiro.Kuwano@infineon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pratyush@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=wuweimin@huaqin.corp-partner.google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.