diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-10-22 15:47:16 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-23 13:18:58 -0700 |
commit | 776bedc3f8888a9526c35de185afb0be9023d237 (patch) | |
tree | a59ad65311c2b6d0b251c8f68b1671734205c8bb /board/chell | |
parent | 964534b91e21fc84dab39b01ab39e6e486f98960 (diff) | |
download | chrome-ec-776bedc3f8888a9526c35de185afb0be9023d237.tar.gz |
glados: chell: add VCONN swap ability
Add VCONN swap ability and accept VCONN_SWAP requests as long
as we have the ability to provide VCONN.
BUG=none
BRANCH=none
TEST=test on glados. ask for vconn swap and make sure vconn swap
is successful.
Change-Id: I7340e6253dcde4cdbe333a9622d7826e7ccbe6b4
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/308238
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/chell')
-rw-r--r-- | board/chell/board.h | 4 | ||||
-rw-r--r-- | board/chell/usb_pd_policy.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/board/chell/board.h b/board/chell/board.h index b875255219..8920f1b467 100644 --- a/board/chell/board.h +++ b/board/chell/board.h @@ -64,6 +64,7 @@ #define CONFIG_USBC_SS_MUX #define CONFIG_USBC_SS_MUX_DFP_ONLY #define CONFIG_USBC_VCONN +#define CONFIG_USBC_VCONN_SWAP #define CONFIG_VBOOT_HASH #define CONFIG_SPI_FLASH_PORT 1 @@ -169,6 +170,9 @@ enum temp_sensor_id { #define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ #define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */ +/* delay to turn on/off vconn */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + /* Define typical operating power and max power */ #define PD_OPERATING_POWER_MW 15000 #define PD_MAX_POWER_MW 45000 diff --git a/board/chell/usb_pd_policy.c b/board/chell/usb_pd_policy.c index 9c223d7b9d..b1a65b73bf 100644 --- a/board/chell/usb_pd_policy.c +++ b/board/chell/usb_pd_policy.c @@ -123,6 +123,12 @@ int pd_check_data_swap(int port, int data_role) return (data_role == PD_ROLE_UFP) ? 1 : 0; } +int pd_check_vconn_swap(int port) +{ + /* in G3, do not allow vconn swap since pp5000_A rail is off */ + return gpio_get_level(GPIO_PMIC_SLP_SUS_L); +} + void pd_execute_data_swap(int port, int data_role) { /* Do nothing */ |