summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lai <ericr_lai@compal.corp-partner.google.com>2021-03-09 13:15:46 +0800
committerMartin Roth <martinroth@google.com>2021-03-11 15:07:41 +0000
commit6f068838565697d46538dd394305afbb37703afb (patch)
tree66abe0825c4437fe76edaf177c0400ab3da06a45
parent6bb5b9a058f1acb6266039931f9b209c107b7987 (diff)
mb/google/mancomb: Enable CONFIG_CHROMEOS
BUG=b:182211161 TEST=builds Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com> Change-Id: I45dcaa8b430721f864d4e5d78ae60883175085c3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51366 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mathew King <mathewk@chromium.org>
-rw-r--r--src/mainboard/google/mancomb/Kconfig10
-rw-r--r--src/mainboard/google/mancomb/Makefile.inc1
-rw-r--r--src/mainboard/google/mancomb/chromeos.c14
3 files changed, 25 insertions, 0 deletions
diff --git a/src/mainboard/google/mancomb/Kconfig b/src/mainboard/google/mancomb/Kconfig
index 6cb5f1854e..dd417cfe10 100644
--- a/src/mainboard/google/mancomb/Kconfig
+++ b/src/mainboard/google/mancomb/Kconfig
@@ -8,8 +8,18 @@ if BOARD_GOOGLE_BASEBOARD_MANCOMB
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
+ select MAINBOARD_HAS_CHROMEOS
select SOC_AMD_CEZANNE
+config CHROMEOS
+ select EC_GOOGLE_CHROMEEC
+ select EC_GOOGLE_CHROMEEC_ESPI
+ select EC_GOOGLE_CHROMEEC_SWITCHES
+
+config VBOOT
+ select VBOOT_SEPARATE_VERSTAGE
+ select VBOOT_STARTS_IN_BOOTBLOCK
+
config FMDFILE
string
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/chromeos.fmd"
diff --git a/src/mainboard/google/mancomb/Makefile.inc b/src/mainboard/google/mancomb/Makefile.inc
index 1e8a88c95d..d16a87420d 100644
--- a/src/mainboard/google/mancomb/Makefile.inc
+++ b/src/mainboard/google/mancomb/Makefile.inc
@@ -3,6 +3,7 @@
bootblock-y += bootblock.c
ramstage-y += mainboard.c
+ramstage-$(CONFIG_CHROMEOS) += chromeos.c
subdirs-y += variants/baseboard
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
diff --git a/src/mainboard/google/mancomb/chromeos.c b/src/mainboard/google/mancomb/chromeos.c
new file mode 100644
index 0000000000..776637ac2d
--- /dev/null
+++ b/src/mainboard/google/mancomb/chromeos.c
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <boot/coreboot_tables.h>
+#include <gpio.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+void fill_lb_gpios(struct lb_gpios *gpios)
+{
+ struct lb_gpio chromeos_gpios[] = {
+ {-1, ACTIVE_HIGH, get_lid_switch(), "lid"},
+ {-1, ACTIVE_HIGH, 0, "power"},
+ };
+ lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
+}