[PATCH v3 7/7] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t
tkuw584924 at gmail.com
tkuw584924 at gmail.com
Wed Nov 4 09:10:23 CET 2020
From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
Fixes mode clocks for SPINOR_OP_READ_FAST_4B and volatile QE bit in tiny.
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
---
drivers/mtd/spi/spi-nor-tiny.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c
index 1326f028a6..9643bbacd0 100644
--- a/drivers/mtd/spi/spi-nor-tiny.c
+++ b/drivers/mtd/spi/spi-nor-tiny.c
@@ -646,6 +646,11 @@ static int spi_nor_init_params(struct spi_nor *nor,
spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_FAST],
0, 8, SPINOR_OP_READ_FAST,
SNOR_PROTO_1_1_1);
+#ifdef CONFIG_SPI_FLASH_SPANSION
+ if (JEDEC_MFR(info) == SNOR_MFR_CYPRESS &&
+ (info->id[1] == 0x2a || info->id[1] == 0x2b))
+ params->reads[SNOR_CMD_READ_FAST].num_mode_clocks = 8;
+#endif
}
if (info->flags & SPI_NOR_QUAD_READ) {
@@ -722,6 +727,11 @@ static int spi_nor_setup(struct spi_nor *nor, const struct flash_info *info,
case SNOR_MFR_MACRONIX:
err = macronix_quad_enable(nor);
break;
+#endif
+#ifdef CONFIG_SPI_FLASH_SPANSION
+ case SNOR_MFR_CYPRESS:
+ err = spansion_quad_enable_volatile(nor);
+ break;
#endif
case SNOR_MFR_ST:
case SNOR_MFR_MICRON:
--
2.25.1
More information about the U-Boot
mailing list