[PATCH 1/2] mtd: spinand: add support for detection with param page
Chuanhong Guo
gch981213 at gmail.com
Mon May 16 07:10:08 PDT 2022
Hi!
On Mon, May 16, 2022 at 3:38 PM Frieder Schrempf
<frieder.schrempf at kontron.de> wrote:
>
> Hi Chuanhong,
>
> Am 14.04.22 um 16:34 schrieb Chuanhong Guo:
> > SPI-NAND detection using chip ID isn't always reliable.
> > Here are two known cases:
> > 1. ESMT uses JEDEC ID from other vendors. This may collapse with future
> > chips.
> > 2. Winbond W25N01KV uses the exact same JEDEC ID as W25N01GV while
> > having completely different chip parameters.
>
> I think they share the same first byte of the JEDEC ID, but the second
> byte actually differs and would allow to differentiate between them, right?
No. For the 128M version, all 3 bytes are the same between
W25N01GV and W25N01KV.
>
> I have this patchset [1] that I didn't manage to send upstream yet which
> adds support for the W25N02KV. I added the second ID byte to detect them.
>
> Still your approach using the ONFI data is more flexible of course and
> probably a better way to handle this. I will see if I can find some time
> to add support for the W25N02KV based on your patches.
Don't do that. I abandoned this patchset because I later found that
some early W25N01GV doesn't contain a parameter page at all,
which means detecting W25N01GV/KV using only the parameter
page is unreliable.
I think what Boris proposed earlier in v1 (use parameter page
just to distinguish the two chips) is the correct way to go.
BTW I was making this patchset for a potential future ID conflict
between ESMT and GigaDevice, and I don't actually need to
deal with the W25N01GV/KV nonsense now, so I don't have a
plan for send a new version of this atm.
--
Regards,
Chuanhong Guo
More information about the linux-mtd
mailing list