1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2009 SAMSUNG Electronics
4 * Minkyu Kang <mk7.kang@samsung.com>
5 * Jaehoon Chung <jh80.chung@samsung.com>
6 * Portions Copyright 2011-2019 NVIDIA Corporation
17 #include <asm/arch-tegra/tegra_mmc.h>
18 #include <linux/delay.h>
19 #include <linux/err.h>
20 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
21 #include <asm/arch/clock.h>
24 struct tegra_mmc_plat {
25 struct mmc_config cfg;
29 struct tegra_mmc_priv {
30 struct tegra_mmc *reg;
31 struct reset_ctl reset_ctl;
33 struct gpio_desc cd_gpio; /* Change Detect GPIO */
34 struct gpio_desc pwr_gpio; /* Power GPIO */
35 struct gpio_desc wp_gpio; /* Write Protect GPIO */
36 unsigned int version; /* SDHCI spec. version */
37 unsigned int clock; /* Current clock (MHz) */
38 int mmc_id; /* peripheral id */
41 static void tegra_mmc_set_power(struct tegra_mmc_priv *priv,
45 debug("%s: power = %x\n", __func__, power);
47 if (power != (unsigned short)-1) {
50 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V1_8;
54 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V3_0;
58 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V3_3;
62 debug("%s: pwr = %X\n", __func__, pwr);
64 /* Set the bus voltage first (if any) */
65 writeb(pwr, &priv->reg->pwrcon);
69 /* Now enable bus power */
70 pwr |= TEGRA_MMC_PWRCTL_SD_BUS_POWER;
71 writeb(pwr, &priv->reg->pwrcon);
74 static void tegra_mmc_prepare_data(struct tegra_mmc_priv *priv,
75 struct mmc_data *data,
76 struct bounce_buffer *bbstate)
81 debug("buf: %p (%p), data->blocks: %u, data->blocksize: %u\n",
82 bbstate->bounce_buffer, bbstate->user_buffer, data->blocks,
85 writel((u32)(unsigned long)bbstate->bounce_buffer, &priv->reg->sysad);
90 * 10 = Selects 32-bit Address ADMA2
91 * 11 = Selects 64-bit Address ADMA2
93 ctrl = readb(&priv->reg->hostctl);
94 ctrl &= ~TEGRA_MMC_HOSTCTL_DMASEL_MASK;
95 ctrl |= TEGRA_MMC_HOSTCTL_DMASEL_SDMA;
96 writeb(ctrl, &priv->reg->hostctl);
98 /* We do not handle DMA boundaries, so set it to max (512 KiB) */
99 writew((7 << 12) | (data->blocksize & 0xFFF), &priv->reg->blksize);
100 writew(data->blocks, &priv->reg->blkcnt);
103 static void tegra_mmc_set_transfer_mode(struct tegra_mmc_priv *priv,
104 struct mmc_data *data)
107 debug(" mmc_set_transfer_mode called\n");
110 * MUL1SIN0[5] : Multi/Single Block Select
111 * RD1WT0[4] : Data Transfer Direction Select
114 * ENACMD12[2] : Auto CMD12 Enable
115 * ENBLKCNT[1] : Block Count Enable
116 * ENDMA[0] : DMA Enable
118 mode = (TEGRA_MMC_TRNMOD_DMA_ENABLE |
119 TEGRA_MMC_TRNMOD_BLOCK_COUNT_ENABLE);
121 if (data->blocks > 1)
122 mode |= TEGRA_MMC_TRNMOD_MULTI_BLOCK_SELECT;
124 if (data->flags & MMC_DATA_READ)
125 mode |= TEGRA_MMC_TRNMOD_DATA_XFER_DIR_SEL_READ;
127 writew(mode, &priv->reg->trnmod);
130 static int tegra_mmc_wait_inhibit(struct tegra_mmc_priv *priv,
132 struct mmc_data *data,
133 unsigned int timeout)
137 * CMDINHDAT[1] : Command Inhibit (DAT)
138 * CMDINHCMD[0] : Command Inhibit (CMD)
140 unsigned int mask = TEGRA_MMC_PRNSTS_CMD_INHIBIT_CMD;
143 * We shouldn't wait for data inhibit for stop commands, even
144 * though they might use busy signaling
146 if ((data == NULL) && (cmd->resp_type & MMC_RSP_BUSY))
147 mask |= TEGRA_MMC_PRNSTS_CMD_INHIBIT_DAT;
149 while (readl(&priv->reg->prnsts) & mask) {
151 printf("%s: timeout error\n", __func__);
161 static int tegra_mmc_send_cmd_bounced(struct udevice *dev, struct mmc_cmd *cmd,
162 struct mmc_data *data,
163 struct bounce_buffer *bbstate)
165 struct tegra_mmc_priv *priv = dev_get_priv(dev);
168 unsigned int mask = 0;
169 unsigned int retry = 0x100000;
170 debug(" mmc_send_cmd called\n");
172 result = tegra_mmc_wait_inhibit(priv, cmd, data, 10 /* ms */);
178 tegra_mmc_prepare_data(priv, data, bbstate);
180 debug("cmd->arg: %08x\n", cmd->cmdarg);
181 writel(cmd->cmdarg, &priv->reg->argument);
184 tegra_mmc_set_transfer_mode(priv, data);
186 if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
191 * CMDIDX[13:8] : Command index
192 * DATAPRNT[5] : Data Present Select
193 * ENCMDIDX[4] : Command Index Check Enable
194 * ENCMDCRC[3] : Command CRC Check Enable
199 * 11 = Length 48 Check busy after response
201 if (!(cmd->resp_type & MMC_RSP_PRESENT))
202 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_NO_RESPONSE;
203 else if (cmd->resp_type & MMC_RSP_136)
204 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_136;
205 else if (cmd->resp_type & MMC_RSP_BUSY)
206 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_48_BUSY;
208 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_48;
210 if (cmd->resp_type & MMC_RSP_CRC)
211 flags |= TEGRA_MMC_TRNMOD_CMD_CRC_CHECK;
212 if (cmd->resp_type & MMC_RSP_OPCODE)
213 flags |= TEGRA_MMC_TRNMOD_CMD_INDEX_CHECK;
215 flags |= TEGRA_MMC_TRNMOD_DATA_PRESENT_SELECT_DATA_TRANSFER;
217 debug("cmd: %d\n", cmd->cmdidx);
219 writew((cmd->cmdidx << 8) | flags, &priv->reg->cmdreg);
221 for (i = 0; i < retry; i++) {
222 mask = readl(&priv->reg->norintsts);
223 /* Command Complete */
224 if (mask & TEGRA_MMC_NORINTSTS_CMD_COMPLETE) {
226 writel(mask, &priv->reg->norintsts);
232 printf("%s: waiting for status update\n", __func__);
233 writel(mask, &priv->reg->norintsts);
237 if (mask & TEGRA_MMC_NORINTSTS_CMD_TIMEOUT) {
239 debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
240 writel(mask, &priv->reg->norintsts);
242 } else if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
243 /* Error Interrupt */
244 debug("error: %08x cmd %d\n", mask, cmd->cmdidx);
245 writel(mask, &priv->reg->norintsts);
249 if (cmd->resp_type & MMC_RSP_PRESENT) {
250 if (cmd->resp_type & MMC_RSP_136) {
251 /* CRC is stripped so we need to do some shifting. */
252 for (i = 0; i < 4; i++) {
253 unsigned long offset = (unsigned long)
254 (&priv->reg->rspreg3 - i);
255 cmd->response[i] = readl(offset) << 8;
261 debug("cmd->resp[%d]: %08x\n",
262 i, cmd->response[i]);
264 } else if (cmd->resp_type & MMC_RSP_BUSY) {
265 for (i = 0; i < retry; i++) {
266 /* PRNTDATA[23:20] : DAT[3:0] Line Signal */
267 if (readl(&priv->reg->prnsts)
268 & (1 << 20)) /* DAT[0] */
273 printf("%s: card is still busy\n", __func__);
274 writel(mask, &priv->reg->norintsts);
278 cmd->response[0] = readl(&priv->reg->rspreg0);
279 debug("cmd->resp[0]: %08x\n", cmd->response[0]);
281 cmd->response[0] = readl(&priv->reg->rspreg0);
282 debug("cmd->resp[0]: %08x\n", cmd->response[0]);
287 unsigned long start = get_timer(0);
290 mask = readl(&priv->reg->norintsts);
292 if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
293 /* Error Interrupt */
294 writel(mask, &priv->reg->norintsts);
295 printf("%s: error during transfer: 0x%08x\n",
298 } else if (mask & TEGRA_MMC_NORINTSTS_DMA_INTERRUPT) {
300 * DMA Interrupt, restart the transfer where
301 * it was interrupted.
303 unsigned int address = readl(&priv->reg->sysad);
306 writel(TEGRA_MMC_NORINTSTS_DMA_INTERRUPT,
307 &priv->reg->norintsts);
308 writel(address, &priv->reg->sysad);
309 } else if (mask & TEGRA_MMC_NORINTSTS_XFER_COMPLETE) {
310 /* Transfer Complete */
311 debug("r/w is done\n");
313 } else if (get_timer(start) > 8000UL) {
314 writel(mask, &priv->reg->norintsts);
315 printf("%s: MMC Timeout\n"
316 " Interrupt status 0x%08x\n"
317 " Interrupt status enable 0x%08x\n"
318 " Interrupt signal enable 0x%08x\n"
319 " Present status 0x%08x\n",
321 readl(&priv->reg->norintstsen),
322 readl(&priv->reg->norintsigen),
323 readl(&priv->reg->prnsts));
327 writel(mask, &priv->reg->norintsts);
334 static int tegra_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
335 struct mmc_data *data)
338 unsigned int bbflags;
340 struct bounce_buffer bbstate;
344 if (data->flags & MMC_DATA_READ) {
346 bbflags = GEN_BB_WRITE;
348 buf = (void *)data->src;
349 bbflags = GEN_BB_READ;
351 len = data->blocks * data->blocksize;
353 bounce_buffer_start(&bbstate, buf, len, bbflags);
356 ret = tegra_mmc_send_cmd_bounced(dev, cmd, data, &bbstate);
359 bounce_buffer_stop(&bbstate);
364 static void tegra_mmc_change_clock(struct tegra_mmc_priv *priv, uint clock)
369 unsigned long timeout;
371 debug(" mmc_change_clock called\n");
374 * Change Tegra SDMMCx clock divisor here. Source is PLLP_OUT0
379 rate = clk_set_rate(&priv->clk, clock);
380 div = (rate + clock - 1) / clock;
382 #if defined(CONFIG_TEGRA210)
383 if (priv->mmc_id == PERIPH_ID_SDMMC1 && clock <= 400000) {
384 /* clock_adjust_periph_pll_div() chooses a 'bad' clock
385 * on SDMMC1 T210, so skip it here and force a clock
386 * that's been spec'd in the table in the TRM for
387 * card-detect (400KHz).
389 uint effective_rate = clock_adjust_periph_pll_div(priv->mmc_id,
390 CLOCK_ID_PERIPH, 24727273, NULL);
393 debug("%s: WAR: Using SDMMC1 clock of %u, div %d to achieve %dHz card clock ...\n",
394 __func__, effective_rate, div, clock);
396 clock_adjust_periph_pll_div(priv->mmc_id, CLOCK_ID_PERIPH,
400 debug("div = %d\n", div);
402 writew(0, &priv->reg->clkcon);
406 * SELFREQ[15:8] : base clock divided by value
407 * ENSDCLK[2] : SD Clock Enable
408 * STBLINTCLK[1] : Internal Clock Stable
409 * ENINTCLK[0] : Internal Clock Enable
412 clk = ((div << TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_SHIFT) |
413 TEGRA_MMC_CLKCON_INTERNAL_CLOCK_ENABLE);
414 writew(clk, &priv->reg->clkcon);
418 while (!(readw(&priv->reg->clkcon) &
419 TEGRA_MMC_CLKCON_INTERNAL_CLOCK_STABLE)) {
421 printf("%s: timeout error\n", __func__);
428 clk |= TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
429 writew(clk, &priv->reg->clkcon);
431 debug("mmc_change_clock: clkcon = %08X\n", clk);
437 static int tegra_mmc_set_ios(struct udevice *dev)
439 struct tegra_mmc_priv *priv = dev_get_priv(dev);
440 struct mmc *mmc = mmc_get_mmc_dev(dev);
442 debug(" mmc_set_ios called\n");
444 debug("bus_width: %x, clock: %d\n", mmc->bus_width, mmc->clock);
446 /* Change clock first */
447 tegra_mmc_change_clock(priv, mmc->clock);
449 ctrl = readb(&priv->reg->hostctl);
453 * 0 = Depend on WIDE4
459 if (mmc->bus_width == 8)
461 else if (mmc->bus_width == 4)
464 ctrl &= ~(1 << 1 | 1 << 5);
466 writeb(ctrl, &priv->reg->hostctl);
467 debug("mmc_set_ios: hostctl = %08X\n", ctrl);
472 static void tegra_mmc_pad_init(struct tegra_mmc_priv *priv)
474 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
478 int id = priv->mmc_id;
480 debug("%s: sdmmc address = %p, id = %d\n", __func__,
483 /* Set the pad drive strength for SDMMC1 or 3 only */
484 if (id != PERIPH_ID_SDMMC1 && id != PERIPH_ID_SDMMC3) {
485 debug("%s: settings are only valid for SDMMC1/SDMMC3!\n",
490 val = readl(&priv->reg->sdmemcmppadctl);
492 val |= MEMCOMP_PADCTRL_VREF;
493 writel(val, &priv->reg->sdmemcmppadctl);
495 /* Disable SD Clock Enable before running auto-cal as per TRM */
496 clk_con = readw(&priv->reg->clkcon);
497 debug("%s: CLOCK_CONTROL = 0x%04X\n", __func__, clk_con);
498 clk_con &= ~TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
499 writew(clk_con, &priv->reg->clkcon);
501 val = readl(&priv->reg->autocalcfg);
503 val |= AUTO_CAL_PU_OFFSET | AUTO_CAL_PD_OFFSET;
504 writel(val, &priv->reg->autocalcfg);
505 val |= AUTO_CAL_START | AUTO_CAL_ENABLE;
506 writel(val, &priv->reg->autocalcfg);
507 debug("%s: AUTO_CAL_CFG = 0x%08X\n", __func__, val);
509 timeout = 100; /* 10 mSec max (100*100uS) */
511 val = readl(&priv->reg->autocalsts);
513 } while ((val & AUTO_CAL_ACTIVE) && --timeout);
514 val = readl(&priv->reg->autocalsts);
515 debug("%s: Final AUTO_CAL_STATUS = 0x%08X, timeout = %d\n",
516 __func__, val, timeout);
518 /* Re-enable SD Clock Enable when auto-cal is done */
519 clk_con |= TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
520 writew(clk_con, &priv->reg->clkcon);
521 clk_con = readw(&priv->reg->clkcon);
522 debug("%s: final CLOCK_CONTROL = 0x%04X\n", __func__, clk_con);
525 printf("%s: Warning: Autocal timed out!\n", __func__);
526 /* TBD: Set CFG2TMC_SDMMC1_PAD_CAL_DRV* regs here */
529 #if defined(CONFIG_TEGRA210)
530 u32 tap_value, trim_value;
532 /* Set tap/trim values for SDMMC1/3 @ <48MHz here */
533 val = readl(&priv->reg->venspictl); /* aka VENDOR_SYS_SW_CNTL */
534 val &= IO_TRIM_BYPASS_MASK;
535 if (id == PERIPH_ID_SDMMC1) {
536 tap_value = 4; /* default */
540 } else { /* SDMMC3 */
545 val = readl(&priv->reg->venclkctl);
546 val &= ~TRIM_VAL_MASK;
547 val |= (trim_value << TRIM_VAL_SHIFT);
548 val &= ~TAP_VAL_MASK;
549 val |= (tap_value << TAP_VAL_SHIFT);
550 writel(val, &priv->reg->venclkctl);
551 debug("%s: VENDOR_CLOCK_CNTRL = 0x%08X\n", __func__, val);
553 #endif /* T30/T210 */
556 static void tegra_mmc_reset(struct tegra_mmc_priv *priv, struct mmc *mmc)
558 unsigned int timeout;
559 debug(" mmc_reset called\n");
562 * RSTALL[0] : Software reset for all
566 writeb(TEGRA_MMC_SWRST_SW_RESET_FOR_ALL, &priv->reg->swrst);
570 /* Wait max 100 ms */
573 /* hw clears the bit when it's done */
574 while (readb(&priv->reg->swrst) & TEGRA_MMC_SWRST_SW_RESET_FOR_ALL) {
576 printf("%s: timeout error\n", __func__);
583 /* Set SD bus voltage & enable bus power */
584 tegra_mmc_set_power(priv, fls(mmc->cfg->voltages) - 1);
585 debug("%s: power control = %02X, host control = %02X\n", __func__,
586 readb(&priv->reg->pwrcon), readb(&priv->reg->hostctl));
588 /* Make sure SDIO pads are set up */
589 tegra_mmc_pad_init(priv);
592 static int tegra_mmc_init(struct udevice *dev)
594 struct tegra_mmc_priv *priv = dev_get_priv(dev);
595 struct mmc *mmc = mmc_get_mmc_dev(dev);
597 debug(" tegra_mmc_init called\n");
599 #if defined(CONFIG_TEGRA210)
600 priv->mmc_id = clock_decode_periph_id(dev);
601 if (priv->mmc_id == PERIPH_ID_NONE) {
602 printf("%s: Missing/invalid peripheral ID\n", __func__);
606 tegra_mmc_reset(priv, mmc);
608 #if defined(CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK)
610 * Disable the external clock loopback and use the internal one on
611 * SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
612 * bits being set to 0xfffd according to the TRM.
614 * TODO(marcel.ziswiler@toradex.com): Move to device tree controlled
615 * approach once proper kernel integration made it mainline.
617 if (priv->reg == (void *)0x700b0400) {
618 mask = readl(&priv->reg->venmiscctl);
619 mask &= ~TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK;
620 writel(mask, &priv->reg->venmiscctl);
624 priv->version = readw(&priv->reg->hcver);
625 debug("host version = %x\n", priv->version);
628 writel(0xffffffff, &priv->reg->norintstsen);
629 writel(0xffffffff, &priv->reg->norintsigen);
631 writeb(0xe, &priv->reg->timeoutcon); /* TMCLK * 2^27 */
633 * NORMAL Interrupt Status Enable Register init
634 * [5] ENSTABUFRDRDY : Buffer Read Ready Status Enable
635 * [4] ENSTABUFWTRDY : Buffer write Ready Status Enable
636 * [3] ENSTADMAINT : DMA boundary interrupt
637 * [1] ENSTASTANSCMPLT : Transfre Complete Status Enable
638 * [0] ENSTACMDCMPLT : Command Complete Status Enable
640 mask = readl(&priv->reg->norintstsen);
642 mask |= (TEGRA_MMC_NORINTSTSEN_CMD_COMPLETE |
643 TEGRA_MMC_NORINTSTSEN_XFER_COMPLETE |
644 TEGRA_MMC_NORINTSTSEN_DMA_INTERRUPT |
645 TEGRA_MMC_NORINTSTSEN_BUFFER_WRITE_READY |
646 TEGRA_MMC_NORINTSTSEN_BUFFER_READ_READY);
647 writel(mask, &priv->reg->norintstsen);
650 * NORMAL Interrupt Signal Enable Register init
651 * [1] ENSTACMDCMPLT : Transfer Complete Signal Enable
653 mask = readl(&priv->reg->norintsigen);
655 mask |= TEGRA_MMC_NORINTSIGEN_XFER_COMPLETE;
656 writel(mask, &priv->reg->norintsigen);
661 static int tegra_mmc_getcd(struct udevice *dev)
663 struct tegra_mmc_priv *priv = dev_get_priv(dev);
665 debug("tegra_mmc_getcd called\n");
667 if (dm_gpio_is_valid(&priv->cd_gpio))
668 return dm_gpio_get_value(&priv->cd_gpio);
673 static const struct dm_mmc_ops tegra_mmc_ops = {
674 .send_cmd = tegra_mmc_send_cmd,
675 .set_ios = tegra_mmc_set_ios,
676 .get_cd = tegra_mmc_getcd,
679 static int tegra_mmc_probe(struct udevice *dev)
681 struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
682 struct tegra_mmc_plat *plat = dev_get_platdata(dev);
683 struct tegra_mmc_priv *priv = dev_get_priv(dev);
684 struct mmc_config *cfg = &plat->cfg;
687 cfg->name = dev->name;
689 bus_width = dev_read_u32_default(dev, "bus-width", 1);
691 cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
694 cfg->host_caps |= MMC_MODE_8BIT;
696 cfg->host_caps |= MMC_MODE_4BIT;
697 cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
700 * min freq is for card identification, and is the highest
701 * low-speed SDIO card frequency (actually 400KHz)
702 * max freq is highest HS eMMC clock as per the SD/MMC spec
706 cfg->f_max = 48000000;
708 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
710 priv->reg = (void *)dev_read_addr(dev);
712 ret = reset_get_by_name(dev, "sdhci", &priv->reset_ctl);
714 debug("reset_get_by_name() failed: %d\n", ret);
717 ret = clk_get_by_index(dev, 0, &priv->clk);
719 debug("clk_get_by_index() failed: %d\n", ret);
723 ret = reset_assert(&priv->reset_ctl);
726 ret = clk_enable(&priv->clk);
729 ret = clk_set_rate(&priv->clk, 20000000);
730 if (IS_ERR_VALUE(ret))
732 ret = reset_deassert(&priv->reset_ctl);
736 /* These GPIOs are optional */
737 gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
738 gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
739 gpio_request_by_name(dev, "power-gpios", 0, &priv->pwr_gpio,
741 if (dm_gpio_is_valid(&priv->pwr_gpio))
742 dm_gpio_set_value(&priv->pwr_gpio, 1);
744 upriv->mmc = &plat->mmc;
746 return tegra_mmc_init(dev);
749 static int tegra_mmc_bind(struct udevice *dev)
751 struct tegra_mmc_plat *plat = dev_get_platdata(dev);
753 return mmc_bind(dev, &plat->mmc, &plat->cfg);
756 static const struct udevice_id tegra_mmc_ids[] = {
757 { .compatible = "nvidia,tegra20-sdhci" },
758 { .compatible = "nvidia,tegra30-sdhci" },
759 { .compatible = "nvidia,tegra114-sdhci" },
760 { .compatible = "nvidia,tegra124-sdhci" },
761 { .compatible = "nvidia,tegra210-sdhci" },
762 { .compatible = "nvidia,tegra186-sdhci" },
766 U_BOOT_DRIVER(tegra_mmc_drv) = {
769 .of_match = tegra_mmc_ids,
770 .bind = tegra_mmc_bind,
771 .probe = tegra_mmc_probe,
772 .ops = &tegra_mmc_ops,
773 .platdata_auto_alloc_size = sizeof(struct tegra_mmc_plat),
774 .priv_auto_alloc_size = sizeof(struct tegra_mmc_priv),