summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorShiji Yang <[email protected]>2025-11-26 09:37:41 +0800
committerTom Rini <[email protected]>2026-02-13 10:54:58 -0600
commiteae0ca2125933c3d1742deba723d2cc4b4955ef0 (patch)
tree790458881da1ec092bd0707be105a2ca8d5741a5 /drivers/mtd
parent4f76c90bad3867c402cae28b45c928626bedefff (diff)
mtd: spi-nor-tiny: fix 4-Byte address instructions for Cypress and ISSI
In theory, for the same vendor, we should use the same instructions as the spi-nor-core implementation. Fixes: 72151ad10f8d ("mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte") Fixes: 5bf3f3dd11db ("mtd: spi-nor: Enable QE bit for ISSI flash") Signed-off-by: Shiji Yang <[email protected]>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/spi-nor-tiny.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index 23de64a1520..cf00473ee83 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -220,6 +220,7 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
/* Some Micron need WREN command; all will accept it */
need_wren = true;
fallthrough;
+ case SNOR_MFR_ISSI:
case SNOR_MFR_MACRONIX:
case SNOR_MFR_WINBOND:
if (need_wren)
@@ -246,6 +247,9 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
}
return status;
+ case SNOR_MFR_CYPRESS:
+ cmd = enable ? SPINOR_OP_EN4B : SPINOR_OP_EX4B_CYPRESS;
+ return spi_nor_write_reg(nor, cmd, NULL, 0);
default:
/* Spansion style */
nor->cmd_buf[0] = enable << 7;