diff options
author | Diana Z <dzigterman@chromium.org> | 2020-04-04 23:52:45 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-16 08:32:22 +0000 |
commit | d9936b2edcb715950421f9ced02c92bb408b87c4 (patch) | |
tree | b1730757fb06c54d03c84795718d74a7ae57b0d3 /test | |
parent | 1cd2adbbf84ef5e67dfa45291a0a6b11f63830cf (diff) | |
download | chrome-ec-d9936b2edcb715950421f9ced02c92bb408b87c4.tar.gz |
TCPMv2: Configure PE test for alternate modes
Configures the TCPMv2 PE test to build the alternate mode code.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I4cb5824875e2a4b4e93fbae0a4d8762195b987f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2137258
Diffstat (limited to 'test')
-rw-r--r-- | test/fake_usbc.c | 5 | ||||
-rw-r--r-- | test/test_config.h | 3 | ||||
-rw-r--r-- | test/usb_pe_drp.c | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/test/fake_usbc.c b/test/fake_usbc.c index d98e7017f9..73906bd6e9 100644 --- a/test/fake_usbc.c +++ b/test/fake_usbc.c @@ -190,11 +190,6 @@ bool pd_is_disconnected(int port) #endif /* !CONFIG_USB_DRP_ACC_TRYSRC && !CONFIG_USB_CTVPD */ #ifndef CONFIG_USB_DRP_ACC_TRYSRC -void dfp_consume_cable_response(int port, int cnt, uint32_t *payload, - uint16_t head) -{ -} - __overridable void pd_set_dual_role(int port, enum pd_dual_role_states state) { } diff --git a/test/test_config.h b/test/test_config.h index cefaf55974..621b1db46a 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -333,11 +333,14 @@ int ncp15wb_calculate_temp(uint16_t adc); #define CONFIG_USB_POWER_DELIVERY #undef CONFIG_USB_PRL_SM #define CONFIG_USB_PD_TCPMV2 +#define CONFIG_USB_PD_DECODE_SOP #undef CONFIG_USB_TYPEC_SM #define CONFIG_USBC_VCONN #define PD_VCONN_SWAP_DELAY 5000 /* us */ #define CONFIG_USB_PD_DISCHARGE_GPIO #undef CONFIG_USB_PD_HOST_CMD +#define CONFIG_USB_PD_ALT_MODE_DFP +#define CONFIG_USBC_SS_MUX #endif /* Common TypeC tests defines */ diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c index 2bd05047ad..9c5771851b 100644 --- a/test/usb_pe_drp.c +++ b/test/usb_pe_drp.c @@ -10,6 +10,7 @@ #include "test_util.h" #include "timer.h" #include "usb_emsg.h" +#include "usb_mux.h" #include "usb_pe.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" @@ -26,6 +27,7 @@ const struct svdm_response svdm_rsp = { }; const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT]; +const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT]; int board_vbus_source_enabled(int port) { @@ -46,6 +48,11 @@ uint8_t tc_get_pd_enabled(int port) return 1; } +bool pd_alt_mode_capable(int port) +{ + return 1; +} + /** * Test section */ |