summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2018-04-09 15:42:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-26 00:41:06 -0700
commite260ea92719bd0462394a2aa4fe05e163ea02306 (patch)
tree09e6d1eca21bdaec5a016c0a3b1cb82b24f8b8ca
parentda7538ace6400aa95ba14dfc3c28b9af08014792 (diff)
downloadchrome-ec-e260ea92719bd0462394a2aa4fe05e163ea02306.tar.gz
atlas_ish: initial board files for atlas_ish
BUG=b:117807679 BRANCH=none TEST=build with BOARD=atlas_ish is successful Change-Id: Iddb9a8a5ced24e9b99753a876ec52b0062b80344 Signed-off-by: li feng <li1.feng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1003393 Commit-Ready: Li1 Feng <li1.feng@intel.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Caveh Jalali <caveh@google.com> Reviewed-by: Li1 Feng <li1.feng@intel.com>
-rw-r--r--board/atlas_ish/board.c40
-rw-r--r--board/atlas_ish/board.h72
-rw-r--r--board/atlas_ish/build.mk11
-rw-r--r--board/atlas_ish/ec.tasklist24
-rw-r--r--board/atlas_ish/gpio.inc15
5 files changed, 162 insertions, 0 deletions
diff --git a/board/atlas_ish/board.c b/board/atlas_ish/board.c
new file mode 100644
index 0000000000..ad6bfd18fa
--- /dev/null
+++ b/board/atlas_ish/board.c
@@ -0,0 +1,40 @@
+/* Copyright 2018 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.
+ */
+
+/* Atlas ISH board-specific configuration */
+
+#include "console.h"
+#include "gpio.h"
+#include "hooks.h"
+#include "host_command.h"
+#include "i2c.h"
+#include "math_util.h"
+#include "task.h"
+#include "uart.h"
+
+#include "gpio_list.h" /* has to be included last */
+#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
+#define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ## args)
+
+/* I2C port map */
+const struct i2c_port_t i2c_ports[] = {
+ {"trackpad", I2C_PORT_TP, 1000,
+ GPIO_I2C_PORT_TP_SCL, GPIO_I2C_PORT_TP_SDA},
+};
+const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+
+/* dummy functions to remove 'undefined' symbol link error for acpi.o
+ * due to CONFIG_LPC flag
+ */
+#ifdef CONFIG_HOSTCMD_LPC
+int lpc_query_host_event_state(void)
+{
+ return 0;
+}
+
+void lpc_set_acpi_status_mask(uint8_t mask)
+{
+}
+#endif
diff --git a/board/atlas_ish/board.h b/board/atlas_ish/board.h
new file mode 100644
index 0000000000..bed99fdf0f
--- /dev/null
+++ b/board/atlas_ish/board.h
@@ -0,0 +1,72 @@
+/* Copyright 2018 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.
+ */
+
+/* Atlas ISH board configuration */
+
+#ifndef __CROS_EC_BOARD_H
+#define __CROS_EC_BOARD_H
+
+/*
+ * Allow dangerous commands.
+ * TODO: Remove this config before production.
+ */
+#define CONFIG_SYSTEM_UNLOCKED
+
+/*
+ * By default, enable all console messages except HC, ACPI and event
+ * The sensor stack is generating a lot of activity.
+ */
+#undef CONFIG_HOSTCMD_DEBUG_MODE
+#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_OFF
+
+/* ISH specific*/
+#define CONFIG_ISH_30
+#undef CONFIG_DEBUG_ASSERT
+#define CONFIG_CLOCK_CRYSTAL
+#define CONFIG_ISH_UART_0
+/* EC */
+#define CONFIG_FLASH_SIZE 0x80000
+#define CONFIG_FPU
+#define CONFIG_I2C
+#define CONFIG_I2C_MASTER
+
+/* I2C ports */
+#define I2C_PORT_TP ISH_I2C0
+#define GPIO_I2C_PORT_TP_SCL GPIO_ISH_I2C0_SCL
+#define GPIO_I2C_PORT_TP_SDA GPIO_ISH_I2C0_SDA
+
+/* Undefine unfeatures */
+#undef CONFIG_CMD_HASH
+#undef CONFIG_CMD_I2C_SCAN
+#undef CONFIG_CMD_I2C_XFER
+#undef CONFIG_CMD_KEYBOARD
+#undef CONFIG_CMD_POWER_AP
+#undef CONFIG_CMD_POWERINDEBUG
+#undef CONFIG_CMD_SHMEM
+#undef CONFIG_CMD_TIMERINFO
+#undef CONFIG_EXTPOWER
+#undef CONFIG_KEYBOARD_KSO_BASE
+#undef CONFIG_FLASH
+#undef CONFIG_FMAP
+#undef CONFIG_LID_SWITCH
+#undef CONFIG_SWITCH
+#undef CONFIG_WATCHDOG
+
+/* Modules we want to exclude */
+#undef CONFIG_CMD_ACCELS
+#undef CONFIG_CMD_HASH
+#undef CONFIG_CMD_TEMP_SENSOR
+#undef CONFIG_CMD_TIMERINFO
+#undef CONFIG_ADC
+#undef CONFIG_SHA256
+
+#ifndef __ASSEMBLER__
+
+#include "gpio_signal.h"
+#include "registers.h"
+
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __CROS_EC_BOARD_H */
diff --git a/board/atlas_ish/build.mk b/board/atlas_ish/build.mk
new file mode 100644
index 0000000000..be388aa99d
--- /dev/null
+++ b/board/atlas_ish/build.mk
@@ -0,0 +1,11 @@
+# -*- makefile -*-
+# Copyright 2018 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 specific files build
+#
+
+CHIP:=ish
+
+board-y=board.o
diff --git a/board/atlas_ish/ec.tasklist b/board/atlas_ish/ec.tasklist
new file mode 100644
index 0000000000..9e1868b7fb
--- /dev/null
+++ b/board/atlas_ish/ec.tasklist
@@ -0,0 +1,24 @@
+/* Copyright 2018 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.
+ */
+
+/*
+ * List of enabled tasks in the priority order
+ *
+ * The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and
+ * TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries,
+ * where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
+ */
+
+#define CONFIG_TASK_LIST \
+ TASK_ALWAYS(HOOKS, hook_task, NULL, HUGE_TASK_STACK_SIZE) \
+ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
+ TASK_ALWAYS(IPC_COMM, ipc_comm_task, NULL, LARGER_TASK_STACK_SIZE) \
+ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE)
diff --git a/board/atlas_ish/gpio.inc b/board/atlas_ish/gpio.inc
new file mode 100644
index 0000000000..0ddac6ccbe
--- /dev/null
+++ b/board/atlas_ish/gpio.inc
@@ -0,0 +1,15 @@
+/* -*- mode:c -*-
+ *
+ * Copyright 2018 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.
+ */
+
+/* Trackpad interrupt pin */
+/*TODO: touchpad driver is not in gerrit yet, so comment out this for now */
+/*GPIO_INT(TOUCHPAD_INT, PIN(1), GPIO_INT_F_FALLING, touchpad_event)*/
+
+/* Those are used by common code, don't change*/
+UNIMPLEMENTED(ENTERING_RW)
+UNIMPLEMENTED(ISH_I2C0_SDA)
+UNIMPLEMENTED(ISH_I2C0_SCL)