oak: add VCONN swap ability

refer to commit 776bedc3, enable VCONN swap option for oak.

BUG=chrome-os-partner:41838
BRANCH=none
TEST=test on oak. ask for vconn swap and make sure vconn swap
is successful.

Change-Id: I2afa68e073d088302c2c6ba2315a6c9f4551ef87
Signed-off-by: Ben Lok <ben.lok@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/313913
Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
Ben Lok
2015-11-24 20:29:34 +08:00
committed by chrome-bot
parent e24ac972e2
commit cefe19e08f
2 changed files with 10 additions and 0 deletions

View File

@@ -69,6 +69,7 @@
#define CONFIG_USBC_SS_MUX
#define CONFIG_USBC_SS_MUX_DFP_ONLY
#define CONFIG_USBC_VCONN
#define CONFIG_USBC_VCONN_SWAP
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_ALT_MODE
#define CONFIG_USB_PD_ALT_MODE_DFP
@@ -191,6 +192,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 60000

View File

@@ -118,6 +118,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 5V power source is off */
return gpio_get_level(GPIO_5V_POWER_GOOD);
}
void pd_execute_data_swap(int port, int data_role)
{
}