diff options
Diffstat (limited to 'board/zinger')
-rw-r--r-- | board/zinger/usb_pd_policy.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c index c520a10d5b..be86f26271 100644 --- a/board/zinger/usb_pd_policy.c +++ b/board/zinger/usb_pd_policy.c @@ -146,11 +146,13 @@ static void discharge_voltage(int target_volt) /* ----------------------- USB Power delivery policy ---------------------- */ +#define PDO_FIXED_FLAGS (PDO_FIXED_EXTERNAL | PDO_FIXED_DATA_SWAP) + /* Power Delivery Objects */ const uint32_t pd_src_pdo[] = { - PDO_FIXED(5000, RATED_CURRENT, PDO_FIXED_EXTERNAL), - PDO_FIXED(12000, RATED_CURRENT, PDO_FIXED_EXTERNAL), - PDO_FIXED(20000, RATED_CURRENT, PDO_FIXED_EXTERNAL), + PDO_FIXED(5000, RATED_CURRENT, PDO_FIXED_FLAGS), + PDO_FIXED(12000, RATED_CURRENT, PDO_FIXED_FLAGS), + PDO_FIXED(20000, RATED_CURRENT, PDO_FIXED_FLAGS), }; const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); @@ -251,6 +253,17 @@ void pd_power_supply_reset(int port) discharge_voltage(voltages[0].ovp); } +int pd_data_swap(int port, int data_role) +{ + /* Allow data swap if we are a DFP, otherwise don't allow */ + return (data_role == PD_ROLE_DFP) ? 1 : 0; +} + +void pd_execute_data_swap(int port, int data_role) +{ + /* Do nothing */ +} + int pd_board_checks(void) { #ifdef CONFIG_HIBERNATE |