summaryrefslogtreecommitdiff
path: root/board/puff/gpio.inc
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2019-12-10 11:11:18 +1100
committerCommit Bot <commit-bot@chromium.org>2019-12-31 02:02:02 +0000
commitbc28967ad0ee8b684bea9146eff7f89045587678 (patch)
tree30cffedf2aa625cc1cb610a8efd5dcd78ded3523 /board/puff/gpio.inc
parentdbc522bb9677d5b34ee989f8e961d5be40c354d7 (diff)
downloadchrome-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/gpio.inc')
-rw-r--r--board/puff/gpio.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/puff/gpio.inc b/board/puff/gpio.inc
index e5e5610b3d..4e479c7484 100644
--- a/board/puff/gpio.inc
+++ b/board/puff/gpio.inc
@@ -37,6 +37,7 @@ GPIO_INT(IMVP8_VRRDY_OD, PIN(1, 6), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(USB_C0_TCPPC_INT_ODL, PIN(E, 0), GPIO_INT_FALLING, ppc_interrupt)
GPIO_INT(USB_C0_TCPC_INT_ODL, PIN(6, 2), GPIO_INT_FALLING, tcpc_alert_event)
GPIO_INT(H1_EC_RECOVERY_BTN_ODL, PIN(2, 4), GPIO_INT_BOTH, button_interrupt)
+GPIO_INT(BJ_ADP_PRESENT_L, PIN(8, 2), GPIO_INT_BOTH, adp_connect_interrupt)
/* Port power control interrupts */
GPIO_INT(HDMI_CONN0_OC_ODL, PIN(0, 7), GPIO_INT_BOTH, port_ocp_interrupt)
@@ -70,7 +71,6 @@ GPIO(EN_IMVP8_VR, PIN(F, 4), GPIO_OUT_LOW)
/* Barreljack */
GPIO(EN_PPVAR_BJ_ADP_L, PIN(0, 4), GPIO_OUT_LOW)
-GPIO(BJ_ADP_PRESENT_L, PIN(8, 2), GPIO_INPUT)
/* USB type A */
GPIO(EN_PP5000_USB_VBUS, PIN(8, 3), GPIO_OUT_LOW)