diff options
-rw-r--r-- | board/kunimitsu/board.h | 4 | ||||
-rw-r--r-- | board/kunimitsu/usb_pd_policy.c | 6 |
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 */ |