From 2b157019bb4c11303497f58b659f08f5ef9d064a Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Mon, 13 May 2019 13:25:27 +0000 Subject: dw_mmc: turn on the IO supply Fixes the microSD slot on the ASUS C201. Signed-off-by: Urja Rannikko Reviewed-by: Simon Glass Reviewed-by: Peng Fan Reviewed-by: Peng Fan > --- drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/mmc/dw_mmc.c') diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include #include #include +#include #define PAGE_SIZE 4096 @@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host); +#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (mmc->vqmmc_supply) { + int ret; + + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; } -- cgit v1.2.3