diff options
author | Scott Collyer <scollyer@google.com> | 2019-01-10 18:25:36 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-12 14:00:13 -0800 |
commit | 8de6b302a3d97018a10795488ba83adf69011940 (patch) | |
tree | 954ff56fb33bb79a5f8e9aa41f1e17cfc6151b10 /board/hatch | |
parent | cc736a3e98b8069897d3256b7f75ba88922eefd1 (diff) | |
download | chrome-ec-8de6b302a3d97018a10795488ba83adf69011940.tar.gz |
hatch: Add support for MST (multi stream transport) enable
The MST chip for Hatch needs to be enabled when HPD signal from either
the Port 1 TCPC or HDMI port is high. This CL adds support to
enable the MST chip based on this criteria. For the Port 1 type C
port, the HPD signal level is derived from the USB PD policy level
where the HPD update driver method is called.
BRANCH=none
BUG=b:123894908
TEST=Used external HP Z27n monitor and verifed the display is extended
as expected when it's connected to either port 1 type C port or the
HDMI connector.
Change-Id: I1c46534bc7f32221f9e379dd9c74d5618c8f57e1
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1406496
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/hatch')
-rw-r--r-- | board/hatch/board.c | 5 | ||||
-rw-r--r-- | board/hatch/board.h | 8 | ||||
-rw-r--r-- | board/hatch/gpio.inc | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/board/hatch/board.c b/board/hatch/board.c index 44ffa432cb..e6cf4dfafa 100644 --- a/board/hatch/board.c +++ b/board/hatch/board.c @@ -69,6 +69,11 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(port); } +static void hdmi_hpd_interrupt(enum gpio_signal signal) +{ + baseboard_mst_enable_control(MST_HDMI, gpio_get_level(signal)); +} + #include "gpio_list.h" /* Must come after other header files. */ /******************************************************************************/ diff --git a/board/hatch/board.h b/board/hatch/board.h index 3cfc6aff0a..b246a51c9d 100644 --- a/board/hatch/board.h +++ b/board/hatch/board.h @@ -37,6 +37,14 @@ #define CONFIG_THROTTLE_AP #define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B +/* MST */ +/* + * TDOD (b/124068003): This inherently assumes the MST chip is connected to only + * one Type C port. This will need to be chagned to support 2 Type C ports + * connected to the same MST chip. + */ +#define USB_PD_PORT_TCPC 1 + /* * Macros for GPIO signals used in common code that don't match the * schematic names. Signal names in gpio.inc match the schematic and are diff --git a/board/hatch/gpio.inc b/board/hatch/gpio.inc index a2355b44b1..d6e77f795a 100644 --- a/board/hatch/gpio.inc +++ b/board/hatch/gpio.inc @@ -29,6 +29,14 @@ GPIO_INT(USB_C1_PPC_INT_ODL, PIN(A, 2), GPIO_INT_FALLING, ppc_interrupt) GPIO_INT(USB_C0_TCPC_INT_ODL, PIN(6, 2), GPIO_INT_FALLING, tcpc_alert_event) GPIO_INT(USB_C1_TCPC_INT_ODL, PIN(F, 5), GPIO_INT_FALLING, tcpc_alert_event) +GPIO_INT(HDMI_CONN_HPD, PIN(7, 2), GPIO_INT_BOTH, hdmi_hpd_interrupt) +/* + * This signal is not used by the EC for MST control, but leaving it here as an + * input as it may be useful for debugging/hw validation purposes. This can + * removed when EVT units are available. + */ +GPIO(TCPC_USB_C1_HPD, PIN(9, 3), GPIO_INPUT) + GPIO(SYS_RESET_L, PIN(0, 2), GPIO_ODR_HIGH) /* SYS_RST_ODL */ GPIO(ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW) /* EC_ENTERING_RW */ GPIO(PCH_WAKE_L, PIN(7, 4), GPIO_ODR_HIGH) /* EC_PCH_WAKE_ODL */ @@ -58,6 +66,7 @@ GPIO(LED_3_L, PIN(C, 2), GPIO_OUT_HIGH) GPIO(LED_4_L, PIN(6, 0), GPIO_OUT_HIGH) GPIO(EC_KB_BL_EN, PIN(8, 6), GPIO_OUT_LOW) /* Keyboard backlight */ GPIO(EN_PP5000_FAN, PIN(6, 1), GPIO_OUT_LOW) +GPIO(EN_MST, PIN(9, 6), GPIO_OUT_LOW) /* I2C pins - Alternate function below configures I2C module on these pins */ |