snow and pit: turn on FET4 (for SD card) at bootup

Explictly enable FET4 on Snow and Pit.

Historically we haven't needed to do this because:
* On snow there's a bypass around FET4 which effectively eliminates
  it.  Even if we don't turn on FET4 the SD card is still powered.
  Turning on FET4 doesn't hurt though and is technically correct.
* On pit the EC turns on FET4 on cold bootup.

On pit we run into a problem if the kernel turns off FET4 like in
<https://gerrit.chromium.org/gerrit/#/c/65332/> and then we get a
software reset or warm reset.  In this case the EC won't know to turn
it back on.

This was ported from: https://gerrit.chromium.org/gerrit/#/c/65673

Signed-off-by: David Hendricks <dhendrix@chromium.org>
BUG=none
BRANCH=none
TEST=compiled only (see original URL for details on testing)

Change-Id: I57337f12b38889e6afee8577cf8807ec4c41e91c
Reviewed-on: https://gerrit.chromium.org/gerrit/66786
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
This commit is contained in:
David Hendricks 2013-08-22 20:44:00 -07:00 committed by ChromeBot
commit e910117047
2 changed files with 17 additions and 0 deletions

View file

@ -383,6 +383,12 @@ static void backlight_vdd(void)
tps65090_thru_ec_fet_set(1);
}
static void sdmmc_vdd(void)
{
/* Enable FET4, P3.3V_SDCARD */
tps65090_thru_ec_fet_set(4);
}
/* this happens after cpu_init where exynos resources are set */
static void mainboard_init(device_t dev)
{
@ -402,6 +408,8 @@ static void mainboard_init(device_t dev)
/* Disable USB3.0 PLL to save 250mW of power */
disable_usb30_pll();
sdmmc_vdd();
set_vbe_mode_info_valid(&edid, (uintptr_t)fb_addr);
/*

View file

@ -134,6 +134,7 @@ static void backlight_en(void)
#define TPS65090_BUS 4 /* Snow-specific */
#define FET1_CTRL 0x0f
#define FET4_CTRL 0x12
#define FET6_CTRL 0x14
static void lcd_vdd(void)
@ -149,6 +150,12 @@ static void backlight_vdd(void)
udelay(LCD_T5_DELAY_MS * 1000);
}
static void sdmmc_vdd(void)
{
/* Enable FET4, P3.3V_SDCARD */
tps65090_fet_enable(TPS65090_BUS, FET4_CTRL);
}
//static struct video_info smdk5250_dp_config = {
static struct video_info dp_video_info = {
/* FIXME: fix video_info struct to use const for name */
@ -250,6 +257,8 @@ static void mainboard_init(device_t dev)
/* Disable USB3.0 PLL to save 250mW of power */
disable_usb30_pll();
sdmmc_vdd();
set_vbe_mode_info_valid(&edid, (uintptr_t)fb_addr);
lcd_vdd();