diff options
author | Vic Yang <victoryang@chromium.org> | 2013-07-03 15:41:34 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-10 11:16:36 -0700 |
commit | 56bd316488584f80ca8d6cc67d73f76ed66af1e7 (patch) | |
tree | fce252e2f7e62bf684c1a55d6fca7e4cc3bec283 | |
parent | 01ed345ebd7a5928298d52afbd8358c55b816c08 (diff) | |
download | chrome-ec-56bd316488584f80ca8d6cc67d73f76ed66af1e7.tar.gz |
spring: Drop support for VFET2 video poewr output
VFET2 is only used by early stage boards. Let's drop it now.
Also, disable power output when power good for VFET is not set. This
essentially adds retry for video power output.
BUG=chrome-os-partner:18186
TEST=Boot and test video output.
BRANCH=Spring
Original-Change-Id: I1937522a6a523a4f5dbeb9882518ca6e37655bea
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60852
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit e82589e073c5a863797fa87ecaa1dfafb1a9228d)
Change-Id: Ib043f952e699eb99b373da205379f56230887f6a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61396
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/extpower_usb.c | 8 | ||||
-rw-r--r-- | common/pmu_tps65090.c | 3 | ||||
-rw-r--r-- | include/pmu_tpschrome.h | 3 |
3 files changed, 9 insertions, 5 deletions
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 |