diff options
Diffstat (limited to 'board/fruitpie/usb_pd_config.h')
-rw-r--r-- | board/fruitpie/usb_pd_config.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/fruitpie/usb_pd_config.h b/board/fruitpie/usb_pd_config.h index efd702a284..f05b71c920 100644 --- a/board/fruitpie/usb_pd_config.h +++ b/board/fruitpie/usb_pd_config.h @@ -82,6 +82,16 @@ static inline void pd_tx_init(void) static inline void pd_set_host_mode(int enable) { + /* We never charging in power source mode */ + if (enable) { + gpio_set_level(GPIO_CHARGE_EN_L, 1); + } else { + /* Kill VBUS power supply */ + gpio_set_level(GPIO_USB_C_5V_EN, 0); + /* Enable the charging path*/ + gpio_set_level(GPIO_CHARGE_EN_L, 0); + } + gpio_set_level(GPIO_CC_HOST, enable); } |