summaryrefslogtreecommitdiff
path: root/test/usb_pe.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-05-06 08:51:08 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-21 04:56:46 +0000
commit61efe94f1e1ca1ebbd7c49ed9bd1bcfe8948e7f0 (patch)
treed4484be2e69c78dcb8369be447b0b139ba147ef0 /test/usb_pe.h
parentc92f3d36f70a551e3df442cc7e015000f73f0578 (diff)
downloadchrome-ec-61efe94f1e1ca1ebbd7c49ed9bd1bcfe8948e7f0.tar.gz
TCPMv2: Only include PD3.0 functionality when CONFIG_USB_PD_REV30
The TCPMv2 stack defaults to PD2.0 functionality. Defining CONFIG_USB_PD_REV30 enables PD3.0 functionality. BUG=b:155879504 BRANCH=none TEST=make -j buildall Manual tests: passed FAFT_PD running on kohaku Before patch: *** 18624 bytes in flash and 29216 bytes in RAM on kohaku RO **** *** 18544 bytes in flash and 29216 bytes in RAM on kohaku RW **** After patch: *** 23320 bytes in flash and 30336 bytes in RAM on kohaku RO **** *** 23228 bytes in flash and 30336 bytes in RAM on kohaku RW **** Flash savings of 4696 bytest Ram savings of 1120 Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I082cf62617a91b487d2d3567afd5e340bd52258c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2184547 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'test/usb_pe.h')
-rw-r--r--test/usb_pe.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/usb_pe.h b/test/usb_pe.h
index e5fccef936..27d7db7a5f 100644
--- a/test/usb_pe.h
+++ b/test/usb_pe.h
@@ -109,8 +109,6 @@ enum usb_pe_state {
PE_SOFT_RESET,
PE_SEND_NOT_SUPPORTED,
PE_SRC_PING,
- PE_GIVE_BATTERY_CAP,
- PE_GIVE_BATTERY_STATUS,
PE_DRS_EVALUATE_SWAP,
PE_DRS_CHANGE,
PE_DRS_SEND_SWAP,
@@ -123,7 +121,6 @@ enum usb_pe_state {
PE_PRS_SNK_SRC_ASSERT_RP,
PE_PRS_SNK_SRC_SOURCE_ON,
PE_PRS_SNK_SRC_SEND_SWAP,
- PE_FRS_SNK_SRC_START_AMS,
PE_VCS_EVALUATE_SWAP,
PE_VCS_SEND_SWAP,
PE_VCS_WAIT_FOR_VCONN_SWAP,
@@ -131,16 +128,29 @@ enum usb_pe_state {
PE_VCS_TURN_OFF_VCONN_SWAP,
PE_VCS_SEND_PS_RDY_SWAP,
PE_DO_PORT_DISCOVERY,
+ PE_VDM_SEND_REQUEST,
+ PE_VDM_IDENTITY_REQUEST_CBL,
+ PE_INIT_PORT_VDM_IDENTITY_REQUEST,
+ PE_INIT_VDM_SVIDS_REQUEST,
+ PE_INIT_VDM_MODES_REQUEST,
PE_VDM_REQUEST,
PE_VDM_ACKED,
PE_VDM_RESPONSE,
PE_HANDLE_CUSTOM_VDM_REQUEST,
PE_WAIT_FOR_ERROR_RECOVERY,
- PE_BIST,
+ PE_BIST_TX,
+ PE_BIST_RX,
PE_DR_SNK_GET_SINK_CAP,
+ /* PD3.0 only states below here*/
+ PE_FRS_SNK_SRC_START_AMS,
+ PE_GIVE_BATTERY_CAP,
+ PE_GIVE_BATTERY_STATUS,
+
+#ifdef CONFIG_USB_PD_REV30
/* Super States */
PE_PRS_FRS_SHARED,
+#endif
};
void set_state_pe(const int port, const enum usb_pe_state new_state);