diff options
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 5 | ||||
-rw-r--r-- | include/linux/mmc/sdhci.h | 1 | ||||
-rw-r--r-- | include/linux/platform_data/mmc-esdhc-imx.h | 1 |
4 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index d2eb8911dc98..3c202e070aea 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -973,6 +973,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, else boarddata->support_vsel = true; + if (of_find_property(np, "vqmmc-1-8-v", NULL)) + boarddata->vqmmc_18v = true; + if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0; @@ -1173,6 +1176,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) } else { host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; } + if (boarddata->vqmmc_18v) + host->quirks2 |= SDHCI_QUIRK2_VQMMC_1_8_V; if (host->mmc->pm_caps & MMC_PM_KEEP_POWER && host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index beb3fc94947b..829d91ff12ae 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1750,6 +1750,9 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); + if (host->quirks2 & SDHCI_QUIRK2_VQMMC_1_8_V) + ios->signal_voltage = MMC_SIGNAL_VOLTAGE_180; + switch (ios->signal_voltage) { case MMC_SIGNAL_VOLTAGE_330: /* Set 1.8V Signal Enable in the Host Control2 register to 0 */ @@ -1777,7 +1780,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, return -EAGAIN; case MMC_SIGNAL_VOLTAGE_180: - if (host->vqmmc) { + if (host->vqmmc && !(host->quirks2 & SDHCI_QUIRK2_VQMMC_1_8_V)) { ret = regulator_set_voltage(host->vqmmc, 1700000, 1950000); if (ret) { diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 2e3a1c941eee..2e15fb18450a 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -97,6 +97,7 @@ struct sdhci_host { #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) #define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON (1<<4) #define SDHCI_QUIRK2_NOSTD_TIMEOUT_COUNTER (1<<5) +#define SDHCI_QUIRK2_VQMMC_1_8_V (1<<6) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h index e1571efa3f2b..8a2707007209 100644 --- a/include/linux/platform_data/mmc-esdhc-imx.h +++ b/include/linux/platform_data/mmc-esdhc-imx.h @@ -44,6 +44,7 @@ struct esdhc_platform_data { enum cd_types cd_type; int max_bus_width; bool support_vsel; + bool vqmmc_18v; unsigned int delay_line; }; #endif /* __ASM_ARCH_IMX_ESDHC_H */ |