summaryrefslogtreecommitdiff
path: root/board/arcada_ish
diff options
context:
space:
mode:
authorShine Liu <shine.liu@intel.com>2018-11-28 11:29:00 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-11 13:32:22 -0800
commit7b99b74ba5463c886200ea827579f7ac1b6a35d2 (patch)
tree63fe59b9849a859b97dc9f959239040ab4ad4c02 /board/arcada_ish
parent27a4e32b5f7cadc251624da08fbab870f9e7ebc8 (diff)
downloadchrome-ec-7b99b74ba5463c886200ea827579f7ac1b6a35d2.tar.gz
ISH: Arcada ISH initial enabling
Add arcada_ish board support BRANCH=none BUG=b:120295222 TEST=Tested on Arcada EVT board, ISH firmware is running and UART console input/output is working. Change-Id: If1073287d45738689db9f1ac005e107a3445320a Signed-off-by: Shine Liu <shine.liu@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1354302 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/arcada_ish')
-rwxr-xr-xboard/arcada_ish/board.c35
-rwxr-xr-xboard/arcada_ish/board.h74
-rwxr-xr-xboard/arcada_ish/build.mk13
-rwxr-xr-xboard/arcada_ish/ec.tasklist22
-rwxr-xr-xboard/arcada_ish/gpio.inc15
5 files changed, 159 insertions, 0 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
new file mode 100755
index 0000000000..0225deb370
--- /dev/null
+++ b/board/arcada_ish/board.c
@@ -0,0 +1,35 @@
+/* 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.
+ */
+
+/* Arcada ISH board-specific configuration */
+
+#include "console.h"
+#include "gpio.h"
+#include "host_command.h"
+#include "i2c.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[] = {
+ {"sensor", I2C_PORT_SENSOR, 1000, GPIO_ISH_I2C0_SCL, GPIO_ISH_I2C0_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/arcada_ish/board.h b/board/arcada_ish/board.h
new file mode 100755
index 0000000000..b85d88a37c
--- /dev/null
+++ b/board/arcada_ish/board.h
@@ -0,0 +1,74 @@
+/* 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.
+ */
+
+/* Arcada 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*/
+#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_SENSOR ISH_I2C0
+#define GPIO_I2C_PORT_TP_SCL GPIO_ISH_I2C0_SCL
+#define GPIO_I2C_PORT_TP_SDA GPIO_ISH_I2C0_SDA
+#define CONFIG_CMD_I2C_XFER
+
+/* Undefine features */
+#undef CONFIG_CMD_HASH
+#undef CONFIG_CMD_I2C_SCAN
+#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
+/* TODO: Watch Dog is supported but temporarily removed. Currently under
+ * development on KBL and will be carried over to WHL.
+ */
+#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/arcada_ish/build.mk b/board/arcada_ish/build.mk
new file mode 100755
index 0000000000..a57c08e6ba
--- /dev/null
+++ b/board/arcada_ish/build.mk
@@ -0,0 +1,13 @@
+# -*- 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
+CHIP_FAMILY:=ish5
+CHIP_VARIANT:=ish5p0
+
+board-y=board.o
diff --git a/board/arcada_ish/ec.tasklist b/board/arcada_ish/ec.tasklist
new file mode 100755
index 0000000000..f384af4d8b
--- /dev/null
+++ b/board/arcada_ish/ec.tasklist
@@ -0,0 +1,22 @@
+/* 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)
diff --git a/board/arcada_ish/gpio.inc b/board/arcada_ish/gpio.inc
new file mode 100755
index 0000000000..ab71f264d5
--- /dev/null
+++ b/board/arcada_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.
+ */
+
+/* We don't have a ENTERING_RW signal wired to the cr50 but common code needs
+ * it to be defined.
+ */
+UNIMPLEMENTED(ENTERING_RW)
+
+/* TODO: We do want to fill these in correctly*/
+UNIMPLEMENTED(ISH_I2C0_SDA)
+UNIMPLEMENTED(ISH_I2C0_SCL)