diff options
author | Peter Marheine <pmarheine@chromium.org> | 2019-12-10 11:11:18 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-31 02:02:02 +0000 |
commit | bc28967ad0ee8b684bea9146eff7f89045587678 (patch) | |
tree | 30cffedf2aa625cc1cb610a8efd5dcd78ded3523 /board/puff/board.h | |
parent | dbc522bb9677d5b34ee989f8e961d5be40c354d7 (diff) | |
download | chrome-ec-bc28967ad0ee8b684bea9146eff7f89045587678.tar.gz |
puff: support switching between USB-C and barrel jack power
We let the charge controller decide which port to use, watching the
presence signal to tell the charge control what is connected. We only
allow switching the input when the system is off, since switching may
cause us to brown out.
This is mostly copied from Fizz; I'm unsure if we need to do anything
with the TCPPC when switching (Fizz has a GPIO that physically connects
or disconnects the type-C port).
BUG=b:143975429
TEST=booted on hardware, verified chgsup output with barrel jack
BRANCH=None
Change-Id: I6d2f8365c03aa44f272195708dd534fdc35cd2f6
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958387
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Diffstat (limited to 'board/puff/board.h')
-rw-r--r-- | board/puff/board.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/puff/board.h b/board/puff/board.h index 6ad0ef4162..2073738029 100644 --- a/board/puff/board.h +++ b/board/puff/board.h @@ -177,6 +177,11 @@ #include "gpio_signal.h" #include "registers.h" +enum charge_port { + CHARGE_PORT_TYPEC0, + CHARGE_PORT_BARRELJACK, +}; + enum adc_channel { ADC_SNS_PP3300, /* ADC2 */ ADC_SNS_PP1050, /* ADC7 */ |