mmc: dw_mmc: Set vqmmc to 3v3 before disabling it

Disabling vqmmc without setting IO domain could
cause SoC damage found in some Rockchip platforms.
To cope with the fix from IO domain, add this patch

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I05c53e78c073737cd0f7af9a206b9f588ffa4636
This commit is contained in:
Shawn Lin
2021-08-19 09:09:15 +08:00
committed by Tao Huang
parent 7b83efeaa4
commit 585dcf2413

View File

@@ -1554,8 +1554,11 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (!IS_ERR(mmc->supply.vmmc))
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
if (!IS_ERR(mmc->supply.vqmmc) && slot->host->vqmmc_enabled)
if (!IS_ERR(mmc->supply.vqmmc) && slot->host->vqmmc_enabled) {
ios->signal_voltage = MMC_SIGNAL_VOLTAGE_330;
mmc_regulator_set_vqmmc(mmc, ios);
regulator_disable(mmc->supply.vqmmc);
}
slot->host->vqmmc_enabled = false;
regs = mci_readl(slot->host, PWREN);