summaryrefslogtreecommitdiff
path: root/board/quiche/board.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-05-03 09:15:28 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-14 16:22:03 +0000
commit81bf98de282dcd11287fc8f5a95cc999437e7597 (patch)
tree84741f3242937acc2ac37e0500675054ef39e072 /board/quiche/board.h
parentbcc11b209a014da1436e9abb9a6cd2c2918869f5 (diff)
downloadchrome-ec-81bf98de282dcd11287fc8f5a95cc999437e7597.tar.gz
honeybuns: Board specific power button and LEDs
This CL modifies both power button press/release polairty and power button LED control signals to be board specific instead of platform specific. Previously there were platform specific macros for BUTTON_PRESSED_LEVEL and BUTTON_RELEASED_LEVEL. But, these levels will depend on how the power button circuit is designed. This CL moves these macros to board.h. In addition, macros are added to for the GPIO signals used for green/red LED control. This allows for boards that don't support the power button LED at all. BUG=b:164157329 BRANCH=quiche TEST=Verfied power button works on both quiche and gingerbread. Previously, this was only working on quiche because gingerbread has opposite polarity for the power button signal. Also, verfied that power button/status LED turns off when dock is off. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Iee838ee158d23252e8b429f51a1dd1a71d8e94a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2868225 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/quiche/board.h')
-rw-r--r--board/quiche/board.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/quiche/board.h b/board/quiche/board.h
index 336b6fcd7e..15faabc1ed 100644
--- a/board/quiche/board.h
+++ b/board/quiche/board.h
@@ -52,6 +52,11 @@
#define GPIO_BPWR_DET GPIO_TP73
#define GPIO_USB_HUB_OCP_NOTIFY GPIO_USBC_DATA_OCP_NOTIFY
#define GPIO_UFP_PLUG_DET GPIO_MST_UFP_PLUG_DET
+#define GPIO_PWR_BUTTON_RED GPIO_EC_STATUS_LED1
+#define GPIO_PWR_BUTTON_GREEN GPIO_EC_STATUS_LED2
+
+#define BUTTON_PRESSED_LEVEL 1
+#define BUTTON_RELEASED_LEVEL 0
#define GPIO_TRIGGER_1 GPIO_EC_STATUS_LED1
#define GPIO_TRIGGER_2 GPIO_EC_STATUS_LED2