From c23fa81e94083d4de518e6cb7fa9de595db26f80 Mon Sep 17 00:00:00 2001 From: Eric Lai Date: Tue, 9 Mar 2021 13:22:51 +0800 Subject: mb/google/mancomb: Enable ACPI tables BUG=b:182211161 TEST=builds Signed-off-by: Eric Lai Change-Id: I623fd052404a08cf0adb471bb654622960f1aa62 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51367 Tested-by: build bot (Jenkins) Reviewed-by: Mathew King --- src/mainboard/google/mancomb/chromeos.c | 11 +++++++++++ src/mainboard/google/mancomb/mainboard.c | 4 +++- .../mancomb/variants/baseboard/include/baseboard/gpio.h | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mainboard/google/mancomb/chromeos.c b/src/mainboard/google/mancomb/chromeos.c index 776637ac2d..d2ef97ef91 100644 --- a/src/mainboard/google/mancomb/chromeos.c +++ b/src/mainboard/google/mancomb/chromeos.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include #include @@ -12,3 +13,13 @@ void fill_lb_gpios(struct lb_gpios *gpios) }; lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); } + +static const struct cros_gpio cros_gpios[] = { + CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_DEVICE_NAME), + CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME), +}; + +void mainboard_chromeos_acpi_generate(void) +{ + chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios)); +} diff --git a/src/mainboard/google/mancomb/mainboard.c b/src/mainboard/google/mancomb/mainboard.c index 4129cff11d..3c7e41c15c 100644 --- a/src/mainboard/google/mancomb/mainboard.c +++ b/src/mainboard/google/mancomb/mainboard.c @@ -2,6 +2,7 @@ #include #include +#include static void mainboard_configure_gpios(void) { @@ -20,7 +21,8 @@ static void mainboard_init(void *chip_info) static void mainboard_enable(struct device *dev) { - /* TODO: Enable mainboard */ + printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n"); + dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; } struct chip_operations mainboard_ops = { diff --git a/src/mainboard/google/mancomb/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/mancomb/variants/baseboard/include/baseboard/gpio.h index b94afac4bf..4c9fc61045 100644 --- a/src/mainboard/google/mancomb/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/mancomb/variants/baseboard/include/baseboard/gpio.h @@ -3,4 +3,7 @@ #ifndef __BASEBOARD_GPIO_H__ #define __BASEBOARD_GPIO_H__ +/* SPI Write protect */ +#define CROS_WP_GPIO GPIO_67 + #endif /* __BASEBOARD_GPIO_H__ */ -- cgit v1.2.3