summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-12-19 14:20:46 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-20 13:49:44 -0800
commit5c0d4b1ea1882c52148106986a18c2761742742a (patch)
tree3f28f4144de7c7a566429c1b43957e297361a067
parent9df27e27ad1115f35c6d050bf07f8ebd1f9c411d (diff)
downloadchrome-ec-5c0d4b1ea1882c52148106986a18c2761742742a.tar.gz
nocturne: Discharge VBUS when stopping sourcing.
When the source power path is turned off, we should discharge VBUS. BUG=none BRANCH=firmware-nocturne-10984.B TEST=Flash nocturne, PR_SWAP, verify that VBUS is discharged instead of floating during the swap. Change-Id: I30cbb85cefc70ef161853758ece57b324eab0014 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/1385445 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/nocturne/usb_pd_policy.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/board/nocturne/usb_pd_policy.c b/board/nocturne/usb_pd_policy.c
index 3b07ff7461..3956fc85ab 100644
--- a/board/nocturne/usb_pd_policy.c
+++ b/board/nocturne/usb_pd_policy.c
@@ -118,8 +118,14 @@ int pd_is_valid_input_voltage(int mv)
void pd_power_supply_reset(int port)
{
- /* Disable VBUS. */
+ /*
+ * Disable VBUS and discharge to vSafe0V.
+ *
+ * The PPC will automatically disable the discharge circuitry once it
+ * reaches vSafe0V.
+ */
ppc_vbus_source_enable(port, 0);
+ ppc_discharge_vbus(port, 1);
#ifdef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT
/* Give back the current quota we are no longer using */