diff options
author | Rajesh Kumar <rajesh3.kumar@intel.com> | 2023-03-07 14:13:31 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-14 00:43:27 +0000 |
commit | 726908c0cfe93332e4af5dd509958c06d2e7c699 (patch) | |
tree | 4650b88277fd1564280d1ecfce1be644ffce1cba | |
parent | ffb51adb112867b6b2367d1187cfc96d0d3fc6ac (diff) | |
download | chrome-ec-726908c0cfe93332e4af5dd509958c06d2e7c699.tar.gz |
PD: Add retimer/redriver cable details in Host command response
This change add support to provide retimer/redriver cable details to AP
through host command "EC_CMD_USB_PD_CONTROL" to configure Bit2 and Bit22
of IOM register.
BRANCH=None
BUG=None
TEST=Verified cable type is appropriate through host command response
Change-Id: Ia0c40bac7c8140a848719b654f85281c3afc8e8d
Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4317924
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
-rw-r--r-- | common/usb_pd_host_cmd.c | 4 | ||||
-rw-r--r-- | include/ec_commands.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/common/usb_pd_host_cmd.c b/common/usb_pd_host_cmd.c index b6508c5e1e..d051a8f2e7 100644 --- a/common/usb_pd_host_cmd.c +++ b/common/usb_pd_host_cmd.c @@ -148,6 +148,7 @@ static const mux_state_t typec_mux_map[USB_PD_CTRL_MUX_COUNT] = { * Bit 1: Optical/Non-optical cable * Bit 2: Legacy Thunderbolt adapter * Bit 3: Active Link Uni-Direction/Bi-Direction + * Bit 4: Retimer/Rediriver cable */ static uint8_t get_pd_control_flags(int port) { @@ -180,6 +181,9 @@ static uint8_t get_pd_control_flags(int port) control_flags |= cable_resp.lsrx_comm == UNIDIR_LSRX_COMM ? USB_PD_CTRL_ACTIVE_LINK_UNIDIR : 0; + control_flags |= cable_resp.retimer_type == USB_RETIMER ? + USB_PD_CTRL_RETIMER_CABLE : + 0; return control_flags; } diff --git a/include/ec_commands.h b/include/ec_commands.h index 1915ff9ea9..049adcc205 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -5792,6 +5792,8 @@ enum pd_cc_states { #define USB_PD_CTRL_TBT_LEGACY_ADAPTER BIT(2) /* Active Link Uni-Direction */ #define USB_PD_CTRL_ACTIVE_LINK_UNIDIR BIT(3) +/* Retimer/Redriver cable */ +#define USB_PD_CTRL_RETIMER_CABLE BIT(4) struct ec_response_usb_pd_control_v2 { uint8_t enabled; |