diff --git a/common/extpower_usb.c b/common/extpower_usb.c index 9389e68cbf..8b20d79145 100644 --- a/common/extpower_usb.c +++ b/common/extpower_usb.c @@ -173,9 +173,11 @@ static int get_video_power(void) static void set_video_power(int enabled) { - /* TODO(victoryang): Drop VFET2. See crosbug.com/p/18186 */ - pmu_enable_fet(FET_VIDEO, enabled, NULL); - pmu_enable_fet(FET_VIDEO2, enabled, NULL); + int power_good; + + pmu_enable_fet(FET_VIDEO, enabled, enabled ? &power_good : NULL); + if (enabled && !power_good) + pmu_enable_fet(FET_VIDEO, 0, NULL); video_power_enabled = enabled; } diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c index 4e3d96e025..431b22ac06 100644 --- a/common/pmu_tps65090.c +++ b/common/pmu_tps65090.c @@ -90,6 +90,8 @@ #define FET_CTRL_BASE (FET1_CTRL - 1) +#define POWER_GOOD_DELAY_US 3500 + /* AD control register bits */ #define AD_CTRL_ENADREF (1 << 4) #define AD_CTRL_ADEOC (1 << 5) @@ -436,6 +438,7 @@ int pmu_enable_fet(int fet_id, int enable, int *power_good) return rv; if (power_good) { + usleep(POWER_GOOD_DELAY_US); rv = pmu_read(reg_offset, ®); if (rv) return rv; diff --git a/include/pmu_tpschrome.h b/include/pmu_tpschrome.h index 27ea0ce074..fc25fd345c 100644 --- a/include/pmu_tpschrome.h +++ b/include/pmu_tpschrome.h @@ -86,9 +86,8 @@ enum FASTCHARGE_TIMEOUT { }; #define FET_BACKLIGHT 1 -#define FET_VIDEO 2 #define FET_WWAN 3 -#define FET_VIDEO2 4 +#define FET_VIDEO 4 #define FET_CAMERA 5 #define FET_LCD_PANEL 6 #define FET_TS 7