diff options
| author | Tom Rini <[email protected]> | 2019-08-09 07:29:20 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2019-08-09 07:29:20 -0400 |
| commit | 21bc1935b1a84176367af982f7f8da11c29cb2eb (patch) | |
| tree | 5746bbe342c196fc47f3cf4cf0cbbdedbd42cf1c /drivers/mmc | |
| parent | fef408679b2f634ebfd6298d9fc99db99e60fb1d (diff) | |
| parent | 6a452e5bd33cf8f4e851445f29ab94b66485700a (diff) | |
Merge tag 'u-boot-rockchip-20190809' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Add rk3399 boards Khadas Edge/-V/-Captain
- Add fully souce code support for rk3328 including TPL/DRAM init
- Enable boot from eMMC for rk3399 rock960/ficus boards
- turn on the IO supply for dw_mmc
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/dw_mmc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d611821..22f6c7eefdf 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include <mmc.h> #include <dwmmc.h> #include <wait_bit.h> +#include <power/regulator.h> #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; } |
