summaryrefslogtreecommitdiff
path: root/board/morphius
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2020-08-20 15:18:35 +1000
committerCommit Bot <commit-bot@chromium.org>2020-08-21 04:38:54 +0000
commitd44d6b29eb5ff59c1afd47135ec626ed907b174a (patch)
treef170e2f7ca5c0a3004a7db289edd088a09a41ba7 /board/morphius
parentace8af086a9f8110ec0086cd6f81720e4bc6e7a1 (diff)
downloadchrome-ec-d44d6b29eb5ff59c1afd47135ec626ed907b174a.tar.gz
trembyle: correctly pass USB-C1 HPD to the MST hub
The RTD2141 MST hub on some daughterboard options requires the EC to drive its HPD input because HPD comes over USB-PD, but the MST hub then drives the AP's HPD input. The EC was incorrectly driving nothing, causing DP outputs on port C1 to not be detected. Because the MST's HPD input is connected to an IO expander on current hardware, configure the USB-C and Trembyle-specific HPD twiddling code to support regular or expander GPIOs. Experience says IO expanders tend to be too slow for reliable HPD, but this should allow some (possibly flaky) HPD support until hardware changes are completed to put the output directly on an EC GPIO. BUG=b:159051013,b:165622386 TEST=still builds (I have no v3 hardware to test against) BRANCH=None Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I9e041ab7c222927a11b8972920b7e978ab30d751 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2366456 Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/morphius')
-rw-r--r--board/morphius/board.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/morphius/board.c b/board/morphius/board.c
index ffb4529662..ab47596e0f 100644
--- a/board/morphius/board.c
+++ b/board/morphius/board.c
@@ -281,8 +281,8 @@ enum gpio_signal board_usbc_port_to_hpd_gpio(int port)
/*
* USB-C1 OPT3 DB
* version_2 uses EC_DP1_HPD
- * version_3 uses DP1_HPD via RTD2141B MST hub, EC does
- * not drive HPD.
+ * version_3 uses DP1_HPD via RTD2141B MST hub to drive AP
+ * HPD, EC drives MST hub HPD input from USB-PD messages.
*
* This would have been ec_config_has_usbc1_retimer_ps8802
* on version_2 hardware but the result is the same and
@@ -290,7 +290,7 @@ enum gpio_signal board_usbc_port_to_hpd_gpio(int port)
*/
else if (ec_config_has_mst_hub_rtd2141b())
return (board_ver >= 3)
- ? GPIO_NO_HPD
+ ? IOEX_USB_C1_HPD_IN_DB
: GPIO_EC_DP1_HPD;
/* USB-C1 OPT1 DB uses DP2_HPD. */