diff options
author | Tzung-Bi Shih <tzungbi@chromium.org> | 2021-04-08 17:30:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-09 05:38:36 +0000 |
commit | 337b81f689f2f9a1045725d1a91a19be81b048bc (patch) | |
tree | 47c7733832339882b5bc1edfbd45b4a666f6b059 /board/cherry_scp | |
parent | 7feb1612e1c5f0c33635d7e586e1f2ffc1991502 (diff) | |
download | chrome-ec-337b81f689f2f9a1045725d1a91a19be81b048bc.tar.gz |
cherry_scp: add initial cherry SCP board
This is basically: cp -r board/asurada_scp board/cherry_scp.
BRANCH=none
BUG=b:184793035
TEST=make BOARD=cherry_scp
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Change-Id: I7a035962a5a371587b5bea6f1cd78cd777dcdc8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2813399
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board/cherry_scp')
-rw-r--r-- | board/cherry_scp/board.c | 23 | ||||
-rw-r--r-- | board/cherry_scp/board.h | 33 | ||||
-rw-r--r-- | board/cherry_scp/build.mk | 13 | ||||
-rw-r--r-- | board/cherry_scp/ec.tasklist | 17 | ||||
-rw-r--r-- | board/cherry_scp/gpio.inc | 10 |
5 files changed, 96 insertions, 0 deletions
diff --git a/board/cherry_scp/board.c b/board/cherry_scp/board.c new file mode 100644 index 0000000000..31f1f069de --- /dev/null +++ b/board/cherry_scp/board.c @@ -0,0 +1,23 @@ +/* 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. + */ +/* Cherry SCP configuration */ + +#include "cache.h" +#include "csr.h" +#include "registers.h" + +struct mpu_entry mpu_entries[NR_MPU_ENTRIES] = { + /* SRAM (for most code, data) */ + {0, 0x0ffc00, MPU_ATTR_C | MPU_ATTR_W | MPU_ATTR_R}, + /* SRAM (for IPI shared buffer) */ + {0x0ffc00, 0x100000, MPU_ATTR_W | MPU_ATTR_R}, + /* For AP domain */ + {0x60000000, 0x70000000, MPU_ATTR_W | MPU_ATTR_R}, + /* For SCP sys */ + {0x70000000, 0x80000000, MPU_ATTR_W | MPU_ATTR_R}, + {0x10000000, 0x11400000, MPU_ATTR_W | MPU_ATTR_R}, +}; + +#include "gpio_list.h" diff --git a/board/cherry_scp/board.h b/board/cherry_scp/board.h new file mode 100644 index 0000000000..16d9bdf063 --- /dev/null +++ b/board/cherry_scp/board.h @@ -0,0 +1,33 @@ +/* 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. + */ + +/* Cherry SCP configuration */ + +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H + +#include "baseboard.h" + +/* + * RW only, no flash + * +-------------------- 0x0 + * | ROM vectortable, .text, .rodata, .data LMA + * +-------------------- 0x58000 + * | RAM .bss, .data + * +-------------------- 0x0ffc00 + * | Reserved (padding for 1k-alignment) + * +-------------------- 0x0ffdb0 + * | IPI shared buffer with AP (288 + 8) * 2 + * +-------------------- 0x100000 + */ +#define CONFIG_ROM_BASE 0x0 +#define CONFIG_RAM_BASE 0x58000 +#define CONFIG_ROM_SIZE (CONFIG_RAM_BASE - CONFIG_ROM_BASE) +#define CONFIG_RAM_SIZE ((CONFIG_IPC_SHARED_OBJ_ADDR & (~(0x400 - 1))) - \ + CONFIG_RAM_BASE) + +#define SCP_FW_END 0x100000 + +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/cherry_scp/build.mk b/board/cherry_scp/build.mk new file mode 100644 index 0000000000..7f47a6e709 --- /dev/null +++ b/board/cherry_scp/build.mk @@ -0,0 +1,13 @@ +# -*- makefile -*- +# 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 specific files build +# + +CHIP:=mt8192_scp +CHIP_VARIANT:=mt8192 +BASEBOARD:=mtscp-rv32i + +board-y=board.o diff --git a/board/cherry_scp/ec.tasklist b/board/cherry_scp/ec.tasklist new file mode 100644 index 0000000000..f0e97e0ffe --- /dev/null +++ b/board/cherry_scp/ec.tasklist @@ -0,0 +1,17 @@ +/* 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. + */ + +/** + * See CONFIG_TASK_LIST in config.h for details. + */ + +#define CONFIG_TASK_LIST \ + TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ + TASK_ALWAYS(VDEC_SERVICE, vdec_service_task, NULL, TRENTA_TASK_STACK_SIZE) \ + TASK_ALWAYS(VDEC_CORE_SERVICE, vdec_core_service_task, NULL, TRENTA_TASK_STACK_SIZE) \ + TASK_ALWAYS(VENC_SERVICE, venc_service_task, NULL, TRENTA_TASK_STACK_SIZE) \ + TASK_ALWAYS(MDP_SERVICE, mdp_service_task, NULL, TRENTA_TASK_STACK_SIZE) diff --git a/board/cherry_scp/gpio.inc b/board/cherry_scp/gpio.inc new file mode 100644 index 0000000000..48b397b9a9 --- /dev/null +++ b/board/cherry_scp/gpio.inc @@ -0,0 +1,10 @@ +/* -*- mode:c -*- + * + * 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. + */ + +/* Unimplemented signals which we need to emulate for now */ +UNIMPLEMENTED(ENTERING_RW) +UNIMPLEMENTED(WP_L) |