diff options
author | Wealian Liao <whliao@nuvoton.corp-partner.google.com> | 2021-06-10 18:21:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-27 15:57:26 +0000 |
commit | 83583a5d9b6dc21b724463ff1880d163b558294a (patch) | |
tree | 45c08018c14c23af769c2d46220791dbca964b7f /zephyr/projects | |
parent | 88b7bf8f40e8100eb338917ff1c9b1f82c449530 (diff) | |
download | chrome-ec-83583a5d9b6dc21b724463ff1880d163b558294a.tar.gz |
zephyr: Initial image for npcx_evb/npcx9
Initial image for npcx_evb/npcx9 supporting basic UART functionality
and basic commands.
BUG=none
BRANCH=none
TEST=test basic console functionality on npcx9_evb
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: I0cdf12823df35ec6aaba7a48c5d1698cc814703a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3033231
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/npcx9/CMakeLists.txt | 11 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/gpio.dts | 10 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/include/gpio_map.h | 32 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/prj.conf | 26 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/zmake.yaml | 11 |
5 files changed, 90 insertions, 0 deletions
diff --git a/zephyr/projects/npcx_evb/npcx9/CMakeLists.txt b/zephyr/projects/npcx_evb/npcx9/CMakeLists.txt new file mode 100644 index 0000000000..8d605a001c --- /dev/null +++ b/zephyr/projects/npcx_evb/npcx9/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(npcx9) + +zephyr_include_directories(include) diff --git a/zephyr/projects/npcx_evb/npcx9/gpio.dts b/zephyr/projects/npcx_evb/npcx9/gpio.dts new file mode 100644 index 0000000000..5de0a5e422 --- /dev/null +++ b/zephyr/projects/npcx_evb/npcx9/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/npcx9/include/gpio_map.h b/zephyr/projects/npcx_evb/npcx9/include/gpio_map.h new file mode 100644 index 0000000000..61258d1184 --- /dev/null +++ b/zephyr/projects/npcx_evb/npcx9/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/npcx9/prj.conf b/zephyr/projects/npcx_evb/npcx9/prj.conf new file mode 100644 index 0000000000..04917a78d4 --- /dev/null +++ b/zephyr/projects/npcx_evb/npcx9/prj.conf @@ -0,0 +1,26 @@ +# 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 + +# Workaround npcx9 A1 chip's bug for download_from_flash API in th booter. +# This can be removed when A2 chip is available. +CONFIG_PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API=y + +# Zephyr feature +CONFIG_ASSERT=y +CONFIG_SHELL_MINIMAL=n +CONFIG_LOG=y diff --git a/zephyr/projects/npcx_evb/npcx9/zmake.yaml b/zephyr/projects/npcx_evb/npcx9/zmake.yaml new file mode 100644 index 0000000000..5aaa630542 --- /dev/null +++ b/zephyr/projects/npcx_evb/npcx9/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: npcx9_evb +dts-overlays: + - gpio.dts +supported-zephyr-versions: + - v2.6 +toolchain: coreboot-sdk +output-type: npcx |