diff options
Diffstat (limited to 'src/mainboard/google/veyron_pinky/romstage.c')
-rw-r--r-- | src/mainboard/google/veyron_pinky/romstage.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mainboard/google/veyron_pinky/romstage.c b/src/mainboard/google/veyron_pinky/romstage.c index b050228b5f..da4165fa61 100644 --- a/src/mainboard/google/veyron_pinky/romstage.c +++ b/src/mainboard/google/veyron_pinky/romstage.c @@ -31,6 +31,7 @@ #include <soc/clock.h> #include <soc/pwm.h> #include <soc/grf.h> +#include <soc/rk808.h> #include <soc/tsadc.h> #include <stdlib.h> #include <symbols.h> @@ -38,7 +39,7 @@ #include <types.h> #include <vendorcode/google/chromeos/chromeos.h> -#include "timer.h" +#include "board.h" static void regulate_vdd_log(unsigned int mv) { @@ -76,6 +77,20 @@ static void configure_l2ctlr(void) write_l2ctlr(l2ctlr); } +static void sdmmc_power_off(void) +{ + switch (board_id()) { + case 0: + rk808_configure_ldo(PMIC_BUS, 8, 0); /* VCCIO_SD */ + gpio_output(GPIO(7, C, 5), 0); /* SD_EN */ + break; + default: + rk808_configure_ldo(PMIC_BUS, 4, 0); /* VCCIO_SD */ + rk808_configure_ldo(PMIC_BUS, 5, 0); /* VCC33_SD */ + break; + } +} + void main(void) { #if CONFIG_COLLECT_TIMESTAMPS @@ -90,6 +105,9 @@ void main(void) configure_l2ctlr(); tsadc_init(); + /* Need to power cycle SD card to ensure it is properly reset. */ + sdmmc_power_off(); + /* vdd_log 1200mv is enough for ddr run 666Mhz */ regulate_vdd_log(1200); #if CONFIG_COLLECT_TIMESTAMPS |