diff options
-rw-r--r-- | baseboard/guybrush/base_ec.tasklist | 13 | ||||
-rw-r--r-- | baseboard/guybrush/base_gpio.inc | 35 | ||||
-rw-r--r-- | baseboard/guybrush/baseboard.h | 31 | ||||
-rw-r--r-- | baseboard/guybrush/build.mk | 3 | ||||
-rw-r--r-- | board/guybrush/board.h | 21 | ||||
-rw-r--r-- | board/guybrush/build.mk | 3 | ||||
-rw-r--r-- | board/guybrush/ec.tasklist | 7 | ||||
-rw-r--r-- | board/guybrush/gpio.inc | 30 |
8 files changed, 87 insertions, 56 deletions
diff --git a/baseboard/guybrush/base_ec.tasklist b/baseboard/guybrush/base_ec.tasklist new file mode 100644 index 0000000000..24c306914f --- /dev/null +++ b/baseboard/guybrush/base_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 BASEBOARD_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/baseboard/guybrush/base_gpio.inc b/baseboard/guybrush/base_gpio.inc new file mode 100644 index 0000000000..cfd27cada8 --- /dev/null +++ b/baseboard/guybrush/base_gpio.inc @@ -0,0 +1,35 @@ +/* -*- 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. */ + +/* Wake Source interrupts */ +GPIO_INT(LID_OPEN, PIN(0, 2), GPIO_INT_BOTH, switch_interrupt) +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 */ +UNIMPLEMENTED(ENTERING_RW) /* GPIO_ENTERING_RW */ + +/* USB and USBC Signals */ + +/* Misc Signals */ + +/* UART */ + +/* I2C pins - these will be reconfigured for alternate function below */ + +/* Power Switch Logic (PSL) inputs */ diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h index fc580c5258..50dd474fa8 100644 --- a/baseboard/guybrush/baseboard.h +++ b/baseboard/guybrush/baseboard.h @@ -15,6 +15,27 @@ #undef CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096 +/* 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 + +/* Config options automatically enabled, re-enable once support added */ +#undef CONFIG_ADC +#undef CONFIG_SWITCH +#undef CONFIG_SPI_FLASH +#undef CONFIG_SUPPORT_CHIP_HIBERNATION + +/* + * 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_LID_OPEN GPIO_EC_LID_OPEN +#define GPIO_WP_L GPIO_EC_WP_L + /* EC Defines */ /* Host communication */ @@ -31,13 +52,23 @@ /* USB Type C and USB PD defines */ +/* USB Type A Features */ + /* BC 1.2 */ /* I2C Bus Configuration */ +/* Keyboard features */ + +/* Volume Button feature */ + +/* Fan features */ #ifndef __ASSEMBLER__ +#include "gpio_signal.h" +#include "registers.h" + #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BASEBOARD_H */ diff --git a/baseboard/guybrush/build.mk b/baseboard/guybrush/build.mk index 4780078166..c365ae5af5 100644 --- a/baseboard/guybrush/build.mk +++ b/baseboard/guybrush/build.mk @@ -6,4 +6,7 @@ # Guybrush baseboard specific files build # +CHIP:=npcx +CHIP_FAMILY:=npcx9 +CHIP_VARIANT:=npcx9m3f baseboard-y=baseboard.o diff --git a/board/guybrush/board.h b/board/guybrush/board.h index 62429e7ee0..8a4a51e549 100644 --- a/board/guybrush/board.h +++ b/board/guybrush/board.h @@ -11,27 +11,6 @@ /* Baseboard features */ #include "baseboard.h" -/* Optional features */ -#define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */ - -/* Config options automatically enabled, re-enable once support added */ -#undef CONFIG_ADC -#undef CONFIG_SWITCH -#undef CONFIG_SPI_FLASH -#undef CONFIG_SUPPORT_CHIP_HIBERNATION - -#undef CONFIG_UART_TX_BUF_SIZE -#define CONFIG_UART_TX_BUF_SIZE 4096 - -/* - * 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_LID_OPEN GPIO_EC_LID_OPEN -#define GPIO_WP_L GPIO_EC_WP_L - /* Motion sensing drivers */ /* Keyboard features */ diff --git a/board/guybrush/build.mk b/board/guybrush/build.mk index c80f89c69a..c76e04a0b7 100644 --- a/board/guybrush/build.mk +++ b/board/guybrush/build.mk @@ -6,9 +6,6 @@ # Board specific files build # -CHIP:=npcx -CHIP_FAMILY:=npcx9 -CHIP_VARIANT:=npcx9m3f BASEBOARD:=guybrush board-y=board.o diff --git a/board/guybrush/ec.tasklist b/board/guybrush/ec.tasklist index 773d62c8cb..2dc9c26ec2 100644 --- a/board/guybrush/ec.tasklist +++ b/board/guybrush/ec.tasklist @@ -7,7 +7,6 @@ * 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) +#include "base_ec.tasklist" + +#define CONFIG_TASK_LIST BASEBOARD_CONFIG_TASK_LIST diff --git a/board/guybrush/gpio.inc b/board/guybrush/gpio.inc index 852f23c55d..06908e3a67 100644 --- a/board/guybrush/gpio.inc +++ b/board/guybrush/gpio.inc @@ -5,32 +5,6 @@ * 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. */ +/* Declare symbolic names for all the GPIOs that we care about. */ -/* Wake Source interrupts */ -GPIO_INT(LID_OPEN, PIN(0, 2), GPIO_INT_BOTH, switch_interrupt) -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 */ -UNIMPLEMENTED(ENTERING_RW) /* GPIO_ENTERING_RW */ - -/* USB and USBC Signals */ - -/* Misc Signals */ - -/* UART */ - -/* I2C pins - these will be reconfigured for alternate function below */ - -/* Power Switch Logic (PSL) inputs */ +#include "base_gpio.inc" |