summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongBeum.Ha <ybha@samsung.corp-partner.google.com>2021-08-23 15:19:31 +0900
committerCommit Bot <commit-bot@chromium.org>2021-08-31 04:58:08 +0000
commitced5a544324099241762d652c086f00c63f3d679 (patch)
treedeb3337bbf9886db2a123f519015afa74ee4c23f
parent463618c732f55a80ca533cd601ebea8bfef3494c (diff)
downloadchrome-ec-ced5a544324099241762d652c086f00c63f3d679.tar.gz
bugzzy : control TSP_TA
Modify EC for bugzzy based on schematics. BUG=b:191505716 BRANCH=None TEST=make -j BOARD=bugzzy Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I9bf663be20480e313b98f328c3dacbd63feb2f77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3112920 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Edward Doan <edoan@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--board/bugzzy/board.c9
-rw-r--r--board/bugzzy/gpio.inc2
2 files changed, 10 insertions, 1 deletions
diff --git a/board/bugzzy/board.c b/board/bugzzy/board.c
index 95ce46db44..1207a01eaf 100644
--- a/board/bugzzy/board.c
+++ b/board/bugzzy/board.c
@@ -731,3 +731,12 @@ void panel_power_change_interrupt(enum gpio_signal signal)
/* Reset lid debounce time */
hook_call_deferred(&panel_power_change_deferred_data, 1 * MSEC);
}
+
+/**
+ * Handle TSP_TA according to AC status
+ */
+static void handle_tsp_ta(void)
+{
+ gpio_set_level(GPIO_TSP_TA, extpower_is_present());
+}
+DECLARE_HOOK(HOOK_AC_CHANGE, handle_tsp_ta, HOOK_PRIO_DEFAULT);
diff --git a/board/bugzzy/gpio.inc b/board/bugzzy/gpio.inc
index 9d5cc2d932..5d6c9a626f 100644
--- a/board/bugzzy/gpio.inc
+++ b/board/bugzzy/gpio.inc
@@ -67,6 +67,7 @@ GPIO(LED_G_ODL, PIN(C, 3), GPIO_OUT_HIGH)
GPIO(LED_B_ODL, PIN(C, 2), GPIO_OUT_HIGH)
GPIO(EN_LCD_ENN, PIN(9, 7), GPIO_OUT_LOW)
GPIO(EN_LCD_ENP, PIN(8, 6), GPIO_OUT_LOW)
+GPIO(TSP_TA, PIN(A, 2), GPIO_OUT_LOW)
/* Power Sequencing */
GPIO(EC_AP_PSYS, PIN(B, 7), GPIO_OUT_LOW)
@@ -132,7 +133,6 @@ GPIO(GPIO60_NC, PIN(6, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO63_NC, PIN(6, 3), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO80_NC, PIN(8, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO81_NC, PIN(8, 1), GPIO_INPUT | GPIO_PULL_DOWN)
-GPIO(GPIOA2_NC, PIN(A, 2), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOD0_NC, PIN(D, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOD1_NC, PIN(D, 1), GPIO_INPUT | GPIO_PULL_DOWN)