summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/include/config.h b/include/config.h
index 3264ffa195..bad67c6abf 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1172,9 +1172,6 @@
*/
#undef CONFIG_EMULATED_SYSRQ
-/* Support for eSPI for host communication */
-#undef CONFIG_ESPI
-
/* Use Virtual Wire signals instead of GPIO with eSPI interface */
#undef CONFIG_ESPI_VW_SIGNALS
@@ -2074,8 +2071,17 @@
*/
#undef CONFIG_LOW_POWER_S0
-/* Support LPC interface */
-#undef CONFIG_LPC
+/*
+ * EC supports x86 host communication with AP. This can either be through LPC
+ * or eSPI. The CONFIG_HOSTCMD_X86 will get automatically defined if either
+ * CONFIG_HOSTCMD_LPC or CONFIG_HOSTCMD_ESPI are defined. LPC and eSPI are
+ * mutually exclusive.
+ */
+#undef CONFIG_HOSTCMD_X86
+/* Support host command interface over LPC bus. */
+#undef CONFIG_HOSTCMD_LPC
+/* Support host command interface over eSPI bus. */
+#undef CONFIG_HOSTCMD_ESPI
/* Base address of low power RAM. */
#undef CONFIG_LPRAM_BASE
@@ -3378,6 +3384,34 @@
/******************************************************************************/
/*
+ * Automatically define CONFIG_HOSTCMD_X86 if either child option is defined.
+ * Ensure LPC and eSPI are mutually exclusive
+ */
+#if defined(CONFIG_HOSTCMD_LPC) || defined(CONFIG_HOSTCMD_ESPI)
+#define CONFIG_HOSTCMD_X86
+#endif
+
+#if defined(CONFIG_HOSTCMD_LPC) && defined(CONFIG_HOSTCMD_ESPI)
+#error Must select only one type of host communication bus.
+#endif
+
+#if defined(CONFIG_HOSTCMD_X86) && \
+ !defined(CONFIG_HOSTCMD_LPC) && \
+ !defined(CONFIG_HOSTCMD_ESPI)
+#error Must select one type of host communication bus.
+#endif
+
+/* TODO(chromium:818804): Remove temp transition code below once finished */
+#ifdef CONFIG_HOSTCMD_ESPI
+#define CONFIG_LPC
+#define CONFIG_ESPI
+#endif
+
+#ifdef CONFIG_HOSTCMD_LPC
+#define CONFIG_LPC
+#endif
+/******************************************************************************/
+/*
* Set default data ram size unless it's customized by the chip.
*/
#ifndef CONFIG_DATA_RAM_SIZE