diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2020-06-03 11:06:53 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-11 19:44:59 +0000 |
commit | b9203fa3b2b032c3aa7b2e3ccfb01dce7eea8f22 (patch) | |
tree | 7969549ba4fdc71e0d4427765543330f8f40df11 /board/servo_v4 | |
parent | 7b2203f0e45e6dc653aec4bc4c5cd4b72e844b9f (diff) | |
download | chrome-ec-b9203fa3b2b032c3aa7b2e3ccfb01dce7eea8f22.tar.gz |
TCPMv2: Support mode entry for SOP' and SOP''
Add a transmit type parameter to functions involved in mode entry; also
add such a parameter to various functions calling those functions. For
DisplayPort-specific definitions or calls, specify SOP; we do not
currently support DisplayPort mode for cable plugs. For TCPMv1-specific
code, specify SOP. TCPMv1 generally assumes that the discovery/mode
structures are 1-dimensional, as they were previously, and changing that
is outside the scope of this CL.
BUG=b:155890173
TEST=Enter DP mode on Volteer with TCPMv2
TEST=Enter DP mode on Volteer with TCPMv1
TEST=Enter TBT mode on Volteer with TCPMV1
BRANCH=none
Change-Id: I8afc75b3f3be8939c4645058ac4a31f24c88fb9e
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2229279
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/servo_v4')
-rw-r--r-- | board/servo_v4/board.c | 4 | ||||
-rw-r--r-- | board/servo_v4/usb_pd_policy.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index 559b9bb5b0..fc6735e19c 100644 --- a/board/servo_v4/board.c +++ b/board/servo_v4/board.c @@ -78,7 +78,7 @@ static volatile int hpd_prev_level; void hpd_irq_deferred(void) { - int dp_mode = pd_alt_mode(1, USB_SID_DISPLAYPORT); + int dp_mode = pd_alt_mode(1, TCPC_TX_SOP, USB_SID_DISPLAYPORT); if (dp_mode) { pd_send_hpd(DUT, hpd_irq); @@ -90,7 +90,7 @@ DECLARE_DEFERRED(hpd_irq_deferred); void hpd_lvl_deferred(void) { int level = gpio_get_level(GPIO_DP_HPD); - int dp_mode = pd_alt_mode(1, USB_SID_DISPLAYPORT); + int dp_mode = pd_alt_mode(1, TCPC_TX_SOP, USB_SID_DISPLAYPORT); if (level != hpd_prev_level) { /* It's a glitch while in deferred or canceled action */ diff --git a/board/servo_v4/usb_pd_policy.c b/board/servo_v4/usb_pd_policy.c index a8a6b8ee1f..b87130fbc8 100644 --- a/board/servo_v4/usb_pd_policy.c +++ b/board/servo_v4/usb_pd_policy.c @@ -950,9 +950,9 @@ static int svdm_enter_mode(int port, uint32_t *payload) return 1; } -int pd_alt_mode(int port, uint16_t svid) +int pd_alt_mode(int port, enum tcpm_transmit_type type, uint16_t svid) { - if (svid == USB_SID_DISPLAYPORT) + if (type == TCPC_TX_SOP && svid == USB_SID_DISPLAYPORT) return alt_mode; return 0; |