diff options
author | Diana Z <dzigterman@chromium.org> | 2021-07-08 16:18:41 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-12 18:08:41 +0000 |
commit | e912085070cd8bff49ae3b3bb3cd7ce3b274caa9 (patch) | |
tree | 2c7b5335d76e91c6770adc9e5fcc221870917582 /common/usbc/usb_pe_drp_sm.c | |
parent | b86dfea40060ba8e5037ba5cb3ea971b28ec541c (diff) | |
download | chrome-ec-e912085070cd8bff49ae3b3bb3cd7ce3b274caa9.tar.gz |
TCPMv2: Gate requesting sink capabilities on related features
There are a number of features that may cause a board to need sink
capabilities (3.0 A port balancing, FRS, or AP host commands). However,
other boards may not need these and the added traffic can increase the
liklihood of collisions on PD 2.0 connections.
BRANCH=None
BUG=b:192051705
TEST=connect honeybuns to TCPMv1 DUT and verify DP alternate mode can be
reliably entered
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I70e2f360a9a45eee85ed555cb0165937c01a661a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3016407
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r-- | common/usbc/usb_pe_drp_sm.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index 7661e8b2ec..0230e0bbb2 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -2153,8 +2153,11 @@ static void pe_src_startup_entry(int port) /* Reset VCONN swap counter */ pe[port].vconn_swap_counter = 0; - /* Request partner sink caps */ - pd_dpm_request(port, DPM_REQUEST_GET_SNK_CAPS); + /* Request partner sink caps if a feature requires them */ + if (IS_ENABLED(CONFIG_USB_PD_HOST_CMD) || + CONFIG_USB_PD_3A_PORTS > 0 || + IS_ENABLED(CONFIG_USB_PD_FRS)) + pd_dpm_request(port, DPM_REQUEST_GET_SNK_CAPS); } } @@ -3005,13 +3008,18 @@ static void pe_snk_startup_entry(int port) PE_SET_FLAG(port, PE_FLAGS_VCONN_SWAP_TO_ON); } - /* Request sink caps for FRS and PRS evaluation. + /* + * Request sink caps for FRS, output power consideration, or reporting + * to the AP through host commands. * * On entry to the PE_SNK_Ready state if the Sink supports Fast Role * Swap, then the Policy Engine Shall do the following: * - Send a Get_Sink_Cap Message */ - pd_dpm_request(port, DPM_REQUEST_GET_SNK_CAPS); + if (IS_ENABLED(CONFIG_USB_PD_HOST_CMD) || + CONFIG_USB_PD_3A_PORTS > 0 || + IS_ENABLED(CONFIG_USB_PD_FRS)) + pd_dpm_request(port, DPM_REQUEST_GET_SNK_CAPS); } |