diff options
author | Scott <scollyer@chromium.org> | 2015-03-04 17:18:27 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-04-09 01:45:38 +0000 |
commit | d98b588c985a6fb537e0ebc7c7e201761f39cbaa (patch) | |
tree | 65ebe350fbe1e0f81209fabcdb9c5224b3e8fa82 /include | |
parent | bd1f20911fcdcd74fa504a53aabc891ff9eeb112 (diff) | |
download | chrome-ec-d98b588c985a6fb537e0ebc7c7e201761f39cbaa.tar.gz |
pd: Modify BIST mode according to ECR#PD2.0.1.0.004
- Changed TX BIST mode so that it transmits for 50 msec instead
of transmitting forever.
- Added console command to initiate TX BIST mode.
- Fixed an issue with circular DMA mode which was causing watchdog.
- Modified RX BIST to account for shorter TX BIST duration.
BUG=chrome-os-partner:36335
TEST=Manual on Samus to Samus, manual on Zinger to Samus
BRANCH=Samus
Signed-off-by: Scott Collyer <scollyer@chromium.org>
Change-Id: I666347de47c81b5b7a1e82c2b99345ff3ebbb7d4
Reviewed-on: https://chromium-review.googlesource.com/256194
Tested-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Trybot-Ready: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 75b0967406..33460bb732 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -134,6 +134,8 @@ enum pd_errors { #define PD_T_SRC_TURN_ON (275*MSEC) /* 275ms */ #define PD_T_SAFE_0V (650*MSEC) /* 650ms */ #define PD_T_NO_RESPONSE (5500*MSEC) /* between 4.5s and 5.5s */ +#define PD_T_BIST_TRANSMIT (50*MSEC) /* 50ms (used for task_wait arg) */ +#define PD_T_BIST_RECEIVE (60*MSEC) /* 60ms (max time to process bist) */ /* number of edges and time window to detect CC line is not idle */ #define PD_RX_TRANSITION_COUNT 3 @@ -626,7 +628,8 @@ enum pd_states { PD_STATE_HARD_RESET_SEND, PD_STATE_HARD_RESET_EXECUTE, #ifdef CONFIG_COMMON_RUNTIME - PD_STATE_BIST, + PD_STATE_BIST_RX, + PD_STATE_BIST_TX, #endif /* Number of states. Not an actual state. */ @@ -1263,6 +1266,13 @@ int pd_start_tx(int port, int polarity, int bit_len); void pd_tx_set_circular_mode(int port); /** + * Stop PD TX DMA circular mode transaction already in progress. + * + * @param port USB-C port number + */ +void pd_tx_clear_circular_mode(int port); + +/** * Call when we are done sending a packet. * * @param port USB-C port number |