summaryrefslogtreecommitdiff
path: root/board/servo_v4/usb_pd_config.h
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-03-17 11:46:25 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-08 05:33:18 +0000
commit974de474ad4c4c86721ae6c4448875b85dc3234b (patch)
treeffb277505a96ef8de7a9eb16ae037a43c12ca2c5 /board/servo_v4/usb_pd_config.h
parentacce53e2ea4eb248a816f868a5b3817bbd4f83a0 (diff)
downloadchrome-ec-974de474ad4c4c86721ae6c4448875b85dc3234b.tar.gz
servo_v4: Add console commands to override the HPD pass-through
New console commands, like: > usbc_action dp hpd ext # use the external HPD, no overridden > usbc_action dp hpd h # override HPD to high, IRQ pass-through > usbc_action dp hpd l # override HPD to low, no IRQ pass-through > usbc_action dp hpd irq # send HPD IRQ BRANCH=servo BUG=b:153647984 TEST=Tried the new console commands. Change-Id: I197efd1d03d906b99d7b82ad151865da44e321ea Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2143937 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/servo_v4/usb_pd_config.h')
-rw-r--r--board/servo_v4/usb_pd_config.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/board/servo_v4/usb_pd_config.h b/board/servo_v4/usb_pd_config.h
index 2d189d6267..9d0a79cf2d 100644
--- a/board/servo_v4/usb_pd_config.h
+++ b/board/servo_v4/usb_pd_config.h
@@ -64,12 +64,14 @@
#define CC_POLARITY BIT(5) /* CC polarity */
/* Servo v4 DP alt-mode configuration */
-#define ALT_DP_ENABLE BIT(0) /* Enable DP alt-mode or not */
-#define ALT_DP_PIN_C BIT(1) /* Pin assignment C supported */
-#define ALT_DP_PIN_D BIT(2) /* Pin assignment D supported */
-#define ALT_DP_PIN_E BIT(3) /* Pin assignment E supported */
-#define ALT_DP_MF_PREF BIT(4) /* Multi-Function preferred */
-#define ALT_DP_PLUG BIT(5) /* Plug or receptacle */
+#define ALT_DP_ENABLE BIT(0) /* Enable DP alt-mode or not */
+#define ALT_DP_PIN_C BIT(1) /* Pin assignment C supported */
+#define ALT_DP_PIN_D BIT(2) /* Pin assignment D supported */
+#define ALT_DP_PIN_E BIT(3) /* Pin assignment E supported */
+#define ALT_DP_MF_PREF BIT(4) /* Multi-Function preferred */
+#define ALT_DP_PLUG BIT(5) /* Plug or receptacle */
+#define ALT_DP_OVERRIDE_HPD BIT(6) /* Override the HPD signal */
+#define ALT_DP_HPD_LVL BIT(7) /* HPD level if overridden */
/* TX uses SPI1 on PB3-4 for CHG port, SPI2 on PB 13-14 for DUT port */
#define SPI_REGS(p) ((p) ? STM32_SPI2_REGS : STM32_SPI1_REGS)