Re: [PATCH] mtd: spinand: Only touch the QE bit on chips that have one
From: Miquel Raynal
Date: Sun Sep 20 2026 - 09:31:51 EST
Hi Ahmed,
On 10/09/2026 at 19:53:55 +04, Ahmed Naseef <naseefkm@xxxxxxxxx> wrote:
> Since commit be0b86c648bf ("mtd: spinand: Gather all the bus interface
> steps in one single function") spinand_init_quad_enable() is called
> unconditionally and clears bit 0 of the configuration register even on
> chips without SPINAND_HAS_QE_BIT. On such chips that bit can have another
> meaning: on the Winbond W25N02KV it is H-DIS (Hold Disable, default 1),
> and clearing it enables the /HOLD function, after which erase and program
> operations silently stop taking effect on MT7986 boards.
>
> Only program the QE bit when the chip declares SPINAND_HAS_QE_BIT, as
> before.
Sorry for the breakage and thanks for the fix, unfortunately it arrived
just after another commit -which I am about to apply now-, therefore I
must take the first patch sent visible there:
https://lore.kernel.org/linux-mtd/010701a08d7e1638-79aaf1ea-cc8c-49e8-ba74-cba028aaa183-000000@xxxxxxxxxxxxxxxxxxxxxxxxxx/
Is is very close to your proposal.
Thanks,
Miquèl