summaryrefslogtreecommitdiff
path: root/test/usb_pe_drp.c
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2021-02-22 16:54:23 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-23 01:36:53 +0000
commitb3c8abc9a71a516f6aad5759b83bfadd131c2b07 (patch)
tree8ad38261d802cb790778330132718472d8cd64dc /test/usb_pe_drp.c
parente193be9c9b02c97cb303605eb473d7a3a4ba7a65 (diff)
downloadchrome-ec-b3c8abc9a71a516f6aad5759b83bfadd131c2b07.tar.gz
TCPMv2: Don't check VBUS when entering BIST mode
Temporarily remove check for VBUS = vSafe5V when entering BIST mode. It does this by measuring VBUS, but this facility is inadequate to the purpose on Volteer. Since this even more of an edge case than actually running BIST tests, remove the check for now, pending a more general solution. BUG=b:180957710,b:173023378 TEST=make buildall; pass TDA.2.1.2.2 BMC PHY RX INT REJ on voxel BRANCH=firmware-volteer-13672.B-main Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I172c1bcc10731c2e405344cdc6ad2b5a1ed80ced Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2714203 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'test/usb_pe_drp.c')
-rw-r--r--test/usb_pe_drp.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 2644ded63b..55be741ad6 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -134,85 +134,6 @@ test_static int finish_src_discovery(int startup_cable_probes)
}
/*
- * Verify that the PE will ignore BIST packets when not at vSafe5V and BIST
- * packets with unsupported BIST modes.
- */
-test_static int test_bist_ignore(void)
-{
- /* Bring up port as Source/DFP. Get to ready state. */
- /* Enable PE as source, expect SOURCE_CAP. */
- mock_tc_port[PORT0].power_role = PD_ROLE_SOURCE;
- mock_tc_port[PORT0].pd_enable = 1;
- mock_tc_port[PORT0].vconn_src = true;
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP,
- 0, PD_DATA_SOURCE_CAP, 10 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
- task_wait_event(10 * MSEC);
-
- /* REQUEST 5V, expect ACCEPT, PS_RDY. */
- rx_message(PD_MSG_SOP, 0, PD_DATA_REQUEST,
- PD_ROLE_SINK, PD_ROLE_UFP, RDO_FIXED(1, 500, 500, 0));
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP,
- PD_CTRL_ACCEPT, 0, 10 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP,
- PD_CTRL_PS_RDY, 0, 35 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
-
- TEST_EQ(finish_src_discovery(0), EC_SUCCESS, "%d");
-
- task_wait_event(5 * SECOND);
-
-
- /* Set VBUS to 1.5V; the PE should ignore the BIST message. */
- mock_charge_manager_set_vbus_voltage(1500);
- rx_message(PD_MSG_SOP, 0, PD_DATA_BIST, PD_ROLE_SINK, PD_ROLE_UFP,
- BDO(BDO_MODE_TEST_DATA, 0));
- /*
- * If the PE ignored the BIST message, it should respond normally to a
- * subsequent Get Source Caps request.
- */
- rx_message(PD_MSG_SOP, PD_CTRL_GET_SINK_CAP, 0, PD_ROLE_SINK,
- PD_ROLE_UFP, 0);
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP, 0,
- PD_DATA_SINK_CAP, 10 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
-
- /* Set VBUS to 20V; the PE should still ignore the BIST message. */
- mock_charge_manager_set_vbus_voltage(20000);
- rx_message(PD_MSG_SOP, 0, PD_DATA_BIST, PD_ROLE_SINK, PD_ROLE_UFP,
- BDO(BDO_MODE_TEST_DATA, 0));
- task_wait_event(1 * SECOND);
- rx_message(PD_MSG_SOP, PD_CTRL_GET_SINK_CAP, 0, PD_ROLE_SINK,
- PD_ROLE_UFP, 0);
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP, 0,
- PD_DATA_SINK_CAP, 10 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
-
- /*
- * Set VBUS to 5V but request an unsupported BIST mode; the PE should
- * still ignore the BIST message.
- */
- mock_charge_manager_set_vbus_voltage(5000);
- rx_message(PD_MSG_SOP, 0, PD_DATA_BIST, PD_ROLE_SINK, PD_ROLE_UFP,
- BDO(BDO_MODE_RECV, 0));
- task_wait_event(1 * SECOND);
- rx_message(PD_MSG_SOP, PD_CTRL_GET_SINK_CAP, 0, PD_ROLE_SINK,
- PD_ROLE_UFP, 0);
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP, 0,
- PD_DATA_SINK_CAP, 10 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_message_sent(PORT0);
-
- return EC_SUCCESS;
-}
-
-/*
* Verify that, before connection, PE_SRC_Send_Capabilities goes to
* PE_SRC_Discovery on send error, not PE_Send_Soft_Reset.
*/
@@ -345,7 +266,6 @@ void run_test(int argc, char **argv)
{
test_reset();
- RUN_TEST(test_bist_ignore);
RUN_TEST(test_send_caps_error_before_connected);
RUN_TEST(test_send_caps_error_when_connected);