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

Dominique Martinet dominique.martinet at atmark-techno.com
Tue Aug 11 16:23:33 PDT 2026


Md Sadre Alam wrote on Tue, Aug 11, 2026 at 06:10:50PM +0530:
> > 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),

(I misremembered NAND_MEMORG() fields, the 256 is indeed the OOB area
size as you pointed out; the erase blocks were already correct at 64
pages = 256KB so while the settings were wrong this might actually not
be visible at all in quick testing; sorry)

> > FWIW, I've confirmed it works with the following diff (at least up to
> > the point of creating an ubi volume and booting from it); happy to send
> > this as a patch if this has indeed not been tested
>
> This device was supported in our downstream tree and was tested there. I
> picked that patch and posted it upstream assuming the configuration was
> already correct.
> The `128` in:
> NAND_MEMORG(1, 4096, 128, 64, 2048, 40, 1, 1, 1)
> was my mistake. It should indeed be `256`, matching the 4096 + 256 page
> layout in the W25N04LW datasheet.
> Please go ahead and post your tested patch. I do not currently have this
> device available to retest the upstream version.

Ok, let me do some slightly more thorough checks and clean up a bit and
I'll send a v2 later this week/early next week

The continuous read feature also definitely is interesting to me and
I'll be testing it later, but it's "just" a performance improvement so
I'll be taking a bit longer; I'll come back with either a patch or
questions hopefully by next month ish

Thanks,
-- 
Dominique




More information about the linux-mtd mailing list