From 9a0e69cbbf9c20ea5915d5cce56dd6ec9226d945 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 20 Sep 2012 09:52:34 -0700 Subject: spring: force power on LCD and backlight For board bring-up. Signed-off-by: Vincent Palatin 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 Tested-by: Vincent Palatin Reviewed-by: David Hendricks --- README | 7 +++++++ board/spring/board.c | 14 ++++++++++++++ board/spring/board.h | 3 +++ 3 files changed, 24 insertions(+) diff --git a/README b/README index 700adcc624..76a10b1852 100644 --- a/README +++ b/README @@ -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 */ -- cgit v1.2.1