summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2016-02-03 15:25:08 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-02-03 21:34:56 -0800
commit00fbe2a0aa0fca3ec2840e262876610a1822c0d7 (patch)
tree2cfe48f5b7d8911b24662ef3ef37455f1d97485e /board
parentc5e0634054093529263367d926e115c0a332f8b0 (diff)
downloadchrome-ec-00fbe2a0aa0fca3ec2840e262876610a1822c0d7.tar.gz
kunimitus: add VCONN swap ability
BUG=none BRANCH=glados TEST=make -j buildall Change-Id: Ifa4273acbeab8b8463eddae2d9dde9c158f337a3 Signed-off-by: li feng <li1.feng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/325529 Commit-Ready: Li1 Feng <li1.feng@intel.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/kunimitsu/board.h4
-rw-r--r--board/kunimitsu/usb_pd_policy.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h
index 61e3d8ac30..fbf06d59ba 100644
--- a/board/kunimitsu/board.h
+++ b/board/kunimitsu/board.h
@@ -90,6 +90,7 @@
#define CONFIG_USBC_SS_MUX
#define CONFIG_USBC_SS_MUX_DFP_ONLY
#define CONFIG_USBC_VCONN
+#define CONFIG_USBC_VCONN_SWAP
/* USB-A ports */
#define USB_PORT_COUNT 2
@@ -218,6 +219,9 @@ enum als_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
diff --git a/board/kunimitsu/usb_pd_policy.c b/board/kunimitsu/usb_pd_policy.c
index b8a9ad3c67..e07454e887 100644
--- a/board/kunimitsu/usb_pd_policy.c
+++ b/board/kunimitsu/usb_pd_policy.c
@@ -126,6 +126,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 */