summaryrefslogtreecommitdiff
path: root/board/gingerbread
diff options
context:
space:
mode:
authorUdaya Kiran Ammu <udaykiran@google.com>2020-04-20 22:11:40 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-25 04:27:48 +0000
commit87c2d45e333909cd2d9e2b187b83ca07cf7007cc (patch)
tree842898611e94fa2ee61873e0980ab1783e6a03c0 /board/gingerbread
parent84d217f113db1aab88a8a886ffaebea60b1a3ef3 (diff)
downloadchrome-ec-87c2d45e333909cd2d9e2b187b83ca07cf7007cc.tar.gz
Gingerbread: Initial skeleton EC image.
This CL contains a skelton image. It is a derivative of honeybuns. BUG=b:154667178 BRANCH=none TEST=make BOARD=Gingerbread and verify that image builds successfully Signed-off-by: Udaya Kiran Ammu <udaykiran@google.com> Change-Id: I63a0e07956ed4cf430c09b94c9cd221fae3c4dd4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2161461 Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'board/gingerbread')
-rw-r--r--board/gingerbread/board.c23
-rw-r--r--board/gingerbread/board.h53
-rw-r--r--board/gingerbread/build.mk18
-rw-r--r--board/gingerbread/ec.tasklist12
-rw-r--r--board/gingerbread/gpio.inc33
5 files changed, 139 insertions, 0 deletions
diff --git a/board/gingerbread/board.c b/board/gingerbread/board.c
new file mode 100644
index 0000000000..58134eaa4d
--- /dev/null
+++ b/board/gingerbread/board.c
@@ -0,0 +1,23 @@
+/* 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.
+ */
+
+/* Gingerbread board-specific configuration */
+
+#include "common.h"
+#include "gpio.h"
+#include "hooks.h"
+#include "switch.h"
+#include "system.h"
+#include "task.h"
+#include "uart.h"
+#include "util.h"
+
+#include "gpio_list.h" /* Must come after other header files. */
+
+static void board_init(void)
+{
+ /* TODO */
+}
+DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
diff --git a/board/gingerbread/board.h b/board/gingerbread/board.h
new file mode 100644
index 0000000000..c3052f3f59
--- /dev/null
+++ b/board/gingerbread/board.h
@@ -0,0 +1,53 @@
+/* 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.
+ */
+
+/* Gingerbread board configuration */
+
+#ifndef __CROS_EC_BOARD_H
+#define __CROS_EC_BOARD_H
+
+/* Baseboard features */
+#include "baseboard.h"
+
+/* Optional features */
+#define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */
+
+#undef CONFIG_UART_TX_BUF_SIZE
+#define CONFIG_UART_TX_BUF_SIZE 4096
+
+/* Keyboard features */
+
+/* Sensors */
+
+/* USB Type C and USB PD defines */
+
+/* USB Type A Features */
+
+/* BC 1.2 */
+
+/* Volume Button feature */
+
+/* Fan features */
+
+/*
+ * Macros for GPIO signals used in common code that don't match the
+ * schematic names. Signal names in gpio.inc match the schematic and are
+ * then redefined here to so it's more clear which signal is being used for
+ * which purpose.
+ */
+#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
+#define GPIO_WP_L GPIO_EC_WP_L
+
+
+
+#ifndef __ASSEMBLER__
+
+#include "gpio_signal.h"
+#include "registers.h"
+
+
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __CROS_EC_BOARD_H */
diff --git a/board/gingerbread/build.mk b/board/gingerbread/build.mk
new file mode 100644
index 0000000000..1cb1533ebc
--- /dev/null
+++ b/board/gingerbread/build.mk
@@ -0,0 +1,18 @@
+# -*- 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.
+#
+# Board specific files build
+#
+
+CHIP:=stm32
+# TODO(b/148493929): The chip family for honeybuns is STM32G4. The chip
+# variant is STM32G431x. Support for this chip is not yet in the Cros EC
+# codebase. Currently, using a variant of the F family so the project will
+# build properly.
+CHIP_FAMILY:=stm32f0
+CHIP_VARIANT:=stm32f09x
+BASEBOARD:=honeybuns
+
+board-y=board.o
diff --git a/board/gingerbread/ec.tasklist b/board/gingerbread/ec.tasklist
new file mode 100644
index 0000000000..c272906fc7
--- /dev/null
+++ b/board/gingerbread/ec.tasklist
@@ -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.
+ */
+
+/*
+ * 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(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE)
diff --git a/board/gingerbread/gpio.inc b/board/gingerbread/gpio.inc
new file mode 100644
index 0000000000..ab65d71374
--- /dev/null
+++ b/board/gingerbread/gpio.inc
@@ -0,0 +1,33 @@
+/* -*- 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.
+ */
+
+/* Declare symbolic names for all the GPIOs that we care about.
+ * Note: Those with interrupt handlers must be declared first. */
+
+/* Wake Source interrupts */
+/* TODO(b/148624000): Change this pin assignment once schematics are final */
+GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt)
+
+/* Power sequencing interrupts */
+
+/* Sensor Interrupts */
+
+/* USB-C interrupts */
+
+/* HDMI interrupts */
+
+/* Volume button interrupts */
+
+/* AP Signals */
+
+/* USB and USBC Signals */
+
+/* Misc Signals */
+UNIMPLEMENTED(EC_ENTERING_RW)
+
+/* UART */
+