@@ -3975,6 +3975,7 @@ static int spi_nor_micron_octal_dtr_enable(struct spi_nor *nor)
if (ret)
return ret;
+ nor->spi->flags |= SPI_XFER_SET_DDR;
*buf = SPINOR_MT_OCT_DTR;
op = (struct spi_mem_op)
SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_MT_WR_ANY_REG, 1),
@@ -4302,8 +4303,13 @@ void spi_nor_set_fixups(struct spi_nor *nor)
#endif
#ifdef CONFIG_SPI_FLASH_MT35XU
- if (!strcmp(nor->info->name, "mt35xu512aba"))
+ if (!strcmp(nor->info->name, "mt35xu512aba") ||
+ !strcmp(nor->info->name, "mt35xl512aba") ||
+ !strcmp(nor->info->name, "mt35xu01g") ||
+ !strcmp(nor->info->name, "mt35xu02g")) {
nor->fixups = &mt35xu512aba_fixups;
+ return;
+ }
#endif
#if CONFIG_IS_ENABLED(SPI_FLASH_MACRONIX)
@@ -702,7 +702,7 @@ static int cadence_spi_mem_exec_op(struct spi_slave *spi,
break;
}
- if (op->cmd.dtr)
+ if ((spi->flags & SPI_XFER_SET_DDR) && op->cmd.dtr)
err = cadence_spi_setup_ddrmode(spi, op);
return err;
@@ -172,6 +172,7 @@ struct spi_slave {
#define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END)
#define SPI_XFER_U_PAGE BIT(4)
#define SPI_XFER_STACKED BIT(5)
+#define SPI_XFER_SET_DDR BIT(6)
/*
* Flag indicating that the spi-controller has multi chip select
* capability and can assert/de-assert more than one chip select