From 7cdc480017b689209c9716e0858cf8e6a39e971a Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Tue, 30 Mar 2021 14:46:28 -0700 Subject: dedede/raa489000: Enable ASGATE when sourcing With the previous change to disable the ASGATE from the charger side, this actually ended up breaking sourcing VBUS. This commit enables the ASGATE when we are attempting to source VBUS. BUG=b:183220414 BRANCH=dedede TEST=Build and flash madoo, plug in a Type-C sink, verify that VBUS is sourced. TEST=Verify that DUT can PR_Swap with peripheral. Signed-off-by: Aseda Aboagye Change-Id: I1938f2b827e57a04ef72e2ad35ad6ff29ce18712 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2795073 Reviewed-by: Diana Z Commit-Queue: Aseda Aboagye Tested-by: Aseda Aboagye --- board/blipper/usb_pd_policy.c | 5 +++++ board/boten/usb_pd_policy.c | 6 +++++- board/galtic/usb_pd_policy.c | 5 +++++ board/madoo/usb_pd_policy.c | 5 +++++ board/magolor/usb_pd_policy.c | 5 +++++ board/metaknight/usb_pd_policy.c | 5 +++++ board/sasuke/usb_pd_policy.c | 5 +++++ board/sasukette/usb_pd_policy.c | 5 +++++ board/storo/usb_pd_policy.c | 5 +++++ board/waddledoo/usb_pd_policy.c | 5 +++++ 10 files changed, 50 insertions(+), 1 deletion(-) (limited to 'board') diff --git a/board/blipper/usb_pd_policy.c b/board/blipper/usb_pd_policy.c index 3a4fb4f543..b7c0ca21df 100644 --- a/board/blipper/usb_pd_policy.c +++ b/board/blipper/usb_pd_policy.c @@ -9,6 +9,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" @@ -54,6 +55,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); diff --git a/board/boten/usb_pd_policy.c b/board/boten/usb_pd_policy.c index 0527553353..65ee678263 100644 --- a/board/boten/usb_pd_policy.c +++ b/board/boten/usb_pd_policy.c @@ -9,7 +9,7 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/charger/sm5803.h" +#include "driver/charger/isl923x_public.h" #include "driver/tcpm/tcpci.h" #include "usb_pd.h" @@ -55,6 +55,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); diff --git a/board/galtic/usb_pd_policy.c b/board/galtic/usb_pd_policy.c index 678e9055d7..dde6d5c318 100644 --- a/board/galtic/usb_pd_policy.c +++ b/board/galtic/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); diff --git a/board/madoo/usb_pd_policy.c b/board/madoo/usb_pd_policy.c index 2f226803e3..02bb449f60 100644 --- a/board/madoo/usb_pd_policy.c +++ b/board/madoo/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); diff --git a/board/magolor/usb_pd_policy.c b/board/magolor/usb_pd_policy.c index 2f226803e3..02bb449f60 100644 --- a/board/magolor/usb_pd_policy.c +++ b/board/magolor/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); diff --git a/board/metaknight/usb_pd_policy.c b/board/metaknight/usb_pd_policy.c index 3ad79b9f1f..3190595596 100644 --- a/board/metaknight/usb_pd_policy.c +++ b/board/metaknight/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); diff --git a/board/sasuke/usb_pd_policy.c b/board/sasuke/usb_pd_policy.c index 3ad79b9f1f..3190595596 100644 --- a/board/sasuke/usb_pd_policy.c +++ b/board/sasuke/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); diff --git a/board/sasukette/usb_pd_policy.c b/board/sasukette/usb_pd_policy.c index fdeabc27cb..b0e1098e4d 100644 --- a/board/sasukette/usb_pd_policy.c +++ b/board/sasukette/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); diff --git a/board/storo/usb_pd_policy.c b/board/storo/usb_pd_policy.c index fdeabc27cb..b0e1098e4d 100644 --- a/board/storo/usb_pd_policy.c +++ b/board/storo/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); diff --git a/board/waddledoo/usb_pd_policy.c b/board/waddledoo/usb_pd_policy.c index 3ad79b9f1f..3190595596 100644 --- a/board/waddledoo/usb_pd_policy.c +++ b/board/waddledoo/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); -- cgit v1.2.1