]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>
Tue, 29 Jun 2021 06:01:04 +0000 (15:01 +0900)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 29 Jun 2021 13:46:54 +0000 (19:16 +0530)
Fixes mode clocks for SPINOR_OP_READ_FAST_4B in tiny.

Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-tiny.c

index 70061f1a617e0484710b22ba6db9d1f23d5c0fdf..68152ce3b4b90680dfe37776bfe241ab1a847886 100644 (file)
@@ -583,6 +583,12 @@ static int spi_nor_init_params(struct spi_nor *nor,
                spi_nor_set_read_settings(&params->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))
+                       /* 0x2a: S25HL (QSPI, 3.3V), 0x2b: S25HS (QSPI, 1.8V) */
+                       params->reads[SNOR_CMD_READ_FAST].num_mode_clocks = 8;
+#endif
        }
 
        if (info->flags & SPI_NOR_QUAD_READ) {