diff options
author | Aseda Aboagye <aaboagye@chromium.org> | 2021-03-31 02:28:13 +0000 |
---|---|---|
committer | Aseda Aboagye <aaboagye@chromium.org> | 2021-03-31 02:29:46 +0000 |
commit | 498219b65a707c266acb957ccaa8467b26d39e99 (patch) | |
tree | ebf5680a99eb80af90197c0a08fc02e6733119e8 /board/galtic | |
parent | 2fd2435923fce9dca3f10fd0fa039cf9214f1d42 (diff) | |
download | chrome-ec-498219b65a707c266acb957ccaa8467b26d39e99.tar.gz |
Revert "dedede/raa489000: Disable ASGATE from READY state"
This reverts commit f7fbc629f0655229cc7ffdadfb18c9e13118e3d2.
Reason for revert: Breaks sourcing of VBUS.
Original change's description:
> dedede/raa489000: Disable ASGATE from READY state
>
> On the boards which use the RAA489000, we keep the ADC enabled while
> giving VBUS control to the charger side. This can cause a situation
> where VBUS is not quite zero volts when a charger is removed. 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. When we place the parts into low power mode, we move the VBUS
> control from the TCPC side of the IC to the charger side. It should
> be safe to issue both commands as if the TCPC side has control, the IC
> ignores the setting from the charger side registers.
>
> BUG=b:183220414
> BRANCH=dedede
> TEST=Build and flash madoo, plug in charger to port, unplug, verify
> that VBUS falls to < 200mV and decays from there.
>
> Signed-off-by: Aseda Aboagye <aaboagye@google.com>
> Change-Id: I8e8c8cc32575d18c9d3d1210ed3c5cf69ad5ca4b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793058
> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
> Reviewed-by: Diana Z <dzigterman@chromium.org>
> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Bug: b:183220414
Change-Id: Ibf6c161adca9981a065e969b6c3b73dd408ef1ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796411
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Diffstat (limited to 'board/galtic')
-rw-r--r-- | board/galtic/board.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/board/galtic/board.c b/board/galtic/board.c index 85195851fb..5e8f5f5714 100644 --- a/board/galtic/board.c +++ b/board/galtic/board.c @@ -516,16 +516,13 @@ int board_set_active_charge_port(int port) /* Disable all ports. */ if (port == CHARGE_PORT_NONE) { - for (i = 0; i < board_get_usb_pd_port_count(); i++) { + for (i = 0; i < board_get_usb_pd_port_count(); i++) tcpc_write(i, TCPC_REG_COMMAND, TCPC_REG_COMMAND_SNK_CTRL_LOW); - raa489000_enable_asgate(i, false); - } - return EC_SUCCESS; } - /* Check if port is sourcing VBUS. */ + /* Check is port is sourcing VBUS. */ if (board_is_sourcing_vbus(port)) { CPRINTS("Skip enable p%d", port); return EC_ERROR_INVAL; @@ -542,20 +539,18 @@ int board_set_active_charge_port(int port) if (tcpc_write(i, TCPC_REG_COMMAND, TCPC_REG_COMMAND_SNK_CTRL_LOW)) CPRINTS("p%d: sink path disable failed.", i); - raa489000_enable_asgate(i, false); } /* - * Stop the charger IC from switching while changing ports. Otherwise, - * we can overcurrent the adapter we're switching to. (crbug.com/926056) + * Stop the charger IC from switching while charging ports. Otherwise, + * we can overcurrent the adapter we's switching to. (crbug.com/926056) */ if (old_port != CHARGE_PORT_NONE) charger_discharge_on_ac(1); - /* Enable requested charge port. */ - if (raa489000_enable_asgate(port, true) || - tcpc_write(port, TCPC_REG_COMMAND, - TCPC_REG_COMMAND_SNK_CTRL_HIGH)) { + /* Enable requested charge port. */ + if (tcpc_write(port, TCPC_REG_COMMAND, + TCPC_REG_COMMAND_SNK_CTRL_HIGH)) { CPRINTS("p%d: sink path enable failed.", port); charger_discharge_on_ac(0); return EC_ERROR_UNKNOWN; |