From b9203fa3b2b032c3aa7b2e3ccfb01dce7eea8f22 Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Wed, 3 Jun 2020 11:06:53 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2229279 Reviewed-by: Diana Z Commit-Queue: Diana Z --- board/chell/usb_pd_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/chell') diff --git a/board/chell/usb_pd_policy.c b/board/chell/usb_pd_policy.c index 478f656de2..2123c45d86 100644 --- a/board/chell/usb_pd_policy.c +++ b/board/chell/usb_pd_policy.c @@ -228,7 +228,7 @@ static int svdm_enter_dp_mode(int port, uint32_t mode_caps) static int svdm_dp_status(int port, uint32_t *payload) { - int opos = pd_alt_mode(port, USB_SID_DISPLAYPORT); + int opos = pd_alt_mode(port, TCPC_TX_SOP, USB_SID_DISPLAYPORT); payload[0] = VDO(USB_SID_DISPLAYPORT, 1, CMD_DP_STATUS | VDO_OPOS(opos)); @@ -245,7 +245,7 @@ static int svdm_dp_status(int port, uint32_t *payload) static int svdm_dp_config(int port, uint32_t *payload) { - int opos = pd_alt_mode(port, USB_SID_DISPLAYPORT); + int opos = pd_alt_mode(port, TCPC_TX_SOP, USB_SID_DISPLAYPORT); int mf_pref = PD_VDO_DPSTS_MF_PREF(dp_status[port]); int pin_mode = pd_dfp_dp_get_pin_mode(port, dp_status[port]); -- cgit v1.2.1