diff options
author | Edward Hill <ecgh@chromium.org> | 2020-02-06 14:05:12 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-14 20:23:07 +0000 |
commit | ca2625eafcd3d22ffb65fb6bf7d7f8021c92fa21 (patch) | |
tree | cd88107fce6e6a250dea091033bbdbca6a3f160b /baseboard/zork | |
parent | fd5e9c3980c81098bd6dd84c7d927c779187f8a2 (diff) | |
download | chrome-ec-ca2625eafcd3d22ffb65fb6bf7d7f8021c92fa21.tar.gz |
zork: HPD for DB OPT3 MST hub
Add interrupt handler for MST_HPD_OUT from IO expander on
DB OPT3 and connect to AP's DP1_HPD.
BUG=b:146468096
BRANCH=none
TEST=HDMI works with DB OPT3
Change-Id: I60a7932f3eb03b90b94354ce809e0d5e09e15247
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2042680
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'baseboard/zork')
-rw-r--r-- | baseboard/zork/baseboard.c | 18 | ||||
-rw-r--r-- | baseboard/zork/baseboard.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c index 05fe765345..308adf7461 100644 --- a/baseboard/zork/baseboard.c +++ b/baseboard/zork/baseboard.c @@ -340,6 +340,7 @@ void baseboard_tcpc_init(void) /* Enable HPD interrupts */ ioex_enable_interrupt(IOEX_HDMI_CONN_HPD_3V3_DB); + ioex_enable_interrupt(IOEX_MST_HPD_OUT); } DECLARE_HOOK(HOOK_INIT, baseboard_tcpc_init, HOOK_PRIO_INIT_I2C + 1); @@ -1181,3 +1182,20 @@ void hdmi_hpd_interrupt(enum ioex_signal signal) /* Debounce for 2 msec. */ hook_call_deferred(&hdmi_hpd_handler_data, (2 * MSEC)); } + +static void mst_hpd_handler(void) +{ + int hpd = 0; + + /* Pass HPD through from DB OPT3 MST hub to AP's DP1. */ + ioex_get_level(IOEX_MST_HPD_OUT, &hpd); + gpio_set_level(GPIO_DP1_HPD, hpd); + ccprints("MST HPD %d", hpd); +} +DECLARE_DEFERRED(mst_hpd_handler); + +void mst_hpd_interrupt(enum ioex_signal signal) +{ + /* Debounce for 2 msec. */ + hook_call_deferred(&mst_hpd_handler_data, (2 * MSEC)); +} diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h index b186ee92bc..eeb5e60725 100644 --- a/baseboard/zork/baseboard.h +++ b/baseboard/zork/baseboard.h @@ -321,6 +321,7 @@ void tcpc_alert_event(enum gpio_signal signal); void bc12_interrupt(enum gpio_signal signal); void ppc_interrupt(enum gpio_signal signal); void hdmi_hpd_interrupt(enum ioex_signal signal); +void mst_hpd_interrupt(enum ioex_signal signal); int board_is_convertible(void); void board_update_sensor_config_from_sku(void); |