summaryrefslogtreecommitdiff
path: root/board/wheatley
diff options
context:
space:
mode:
authorMulin Chao <mlchao@nuvoton.com>2016-08-04 14:20:36 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-08-12 05:24:34 -0700
commit0558a242bbfbf4a2a1fec3c85c01767e30dee8f5 (patch)
tree231b31c2e2d3e7625bbe7f12dc456a4b4c7debf9 /board/wheatley
parent2e738c72fd3676ef5e3b8ffcf51ad3fa488fe865 (diff)
downloadchrome-ec-0558a242bbfbf4a2a1fec3c85c01767e30dee8f5.tar.gz
wheatley: Modified board level drivers for eSPI POC on wheatley.
Modified board level drivers for eSPI POC on wheatley. By adding CONFIG_ESPI definition, ec can support espi protocols for host interface on x86 based platform such as skylake and so on. CONFIG_VW_SIGNALS will be used in the future for saving GPIOs during power sequence. Modified sources: 1. wheatley/board.h: Enable/disable espi driver. 2, wheatley/board.c: Add VW signals in power signal list. 3. wheatley/gpio.inc: Save GPIOs if CONFIG_VW_SIGNALS is defined. BRANCH=none BUG=chrome-os-partner:34346 TEST=make BOARD=wheatley; test nuvoton IC specific drivers Change-Id: I0e8a951de6eacd4f8be65ffaac242f38079375d5 Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/366520 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/wheatley')
-rw-r--r--board/wheatley/board.c6
-rw-r--r--board/wheatley/board.h4
-rw-r--r--board/wheatley/gpio.inc3
3 files changed, 13 insertions, 0 deletions
diff --git a/board/wheatley/board.c b/board/wheatley/board.c
index 557aca2bb2..5ae6caf1a2 100644
--- a/board/wheatley/board.c
+++ b/board/wheatley/board.c
@@ -44,6 +44,7 @@
#include "usb_pd.h"
#include "usb_pd_tcpm.h"
#include "util.h"
+#include "espi.h"
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_USBCHARGE, format, ## args)
@@ -101,8 +102,13 @@ void tablet_mode_interrupt(enum gpio_signal signal)
const struct power_signal_info power_signal_list[] = {
{GPIO_RSMRST_L_PGOOD, 1, "RSMRST_N_PWRGD"},
{GPIO_PCH_SLP_S0_L, 1, "SLP_S0_DEASSERTED"},
+#ifdef CONFIG_VW_SIGNALS
+ {VW_SLP_S3_L, 1, "SLP_S3_DEASSERTED"},
+ {VW_SLP_S4_L, 1, "SLP_S4_DEASSERTED"},
+#else
{GPIO_PCH_SLP_S3_L, 1, "SLP_S3_DEASSERTED"},
{GPIO_PCH_SLP_S4_L, 1, "SLP_S4_DEASSERTED"},
+#endif
{GPIO_PCH_SLP_SUS_L, 1, "SLP_SUS_DEASSERTED"},
{GPIO_PMIC_DPWROK, 1, "PMIC_DPWROK"},
};
diff --git a/board/wheatley/board.h b/board/wheatley/board.h
index bfad967c78..b9f62d73d9 100644
--- a/board/wheatley/board.h
+++ b/board/wheatley/board.h
@@ -148,6 +148,10 @@
#undef CONFIG_CMD_TIMERINFO
#undef CONFIG_CONSOLE_CMDHELP
+/* Features of eSPI */
+#undef CONFIG_ESPI /* Use eSPI protocol for host interface of x86 CPU */
+#undef CONFIG_VW_SIGNALS /* Use VW signals instead of GPIOs */
+
#ifndef __ASSEMBLER__
#include "gpio_signal.h"
diff --git a/board/wheatley/gpio.inc b/board/wheatley/gpio.inc
index 8d16b9d817..c50b184482 100644
--- a/board/wheatley/gpio.inc
+++ b/board/wheatley/gpio.inc
@@ -15,8 +15,11 @@ GPIO_INT(WP_L, PIN(7, 1), GPIO_INT_BOTH, switch
GPIO_INT(POWER_BUTTON_L, PIN(9, 7), GPIO_INT_BOTH, power_button_interrupt) /* A48 - GPIO97 for ROP_EC_PWR_BTN_L_R */
/* RSMRST from PMIC */
GPIO_INT(RSMRST_L_PGOOD, PIN(7, 2), GPIO_INT_BOTH, power_signal_interrupt) /* A36 - PWRGD for ROP_EC_RSMRST_L */
+/* Use VW signals instead of GPIOs */
+#ifndef CONFIG_VW_SIGNALS
GPIO_INT(PCH_SLP_S4_L, PIN(5, 0), GPIO_INT_BOTH, power_signal_interrupt) /* A25 - GPIO50 for SLP_S4_L */
GPIO_INT(PCH_SLP_S3_L, PIN(4, 0), GPIO_INT_BOTH, power_signal_interrupt) /* B21 - TA1 for SLP_S3_L */
+#endif
/*
* This pulldown should be removed in future hardware followers. The signal
* is pulled up in the SoC when the primary rails are on and/or ramping.