Commit 82de6a6f authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Miquel Raynal

mtd: spi-nor: Fix the writing of the Status Register on micron flashes

Micron flashes do not support 16 bit writes on the Status Register.
According to micron datasheets, when using the Write Status Register
(01h) command, the chip select should be driven LOW and held LOW until
the eighth bit of the last data byte has been latched in, after which
it must be driven HIGH. If CS is not driven HIGH, the command is not
executed, flag status register error bits are not set, and the write enable
latch remains set to 1. This fixes the lock operations on micron flashes.
Reported-by: default avatarJohn Garry <john.garry@huawei.com>
Fixes: 39d1e334 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent de08b5ac
...@@ -4596,6 +4596,7 @@ static void sst_set_default_init(struct spi_nor *nor) ...@@ -4596,6 +4596,7 @@ static void sst_set_default_init(struct spi_nor *nor)
static void st_micron_set_default_init(struct spi_nor *nor) static void st_micron_set_default_init(struct spi_nor *nor)
{ {
nor->flags |= SNOR_F_HAS_LOCK; nor->flags |= SNOR_F_HAS_LOCK;
nor->flags &= ~SNOR_F_HAS_16BIT_SR;
nor->params.quad_enable = NULL; nor->params.quad_enable = NULL;
nor->params.set_4byte = st_micron_set_4byte; nor->params.set_4byte = st_micron_set_4byte;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment