From 877a5394721d2b716c9beb61c952bd3b0b79ed62 Mon Sep 17 00:00:00 2001 From: xbw Date: Thu, 21 Feb 2013 18:58:19 +0800 Subject: [PATCH] SDMMC: add the control for the voltage of sdmmc0-pin in RK-host gpio group. --- arch/arm/plat-rk/rk-sdmmc-ops.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-rk/rk-sdmmc-ops.c b/arch/arm/plat-rk/rk-sdmmc-ops.c index 6c55ce44daa5..09a88d8f905e 100644 --- a/arch/arm/plat-rk/rk-sdmmc-ops.c +++ b/arch/arm/plat-rk/rk-sdmmc-ops.c @@ -805,8 +805,16 @@ static void rk29_sdmmc_set_iomux_mmc0(unsigned int bus_width) rk30_mux_api_set(rksdmmc0_gpio_init.data0_gpio.iomux.name, rksdmmc0_gpio_init.data0_gpio.iomux.fmux); #endif - //IO voltage(vccio);sdcard must set the voltage to 3.3v + //IO voltage(vccio); + #ifdef RK31SDK_SET_SDMMC0_PIN_VOLTAGE + if(rk31sdk_get_sdmmc0_pin_io_voltage() > 3.0) + SDMMC_write_grf_reg(GRF_IO_CON4, (SDMMC0_IO_VOLTAGE_MASK |SDMMC0_IO_VOLTAGE_33)); //set SDMMC0 pin to 3.3v + else + SDMMC_write_grf_reg(GRF_IO_CON4, (SDMMC0_IO_VOLTAGE_MASK |SDMMC0_IO_VOLTAGE_18));//set SDMMC0 pin to 1.8v + #else + //default set the voltage of SDMMC0 to 3.3V SDMMC_write_grf_reg(GRF_IO_CON4, (SDMMC0_IO_VOLTAGE_MASK |SDMMC0_IO_VOLTAGE_33)); + #endif //sdmmc drive strength control SDMMC_write_grf_reg(GRF_IO_CON2, (SDMMC0_DRIVER_STRENGTH_MASK |SDMMC0_DRIVER_STRENGTH_8MA)); -- 2.34.1