summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2019-08-15 15:58:34 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-20 18:55:39 +0000
commitd85f03e3015addc5f7b96b36b2a1d43147f4dae4 (patch)
tree9a94b0dd74dbd423cf1a641df3b153c132dc84ff
parent8bbbfbe64c410d9c43daacbdad272022f9eff900 (diff)
downloadchrome-ec-d85f03e3015addc5f7b96b36b2a1d43147f4dae4.tar.gz
Volteer: Add initial AP signals
Enable ESPI interface and support for IceLake chipset. Configure reset and power button signals. BUG=none BRANCH=none TEST=make BOARD=volteer Change-Id: I6f06a71fc2516781fe3c23b997310a960e6e0bb8 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1758533 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--baseboard/volteer/baseboard.h12
-rw-r--r--board/volteer/board.c2
-rw-r--r--board/volteer/board.h8
-rw-r--r--board/volteer/ec.tasklist3
-rw-r--r--board/volteer/gpio.inc5
5 files changed, 28 insertions, 2 deletions
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h
index 543a42bdb8..7da10339a0 100644
--- a/baseboard/volteer/baseboard.h
+++ b/baseboard/volteer/baseboard.h
@@ -25,8 +25,20 @@
#define CONFIG_VSTORE_SLOT_COUNT 1
/* Host communication */
+#define CONFIG_HOSTCMD_ESPI
/* Chipset config */
+/* TODO - replace with TigerLake once the changes land */
+#define CONFIG_CHIPSET_ICELAKE
+#define CONFIG_CHIPSET_RESET_HOOK
+#define CONFIG_CPU_PROCHOT_ACTIVE_LOW
+#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_POWER_BUTTON
+#define CONFIG_POWER_BUTTON_X86
+#define CONFIG_POWER_COMMON
+#define CONFIG_POWER_S0IX
+#define CONFIG_POWER_S0IX_FAILURE_DETECTION
+#define CONFIG_POWER_TRACK_HOST_SLEEP_STATE
/* Common Keyboard Defines */
diff --git a/board/volteer/board.c b/board/volteer/board.c
index 295ecd696b..54c7e52594 100644
--- a/board/volteer/board.c
+++ b/board/volteer/board.c
@@ -6,9 +6,11 @@
/* Volteer board-specific configuration */
#include "common.h"
+#include "extpower.h"
#include "gpio.h"
#include "hooks.h"
#include "lid_switch.h"
+#include "power_button.h"
#include "switch.h"
#include "system.h"
#include "task.h"
diff --git a/board/volteer/board.h b/board/volteer/board.h
index f8d899c8b4..45511fe989 100644
--- a/board/volteer/board.h
+++ b/board/volteer/board.h
@@ -14,9 +14,10 @@
/* Optional features */
#define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */
+#define CONFIG_POWER_BUTTON
+
/* Config options automatically enabled by NPCX, re-enable once support added */
#undef CONFIG_ADC
-#undef CONFIG_SWITCH
#undef CONFIG_UART_TX_BUF_SIZE
#define CONFIG_UART_TX_BUF_SIZE 4096
@@ -41,8 +42,13 @@
* then redefined here to so it's more clear which signal is being used for
* which purpose.
*/
+#define GPIO_AC_PRESENT GPIO_ACOK_OD
#define GPIO_ENTERING_RW GPIO_EC_ENTERING_RW
#define GPIO_LID_OPEN GPIO_EC_LID_OPEN
+#define GPIO_PCH_WAKE_L GPIO_EC_PCH_WAKE_ODL
+#define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL
+#define GPIO_POWER_BUTTON_L GPIO_H1_EC_PWR_BTN_ODL
+#define GPIO_SYS_RESET_L GPIO_EC_RST_ODL
#define GPIO_WP_L GPIO_EC_WP_L
diff --git a/board/volteer/ec.tasklist b/board/volteer/ec.tasklist
index 6e1791520d..f8b67701bf 100644
--- a/board/volteer/ec.tasklist
+++ b/board/volteer/ec.tasklist
@@ -10,4 +10,5 @@
#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)
+ TASK_ALWAYS(CONSOLE, console_task, NULL, VENTI_TASK_STACK_SIZE) \
+ TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE)
diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc
index 7b9ee14a04..e54b679a84 100644
--- a/board/volteer/gpio.inc
+++ b/board/volteer/gpio.inc
@@ -11,6 +11,8 @@
/* Wake Source interrupts */
GPIO_INT(EC_LID_OPEN, PIN(D, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, lid_interrupt)
GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt)
+GPIO_INT(H1_EC_PWR_BTN_ODL, PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt)
+GPIO_INT(ACOK_OD, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt)
/* Power sequencing interrupts */
@@ -23,7 +25,10 @@ GPIO_INT(EC_WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt)
/* Volume button interrupts */
/* AP Signals */
+GPIO(EC_RST_ODL, PIN(0, 2), GPIO_ODR_HIGH)
GPIO(EC_ENTERING_RW, PIN(E, 3), GPIO_OUT_LOW)
+GPIO(EC_PCH_WAKE_ODL, PIN(7, 4), GPIO_ODR_HIGH)
+GPIO(EC_PCH_PWR_BTN_ODL, PIN(C, 1), GPIO_ODR_HIGH)
/* USB and USBC Signals */