diff options
author | Scott Collyer <scollyer@google.com> | 2021-03-25 12:32:56 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-02 02:47:54 +0000 |
commit | 00f1fed18d7a75792f6a4a849bb39d33590a5f9c (patch) | |
tree | 4c99a3db2a1f3c4ea8155187ac5ec85b72788f02 /board/baklava/board.h | |
parent | 89e4a2e95103abbfb31d6d77bba0d9eeb047290b (diff) | |
download | chrome-ec-00f1fed18d7a75792f6a4a849bb39d33590a5f9c.tar.gz |
honeybuns: Add usbc attached gpio support for usb/mst hubs
This CL adds support for new GPIO signals used by the EC to notify
usb/mst hubs about type-c attach and over current protection events.
The usb3 only port on quiche/baklava uses a PPC, and previously the
PPC was only being used to enable/disable VBUS and did not have
interrupt support. However, there can still protection events that
must be handled.
This CL also adds a simple usbc state machine to be able to determine
attached.src state while in RO. The USB hub needs to be notified when
VBUS is present (BPWRDET) otherwise it will just go into suspend state
and there can be USB enumeration issues.
BUG=b:185066262
BRANCH=quiche
TEST=manual
For OCP, I set the PPC source current limit to 1.5A and connected to a
chromebook. This triggers the OCP event.
For BPWRDET/UFP_PLUG_DET verified that when attached, these signals
are high, when detached, are low as expected.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: Ia147b970ea3dc298545aec4dedaa035ad2a1db30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2818522
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Sam Hurst <shurst@google.com>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'board/baklava/board.h')
-rw-r--r-- | board/baklava/board.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/baklava/board.h b/board/baklava/board.h index 1736b688d9..6d0e74f302 100644 --- a/board/baklava/board.h +++ b/board/baklava/board.h @@ -47,9 +47,12 @@ #define GPIO_DP_HPD GPIO_DDI_MST_IN_HPD #define GPIO_USBC_UF_ATTACHED_SRC GPIO_USBC_UF_MUX_VBUS_EN +#define GPIO_BPWR_DET GPIO_HUB_BPWRDET +#define GPIO_USB_HUB_OCP_NOTIFY GPIO_USBC_DATA_OCP_NOTIFY +#define GPIO_UFP_PLUG_DET GPIO_MST_UFP_PLUG_DET -#define GPIO_TRIGGER_1 GPIO_TP41 -#define GPIO_TRIGGER_2 GPIO_TP73 +#define GPIO_TRIGGER_1 GPIO_USB3_A5_CDP_EN +#define GPIO_TRIGGER_2 GPIO_USB3_A6_CDP_EN enum debug_gpio { TRIGGER_1 = 0, |