summaryrefslogtreecommitdiff
path: root/include/usbc_ppc.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-01-23 15:35:41 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-01-25 19:23:47 -0800
commitf4602ec472c5477b1dd1e8963f6d36bd735ebba8 (patch)
treeb68f2d71a73b764f1e3aa93a7566fd762cb8b778 /include/usbc_ppc.h
parentf71edad1e7da32c1a9f2f4208da2ce57d0cfd100 (diff)
downloadchrome-ec-f4602ec472c5477b1dd1e8963f6d36bd735ebba8.tar.gz
usbc: Moving PPC init after setting TCPC resistors.
We don't want the PPC to connect the CC lines from the TCPC to the USB connector until the TCPC resistors are set in a valid state (SINK initially). If we connect the CC lines (happens in the ppc_init) before setting the resistor values, some TCPC will be toggling the CC line between Rp/Rd since it doesn't detect a cable yet. In the dead battery charging case, connecting the toggling CC lines to the charger can rail the CC lines to 3.3 V signaling to the charger to disconnect Vbus, thus browning out the board. BRANCH=none BUG=b:71865251 TEST=Grunt powers on via usbc p0 with and without USB hub. Change-Id: I8e78aa2af42075398fab89a2dccef5e7df27b260 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/882305 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include/usbc_ppc.h')
-rw-r--r--include/usbc_ppc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h
index 9fc8e61f91..c005540e99 100644
--- a/include/usbc_ppc.h
+++ b/include/usbc_ppc.h
@@ -96,6 +96,14 @@ extern const struct ppc_config_t ppc_chips[];
extern const unsigned int ppc_cnt;
/**
+ * Initializes the PPC for the specified port.
+ *
+ * @param port: The Type-C port number.
+ * @return EC_SUCCESS on success, error otherwise.
+ */
+int ppc_init(int port);
+
+/**
* Determine if VBUS is present or not.
*
* @param port: The Type-C port number.