Skip to content

Commit 135ac3b

Browse files
committed
mtd: spinand: winbond: Fix ODTR write VCR on W35NxxJW
In most scenarios this variant is actually unused (VCR is written in SSDR mode), but we need to provide an octal variant. The address is 24 bits but is sent over 4 bytes MSB first. This means we need to shift the register address by one extra byte for the address to be correct. I didn't catch this initially because the volatile register region is 256 bytes wide, so the write-then-read procedure did work with the small register addresses I was using at that time: 0 and 1. Fixes: 44a2f49 ("mtd: spinand: winbond: W35N octal DTR support") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent 8d65574 commit 135ac3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/nand/spi/winbond.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static SPINAND_OP_VARIANTS(update_cache_variants,
9999

100100
#define SPINAND_WINBOND_WRITE_VCR_8D_8D_8D(reg, buf) \
101101
SPI_MEM_OP(SPI_MEM_DTR_OP_RPT_CMD(0x81, 8), \
102-
SPI_MEM_DTR_OP_ADDR(4, reg, 8), \
102+
SPI_MEM_DTR_OP_ADDR(4, reg << 8, 8), \
103103
SPI_MEM_OP_NO_DUMMY, \
104104
SPI_MEM_DTR_OP_DATA_OUT(2, buf, 8))
105105

0 commit comments

Comments
 (0)