diff options
author | Edward Hill <ecgh@chromium.org> | 2020-08-18 21:02:18 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-22 07:38:00 +0000 |
commit | 9f36f26717844dfedb02aa4e50c8d199c9121f50 (patch) | |
tree | 7b5b7753b18ce3115c7dbf376a3774d063085e02 /board/berknip | |
parent | e5043bdc45a19593e07122ed725f917d8a0e5b00 (diff) | |
download | chrome-ec-9f36f26717844dfedb02aa4e50c8d199c9121f50.tar.gz |
Berknip: Fix HDMI retimer suspend / resume
BUG=b:165191082
BRANCH=none
TEST=none
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: If0619e61faa36e67e4e73c1cc59b296f6a039075
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364115
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'board/berknip')
-rw-r--r-- | board/berknip/board.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/board/berknip/board.c b/board/berknip/board.c index 37a7da3210..1c52c1cfff 100644 --- a/board/berknip/board.c +++ b/board/berknip/board.c @@ -14,6 +14,7 @@ #include "driver/accelgyro_bmi_common.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" +#include "driver/retimer/pi3hdx1204.h" #include "driver/retimer/tusb544.h" #include "driver/temp_sensor/sb_tsi.h" #include "driver/usb_mux/amd_fp5.h" @@ -161,22 +162,31 @@ const int usb_port_enable[USBA_PORT_COUNT] = { }; /***************************************************************************** - * Retimers + * Board suspend / resume */ -static void retimers_on(void) +static void board_chipset_resume(void) { - /* hdmi retimer power on */ - ioex_set_level(IOEX_HDMI_POWER_EN_DB, 1); + if (ec_config_has_hdmi_retimer_pi3hdx1204()) { + ioex_set_level(IOEX_HDMI_POWER_EN_DB, 1); + msleep(PI3HDX1204_POWER_ON_DELAY_MS); + pi3hdx1204_enable(I2C_PORT_TCPC1, + PI3HDX1204_I2C_ADDR_FLAGS, + 1); + } } -DECLARE_HOOK(HOOK_CHIPSET_RESUME, retimers_on, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); -static void retimers_off(void) +static void board_chipset_suspend(void) { - /* hdmi retimer power off */ - ioex_set_level(IOEX_HDMI_POWER_EN_DB, 0); + if (ec_config_has_hdmi_retimer_pi3hdx1204()) { + pi3hdx1204_enable(I2C_PORT_TCPC1, + PI3HDX1204_I2C_ADDR_FLAGS, + 0); + ioex_set_level(IOEX_HDMI_POWER_EN_DB, 0); + } } -DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, retimers_off, HOOK_PRIO_DEFAULT); +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); /* * USB C0 port SBU mux use standalone PI3USB221 |