From 44948a7c5c96dec3c826484c87360d977aef939e Mon Sep 17 00:00:00 2001 From: Mathew King Date: Wed, 10 Feb 2021 16:05:38 -0700 Subject: mb/google/guybrush: Enable CONFIG_CHROMEOS BUG=b:175143925 TEST=builds Signed-off-by: Mathew King Change-Id: I8d038126b3e511bd16df2144652992c2d5b56c87 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50507 Reviewed-by: EricR Lai Reviewed-by: Karthik Ramasubramanian Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/mainboard/google/guybrush/Kconfig | 10 ++++++++++ src/mainboard/google/guybrush/Makefile.inc | 1 + src/mainboard/google/guybrush/chromeos.c | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 src/mainboard/google/guybrush/chromeos.c (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/guybrush/Kconfig b/src/mainboard/google/guybrush/Kconfig index fe20162e95..4e6e21ca03 100644 --- a/src/mainboard/google/guybrush/Kconfig +++ b/src/mainboard/google/guybrush/Kconfig @@ -8,8 +8,18 @@ if BOARD_GOOGLE_BASEBOARD_GUYBRUSH 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/guybrush/Makefile.inc b/src/mainboard/google/guybrush/Makefile.inc index 1e8a88c95d..d16a87420d 100644 --- a/src/mainboard/google/guybrush/Makefile.inc +++ b/src/mainboard/google/guybrush/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/guybrush/chromeos.c b/src/mainboard/google/guybrush/chromeos.c new file mode 100644 index 0000000000..776637ac2d --- /dev/null +++ b/src/mainboard/google/guybrush/chromeos.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include + +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)); +} -- cgit v1.2.3