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/gingerbread | |
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/gingerbread')
-rw-r--r-- | board/gingerbread/board.h | 1 | ||||
-rw-r--r-- | board/gingerbread/gpio.inc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/board/gingerbread/board.h b/board/gingerbread/board.h index d0b2994d31..cee6cb45d9 100644 --- a/board/gingerbread/board.h +++ b/board/gingerbread/board.h @@ -59,6 +59,7 @@ #include "registers.h" #define GPIO_DP_HPD GPIO_DDI_MST_IN_HPD +#define GPIO_BPWR_DET GPIO_TP71 #define GPIO_TRIGGER_1 GPIO_EC_HUB1_RESET_L #define GPIO_TRIGGER_2 GPIO_EC_HUB2_RESET_L diff --git a/board/gingerbread/gpio.inc b/board/gingerbread/gpio.inc index 9d2e3df5d9..5b7b3a9619 100644 --- a/board/gingerbread/gpio.inc +++ b/board/gingerbread/gpio.inc @@ -73,6 +73,7 @@ GPIO(FLASH_SPI1_MOSI, PIN(A, 7), GPIO_INT_BOTH) /* misc signals */ GPIO(EC_DFU_MUX_CTRL, PIN(A, 8), GPIO_OUT_HIGH) +GPIO(TP71, PIN(B, 0), GPIO_OUT_LOW) /* * I2C SCL/SDA pins. These will normally be under control of the peripheral from |