summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2020-08-28 14:21:18 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-07 19:16:10 +0000
commitf22925531a49127dca6b43b738e4c006fa33ff11 (patch)
treee35639ac48e59aad7ddde3e6c62d5f22d71d8e80 /baseboard
parent840d7258423fced9538af206c2f13f8cd5600b59 (diff)
downloadchrome-ec-f22925531a49127dca6b43b738e4c006fa33ff11.tar.gz
BB retimer: Set UFP mode of BB retimer
This CL enables getting the enter mode information received from DFP and sets the following BB retimer bits accordingly. Bit 2: RE_TIMER_DRIVER Bit 18: CABLE_TYPE Bit 19: VPRO_DOCK_DETECTED Bit 20: TBT_ACTIVE_LINK_TRAINING Bit 22: ACTIVE/PASSIVE Bits 27-25: TBT Cable speed Bits 29-28: TBT_GEN_SUPPORT BUG=b:157163664 BRANCH=None TEST=Tested with volteer as UFP, able to set the retimer bits Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I661aa4630b42fbaa136ff3855c4f70e3dee61546 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2382634 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/volteer/baseboard.h1
-rw-r--r--baseboard/volteer/usb_pd_policy.c11
2 files changed, 2 insertions, 10 deletions
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h
index 772b34e694..132ed7375b 100644
--- a/baseboard/volteer/baseboard.h
+++ b/baseboard/volteer/baseboard.h
@@ -158,6 +158,7 @@
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_ALT_MODE
#define CONFIG_USB_PD_ALT_MODE_DFP
+#define CONFIG_USB_PD_ALT_MODE_UFP
#define CONFIG_USB_PD_DISCHARGE_PPC
#define CONFIG_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
diff --git a/baseboard/volteer/usb_pd_policy.c b/baseboard/volteer/usb_pd_policy.c
index 2b4cd162aa..670654198f 100644
--- a/baseboard/volteer/usb_pd_policy.c
+++ b/baseboard/volteer/usb_pd_policy.c
@@ -76,8 +76,6 @@ int board_vbus_source_enabled(int port)
/* Responses specifically for the enablement of TBT mode in the role of UFP */
#define OPOS_TBT 1
-static union tbt_dev_mode_enter_cmd
- ufp_enter_mode[CONFIG_USB_PD_PORT_MAX_COUNT];
static const union tbt_mode_resp_device vdo_tbt_modes[1] = {
{
@@ -181,14 +179,7 @@ static int svdm_tbt_compat_response_enter_mode(
*/
if ((mux_state & USB_PD_MUX_USB_ENABLED) ||
(mux_state & USB_PD_MUX_SAFE_MODE)) {
-
- /*
- * TODO(b:157163664): set retimer config for UFP
- * Save TBT3 SOP VDO from request so retimer can use it
- */
- ufp_enter_mode[port] =
- (union tbt_dev_mode_enter_cmd)payload[1];
-
+ pd_ufp_set_enter_mode(port, payload);
set_tbt_compat_mode_ready(port);
CPRINTS("UFP Enter TBT mode");
return 1; /* ACK */