1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2018 Xilinx
5 * Xilinx ZynqMP Generic Quad-SPI(QSPI) controller driver(master mode only)
10 #include <asm/arch/sys_proto.h>
17 #include <ubi_uboot.h>
20 #define GQSPI_GFIFO_STRT_MODE_MASK BIT(29)
21 #define GQSPI_CONFIG_MODE_EN_MASK (3 << 30)
22 #define GQSPI_CONFIG_DMA_MODE (2 << 30)
23 #define GQSPI_CONFIG_CPHA_MASK BIT(2)
24 #define GQSPI_CONFIG_CPOL_MASK BIT(1)
27 * QSPI Interrupt Registers bit Masks
29 * All the four interrupt registers (Status/Mask/Enable/Disable) have the same
32 #define GQSPI_IXR_TXNFULL_MASK 0x00000004 /* QSPI TX FIFO Overflow */
33 #define GQSPI_IXR_TXFULL_MASK 0x00000008 /* QSPI TX FIFO is full */
34 #define GQSPI_IXR_RXNEMTY_MASK 0x00000010 /* QSPI RX FIFO Not Empty */
35 #define GQSPI_IXR_GFEMTY_MASK 0x00000080 /* QSPI Generic FIFO Empty */
36 #define GQSPI_IXR_ALL_MASK (GQSPI_IXR_TXNFULL_MASK | \
37 GQSPI_IXR_RXNEMTY_MASK)
40 * QSPI Enable Register bit Masks
42 * This register is used to enable or disable the QSPI controller
44 #define GQSPI_ENABLE_ENABLE_MASK 0x00000001 /* QSPI Enable Bit Mask */
46 #define GQSPI_GFIFO_LOW_BUS BIT(14)
47 #define GQSPI_GFIFO_CS_LOWER BIT(12)
48 #define GQSPI_GFIFO_UP_BUS BIT(15)
49 #define GQSPI_GFIFO_CS_UPPER BIT(13)
50 #define GQSPI_SPI_MODE_QSPI (3 << 10)
51 #define GQSPI_SPI_MODE_SPI BIT(10)
52 #define GQSPI_SPI_MODE_DUAL_SPI (2 << 10)
53 #define GQSPI_IMD_DATA_CS_ASSERT 5
54 #define GQSPI_IMD_DATA_CS_DEASSERT 5
55 #define GQSPI_GFIFO_TX BIT(16)
56 #define GQSPI_GFIFO_RX BIT(17)
57 #define GQSPI_GFIFO_STRIPE_MASK BIT(18)
58 #define GQSPI_GFIFO_IMD_MASK 0xFF
59 #define GQSPI_GFIFO_EXP_MASK BIT(9)
60 #define GQSPI_GFIFO_DATA_XFR_MASK BIT(8)
61 #define GQSPI_STRT_GEN_FIFO BIT(28)
62 #define GQSPI_GEN_FIFO_STRT_MOD BIT(29)
63 #define GQSPI_GFIFO_WP_HOLD BIT(19)
64 #define GQSPI_BAUD_DIV_MASK (7 << 3)
65 #define GQSPI_DFLT_BAUD_RATE_DIV BIT(3)
66 #define GQSPI_GFIFO_ALL_INT_MASK 0xFBE
67 #define GQSPI_DMA_DST_I_STS_DONE BIT(1)
68 #define GQSPI_DMA_DST_I_STS_MASK 0xFE
71 #define GQSPI_GFIFO_SELECT BIT(0)
72 #define GQSPI_FIFO_THRESHOLD 1
74 #define SPI_XFER_ON_BOTH 0
75 #define SPI_XFER_ON_LOWER 1
76 #define SPI_XFER_ON_UPPER 2
78 #define GQSPI_DMA_ALIGN 0x4
79 #define GQSPI_MAX_BAUD_RATE_VAL 7
80 #define GQSPI_DFLT_BAUD_RATE_VAL 2
82 #define GQSPI_TIMEOUT 100000000
84 #define GQSPI_BAUD_DIV_SHIFT 2
85 #define GQSPI_LPBK_DLY_ADJ_LPBK_SHIFT 5
86 #define GQSPI_LPBK_DLY_ADJ_DLY_1 0x2
87 #define GQSPI_LPBK_DLY_ADJ_DLY_1_SHIFT 3
88 #define GQSPI_LPBK_DLY_ADJ_DLY_0 0x3
89 #define GQSPI_USE_DATA_DLY 0x1
90 #define GQSPI_USE_DATA_DLY_SHIFT 31
91 #define GQSPI_DATA_DLY_ADJ_VALUE 0x2
92 #define GQSPI_DATA_DLY_ADJ_SHIFT 28
93 #define TAP_DLY_BYPASS_LQSPI_RX_VALUE 0x1
94 #define TAP_DLY_BYPASS_LQSPI_RX_SHIFT 2
95 #define GQSPI_DATA_DLY_ADJ_OFST 0x000001F8
96 #define IOU_TAPDLY_BYPASS_OFST 0xFF180390
97 #define GQSPI_LPBK_DLY_ADJ_LPBK_MASK 0x00000020
98 #define GQSPI_FREQ_40MHZ 40000000
99 #define GQSPI_FREQ_100MHZ 100000000
100 #define GQSPI_FREQ_150MHZ 150000000
101 #define IOU_TAPDLY_BYPASS_MASK 0x7
103 #define GQSPI_REG_OFFSET 0x100
104 #define GQSPI_DMA_REG_OFFSET 0x800
106 /* QSPI register offsets */
107 struct zynqmp_qspi_regs {
108 u32 confr; /* 0x00 */
111 u32 idisr; /* 0x0C */
112 u32 imaskr; /* 0x10 */
115 u32 txd0r; /* 0x1C */
118 u32 txftr; /* 0x28 */
119 u32 rxftr; /* 0x2C */
120 u32 gpior; /* 0x30 */
121 u32 reserved0; /* 0x34 */
122 u32 lpbkdly; /* 0x38 */
123 u32 reserved1; /* 0x3C */
124 u32 genfifo; /* 0x40 */
125 u32 gqspisel; /* 0x44 */
126 u32 reserved2; /* 0x48 */
127 u32 gqfifoctrl; /* 0x4C */
128 u32 gqfthr; /* 0x50 */
129 u32 gqpollcfg; /* 0x54 */
130 u32 gqpollto; /* 0x58 */
131 u32 gqxfersts; /* 0x5C */
132 u32 gqfifosnap; /* 0x60 */
133 u32 gqrxcpy; /* 0x64 */
134 u32 reserved3[36]; /* 0x68 */
135 u32 gqspidlyadj; /* 0xF8 */
138 struct zynqmp_qspi_dma_regs {
139 u32 dmadst; /* 0x00 */
140 u32 dmasize; /* 0x04 */
141 u32 dmasts; /* 0x08 */
142 u32 dmactrl; /* 0x0C */
143 u32 reserved0; /* 0x10 */
144 u32 dmaisr; /* 0x14 */
145 u32 dmaier; /* 0x18 */
146 u32 dmaidr; /* 0x1C */
147 u32 dmaimr; /* 0x20 */
148 u32 dmactrl2; /* 0x24 */
149 u32 dmadstmsb; /* 0x28 */
152 DECLARE_GLOBAL_DATA_PTR;
154 struct zynqmp_qspi_platdata {
155 struct zynqmp_qspi_regs *regs;
156 struct zynqmp_qspi_dma_regs *dma_regs;
161 struct zynqmp_qspi_priv {
162 struct zynqmp_qspi_regs *regs;
163 struct zynqmp_qspi_dma_regs *dma_regs;
167 int bytes_to_transfer;
168 int bytes_to_receive;
169 unsigned int is_inst;
170 unsigned int cs_change:1;
173 static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus)
175 struct zynqmp_qspi_platdata *plat = bus->platdata;
177 debug("%s\n", __func__);
179 plat->regs = (struct zynqmp_qspi_regs *)(devfdt_get_addr(bus) +
181 plat->dma_regs = (struct zynqmp_qspi_dma_regs *)
182 (devfdt_get_addr(bus) + GQSPI_DMA_REG_OFFSET);
187 static void zynqmp_qspi_init_hw(struct zynqmp_qspi_priv *priv)
190 struct zynqmp_qspi_regs *regs = priv->regs;
192 writel(GQSPI_GFIFO_SELECT, ®s->gqspisel);
193 writel(GQSPI_GFIFO_ALL_INT_MASK, ®s->idisr);
194 writel(GQSPI_FIFO_THRESHOLD, ®s->txftr);
195 writel(GQSPI_FIFO_THRESHOLD, ®s->rxftr);
196 writel(GQSPI_GFIFO_ALL_INT_MASK, ®s->isr);
198 config_reg = readl(®s->confr);
199 config_reg &= ~(GQSPI_GFIFO_STRT_MODE_MASK |
200 GQSPI_CONFIG_MODE_EN_MASK);
201 config_reg |= GQSPI_CONFIG_DMA_MODE |
202 GQSPI_GFIFO_WP_HOLD |
203 GQSPI_DFLT_BAUD_RATE_DIV;
204 writel(config_reg, ®s->confr);
206 writel(GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
209 static u32 zynqmp_qspi_bus_select(struct zynqmp_qspi_priv *priv)
211 u32 gqspi_fifo_reg = 0;
213 gqspi_fifo_reg = GQSPI_GFIFO_LOW_BUS |
214 GQSPI_GFIFO_CS_LOWER;
216 return gqspi_fifo_reg;
219 static void zynqmp_qspi_fill_gen_fifo(struct zynqmp_qspi_priv *priv,
222 struct zynqmp_qspi_regs *regs = priv->regs;
225 ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_GFEMTY_MASK, 1,
228 printf("%s Timeout\n", __func__);
230 writel(gqspi_fifo_reg, ®s->genfifo);
233 static void zynqmp_qspi_chipselect(struct zynqmp_qspi_priv *priv, int is_on)
235 u32 gqspi_fifo_reg = 0;
238 gqspi_fifo_reg = zynqmp_qspi_bus_select(priv);
239 gqspi_fifo_reg |= GQSPI_SPI_MODE_SPI |
240 GQSPI_IMD_DATA_CS_ASSERT;
242 gqspi_fifo_reg = GQSPI_GFIFO_LOW_BUS;
243 gqspi_fifo_reg |= GQSPI_IMD_DATA_CS_DEASSERT;
246 debug("GFIFO_CMD_CS: 0x%x\n", gqspi_fifo_reg);
248 zynqmp_qspi_fill_gen_fifo(priv, gqspi_fifo_reg);
251 void zynqmp_qspi_set_tapdelay(struct udevice *bus, u32 baudrateval)
253 struct zynqmp_qspi_platdata *plat = bus->platdata;
254 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
255 struct zynqmp_qspi_regs *regs = priv->regs;
256 u32 tapdlybypass = 0, lpbkdlyadj = 0, datadlyadj = 0, clk_rate;
259 clk_rate = plat->frequency;
260 reqhz = (clk_rate / (GQSPI_BAUD_DIV_SHIFT << baudrateval));
262 debug("%s, req_hz:%d, clk_rate:%d, baudrateval:%d\n",
263 __func__, reqhz, clk_rate, baudrateval);
265 if (reqhz < GQSPI_FREQ_40MHZ) {
266 zynqmp_mmio_read(IOU_TAPDLY_BYPASS_OFST, &tapdlybypass);
267 tapdlybypass |= (TAP_DLY_BYPASS_LQSPI_RX_VALUE <<
268 TAP_DLY_BYPASS_LQSPI_RX_SHIFT);
269 } else if (reqhz <= GQSPI_FREQ_100MHZ) {
270 zynqmp_mmio_read(IOU_TAPDLY_BYPASS_OFST, &tapdlybypass);
271 tapdlybypass |= (TAP_DLY_BYPASS_LQSPI_RX_VALUE <<
272 TAP_DLY_BYPASS_LQSPI_RX_SHIFT);
273 lpbkdlyadj = readl(®s->lpbkdly);
274 lpbkdlyadj |= (GQSPI_LPBK_DLY_ADJ_LPBK_MASK);
275 datadlyadj = readl(®s->gqspidlyadj);
276 datadlyadj |= ((GQSPI_USE_DATA_DLY << GQSPI_USE_DATA_DLY_SHIFT)
277 | (GQSPI_DATA_DLY_ADJ_VALUE <<
278 GQSPI_DATA_DLY_ADJ_SHIFT));
279 } else if (reqhz <= GQSPI_FREQ_150MHZ) {
280 lpbkdlyadj = readl(®s->lpbkdly);
281 lpbkdlyadj |= ((GQSPI_LPBK_DLY_ADJ_LPBK_MASK) |
282 GQSPI_LPBK_DLY_ADJ_DLY_0);
285 zynqmp_mmio_write(IOU_TAPDLY_BYPASS_OFST, IOU_TAPDLY_BYPASS_MASK,
287 writel(lpbkdlyadj, ®s->lpbkdly);
288 writel(datadlyadj, ®s->gqspidlyadj);
291 static int zynqmp_qspi_set_speed(struct udevice *bus, uint speed)
293 struct zynqmp_qspi_platdata *plat = bus->platdata;
294 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
295 struct zynqmp_qspi_regs *regs = priv->regs;
297 u8 baud_rate_val = 0;
299 debug("%s\n", __func__);
300 if (speed > plat->frequency)
301 speed = plat->frequency;
303 /* Set the clock frequency */
304 confr = readl(®s->confr);
306 /* Set baudrate x8, if the freq is 0 */
307 baud_rate_val = GQSPI_DFLT_BAUD_RATE_VAL;
308 } else if (plat->speed_hz != speed) {
309 while ((baud_rate_val < 8) &&
311 (2 << baud_rate_val)) > speed))
314 if (baud_rate_val > GQSPI_MAX_BAUD_RATE_VAL)
315 baud_rate_val = GQSPI_DFLT_BAUD_RATE_VAL;
317 plat->speed_hz = plat->frequency / (2 << baud_rate_val);
319 confr &= ~GQSPI_BAUD_DIV_MASK;
320 confr |= (baud_rate_val << 3);
321 writel(confr, ®s->confr);
323 zynqmp_qspi_set_tapdelay(bus, baud_rate_val);
324 debug("regs=%p, speed=%d\n", priv->regs, plat->speed_hz);
329 static int zynqmp_qspi_probe(struct udevice *bus)
331 struct zynqmp_qspi_platdata *plat = dev_get_platdata(bus);
332 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
337 debug("%s: bus:%p, priv:%p\n", __func__, bus, priv);
339 priv->regs = plat->regs;
340 priv->dma_regs = plat->dma_regs;
342 ret = clk_get_by_index(bus, 0, &clk);
344 dev_err(dev, "failed to get clock\n");
348 clock = clk_get_rate(&clk);
349 if (IS_ERR_VALUE(clock)) {
350 dev_err(dev, "failed to get rate\n");
353 debug("%s: CLK %ld\n", __func__, clock);
355 ret = clk_enable(&clk);
356 if (ret && ret != -ENOSYS) {
357 dev_err(dev, "failed to enable clock\n");
360 plat->frequency = clock;
361 plat->speed_hz = plat->frequency / 2;
363 /* init the zynq spi hw */
364 zynqmp_qspi_init_hw(priv);
369 static int zynqmp_qspi_set_mode(struct udevice *bus, uint mode)
371 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
372 struct zynqmp_qspi_regs *regs = priv->regs;
375 debug("%s\n", __func__);
376 /* Set the SPI Clock phase and polarities */
377 confr = readl(®s->confr);
378 confr &= ~(GQSPI_CONFIG_CPHA_MASK |
379 GQSPI_CONFIG_CPOL_MASK);
382 confr |= GQSPI_CONFIG_CPHA_MASK;
384 confr |= GQSPI_CONFIG_CPOL_MASK;
386 writel(confr, ®s->confr);
391 static int zynqmp_qspi_fill_tx_fifo(struct zynqmp_qspi_priv *priv, u32 size)
395 struct zynqmp_qspi_regs *regs = priv->regs;
396 u32 *buf = (u32 *)priv->tx_buf;
399 debug("TxFIFO: 0x%x, size: 0x%x\n", readl(®s->isr),
403 ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_TXNFULL_MASK, 1,
406 printf("%s: Timeout\n", __func__);
411 writel(*buf, ®s->txd0r);
419 data |= GENMASK(31, 8);
422 data = *((u16 *)buf);
424 data |= GENMASK(31, 16);
427 data = *((u16 *)buf);
429 data |= (*((u8 *)buf) << 16);
431 data |= GENMASK(31, 24);
434 writel(data, ®s->txd0r);
443 static void zynqmp_qspi_genfifo_cmd(struct zynqmp_qspi_priv *priv)
449 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
450 gen_fifo_cmd |= GQSPI_GFIFO_TX | GQSPI_SPI_MODE_SPI;
451 gen_fifo_cmd |= *(u8 *)priv->tx_buf;
454 priv->tx_buf = (u8 *)priv->tx_buf + 1;
456 debug("GFIFO_CMD_Cmd = 0x%x\n", gen_fifo_cmd);
458 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
462 static u32 zynqmp_qspi_calc_exp(struct zynqmp_qspi_priv *priv,
469 if (priv->len > 255) {
470 if (priv->len & (1 << expval)) {
471 *gen_fifo_cmd &= ~GQSPI_GFIFO_IMD_MASK;
472 *gen_fifo_cmd |= GQSPI_GFIFO_EXP_MASK;
473 *gen_fifo_cmd |= expval;
474 priv->len -= (1 << expval);
479 *gen_fifo_cmd &= ~(GQSPI_GFIFO_IMD_MASK |
480 GQSPI_GFIFO_EXP_MASK);
481 *gen_fifo_cmd |= (u8)priv->len;
489 static int zynqmp_qspi_genfifo_fill_tx(struct zynqmp_qspi_priv *priv)
495 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
496 gen_fifo_cmd |= GQSPI_GFIFO_TX |
497 GQSPI_GFIFO_DATA_XFR_MASK;
499 gen_fifo_cmd |= GQSPI_SPI_MODE_SPI;
502 len = zynqmp_qspi_calc_exp(priv, &gen_fifo_cmd);
503 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
505 debug("GFIFO_CMD_TX:0x%x\n", gen_fifo_cmd);
507 if (gen_fifo_cmd & GQSPI_GFIFO_EXP_MASK)
508 ret = zynqmp_qspi_fill_tx_fifo(priv,
511 ret = zynqmp_qspi_fill_tx_fifo(priv,
520 static int zynqmp_qspi_start_dma(struct zynqmp_qspi_priv *priv,
521 u32 gen_fifo_cmd, u32 *buf)
525 u32 actuallen = priv->len;
527 struct zynqmp_qspi_dma_regs *dma_regs = priv->dma_regs;
529 writel((unsigned long)buf, &dma_regs->dmadst);
530 writel(roundup(priv->len, ARCH_DMA_MINALIGN), &dma_regs->dmasize);
531 writel(GQSPI_DMA_DST_I_STS_MASK, &dma_regs->dmaier);
532 addr = (unsigned long)buf;
533 size = roundup(priv->len, ARCH_DMA_MINALIGN);
534 flush_dcache_range(addr, addr + size);
537 len = zynqmp_qspi_calc_exp(priv, &gen_fifo_cmd);
538 if (!(gen_fifo_cmd & GQSPI_GFIFO_EXP_MASK) &&
539 (len % ARCH_DMA_MINALIGN)) {
540 gen_fifo_cmd &= ~GENMASK(7, 0);
541 gen_fifo_cmd |= roundup(len, ARCH_DMA_MINALIGN);
543 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
545 debug("GFIFO_CMD_RX:0x%x\n", gen_fifo_cmd);
548 ret = wait_for_bit_le32(&dma_regs->dmaisr, GQSPI_DMA_DST_I_STS_DONE,
549 1, GQSPI_TIMEOUT, 1);
551 printf("DMA Timeout:0x%x\n", readl(&dma_regs->dmaisr));
555 writel(GQSPI_DMA_DST_I_STS_DONE, &dma_regs->dmaisr);
557 debug("buf:0x%lx, rxbuf:0x%lx, *buf:0x%x len: 0x%x\n",
558 (unsigned long)buf, (unsigned long)priv->rx_buf, *buf,
561 if (buf != priv->rx_buf)
562 memcpy(priv->rx_buf, buf, actuallen);
567 static int zynqmp_qspi_genfifo_fill_rx(struct zynqmp_qspi_priv *priv)
571 u32 actuallen = priv->len;
573 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
574 gen_fifo_cmd |= GQSPI_GFIFO_RX |
575 GQSPI_GFIFO_DATA_XFR_MASK;
577 gen_fifo_cmd |= GQSPI_SPI_MODE_SPI;
580 * Check if receive buffer is aligned to 4 byte and length
581 * is multiples of four byte as we are using dma to receive.
583 if (!((unsigned long)priv->rx_buf & (GQSPI_DMA_ALIGN - 1)) &&
584 !(actuallen % GQSPI_DMA_ALIGN)) {
585 buf = (u32 *)priv->rx_buf;
586 return zynqmp_qspi_start_dma(priv, gen_fifo_cmd, buf);
589 ALLOC_CACHE_ALIGN_BUFFER(u8, tmp, roundup(priv->len,
592 return zynqmp_qspi_start_dma(priv, gen_fifo_cmd, buf);
595 static int zynqmp_qspi_start_transfer(struct zynqmp_qspi_priv *priv)
601 zynqmp_qspi_genfifo_cmd(priv);
606 ret = zynqmp_qspi_genfifo_fill_tx(priv);
607 else if (priv->rx_buf)
608 ret = zynqmp_qspi_genfifo_fill_rx(priv);
615 static int zynqmp_qspi_transfer(struct zynqmp_qspi_priv *priv)
617 static unsigned int cs_change = 1;
620 debug("%s\n", __func__);
623 /* Select the chip if required */
625 zynqmp_qspi_chipselect(priv, 1);
627 cs_change = priv->cs_change;
629 if (!priv->tx_buf && !priv->rx_buf && priv->len) {
634 /* Request the transfer */
636 status = zynqmp_qspi_start_transfer(priv);
643 /* Deselect the chip */
644 zynqmp_qspi_chipselect(priv, 0);
651 static int zynqmp_qspi_claim_bus(struct udevice *dev)
653 struct udevice *bus = dev->parent;
654 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
655 struct zynqmp_qspi_regs *regs = priv->regs;
657 writel(GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
662 static int zynqmp_qspi_release_bus(struct udevice *dev)
664 struct udevice *bus = dev->parent;
665 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
666 struct zynqmp_qspi_regs *regs = priv->regs;
668 writel(~GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
673 int zynqmp_qspi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout,
674 void *din, unsigned long flags)
676 struct udevice *bus = dev->parent;
677 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
679 debug("%s: priv: 0x%08lx bitlen: %d dout: 0x%08lx ", __func__,
680 (unsigned long)priv, bitlen, (unsigned long)dout);
681 debug("din: 0x%08lx flags: 0x%lx\n", (unsigned long)din, flags);
685 priv->len = bitlen / 8;
688 * Assume that the beginning of a transfer with bits to
689 * transmit must contain a device command.
691 if (dout && flags & SPI_XFER_BEGIN)
696 if (flags & SPI_XFER_END)
701 zynqmp_qspi_transfer(priv);
706 static const struct dm_spi_ops zynqmp_qspi_ops = {
707 .claim_bus = zynqmp_qspi_claim_bus,
708 .release_bus = zynqmp_qspi_release_bus,
709 .xfer = zynqmp_qspi_xfer,
710 .set_speed = zynqmp_qspi_set_speed,
711 .set_mode = zynqmp_qspi_set_mode,
714 static const struct udevice_id zynqmp_qspi_ids[] = {
715 { .compatible = "xlnx,zynqmp-qspi-1.0" },
716 { .compatible = "xlnx,versal-qspi-1.0" },
720 U_BOOT_DRIVER(zynqmp_qspi) = {
721 .name = "zynqmp_qspi",
723 .of_match = zynqmp_qspi_ids,
724 .ops = &zynqmp_qspi_ops,
725 .ofdata_to_platdata = zynqmp_qspi_ofdata_to_platdata,
726 .platdata_auto_alloc_size = sizeof(struct zynqmp_qspi_platdata),
727 .priv_auto_alloc_size = sizeof(struct zynqmp_qspi_priv),
728 .probe = zynqmp_qspi_probe,