summaryrefslogtreecommitdiff
path: root/board/hadoken/gpio.inc
diff options
context:
space:
mode:
authorLouis Yung-Chieh Lo <yjlou@chromium.org>2014-07-15 10:41:16 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-29 02:21:22 +0000
commitf93f1cfe77ed3603ab16047d79a283a781416db4 (patch)
treed0ec489650265d06c90297b884f02b96b18094c0 /board/hadoken/gpio.inc
parentbbb5b0636b5d2b9a9d339e32142bf775717bd929 (diff)
downloadchrome-ec-f93f1cfe77ed3603ab16047d79a283a781416db4.tar.gz
hadoken: initial commit.
Board bring up. GPIO / UART / timer / console / task / hook are working now. BRANCH=tot BUG=none TEST=run on evaluation board and see LED 0/1 are blinking. Console commands are available to use. Change-Id: If93a2c94b8abe1c2c931c03a7a12ddd2bed9d9f6 Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209403 Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'board/hadoken/gpio.inc')
-rw-r--r--board/hadoken/gpio.inc46
1 files changed, 46 insertions, 0 deletions
diff --git a/board/hadoken/gpio.inc b/board/hadoken/gpio.inc
new file mode 100644
index 0000000000..da5df7a968
--- /dev/null
+++ b/board/hadoken/gpio.inc
@@ -0,0 +1,46 @@
+/* -*- mode:c -*-
+ *
+ * Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH)
+#define GPIO_KB_OUTPUT GPIO_ODR_HIGH
+
+/* Inputs with interrupt handlers are first for efficiency */
+
+/* Keyboard inputs */
+/*
+ * TODO(yjlou): call keyboard_raw_gpio_interrupt() in chip/nrf51/keyboard_raw.c
+ */
+GPIO(KB_IN00, 0, 6, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN01, 0, 24, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN02, 0, 1, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN03, 0, 4, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN04, 0, 0, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN05, 0, 30, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN06, 0, 27, GPIO_KB_INPUT, NULL)
+GPIO(KB_IN07, 0, 26, GPIO_KB_INPUT, NULL)
+
+/* Other inputs */
+
+/* Outputs */
+GPIO(LED0, 0, 18, GPIO_OUTPUT | GPIO_HIGH, NULL)
+GPIO(LED1, 0, 19, GPIO_OUTPUT | GPIO_HIGH, NULL)
+GPIO(KB_OUT00, 0, 2, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT01, 0, 10, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT02, 0, 7, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT03, 0, 5, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT04, 0, 3, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT05, 0, 9, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT06, 0, 8, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT07, 0, 28, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT08, 0, 18, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT09, 0, 16, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT10, 0, 12, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT11, 0, 15, GPIO_KB_OUTPUT, NULL)
+GPIO(KB_OUT12, 0, 11, GPIO_KB_OUTPUT, NULL)
+
+/* Unimplemented */
+UNIMPLEMENTED(ENTERING_RW)