diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/ryu/usb_pd_config.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/ryu/usb_pd_config.h b/board/ryu/usb_pd_config.h index 7017118c0a..9d6784beb4 100644 --- a/board/ryu/usb_pd_config.h +++ b/board/ryu/usb_pd_config.h @@ -138,10 +138,16 @@ static inline void pd_set_host_mode(int port, int enable) /* High-Z is used for host mode. */ gpio_set_level(GPIO_USBC_CC1_DEVICE_ODL, 1); gpio_set_level(GPIO_USBC_CC2_DEVICE_ODL, 1); + /* Set 3.3V for Rp pull-up */ + gpio_set_flags(GPIO_USBC_CC_PUEN1, GPIO_OUT_HIGH); + gpio_set_flags(GPIO_USBC_CC_PUEN2, GPIO_OUT_HIGH); } else { /* Kill VBUS power supply */ charger_enable_otg_power(0); gpio_set_level(GPIO_CHGR_OTG, 0); + /* Remove Rp pull-up by putting the high side in Hi-Z */ + gpio_set_flags(GPIO_USBC_CC_PUEN1, GPIO_INPUT); + gpio_set_flags(GPIO_USBC_CC_PUEN2, GPIO_INPUT); /* Pull low for device mode. */ gpio_set_level(GPIO_USBC_CC1_DEVICE_ODL, 0); gpio_set_level(GPIO_USBC_CC2_DEVICE_ODL, 0); |