diff options
author | Caveh Jalali <caveh@chromium.org> | 2020-10-16 00:52:52 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-19 20:52:57 +0000 |
commit | c6002497c6ac39f84541686836de0aa6488802f7 (patch) | |
tree | e2958d2eb7f8cabe9c4ca76cb8d7e8ae6d7ec3f0 | |
parent | 82a761da1b46229283672fb94ad617327d7149b1 (diff) | |
download | chrome-ec-c6002497c6ac39f84541686836de0aa6488802f7.tar.gz |
brya: add skeletal board and baseboard build
this adds a minimal build for a new board called brya. brya will be
the basis for a family of boards, so this also introduces a new
baseboard called brya. the primary goal is to introduce a build target
to enable iterative development of this board.
BRANCH=none
BUG=b:173575131
TEST=make BOARD=brya, make buildall,
verified ec.bin is generated
Change-Id: I27a64594b84c69ee43ee91227c47391a801dee44
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546802
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | baseboard/brya/baseboard.h | 11 | ||||
-rw-r--r-- | baseboard/brya/build.mk | 7 | ||||
-rw-r--r-- | board/brya/board.c | 12 | ||||
-rw-r--r-- | board/brya/board.h | 32 | ||||
-rw-r--r-- | board/brya/build.mk | 14 | ||||
-rw-r--r-- | board/brya/ec.tasklist | 13 | ||||
-rw-r--r-- | board/brya/gpio.inc | 15 |
7 files changed, 104 insertions, 0 deletions
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h new file mode 100644 index 0000000000..9d3b1c653a --- /dev/null +++ b/baseboard/brya/baseboard.h @@ -0,0 +1,11 @@ +/* Copyright 2020 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. + */ + +/* Brya baseboard configuration */ + +#ifndef __CROS_EC_BASEBOARD_H +#define __CROS_EC_BASEBOARD_H + +#endif /* __CROS_EC_BASEBOARD_H */ diff --git a/baseboard/brya/build.mk b/baseboard/brya/build.mk new file mode 100644 index 0000000000..11fecc502d --- /dev/null +++ b/baseboard/brya/build.mk @@ -0,0 +1,7 @@ +# -*- makefile -*- +# Copyright 2020 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. +# +# Brya baseboard specific files build +# diff --git a/board/brya/board.c b/board/brya/board.c new file mode 100644 index 0000000000..6e945463ee --- /dev/null +++ b/board/brya/board.c @@ -0,0 +1,12 @@ +/* Copyright 2020 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. + */ + +#include "registers.h" + +static void fake_gpio_interrupt(enum gpio_signal signal) +{ +} + +#include "gpio_list.h" diff --git a/board/brya/board.h b/board/brya/board.h new file mode 100644 index 0000000000..3d8f0cbb1f --- /dev/null +++ b/board/brya/board.h @@ -0,0 +1,32 @@ +/* Copyright 2020 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. + */ + +/* Brya board configuration */ + +#ifndef __CROS_EC_BOARD_H +#define __CROS_EC_BOARD_H + +/* Baseboard features */ +#include "baseboard.h" + +#ifndef __ASSEMBLER__ + +#include "gpio_signal.h" /* must precede gpio.h */ + +#endif /* !__ASSEMBLER__ */ + +/* + * Disable features enabled by default. + */ +#undef CONFIG_ADC +#undef CONFIG_LID_SWITCH +#undef CONFIG_HIBERNATE +#undef CONFIG_SPI_FLASH +#undef CONFIG_SWITCH + +#define GPIO_WP_L GPIO_FAKE_IRQ_00 +#define GPIO_ENTERING_RW GPIO_FAKE_OUT_01 + +#endif /* __CROS_EC_BOARD_H */ diff --git a/board/brya/build.mk b/board/brya/build.mk new file mode 100644 index 0000000000..355d88e44c --- /dev/null +++ b/board/brya/build.mk @@ -0,0 +1,14 @@ +# -*- makefile -*- +# Copyright 2020 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. +# +# Brya board specific files build +# + +CHIP:=npcx +CHIP_FAMILY:=npcx9 +CHIP_VARIANT:=npcx9m3f +BASEBOARD:=brya + +board-y=board.o diff --git a/board/brya/ec.tasklist b/board/brya/ec.tasklist new file mode 100644 index 0000000000..773d62c8cb --- /dev/null +++ b/board/brya/ec.tasklist @@ -0,0 +1,13 @@ +/* Copyright 2020 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, VENTI_TASK_STACK_SIZE) diff --git a/board/brya/gpio.inc b/board/brya/gpio.inc new file mode 100644 index 0000000000..6c4d16415c --- /dev/null +++ b/board/brya/gpio.inc @@ -0,0 +1,15 @@ +/* -*- mode:c -*- + * + * Copyright 2020 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 need at least one GPIO definition because much of the code does not + * handle the case of no GPIOs. + */ + +GPIO_INT(FAKE_IRQ_00, PIN(3, 4), GPIO_INT_BOTH, fake_gpio_interrupt) + +GPIO(FAKE_OUT_01, PIN(5, 6), GPIO_OUTPUT) |