summaryrefslogtreecommitdiff
path: root/board/cret/usb_pd_policy.c
diff options
context:
space:
mode:
authorjohnwc_yeh <johnwc_yeh@compal.corp-partner.google.com>2021-06-09 18:18:52 +0800
committerCommit Bot <commit-bot@chromium.org>2021-06-10 10:48:49 +0000
commit2ce3beec20501d1975acb69053d724c6b391f849 (patch)
treea51f0d922688c22d1b040e639a0dce10a677c3d9 /board/cret/usb_pd_policy.c
parent3286ace9ad8ce336e0dfd6f4d87b54e5a49cd33e (diff)
downloadchrome-ec-2ce3beec20501d1975acb69053d724c6b391f849.tar.gz
cret/raa489000: Control ASGATE statestabilize-14026.B-main
There is 0.1V leakage from Charger to Vbus when a charger is removed in S5. Control ASGATE state to prevent the leakage. This commit uses the charger side registers to control the ASGATE when selecting our active charge port. This is done in addition to the existing implementation which uses the TCPCI registers to control ASGATE. BUG=b:189299803 BRANCH=dedede TEST=Build and flash Cret, the leakage has been improved from 0.1V to 0.001V Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: Ib81ca651b0708149fae7b4df27f66107b47f8490 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948604 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/cret/usb_pd_policy.c')
-rw-r--r--board/cret/usb_pd_policy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/cret/usb_pd_policy.c b/board/cret/usb_pd_policy.c
index f00fb3aa95..15faf41ffc 100644
--- a/board/cret/usb_pd_policy.c
+++ b/board/cret/usb_pd_policy.c
@@ -7,6 +7,7 @@
#include "chipset.h"
#include "common.h"
#include "console.h"
+#include "driver/charger/isl923x_public.h"
#include "driver/tcpm/tcpci.h"
#include "usb_pd.h"
@@ -49,6 +50,10 @@ int pd_set_power_supply_ready(int port)
if (rv)
return rv;
+ rv = raa489000_enable_asgate(port, true);
+ if (rv)
+ return rv;
+
/* Notify host of power info change. */
pd_send_host_event(PD_EVENT_POWER_CHANGE);