Re: [PATCH 1/2] mtd: spinand: winbond: add support for W25N04LW

Md Sadre Alam <[email protected]>
Newsgroups org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 02:43:52PM +0200, Miquel Raynal wrote:
> Hi Dominique,
> 
> On 10/08/2026 at 17:28:32 +09, Dominique MARTINET <[email protected]> wrote:
> 
> > Md Sadre Alam wrote on Fri, Aug 07, 2026 at 12:13:38PM +0530:
> >> Add support for Winbond W25N04LW 4Gbit SPI-NAND.
> >> It has 8-bit on-die ECC and a 4096+256 byte page
> >> (4096 byte main area, 128 byte usable OOB once
> >> on-chip ECC hides the 128 byte parity area),
> >> organized as 2048 blocks of 64 pages each, unlike
> >> the existing 2048 byte page W25N04KV/W25N04KW parts.
> >
> > This is pretty good timing, I was just looking at sending a patch for
> > W25N04LW myself!
> >
> > I agree with Miquèl that your patch looks odd, you wrote
> >> +		     NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1),
> > but the erase blocks are 256K long so it should be
> > +		     NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1),
> >
> > did you actually test this device?
> >
> > If it helps, the datasheet for W25N04LWZExx / W25N04LWTBxx is freely
> > available from digikey here[1]
> > [1] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/7182/W25N04LWZExx_W25N04LWTBxx_RevD_2025-08-05.pdf
> 
> Thanks for all the feedback, Sadre, can you please propose an udpate
> with these details and changes?
I do not currently have access to this device, so I cannot properly
validate an updated version on hardware.

Given that the current patch needs the OOB size fixed to 256, and likely
the OOB layout adjusted accordingly, I think it is better if Dominique sends
his tested version. I am fine with him taking over this patch.

> 
> > (And it also supports continuous read, so I'm curious to see if it'd
> > work with the recent continous read support from Miquèl[2] merged in
> > 7.2... I'm not familiar with the subsystem so will need a bit of time to
> > plug all the hooks in properly)
> > [2]
> > https://lore.kernel.org/linux-mtd/20260429-winbond-v6-18-rc1-cont-read-v3-0-0f38b3c229ad@bootlin.com/
> 
> If it has continuous read, it requires the flag and a hook to
> enable/disable the feature. The existing Winbond helper may already be
> enough for it. You can test it with a recent version of mtd-utils, I
> added options to nanddump, nandbiterrs and flash_speed for that.
> 
> If Sadre dooesn't do it, you can propose a follow-up patch.

I currently do not have access to this device to test continuous read,
so please go ahead with the follow-up patch if you have hardware to
validate it.

Thanks,
Alam.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.