Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/50814 )
Change subject: mb/google/guybrush: Enable ACPI tables ......................................................................
mb/google/guybrush: Enable ACPI tables
BUG=b:180419454 TEST=builds
Signed-off-by: Mathew King mathewk@chromium.org Change-Id: I1e724e78b5ef378d474063417aa2b7e57a00886f Reviewed-on: https://review.coreboot.org/c/coreboot/+/50814 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Raul Rangel rrangel@chromium.org Reviewed-by: EricR Lai ericr_lai@compal.corp-partner.google.com --- M src/mainboard/google/guybrush/chromeos.c M src/mainboard/google/guybrush/mainboard.c M src/mainboard/google/guybrush/variants/baseboard/include/baseboard/gpio.h 3 files changed, 18 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved EricR Lai: Looks good to me, approved
diff --git a/src/mainboard/google/guybrush/chromeos.c b/src/mainboard/google/guybrush/chromeos.c index 776637a..d2ef97e 100644 --- a/src/mainboard/google/guybrush/chromeos.c +++ b/src/mainboard/google/guybrush/chromeos.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <baseboard/gpio.h> #include <boot/coreboot_tables.h> #include <gpio.h> #include <vendorcode/google/chromeos/chromeos.h> @@ -12,3 +13,13 @@ }; 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/guybrush/mainboard.c b/src/mainboard/google/guybrush/mainboard.c index f4466d1..3a45907 100644 --- a/src/mainboard/google/guybrush/mainboard.c +++ b/src/mainboard/google/guybrush/mainboard.c @@ -2,6 +2,7 @@
#include <baseboard/variants.h> #include <device/device.h> +#include <vendorcode/google/chromeos/chromeos.h>
static void mainboard_configure_gpios(void) { @@ -22,7 +23,9 @@
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/guybrush/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/gpio.h index b94afac..4c9fc61 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/guybrush/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__ */