diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2021-09-17 15:27:01 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-23 14:10:33 +0000 |
commit | e5253ca54aa540e6d0db997a9937de801b146e7d (patch) | |
tree | a821f2160810c8742a225bde0a81cddcb1066d31 /board/nipperkin/board.c | |
parent | 9c9ee9b28cda9f9bae751336e06e03accbec8f7f (diff) | |
download | chrome-ec-e5253ca54aa540e6d0db997a9937de801b146e7d.tar.gz |
nipperkin: support HDMI power control
This patch add gpio: EN_PWR_HDMI, HDMI_DATA_EN control,
set low when suspend, set high when resume.
BUG=b:193395015
BRANCH=none
TEST=check GPIO status in s0 and suspend.
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I21155b5f572ed9d5a9ca01eb5dd9fc91c12b6344
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3167614
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Commit-Queue: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'board/nipperkin/board.c')
-rw-r--r-- | board/nipperkin/board.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/board/nipperkin/board.c b/board/nipperkin/board.c index cdb3b6e642..42df3c312b 100644 --- a/board/nipperkin/board.c +++ b/board/nipperkin/board.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Guybrush board-specific configuration */ +/* Nipperkin board-specific configuration */ #include "adc.h" #include "base_fw_config.h" @@ -321,3 +321,19 @@ static int board_get_temp(int idx, int *temp_k) return EC_ERROR_NOT_POWERED; return get_temp_3v3_30k9_47k_4050b(idx, temp_k); } + +/* Called on AP resume to S0 */ +static void board_chipset_resume(void) +{ + ioex_set_level(IOEX_HDMI_DATA_EN, 1); + ioex_set_level(IOEX_EN_PWR_HDMI, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + +/* Called on AP suspend */ +static void board_chipset_suspend(void) +{ + ioex_set_level(IOEX_EN_PWR_HDMI, 0); + ioex_set_level(IOEX_HDMI_DATA_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); |