diff options
author | Aseda Aboagye <aaboagye@google.com> | 2021-03-29 20:23:32 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-01 20:53:53 +0000 |
commit | f0486d8cde3001dc62038de7bc06a473f3d84b7c (patch) | |
tree | b2760fd377118e30e3028bf88a27282f664257fe /board/boten | |
parent | 6c7bcced3a5b5e752ce8f85ce23648e178b72d5d (diff) | |
download | chrome-ec-f0486d8cde3001dc62038de7bc06a473f3d84b7c.tar.gz |
Reland "dedede/raa489000: Disable ASGATE from READY state"
This is a reland of f7fbc629f0655229cc7ffdadfb18c9e13118e3d2
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: I36db53f3e13ba848308cd7e0c94a1b5a3551c600
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2797549
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/boten')
-rw-r--r-- | board/boten/board.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/board/boten/board.c b/board/boten/board.c index a544377aa7..c69c014b8b 100644 --- a/board/boten/board.c +++ b/board/boten/board.c @@ -308,7 +308,7 @@ int board_set_active_charge_port(int port) if (port == CHARGE_PORT_NONE) { tcpc_write(0, TCPC_REG_COMMAND, TCPC_REG_COMMAND_SNK_CTRL_LOW); - + raa489000_enable_asgate(0, false); return EC_SUCCESS; } @@ -319,7 +319,8 @@ int board_set_active_charge_port(int port) } /* Enable requested charge port. */ - if (tcpc_write(0, TCPC_REG_COMMAND, + if (raa489000_enable_asgate(port, true) || + tcpc_write(0, TCPC_REG_COMMAND, TCPC_REG_COMMAND_SNK_CTRL_HIGH)) { CPRINTUSB("p%d: sink path enable failed.", port); return EC_ERROR_UNKNOWN; |