diff options
author | Scott Collyer <scollyer@google.com> | 2020-01-30 16:03:22 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-04 11:30:05 +0000 |
commit | 79ec40ac7060bb1f7a12aa53f0222dba74f3c521 (patch) | |
tree | 53a764ce41fb7f85b2fc2ae47a57412fb28f1f2f | |
parent | 5f3a97a9401dcd86705c4e00632cf06c684425f4 (diff) | |
download | chrome-ec-79ec40ac7060bb1f7a12aa53f0222dba74f3c521.tar.gz |
honeybuns: Initial skeleton EC image
This CL contains a skeleton image as a starter for honeybuns.
BUG=b:148492715
BRANCH=none
TEST=make BOARD=honeybuns and verify that image builds successfully
Change-Id: I05c8b6bb4fa1f1a781ab4d9e8a43026373c2ab50
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032199
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
-rw-r--r-- | baseboard/honeybuns/baseboard.c | 11 | ||||
-rw-r--r-- | baseboard/honeybuns/baseboard.h | 55 | ||||
-rw-r--r-- | baseboard/honeybuns/build.mk | 9 | ||||
-rw-r--r-- | board/honeybuns/board.c | 23 | ||||
-rw-r--r-- | board/honeybuns/board.h | 53 | ||||
-rw-r--r-- | board/honeybuns/build.mk | 18 | ||||
-rw-r--r-- | board/honeybuns/ec.tasklist | 12 | ||||
-rw-r--r-- | board/honeybuns/gpio.inc | 33 |
8 files changed, 214 insertions, 0 deletions
diff --git a/baseboard/honeybuns/baseboard.c b/baseboard/honeybuns/baseboard.c new file mode 100644 index 0000000000..e594d40a0c --- /dev/null +++ b/baseboard/honeybuns/baseboard.c @@ -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. + */ + +/* Honeybuns family-specific configuration */ +#include "gpio.h" + +/******************************************************************************/ + + diff --git a/baseboard/honeybuns/baseboard.h b/baseboard/honeybuns/baseboard.h new file mode 100644 index 0000000000..1711fd1717 --- /dev/null +++ b/baseboard/honeybuns/baseboard.h @@ -0,0 +1,55 @@ +/* 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. + */ + +/* Honeybuns baseboard configuration */ + +#ifndef __CROS_EC_BASEBOARD_H +#define __CROS_EC_BASEBOARD_H + +/* EC Defines */ +#define CONFIG_CRC8 + +/* TODO Define FLASH_PSTATE_LOCKED prior to building MP FW. */ +#undef CONFIG_FLASH_PSTATE_LOCKED + +/* + * TODO(b/148493929): Revisit these timer values once support for STM32G4 has + * been added. These macros are required to build the EC image. + */ +/* 48 MHz SYSCLK clock frequency */ +#define CPU_CLOCK 48000000 +#define CONFIG_STM_HWTIMER32 +#define TIM_CLOCK32 2 +#define TIM_CLOCK_MSB 3 +#define TIM_CLOCK_LSB 15 +#define TIM_WATCHDOG 7 + +/* Honeybuns platform does not have a lid switch */ +#undef CONFIG_LID_SWITCH + +/* Host communication */ + +/* Chipset config */ + +/* Common Keyboard Defines */ + +/* Sensors */ + +/* Common charger defines */ + +/* Common battery defines */ + +/* USB Type C and USB PD defines */ + +/* BC 1.2 */ + +/* I2C Bus Configuration */ + + +#ifndef __ASSEMBLER__ + +#endif /* !__ASSEMBLER__ */ + +#endif /* __CROS_EC_BASEBOARD_H */ diff --git a/baseboard/honeybuns/build.mk b/baseboard/honeybuns/build.mk new file mode 100644 index 0000000000..2a572df114 --- /dev/null +++ b/baseboard/honeybuns/build.mk @@ -0,0 +1,9 @@ +# -*- 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. +# +# Honeybuns baseboard specific files build +# + +baseboard-y=baseboard.o diff --git a/board/honeybuns/board.c b/board/honeybuns/board.c new file mode 100644 index 0000000000..039b1c7246 --- /dev/null +++ b/board/honeybuns/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. + */ + +/* Honeybuns 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/honeybuns/board.h b/board/honeybuns/board.h new file mode 100644 index 0000000000..7f5ec7476c --- /dev/null +++ b/board/honeybuns/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. + */ + +/* Honeybuns 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/honeybuns/build.mk b/board/honeybuns/build.mk new file mode 100644 index 0000000000..1cb1533ebc --- /dev/null +++ b/board/honeybuns/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/honeybuns/ec.tasklist b/board/honeybuns/ec.tasklist new file mode 100644 index 0000000000..c272906fc7 --- /dev/null +++ b/board/honeybuns/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/honeybuns/gpio.inc b/board/honeybuns/gpio.inc new file mode 100644 index 0000000000..ab65d71374 --- /dev/null +++ b/board/honeybuns/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 */ + |