diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2018-01-09 16:38:38 +0100 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-12 14:31:07 -0800 |
commit | f77552abc44cf5957812bb40abb84659ef1b4445 (patch) | |
tree | 922fe486c25f45eaac43a4f2222d765b57bf85e1 | |
parent | 47c7e189b9adb5819316be66a410e47149a2ddea (diff) | |
download | chrome-ec-f77552abc44cf5957812bb40abb84659ef1b4445.tar.gz |
meowth_fp: enable the hostcmd interface
Use the SPI1 controller as the host command slave interface.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=b:67081508
TEST=On reworked Meowth board with ZerbleBarn connected to the PCH SPI
bus, use to the kernel cros_ec interface to communicate with the MCU.
Change-Id: Ia7bdc72677cda2752a0849266282d2a779980152
Reviewed-on: https://chromium-review.googlesource.com/860933
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/meowth_fp/board.c | 3 | ||||
-rw-r--r-- | board/meowth_fp/board.h | 1 | ||||
-rw-r--r-- | board/meowth_fp/ec.tasklist | 1 | ||||
-rw-r--r-- | board/meowth_fp/gpio.inc | 3 |
4 files changed, 6 insertions, 2 deletions
diff --git a/board/meowth_fp/board.c b/board/meowth_fp/board.c index a777936e33..4fb6f62c9f 100644 --- a/board/meowth_fp/board.c +++ b/board/meowth_fp/board.c @@ -38,5 +38,8 @@ static void spi_configure(void) static void board_init(void) { spi_configure(); + + /* pretend the AP is up, when available do it using GPIO_SLP_S3_L */ + hook_notify(HOOK_CHIPSET_RESUME); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/meowth_fp/board.h b/board/meowth_fp/board.h index d753fcc16b..eb466bbbca 100644 --- a/board/meowth_fp/board.h +++ b/board/meowth_fp/board.h @@ -23,6 +23,7 @@ #undef CONFIG_LID_SWITCH #define CONFIG_MKBP_EVENT #define CONFIG_PRINTF_LEGACY_LI_FORMAT +#define CONFIG_SPI #define CONFIG_STM_HWTIMER32 #undef CONFIG_TASK_PROFILING #define CONFIG_WATCHDOG_HELP diff --git a/board/meowth_fp/ec.tasklist b/board/meowth_fp/ec.tasklist index 493ada1d16..3a583be499 100644 --- a/board/meowth_fp/ec.tasklist +++ b/board/meowth_fp/ec.tasklist @@ -19,4 +19,5 @@ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(FPSENSOR, fp_task, NULL, 4096) \ + TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) diff --git a/board/meowth_fp/gpio.inc b/board/meowth_fp/gpio.inc index 2b369c2f73..2ff4fbbf5e 100644 --- a/board/meowth_fp/gpio.inc +++ b/board/meowth_fp/gpio.inc @@ -6,8 +6,7 @@ /* Interrupts */ GPIO_INT(FPS_INT, PIN(A, 0), GPIO_INT_RISING, fps_event) -/* interrupt not yet in use */ -GPIO(SPI1_NSS, PIN(A, 4), GPIO_INPUT) +GPIO_INT(SPI1_NSS, PIN(A, 4), GPIO_INPUT, spi_event) /* Outputs */ GPIO(EC_INT_L, PIN(A, 1), GPIO_INPUT) /* Enabled when PCH is up */ |