summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-05-06 12:32:37 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-06 22:53:13 +0000
commit7eae25ba10d4c53f80b85a25865f66ffc8f08aeb (patch)
tree086efc486905c1c7390d65f6910caf32a14edafe
parent3b9159f0ec0b48e5b38baa3f7d3ed8bb1c883edd (diff)
downloadchrome-ec-7eae25ba10d4c53f80b85a25865f66ffc8f08aeb.tar.gz
twinkie: fix initialization in sniffer mode
Do not set the Rd pull-down by default when we are passively sniffing and we don't need VBUS detection in sniffer mode. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=run Twinkie without any type-C connected, using the "adc" command, check that both CC are floating at startup. Change-Id: I8889b22d978b9911bc4441e485e1984ccedf3425 Reviewed-on: https://chromium-review.googlesource.com/269782 Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/twinkie/usb_pd_config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/twinkie/usb_pd_config.h b/board/twinkie/usb_pd_config.h
index 6a5e18b128..7645d7500b 100644
--- a/board/twinkie/usb_pd_config.h
+++ b/board/twinkie/usb_pd_config.h
@@ -140,12 +140,14 @@ static inline void pd_tx_init(void)
{
gpio_config_module(MODULE_USB_PD, 1);
+#ifndef CONFIG_USB_PD_TX_PHY_ONLY
/* Detect when VBUS crosses the 4.5V threshold (1.25mV/bit) */
ina2xx_write(0, INA2XX_REG_ALERT, 4500 * 100 / 125);
ina2xx_write(0, INA2XX_REG_MASK, INA2XX_MASK_EN_BOL);
/* start as a power consumer */
gpio_set_level(GPIO_CC1_RD, 0);
gpio_set_level(GPIO_CC2_RD, 0);
+#endif /* CONFIG_USB_PD_TX_PHY_ONLY */
}
static inline void pd_set_host_mode(int port, int enable)