diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-05-05 15:22:04 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-06 04:40:05 +0000 |
commit | f782bab165c0fe551efd1e7a669b766a14dc2187 (patch) | |
tree | 1ccf08b17b42b5c6733e5f8cc62939ce68127310 /board | |
parent | d175e507d8e3d4333b71eeee00a0cd1314179573 (diff) | |
download | chrome-ec-f782bab165c0fe551efd1e7a669b766a14dc2187.tar.gz |
ryu: fix Rp pull-ups on CC
the USBC_CC_PUENx resistors are actually stuffed on P6,
we need to drive the corresponding GPIOs to set the high side of the Rp
pull-ups when we are a power source.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=on Ryu P6, check the ADC values on CC lines when dual role
toggling.
Change-Id: Ic8943268615597f114672df7c42a0292c985e994
Reviewed-on: https://chromium-review.googlesource.com/269517
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
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); |