summaryrefslogtreecommitdiff
path: root/zephyr/projects
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-06-10 17:46:46 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-27 15:57:24 +0000
commit88b7bf8f40e8100eb338917ff1c9b1f82c449530 (patch)
treec0fcbff8ac475914c77a096d6473ae2550fa7d2e /zephyr/projects
parentc4e335d6851438aa2767189ef84dfefecca92869 (diff)
downloadchrome-ec-88b7bf8f40e8100eb338917ff1c9b1f82c449530.tar.gz
zephyr: Initial image for npcx_evb/npcx7
Initial image for npcx_evb/npcx7 supporting basic UART functionality and basic commands. BUG=none BRANCH=none TEST=test basic console functionality on npcx7_evb Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ibdf1ce98b6ad747dc649b82f12e555e63569036a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3033230 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects')
-rw-r--r--zephyr/projects/npcx_evb/npcx7/CMakeLists.txt11
-rw-r--r--zephyr/projects/npcx_evb/npcx7/gpio.dts10
-rw-r--r--zephyr/projects/npcx_evb/npcx7/include/gpio_map.h32
-rw-r--r--zephyr/projects/npcx_evb/npcx7/prj.conf22
-rw-r--r--zephyr/projects/npcx_evb/npcx7/zmake.yaml11
5 files changed, 86 insertions, 0 deletions
diff --git a/zephyr/projects/npcx_evb/npcx7/CMakeLists.txt b/zephyr/projects/npcx_evb/npcx7/CMakeLists.txt
new file mode 100644
index 0000000000..b48b5d795d
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/CMakeLists.txt
@@ -0,0 +1,11 @@
+# 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.
+
+cmake_minimum_required(VERSION 3.13.1)
+set(BOARD_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
+
+find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
+project(npcx7)
+
+zephyr_include_directories(include)
diff --git a/zephyr/projects/npcx_evb/npcx7/gpio.dts b/zephyr/projects/npcx_evb/npcx7/gpio.dts
new file mode 100644
index 0000000000..5de0a5e422
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/gpio.dts
@@ -0,0 +1,10 @@
+/* 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.
+ */
+
+/ {
+ named-gpios {
+ compatible = "named-gpios";
+ };
+};
diff --git a/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h b/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h
new file mode 100644
index 0000000000..61258d1184
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/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 */
diff --git a/zephyr/projects/npcx_evb/npcx7/prj.conf b/zephyr/projects/npcx_evb/npcx7/prj.conf
new file mode 100644
index 0000000000..d7e60fc6bc
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/prj.conf
@@ -0,0 +1,22 @@
+# 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.
+
+CONFIG_CROS_EC=y
+CONFIG_PLATFORM_EC=y
+CONFIG_PLATFORM_EC_BRINGUP=y
+CONFIG_SHIMMED_TASKS=y
+
+CONFIG_CROS_KB_RAW_NPCX=n
+
+CONFIG_AP=n
+CONFIG_PLATFORM_EC_ADC=n
+CONFIG_PLATFORM_EC_I2C=n
+CONFIG_PLATFORM_EC_KEYBOARD=n
+CONFIG_PLATFORM_EC_VBOOT=n
+CONFIG_PLATFORM_EC_VSTORE=n
+
+# Zephyr feature
+CONFIG_ASSERT=y
+CONFIG_SHELL_MINIMAL=n
+CONFIG_LOG=y
diff --git a/zephyr/projects/npcx_evb/npcx7/zmake.yaml b/zephyr/projects/npcx_evb/npcx7/zmake.yaml
new file mode 100644
index 0000000000..10cb8dffb7
--- /dev/null
+++ b/zephyr/projects/npcx_evb/npcx7/zmake.yaml
@@ -0,0 +1,11 @@
+# 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.
+
+board: npcx7_evb
+dts-overlays:
+ - gpio.dts
+supported-zephyr-versions:
+ - v2.6
+toolchain: coreboot-sdk
+output-type: npcx