1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2018 Xilinx
5 * Xilinx ZynqMP Generic Quad-SPI(QSPI) controller driver(master mode only)
9 #include <asm/arch/sys_proto.h>
16 #include <ubi_uboot.h>
19 #define GQSPI_GFIFO_STRT_MODE_MASK BIT(29)
20 #define GQSPI_CONFIG_MODE_EN_MASK (3 << 30)
21 #define GQSPI_CONFIG_DMA_MODE (2 << 30)
22 #define GQSPI_CONFIG_CPHA_MASK BIT(2)
23 #define GQSPI_CONFIG_CPOL_MASK BIT(1)
26 * QSPI Interrupt Registers bit Masks
28 * All the four interrupt registers (Status/Mask/Enable/Disable) have the same
31 #define GQSPI_IXR_TXNFULL_MASK 0x00000004 /* QSPI TX FIFO Overflow */
32 #define GQSPI_IXR_TXFULL_MASK 0x00000008 /* QSPI TX FIFO is full */
33 #define GQSPI_IXR_RXNEMTY_MASK 0x00000010 /* QSPI RX FIFO Not Empty */
34 #define GQSPI_IXR_GFEMTY_MASK 0x00000080 /* QSPI Generic FIFO Empty */
35 #define GQSPI_IXR_ALL_MASK (GQSPI_IXR_TXNFULL_MASK | \
36 GQSPI_IXR_RXNEMTY_MASK)
39 * QSPI Enable Register bit Masks
41 * This register is used to enable or disable the QSPI controller
43 #define GQSPI_ENABLE_ENABLE_MASK 0x00000001 /* QSPI Enable Bit Mask */
45 #define GQSPI_GFIFO_LOW_BUS BIT(14)
46 #define GQSPI_GFIFO_CS_LOWER BIT(12)
47 #define GQSPI_GFIFO_UP_BUS BIT(15)
48 #define GQSPI_GFIFO_CS_UPPER BIT(13)
49 #define GQSPI_SPI_MODE_QSPI (3 << 10)
50 #define GQSPI_SPI_MODE_SPI BIT(10)
51 #define GQSPI_SPI_MODE_DUAL_SPI (2 << 10)
52 #define GQSPI_IMD_DATA_CS_ASSERT 5
53 #define GQSPI_IMD_DATA_CS_DEASSERT 5
54 #define GQSPI_GFIFO_TX BIT(16)
55 #define GQSPI_GFIFO_RX BIT(17)
56 #define GQSPI_GFIFO_STRIPE_MASK BIT(18)
57 #define GQSPI_GFIFO_IMD_MASK 0xFF
58 #define GQSPI_GFIFO_EXP_MASK BIT(9)
59 #define GQSPI_GFIFO_DATA_XFR_MASK BIT(8)
60 #define GQSPI_STRT_GEN_FIFO BIT(28)
61 #define GQSPI_GEN_FIFO_STRT_MOD BIT(29)
62 #define GQSPI_GFIFO_WP_HOLD BIT(19)
63 #define GQSPI_BAUD_DIV_MASK (7 << 3)
64 #define GQSPI_DFLT_BAUD_RATE_DIV BIT(3)
65 #define GQSPI_GFIFO_ALL_INT_MASK 0xFBE
66 #define GQSPI_DMA_DST_I_STS_DONE BIT(1)
67 #define GQSPI_DMA_DST_I_STS_MASK 0xFE
70 #define GQSPI_GFIFO_SELECT BIT(0)
71 #define GQSPI_FIFO_THRESHOLD 1
73 #define SPI_XFER_ON_BOTH 0
74 #define SPI_XFER_ON_LOWER 1
75 #define SPI_XFER_ON_UPPER 2
77 #define GQSPI_DMA_ALIGN 0x4
78 #define GQSPI_MAX_BAUD_RATE_VAL 7
79 #define GQSPI_DFLT_BAUD_RATE_VAL 2
81 #define GQSPI_TIMEOUT 100000000
83 #define GQSPI_BAUD_DIV_SHIFT 2
84 #define GQSPI_LPBK_DLY_ADJ_LPBK_SHIFT 5
85 #define GQSPI_LPBK_DLY_ADJ_DLY_1 0x2
86 #define GQSPI_LPBK_DLY_ADJ_DLY_1_SHIFT 3
87 #define GQSPI_LPBK_DLY_ADJ_DLY_0 0x3
88 #define GQSPI_USE_DATA_DLY 0x1
89 #define GQSPI_USE_DATA_DLY_SHIFT 31
90 #define GQSPI_DATA_DLY_ADJ_VALUE 0x2
91 #define GQSPI_DATA_DLY_ADJ_SHIFT 28
92 #define TAP_DLY_BYPASS_LQSPI_RX_VALUE 0x1
93 #define TAP_DLY_BYPASS_LQSPI_RX_SHIFT 2
94 #define GQSPI_DATA_DLY_ADJ_OFST 0x000001F8
95 #define IOU_TAPDLY_BYPASS_OFST 0xFF180390
96 #define GQSPI_LPBK_DLY_ADJ_LPBK_MASK 0x00000020
97 #define GQSPI_FREQ_40MHZ 40000000
98 #define GQSPI_FREQ_100MHZ 100000000
99 #define GQSPI_FREQ_150MHZ 150000000
100 #define IOU_TAPDLY_BYPASS_MASK 0x7
102 #define GQSPI_REG_OFFSET 0x100
103 #define GQSPI_DMA_REG_OFFSET 0x800
105 /* QSPI register offsets */
106 struct zynqmp_qspi_regs {
107 u32 confr; /* 0x00 */
110 u32 idisr; /* 0x0C */
111 u32 imaskr; /* 0x10 */
114 u32 txd0r; /* 0x1C */
117 u32 txftr; /* 0x28 */
118 u32 rxftr; /* 0x2C */
119 u32 gpior; /* 0x30 */
120 u32 reserved0; /* 0x34 */
121 u32 lpbkdly; /* 0x38 */
122 u32 reserved1; /* 0x3C */
123 u32 genfifo; /* 0x40 */
124 u32 gqspisel; /* 0x44 */
125 u32 reserved2; /* 0x48 */
126 u32 gqfifoctrl; /* 0x4C */
127 u32 gqfthr; /* 0x50 */
128 u32 gqpollcfg; /* 0x54 */
129 u32 gqpollto; /* 0x58 */
130 u32 gqxfersts; /* 0x5C */
131 u32 gqfifosnap; /* 0x60 */
132 u32 gqrxcpy; /* 0x64 */
133 u32 reserved3[36]; /* 0x68 */
134 u32 gqspidlyadj; /* 0xF8 */
137 struct zynqmp_qspi_dma_regs {
138 u32 dmadst; /* 0x00 */
139 u32 dmasize; /* 0x04 */
140 u32 dmasts; /* 0x08 */
141 u32 dmactrl; /* 0x0C */
142 u32 reserved0; /* 0x10 */
143 u32 dmaisr; /* 0x14 */
144 u32 dmaier; /* 0x18 */
145 u32 dmaidr; /* 0x1C */
146 u32 dmaimr; /* 0x20 */
147 u32 dmactrl2; /* 0x24 */
148 u32 dmadstmsb; /* 0x28 */
151 DECLARE_GLOBAL_DATA_PTR;
153 struct zynqmp_qspi_platdata {
154 struct zynqmp_qspi_regs *regs;
155 struct zynqmp_qspi_dma_regs *dma_regs;
160 struct zynqmp_qspi_priv {
161 struct zynqmp_qspi_regs *regs;
162 struct zynqmp_qspi_dma_regs *dma_regs;
166 int bytes_to_transfer;
167 int bytes_to_receive;
168 unsigned int is_inst;
169 unsigned int cs_change:1;
172 static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus)
174 struct zynqmp_qspi_platdata *plat = bus->platdata;
176 debug("%s\n", __func__);
178 plat->regs = (struct zynqmp_qspi_regs *)(devfdt_get_addr(bus) +
180 plat->dma_regs = (struct zynqmp_qspi_dma_regs *)
181 (devfdt_get_addr(bus) + GQSPI_DMA_REG_OFFSET);
186 static void zynqmp_qspi_init_hw(struct zynqmp_qspi_priv *priv)
189 struct zynqmp_qspi_regs *regs = priv->regs;
191 writel(GQSPI_GFIFO_SELECT, ®s->gqspisel);
192 writel(GQSPI_GFIFO_ALL_INT_MASK, ®s->idisr);
193 writel(GQSPI_FIFO_THRESHOLD, ®s->txftr);
194 writel(GQSPI_FIFO_THRESHOLD, ®s->rxftr);
195 writel(GQSPI_GFIFO_ALL_INT_MASK, ®s->isr);
197 config_reg = readl(®s->confr);
198 config_reg &= ~(GQSPI_GFIFO_STRT_MODE_MASK |
199 GQSPI_CONFIG_MODE_EN_MASK);
200 config_reg |= GQSPI_CONFIG_DMA_MODE |
201 GQSPI_GFIFO_WP_HOLD |
202 GQSPI_DFLT_BAUD_RATE_DIV;
203 writel(config_reg, ®s->confr);
205 writel(GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
208 static u32 zynqmp_qspi_bus_select(struct zynqmp_qspi_priv *priv)
210 u32 gqspi_fifo_reg = 0;
212 gqspi_fifo_reg = GQSPI_GFIFO_LOW_BUS |
213 GQSPI_GFIFO_CS_LOWER;
215 return gqspi_fifo_reg;
218 static void zynqmp_qspi_fill_gen_fifo(struct zynqmp_qspi_priv *priv,
221 struct zynqmp_qspi_regs *regs = priv->regs;
224 ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_GFEMTY_MASK, 1,
227 printf("%s Timeout\n", __func__);
229 writel(gqspi_fifo_reg, ®s->genfifo);
232 static void zynqmp_qspi_chipselect(struct zynqmp_qspi_priv *priv, int is_on)
234 u32 gqspi_fifo_reg = 0;
237 gqspi_fifo_reg = zynqmp_qspi_bus_select(priv);
238 gqspi_fifo_reg |= GQSPI_SPI_MODE_SPI |
239 GQSPI_IMD_DATA_CS_ASSERT;
241 gqspi_fifo_reg = GQSPI_GFIFO_LOW_BUS;
242 gqspi_fifo_reg |= GQSPI_IMD_DATA_CS_DEASSERT;
245 debug("GFIFO_CMD_CS: 0x%x\n", gqspi_fifo_reg);
247 zynqmp_qspi_fill_gen_fifo(priv, gqspi_fifo_reg);
250 void zynqmp_qspi_set_tapdelay(struct udevice *bus, u32 baudrateval)
252 struct zynqmp_qspi_platdata *plat = bus->platdata;
253 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
254 struct zynqmp_qspi_regs *regs = priv->regs;
255 u32 tapdlybypass = 0, lpbkdlyadj = 0, datadlyadj = 0, clk_rate;
258 clk_rate = plat->frequency;
259 reqhz = (clk_rate / (GQSPI_BAUD_DIV_SHIFT << baudrateval));
261 debug("%s, req_hz:%d, clk_rate:%d, baudrateval:%d\n",
262 __func__, reqhz, clk_rate, baudrateval);
264 if (reqhz < GQSPI_FREQ_40MHZ) {
265 zynqmp_mmio_read(IOU_TAPDLY_BYPASS_OFST, &tapdlybypass);
266 tapdlybypass |= (TAP_DLY_BYPASS_LQSPI_RX_VALUE <<
267 TAP_DLY_BYPASS_LQSPI_RX_SHIFT);
268 } else if (reqhz <= GQSPI_FREQ_100MHZ) {
269 zynqmp_mmio_read(IOU_TAPDLY_BYPASS_OFST, &tapdlybypass);
270 tapdlybypass |= (TAP_DLY_BYPASS_LQSPI_RX_VALUE <<
271 TAP_DLY_BYPASS_LQSPI_RX_SHIFT);
272 lpbkdlyadj = readl(®s->lpbkdly);
273 lpbkdlyadj |= (GQSPI_LPBK_DLY_ADJ_LPBK_MASK);
274 datadlyadj = readl(®s->gqspidlyadj);
275 datadlyadj |= ((GQSPI_USE_DATA_DLY << GQSPI_USE_DATA_DLY_SHIFT)
276 | (GQSPI_DATA_DLY_ADJ_VALUE <<
277 GQSPI_DATA_DLY_ADJ_SHIFT));
278 } else if (reqhz <= GQSPI_FREQ_150MHZ) {
279 lpbkdlyadj = readl(®s->lpbkdly);
280 lpbkdlyadj |= ((GQSPI_LPBK_DLY_ADJ_LPBK_MASK) |
281 GQSPI_LPBK_DLY_ADJ_DLY_0);
284 zynqmp_mmio_write(IOU_TAPDLY_BYPASS_OFST, IOU_TAPDLY_BYPASS_MASK,
286 writel(lpbkdlyadj, ®s->lpbkdly);
287 writel(datadlyadj, ®s->gqspidlyadj);
290 static int zynqmp_qspi_set_speed(struct udevice *bus, uint speed)
292 struct zynqmp_qspi_platdata *plat = bus->platdata;
293 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
294 struct zynqmp_qspi_regs *regs = priv->regs;
296 u8 baud_rate_val = 0;
298 debug("%s\n", __func__);
299 if (speed > plat->frequency)
300 speed = plat->frequency;
302 /* Set the clock frequency */
303 confr = readl(®s->confr);
305 /* Set baudrate x8, if the freq is 0 */
306 baud_rate_val = GQSPI_DFLT_BAUD_RATE_VAL;
307 } else if (plat->speed_hz != speed) {
308 while ((baud_rate_val < 8) &&
310 (2 << baud_rate_val)) > speed))
313 if (baud_rate_val > GQSPI_MAX_BAUD_RATE_VAL)
314 baud_rate_val = GQSPI_DFLT_BAUD_RATE_VAL;
316 plat->speed_hz = plat->frequency / (2 << baud_rate_val);
318 confr &= ~GQSPI_BAUD_DIV_MASK;
319 confr |= (baud_rate_val << 3);
320 writel(confr, ®s->confr);
322 zynqmp_qspi_set_tapdelay(bus, baud_rate_val);
323 debug("regs=%p, speed=%d\n", priv->regs, plat->speed_hz);
328 static int zynqmp_qspi_probe(struct udevice *bus)
330 struct zynqmp_qspi_platdata *plat = dev_get_platdata(bus);
331 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
336 debug("%s: bus:%p, priv:%p\n", __func__, bus, priv);
338 priv->regs = plat->regs;
339 priv->dma_regs = plat->dma_regs;
341 ret = clk_get_by_index(bus, 0, &clk);
343 dev_err(dev, "failed to get clock\n");
347 clock = clk_get_rate(&clk);
348 if (IS_ERR_VALUE(clock)) {
349 dev_err(dev, "failed to get rate\n");
352 debug("%s: CLK %ld\n", __func__, clock);
354 ret = clk_enable(&clk);
355 if (ret && ret != -ENOSYS) {
356 dev_err(dev, "failed to enable clock\n");
359 plat->frequency = clock;
360 plat->speed_hz = plat->frequency / 2;
362 /* init the zynq spi hw */
363 zynqmp_qspi_init_hw(priv);
368 static int zynqmp_qspi_set_mode(struct udevice *bus, uint mode)
370 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
371 struct zynqmp_qspi_regs *regs = priv->regs;
374 debug("%s\n", __func__);
375 /* Set the SPI Clock phase and polarities */
376 confr = readl(®s->confr);
377 confr &= ~(GQSPI_CONFIG_CPHA_MASK |
378 GQSPI_CONFIG_CPOL_MASK);
381 confr |= GQSPI_CONFIG_CPHA_MASK;
383 confr |= GQSPI_CONFIG_CPOL_MASK;
385 writel(confr, ®s->confr);
390 static int zynqmp_qspi_fill_tx_fifo(struct zynqmp_qspi_priv *priv, u32 size)
394 struct zynqmp_qspi_regs *regs = priv->regs;
395 u32 *buf = (u32 *)priv->tx_buf;
398 debug("TxFIFO: 0x%x, size: 0x%x\n", readl(®s->isr),
402 ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_TXNFULL_MASK, 1,
405 printf("%s: Timeout\n", __func__);
410 writel(*buf, ®s->txd0r);
418 data |= GENMASK(31, 8);
421 data = *((u16 *)buf);
423 data |= GENMASK(31, 16);
426 data = *((u16 *)buf);
428 data |= (*((u8 *)buf) << 16);
430 data |= GENMASK(31, 24);
433 writel(data, ®s->txd0r);
442 static void zynqmp_qspi_genfifo_cmd(struct zynqmp_qspi_priv *priv)
448 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
449 gen_fifo_cmd |= GQSPI_GFIFO_TX | GQSPI_SPI_MODE_SPI;
450 gen_fifo_cmd |= *(u8 *)priv->tx_buf;
453 priv->tx_buf = (u8 *)priv->tx_buf + 1;
455 debug("GFIFO_CMD_Cmd = 0x%x\n", gen_fifo_cmd);
457 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
461 static u32 zynqmp_qspi_calc_exp(struct zynqmp_qspi_priv *priv,
468 if (priv->len > 255) {
469 if (priv->len & (1 << expval)) {
470 *gen_fifo_cmd &= ~GQSPI_GFIFO_IMD_MASK;
471 *gen_fifo_cmd |= GQSPI_GFIFO_EXP_MASK;
472 *gen_fifo_cmd |= expval;
473 priv->len -= (1 << expval);
478 *gen_fifo_cmd &= ~(GQSPI_GFIFO_IMD_MASK |
479 GQSPI_GFIFO_EXP_MASK);
480 *gen_fifo_cmd |= (u8)priv->len;
488 static int zynqmp_qspi_genfifo_fill_tx(struct zynqmp_qspi_priv *priv)
494 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
495 gen_fifo_cmd |= GQSPI_GFIFO_TX |
496 GQSPI_GFIFO_DATA_XFR_MASK;
498 gen_fifo_cmd |= GQSPI_SPI_MODE_SPI;
501 len = zynqmp_qspi_calc_exp(priv, &gen_fifo_cmd);
502 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
504 debug("GFIFO_CMD_TX:0x%x\n", gen_fifo_cmd);
506 if (gen_fifo_cmd & GQSPI_GFIFO_EXP_MASK)
507 ret = zynqmp_qspi_fill_tx_fifo(priv,
510 ret = zynqmp_qspi_fill_tx_fifo(priv,
519 static int zynqmp_qspi_start_dma(struct zynqmp_qspi_priv *priv,
520 u32 gen_fifo_cmd, u32 *buf)
524 u32 actuallen = priv->len;
526 struct zynqmp_qspi_dma_regs *dma_regs = priv->dma_regs;
528 writel((unsigned long)buf, &dma_regs->dmadst);
529 writel(roundup(priv->len, ARCH_DMA_MINALIGN), &dma_regs->dmasize);
530 writel(GQSPI_DMA_DST_I_STS_MASK, &dma_regs->dmaier);
531 addr = (unsigned long)buf;
532 size = roundup(priv->len, ARCH_DMA_MINALIGN);
533 flush_dcache_range(addr, addr + size);
536 len = zynqmp_qspi_calc_exp(priv, &gen_fifo_cmd);
537 if (!(gen_fifo_cmd & GQSPI_GFIFO_EXP_MASK) &&
538 (len % ARCH_DMA_MINALIGN)) {
539 gen_fifo_cmd &= ~GENMASK(7, 0);
540 gen_fifo_cmd |= roundup(len, ARCH_DMA_MINALIGN);
542 zynqmp_qspi_fill_gen_fifo(priv, gen_fifo_cmd);
544 debug("GFIFO_CMD_RX:0x%x\n", gen_fifo_cmd);
547 ret = wait_for_bit_le32(&dma_regs->dmaisr, GQSPI_DMA_DST_I_STS_DONE,
548 1, GQSPI_TIMEOUT, 1);
550 printf("DMA Timeout:0x%x\n", readl(&dma_regs->dmaisr));
554 writel(GQSPI_DMA_DST_I_STS_DONE, &dma_regs->dmaisr);
556 debug("buf:0x%lx, rxbuf:0x%lx, *buf:0x%x len: 0x%x\n",
557 (unsigned long)buf, (unsigned long)priv->rx_buf, *buf,
560 if (buf != priv->rx_buf)
561 memcpy(priv->rx_buf, buf, actuallen);
566 static int zynqmp_qspi_genfifo_fill_rx(struct zynqmp_qspi_priv *priv)
570 u32 actuallen = priv->len;
572 gen_fifo_cmd = zynqmp_qspi_bus_select(priv);
573 gen_fifo_cmd |= GQSPI_GFIFO_RX |
574 GQSPI_GFIFO_DATA_XFR_MASK;
576 gen_fifo_cmd |= GQSPI_SPI_MODE_SPI;
579 * Check if receive buffer is aligned to 4 byte and length
580 * is multiples of four byte as we are using dma to receive.
582 if (!((unsigned long)priv->rx_buf & (GQSPI_DMA_ALIGN - 1)) &&
583 !(actuallen % GQSPI_DMA_ALIGN)) {
584 buf = (u32 *)priv->rx_buf;
585 return zynqmp_qspi_start_dma(priv, gen_fifo_cmd, buf);
588 ALLOC_CACHE_ALIGN_BUFFER(u8, tmp, roundup(priv->len,
591 return zynqmp_qspi_start_dma(priv, gen_fifo_cmd, buf);
594 static int zynqmp_qspi_start_transfer(struct zynqmp_qspi_priv *priv)
600 zynqmp_qspi_genfifo_cmd(priv);
605 ret = zynqmp_qspi_genfifo_fill_tx(priv);
606 else if (priv->rx_buf)
607 ret = zynqmp_qspi_genfifo_fill_rx(priv);
614 static int zynqmp_qspi_transfer(struct zynqmp_qspi_priv *priv)
616 static unsigned int cs_change = 1;
619 debug("%s\n", __func__);
622 /* Select the chip if required */
624 zynqmp_qspi_chipselect(priv, 1);
626 cs_change = priv->cs_change;
628 if (!priv->tx_buf && !priv->rx_buf && priv->len) {
633 /* Request the transfer */
635 status = zynqmp_qspi_start_transfer(priv);
642 /* Deselect the chip */
643 zynqmp_qspi_chipselect(priv, 0);
650 static int zynqmp_qspi_claim_bus(struct udevice *dev)
652 struct udevice *bus = dev->parent;
653 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
654 struct zynqmp_qspi_regs *regs = priv->regs;
656 writel(GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
661 static int zynqmp_qspi_release_bus(struct udevice *dev)
663 struct udevice *bus = dev->parent;
664 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
665 struct zynqmp_qspi_regs *regs = priv->regs;
667 writel(~GQSPI_ENABLE_ENABLE_MASK, ®s->enbr);
672 int zynqmp_qspi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout,
673 void *din, unsigned long flags)
675 struct udevice *bus = dev->parent;
676 struct zynqmp_qspi_priv *priv = dev_get_priv(bus);
678 debug("%s: priv: 0x%08lx bitlen: %d dout: 0x%08lx ", __func__,
679 (unsigned long)priv, bitlen, (unsigned long)dout);
680 debug("din: 0x%08lx flags: 0x%lx\n", (unsigned long)din, flags);
684 priv->len = bitlen / 8;
687 * Assume that the beginning of a transfer with bits to
688 * transmit must contain a device command.
690 if (dout && flags & SPI_XFER_BEGIN)
695 if (flags & SPI_XFER_END)
700 zynqmp_qspi_transfer(priv);
705 static const struct dm_spi_ops zynqmp_qspi_ops = {
706 .claim_bus = zynqmp_qspi_claim_bus,
707 .release_bus = zynqmp_qspi_release_bus,
708 .xfer = zynqmp_qspi_xfer,
709 .set_speed = zynqmp_qspi_set_speed,
710 .set_mode = zynqmp_qspi_set_mode,
713 static const struct udevice_id zynqmp_qspi_ids[] = {
714 { .compatible = "xlnx,zynqmp-qspi-1.0" },
715 { .compatible = "xlnx,versal-qspi-1.0" },
719 U_BOOT_DRIVER(zynqmp_qspi) = {
720 .name = "zynqmp_qspi",
722 .of_match = zynqmp_qspi_ids,
723 .ops = &zynqmp_qspi_ops,
724 .ofdata_to_platdata = zynqmp_qspi_ofdata_to_platdata,
725 .platdata_auto_alloc_size = sizeof(struct zynqmp_qspi_platdata),
726 .priv_auto_alloc_size = sizeof(struct zynqmp_qspi_priv),
727 .probe = zynqmp_qspi_probe,