summaryrefslogtreecommitdiff
path: root/zephyr/projects/brya/brya/include
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-05-20 01:42:46 -0600
committerCommit Bot <commit-bot@chromium.org>2021-05-26 20:03:53 +0000
commit59c47366fe3832bbbbc098948f4073fdd8fe438a (patch)
treee23770a9600385d15b150a0a66aea7ebec9b0664 /zephyr/projects/brya/brya/include
parent1ceb875524c1bf5360bcc451538534bb4695a2a4 (diff)
downloadchrome-ec-59c47366fe3832bbbbc098948f4073fdd8fe438a.tar.gz
Zephyr: brya: add basic template for brya board
Verify that npcx9 configuration and drivers work. BRANCH=none BUG=b:188605676 TEST=flash brya, check that LEDs work and console turns on Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I334ffc504da81ee6a6bb11b245b01a364ea05c6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2909754 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/projects/brya/brya/include')
-rw-r--r--zephyr/projects/brya/brya/include/gpio_map.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/zephyr/projects/brya/brya/include/gpio_map.h b/zephyr/projects/brya/brya/include/gpio_map.h
new file mode 100644
index 0000000000..5c2f4ea23e
--- /dev/null
+++ b/zephyr/projects/brya/brya/include/gpio_map.h
@@ -0,0 +1,36 @@
+/* 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 \
+ GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) \
+ GPIO_INT(GPIO_POWER_BUTTON_L, GPIO_INT_EDGE_BOTH, \
+ power_button_interrupt) \
+ GPIO_INT(GPIO_WP_L, GPIO_INT_EDGE_BOTH, switch_interrupt)
+
+#endif /* __ZEPHYR_GPIO_MAP_H */