diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-09-20 09:52:34 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-10-15 12:14:27 -0700 |
commit | 9a0e69cbbf9c20ea5915d5cce56dd6ec9226d945 (patch) | |
tree | f8b3fa49bee080c9e65ed46586f63a2b737f74c2 | |
parent | b3fa69f17f4fec6cbe9cdc34e3b8abff367050f1 (diff) | |
download | chrome-ec-9a0e69cbbf9c20ea5915d5cce56dd6ec9226d945.tar.gz |
spring: force power on LCD and backlight
For board bring-up.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:10912 chrome-os-partner:14324
TEST=on Spring, boot the AP, issue "pmu" command on the EC console
and FET1 and FET6 (registers 0xf and 0x14) contains 0x13.
Change-Id: Ic8fd681c2e2f3e2168de2cb7f83920d4feefd485
Reviewed-on: https://gerrit.chromium.org/gerrit/33703
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | board/spring/board.c | 14 | ||||
-rw-r--r-- | board/spring/board.h | 3 |
3 files changed, 24 insertions, 0 deletions
@@ -66,3 +66,10 @@ Build Options the AP indicating this state. The GPIO will be driven low when AC power is not connected, and high when it is connected. This uses GPIO_AC_STATUS for this purpose. + +- CONFIG_PMU_FORCE_FET + + Force switching on and off the FETs on the PMU controlling various + power rails during AP startup and shutdown sequences. + This is mainly useful for bringup when we don't have the corresponding + sequences in the AP code. diff --git a/board/spring/board.c b/board/spring/board.c index d6608aa7a9..c19a61de08 100644 --- a/board/spring/board.c +++ b/board/spring/board.c @@ -184,12 +184,26 @@ void board_keyboard_suppress_noise(void) static int board_startup_hook(void) { gpio_set_flags(GPIO_SUSPEND_L, INT_BOTH_PULL_UP); + +#ifdef CONFIG_PMU_FORCE_FET + /* Enable lcd panel power */ + pmu_enable_fet(FET_LCD_PANEL, 1, NULL); + /* Enable backlight power */ + pmu_enable_fet(FET_BACKLIGHT, 1, NULL); return 0; +#endif /* CONFIG_PMU_FORCE_FET */ } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_startup_hook, HOOK_PRIO_DEFAULT); static int board_shutdown_hook(void) { +#ifdef CONFIG_PMU_FORCE_FET + /* Power off backlight power */ + pmu_enable_fet(FET_BACKLIGHT, 0, NULL); + /* Power off lcd panel */ + pmu_enable_fet(FET_LCD_PANEL, 0, NULL); +#endif /* CONFIG_PMU_FORCE_FET */ + /* Disable pull-up on SUSPEND_L during shutdown to prevent leakage */ gpio_set_flags(GPIO_SUSPEND_L, INT_BOTH_FLOATING); diff --git a/board/spring/board.h b/board/spring/board.h index b8ec6ab2ea..c89f8cf674 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -33,6 +33,9 @@ /* DE-ACTIVATED: use STOP mode when we have nothing to do */ #undef CONFIG_LOW_POWER_IDLE +/* always enable LCD power rails */ +#define CONFIG_PMU_FORCE_FET + #ifndef __ASSEMBLER__ /* By default, enable all console messages except keyboard */ |