summaryrefslogtreecommitdiff
path: root/board/plankton/board.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-07-17 17:41:54 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-22 18:04:29 +0000
commit0115834bb637f95c7bb0d9d882a09dd1c4349d15 (patch)
tree060aa843b5b171eed6fb254d66fd41aeb792d56d /board/plankton/board.h
parent2f4a59037990891570af032f7ce41397b499347a (diff)
downloadchrome-ec-0115834bb637f95c7bb0d9d882a09dd1c4349d15.tar.gz
plankton: allow use of double CC cable
Add ability for Plankton to detect whether a single or double CC cable is used to connect to DUT. This is done by toggling the active CC line until a connection is detected, then toggling once more and checking if we still have a connection. If we can connect to the DUT in both CC polarities, then it is a double CC cable. Before we know the cable type, keep PD communication disabled to avoid partially negotiating and then disconnecting. Note, this increases the time it takes for us to connect a form a stable PD contract with the DUT. When we detect a double CC cable, the cable flip button actually flips the active CC polarity, thus testing all pins in the opposite polarity. BUG=chrome-os-partner:42569 BRANCH=smaug TEST=test with plankton and samus. test that we form a PD contract with both single and double CC cables as both sink and source. also test the cable flip button for both cables. Change-Id: I522369302848d4cdbb70c55a40af3ad0b7c3fb8a Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/286589 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/plankton/board.h')
-rw-r--r--board/plankton/board.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/board/plankton/board.h b/board/plankton/board.h
index 43ca20fc1e..33f9165583 100644
--- a/board/plankton/board.h
+++ b/board/plankton/board.h
@@ -19,6 +19,8 @@
#define CONFIG_STM_HWTIMER32
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_ALT_MODE
+#undef CONFIG_USB_PD_COMM_ENABLED
+#define CONFIG_USB_PD_COMM_ENABLED 0
#define CONFIG_USB_PD_CUSTOM_VDM
#define CONFIG_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_DYNAMIC_SRC_CAP
@@ -50,6 +52,9 @@
*/
#define CONFIG_SYSTEM_UNLOCKED
+#undef DEFERRABLE_MAX_COUNT
+#define DEFERRABLE_MAX_COUNT 9
+
#ifndef __ASSEMBLER__
/* Timer selection */
@@ -95,14 +100,8 @@ void board_set_source_cap(enum board_src_cap cap);
/* Reset USB hub if USB hub is switched to type-C port */
void board_maybe_reset_usb_hub(void);
-/* Whether faking PD disconnected or not */
-int board_pd_fake_disconnected(void);
-
/* Get fake ADC reading */
-int board_fake_pd_adc_read(void);
-
-/* Set fake PD pull-up/pull-down */
-void board_update_fake_adc_value(int host_mode);
+int board_fake_pd_adc_read(int cc);
/* Set pull-up/pull-down on CC lines */
void board_pd_set_host_mode(int enable);