@@ -61,6 +61,7 @@
#define CQSPI_REG_RD_INSTR 0x04
#define CQSPI_REG_RD_INSTR_OPCODE_LSB 0
#define CQSPI_REG_RD_INSTR_TYPE_INSTR_LSB 8
+#define CQSPI_REG_RD_INSTR_DDR_EN_MASK BIT(10)
#define CQSPI_REG_RD_INSTR_TYPE_ADDR_LSB 12
#define CQSPI_REG_RD_INSTR_TYPE_DATA_LSB 16
#define CQSPI_REG_RD_INSTR_MODE_EN_LSB 20
@@ -446,6 +446,7 @@ int cadence_qspi_apb_command_read_setup(struct cadence_spi_priv *priv,
return ret;
reg = cadence_qspi_calc_rdreg(priv);
+ reg |= op->cmd.dtr ? CQSPI_REG_RD_INSTR_DDR_EN_MASK : 0;
writel(reg, priv->regbase + CQSPI_REG_RD_INSTR);
return 0;
@@ -537,6 +538,7 @@ int cadence_qspi_apb_command_write_setup(struct cadence_spi_priv *priv,
return ret;
reg = cadence_qspi_calc_rdreg(priv);
+ reg |= op->cmd.dtr ? CQSPI_REG_RD_INSTR_DDR_EN_MASK : 0;
writel(reg, priv->regbase + CQSPI_REG_RD_INSTR);
return 0;
@@ -638,6 +640,7 @@ int cadence_qspi_apb_read_setup(struct cadence_spi_priv *priv,
opcode = op->cmd.opcode;
rd_reg = opcode << CQSPI_REG_RD_INSTR_OPCODE_LSB;
+ rd_reg |= op->cmd.dtr ? CQSPI_REG_RD_INSTR_DDR_EN_MASK : 0;
rd_reg |= cadence_qspi_calc_rdreg(priv);
writel(op->addr.val, priv->regbase + CQSPI_REG_INDIRECTRDSTARTADDR);
@@ -812,6 +815,7 @@ int cadence_qspi_apb_write_setup(struct cadence_spi_priv *priv,
writel(reg, priv->regbase + CQSPI_REG_WR_INSTR);
reg = cadence_qspi_calc_rdreg(priv);
+ reg |= op->cmd.dtr ? CQSPI_REG_RD_INSTR_DDR_EN_MASK : 0;
writel(reg, priv->regbase + CQSPI_REG_RD_INSTR);
writel(op->addr.val, priv->regbase + CQSPI_REG_INDIRECTWRSTARTADDR);