diff options
author | li feng <li1.feng@intel.com> | 2019-12-04 17:59:39 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 22:38:32 +0000 |
commit | 68650b554531de4cd2480b5cec5589d483bc0dba (patch) | |
tree | c88e7c77acf8227e7fa494340671b8eab2f6d639 /board/volteer_ish | |
parent | ef56aef9d6eb4d6430109c833dfd5829f2b2117c (diff) | |
download | chrome-ec-68650b554531de4cd2480b5cec5589d483bc0dba.tar.gz |
volteer ish: bring up ISH
Hardware rework on Volteer, stuff ISH UART0 and I2C1 path.
BRANCH=none
BUG=b:145946347
TEST=Verified ISH console output from ISH UART0; sensor i2c access from
ISH I2C1 port.
Change-Id: I5cd20c38fa8f321c886091799c52555e796fd747
Signed-off-by: li feng <li1.feng@intel.com>
Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1959825
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/volteer_ish')
-rw-r--r-- | board/volteer_ish/board.c | 55 | ||||
-rw-r--r-- | board/volteer_ish/board.h | 82 | ||||
-rw-r--r-- | board/volteer_ish/build.mk | 13 | ||||
-rw-r--r-- | board/volteer_ish/ec.tasklist | 17 | ||||
-rw-r--r-- | board/volteer_ish/gpio.inc | 12 |
5 files changed, 179 insertions, 0 deletions
diff --git a/board/volteer_ish/board.c b/board/volteer_ish/board.c new file mode 100644 index 0000000000..f888ff60fe --- /dev/null +++ b/board/volteer_ish/board.c @@ -0,0 +1,55 @@ +/* Copyright 2019 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. + */ + +/* Volteer ISH board-specific configuration */ + +#include "console.h" +#include "driver/accelgyro_bmi160.h" +#include "driver/accel_bma2x2.h" +#include "gpio.h" +#include "hooks.h" +#include "host_command.h" +#include "i2c.h" +#include "motion_sense.h" +#include "power.h" +#include "task.h" + +#include "gpio_list.h" /* has to be included last */ + +/* I2C port map */ +const struct i2c_port_t i2c_ports[] = { + { + .name = "sensor", + .port = I2C_PORT_SENSOR, + .kbps = 1000 + }, +}; +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); + +/* Drivers */ +struct motion_sensor_t motion_sensors[] = { +}; + +const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); + +int chipset_in_state(int state_mask) +{ + return state_mask & CHIPSET_STATE_ON; +} + +int chipset_in_or_transitioning_to_state(int state_mask) +{ + return state_mask & CHIPSET_STATE_ON; +} + +void chipset_force_shutdown(enum chipset_shutdown_reason reason) +{ +} + +int board_idle_task(void *unused) +{ + while (1) + task_wait_event(-1); +} diff --git a/board/volteer_ish/board.h b/board/volteer_ish/board.h new file mode 100644 index 0000000000..3adfcb07c5 --- /dev/null +++ b/board/volteer_ish/board.h @@ -0,0 +1,82 @@ +/* Copyright 2019 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. + */ + +/* Volteer ISH board configuration */ + +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H + +/* + * Allow dangerous commands. + * TODO: Don't use this on production systems. + */ +#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 + +/* Host command over HECI */ +#define CONFIG_HOSTCMD_HECI + +#define CONFIG_MKBP_EVENT +#define CONFIG_MKBP_USE_HECI + +/* I2C ports */ +#define I2C_PORT_SENSOR ISH_I2C1 +#define CONFIG_CMD_I2C_XFER + +/* EC Console Commands */ +#define CONFIG_CMD_ACCELS +#define CONFIG_CMD_ACCEL_INFO +#define CONFIG_CMD_TIMERINFO + +/* Undefined 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_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_HASH +#undef CONFIG_CMD_TEMP_SENSOR +#undef CONFIG_ADC +#undef CONFIG_SHA256 + +#ifndef __ASSEMBLER__ + +#include "gpio_signal.h" +#include "registers.h" + +/* Motion sensors */ +enum sensor_id { + SENSOR_COUNT +}; + +#endif /* !__ASSEMBLER__ */ + +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/volteer_ish/build.mk b/board/volteer_ish/build.mk new file mode 100644 index 0000000000..74ec3c865f --- /dev/null +++ b/board/volteer_ish/build.mk @@ -0,0 +1,13 @@ +# -*- makefile -*- +# Copyright 2019 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:=ish5p4 + +board-y=board.o diff --git a/board/volteer_ish/ec.tasklist b/board/volteer_ish/ec.tasklist new file mode 100644 index 0000000000..a4db486e9a --- /dev/null +++ b/board/volteer_ish/ec.tasklist @@ -0,0 +1,17 @@ +/* Copyright 2019 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. + */ + +/* + * See CONFIG_TASK_LIST in config.h for details. + */ + +#define CONFIG_TASK_LIST \ + TASK_ALWAYS(HOOKS, hook_task, NULL, HUGE_TASK_STACK_SIZE, 0) \ + TASK_ALWAYS(MOTIONSENSE, motion_sense_task, NULL, LARGER_TASK_STACK_SIZE, 0) \ + TASK_NOTEST(CHIPSET, board_idle_task, NULL, IDLE_TASK_STACK_SIZE, 0) \ + TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE, 0) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE, 0) \ + TASK_ALWAYS(HECI_RX, heci_rx_task, NULL, HUGE_TASK_STACK_SIZE, 0) \ + TASK_ALWAYS(IPC_MNG, ipc_mng_task, NULL, LARGER_TASK_STACK_SIZE, 0) diff --git a/board/volteer_ish/gpio.inc b/board/volteer_ish/gpio.inc new file mode 100644 index 0000000000..286309e388 --- /dev/null +++ b/board/volteer_ish/gpio.inc @@ -0,0 +1,12 @@ +/* -*- mode:c -*- + * + * Copyright 2019 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) |