Skip to content

Commit 82de6a6

Browse files
ambarusmiquelraynal
authored andcommitted
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: John Garry <[email protected]> Fixes: 39d1e33 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()") Signed-off-by: Tudor Ambarus <[email protected]> Tested-by: John Garry <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent de08b5a commit 82de6a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/spi-nor/spi-nor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4596,6 +4596,7 @@ static void sst_set_default_init(struct spi_nor *nor)
45964596
static void st_micron_set_default_init(struct spi_nor *nor)
45974597
{
45984598
nor->flags |= SNOR_F_HAS_LOCK;
4599+
nor->flags &= ~SNOR_F_HAS_16BIT_SR;
45994600
nor->params.quad_enable = NULL;
46004601
nor->params.set_4byte = st_micron_set_4byte;
46014602
}

0 commit comments

Comments
 (0)