summaryrefslogtreecommitdiff
path: root/zephyr/projects/trogdor/lazor/include/gpio_map.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-03-10 14:30:47 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-11 23:43:21 +0000
commit8224f153994ec70661259ec0de49e473eefce359 (patch)
tree360f6c9a912c422572bfaae66b1cec157a2a432f /zephyr/projects/trogdor/lazor/include/gpio_map.h
parent97e22d467763dace5df64c9869cd8d4984f4ab39 (diff)
downloadchrome-ec-8224f153994ec70661259ec0de49e473eefce359.tar.gz
zephyr: add support for trogdor/lazor
Initial bringup for Lazor, featuring just a UART console, flash access, and basic commands. I structured the directories to look a little more like what we discussed in last week's meeting (putting the Zephyr "board" directory to be common to the baseboard, and putting variants under a directory categorized by baseboard). I hope we can go back to volteer/delbin and re-adopt this layout there too, as it's much cleaner and leads to less repeated code. BUG=b:182398910 BRANCH=none TEST=flash on lazor, test out UART and basic commands ("gettime", "flashinfo", etc.) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I411c47e9b9563d78349abbeebf71223ae41748a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749765 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/trogdor/lazor/include/gpio_map.h')
-rw-r--r--zephyr/projects/trogdor/lazor/include/gpio_map.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/zephyr/projects/trogdor/lazor/include/gpio_map.h b/zephyr/projects/trogdor/lazor/include/gpio_map.h
new file mode 100644
index 0000000000..dad1d91ff7
--- /dev/null
+++ b/zephyr/projects/trogdor/lazor/include/gpio_map.h
@@ -0,0 +1,32 @@
+/* Copyright 2021 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.
+ */
+
+#ifndef __ZEPHYR_GPIO_MAP_H
+#define __ZEPHYR_GPIO_MAP_H
+
+#include <devicetree.h>
+#include <gpio_signal.h>
+
+#define GPIO_ENTERING_RW GPIO_UNIMPLEMENTED
+#define GPIO_WP_L GPIO_UNIMPLEMENTED
+
+/*
+ * Set EC_CROS_GPIO_INTERRUPTS to a space-separated list of GPIO_INT items.
+ *
+ * Each GPIO_INT requires three parameters:
+ * gpio_signal - The enum gpio_signal for the interrupt gpio
+ * interrupt_flags - The interrupt-related flags (e.g. GPIO_INT_EDGE_BOTH)
+ * handler - The platform/ec interrupt handler.
+ *
+ * Ensure that this files includes all necessary headers to declare all
+ * referenced handler functions.
+ *
+ * For example, one could use the follow definition:
+ * #define EC_CROS_GPIO_INTERRUPTS \
+ * GPIO_INT(NAMED_GPIO(h1_ec_pwr_btn_odl), GPIO_INT_EDGE_BOTH, button_print)
+ */
+#define EC_CROS_GPIO_INTERRUPTS
+
+#endif /* __ZEPHYR_GPIO_MAP_H */