[BUG]: spi-nor: spi_nor_init() fails when SR locked

David Clear dac2 at pensando.io
Tue Jul 21 13:02:02 EDT 2020

On Tue, Jul 21, 2020 at 2:37 AM <Tudor.Ambarus at microchip.com> wrote:
> We tackled the unlock_all stuff in
> the past, Michael did a patch, I'll check how that fits here.

Thanks Tudor.  The new Macronix mx662ug45g flash in my patch also
supports similar block protections, with WP#, but it looks like the driver
doesn't support BP in any of the Macronix flashes.

The functionality is similar to Micron's (power-of-2 sectors, top/bottom,
WP# lock), with two differences:
1. The BP bits in the SR are in different positions
2. The Top/Bottom bit is OTP, and is in the Configuration Register

As Macronix flashes don't declare BP support it looks like they won't suffer
this specific issue (I'll verify in the next few days), but I'd like to
evolve the driver to support BP on these devices.

Thanks for the patch pointer.  I'll take a look at it.


More information about the linux-mtd mailing list