summaryrefslogtreecommitdiff
path: root/board/brya/gpio.inc
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-05-21 19:39:46 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-27 00:49:23 +0000
commit2a85f58b5c17afc725784de5c9d86dcd3a1ba9d8 (patch)
tree4adb721f271a44d972f56f46ad51104d6e99f2ba /board/brya/gpio.inc
parent964fa09df258c2c5e28b91db54dfb95e66fcf658 (diff)
downloadchrome-ec-2a85f58b5c17afc725784de5c9d86dcd3a1ba9d8.tar.gz
brya: Board ID 1: Handle BATT_PRES reassignment
We are transitioning GPIO definitions to be correct for board ID 2. In order to support board ID 1 with the same EC image, some GPIOs need to be reconfigured to their legacy settings at runtime when board ID 1 is detected. For board ID 2, the battery presence detect GPIO has moved to the previous keyboard backlight enable pin. BRANCH=none BUG=b:183452273 TEST=booted on brya board ID 1, check battery present status on ID_1_EC_BATT_PRES_ODL. Cq-Depend: chromium:2914207 Change-Id: Ibae2a5e1f43c83360535e0d60c2a343bf9ef2421 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2916413
Diffstat (limited to 'board/brya/gpio.inc')
-rw-r--r--board/brya/gpio.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/brya/gpio.inc b/board/brya/gpio.inc
index e1619c1176..4b243979dd 100644
--- a/board/brya/gpio.inc
+++ b/board/brya/gpio.inc
@@ -29,6 +29,13 @@
GPIO(EC_KSO_02_INV, PIN(1, 7), GPIO_OUT_LOW)
/*
+ * GPIOE1 is an ALT function ADC INPUT on board ID 2 and a GPIO INPUT on
+ * board ID 1. This declaration gives us a signal name to use on board
+ * ID 1.
+ */
+GPIO(ID_1_EC_BATT_PRES_ODL, PIN(E, 1), GPIO_INPUT)
+
+/*
* GPIO34 is an INPUT on board ID 2 and ODR_LOW on board ID 1.
*
* Since this pin is pulled up to 3.3V through a 30.9K ohm resistor on