From 9e00571b49e14d7b81f4601ff04597fb12dd5d61 Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Thu, 17 Feb 2022 14:48:55 -0700 Subject: [PATCH] mb/google/skyrim: Enable variants for Skyrim BUG=b:214414033 TEST=builds BRANCH=none Signed-off-by: Jon Murphy Change-Id: I034ab8a06842bee12060103b4a1bc4e3db69e42a Reviewed-on: https://review.coreboot.org/c/coreboot/+/62145 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Karthik Ramasubramanian --- src/mainboard/google/skyrim/Kconfig | 8 ++++++++ src/mainboard/google/skyrim/Makefile.inc | 2 ++ src/mainboard/google/skyrim/mainboard.c | 3 ++- .../google/skyrim/variants/skyrim/include/variant/ec.h | 3 +++ .../google/skyrim/variants/skyrim/overridetree.cb | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/mainboard/google/skyrim/variants/skyrim/include/variant/ec.h create mode 100644 src/mainboard/google/skyrim/variants/skyrim/overridetree.cb diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig index 99c7a4fe46..b8a4340c5b 100644 --- a/src/mainboard/google/skyrim/Kconfig +++ b/src/mainboard/google/skyrim/Kconfig @@ -33,6 +33,14 @@ config MAINBOARD_FAMILY config MAINBOARD_PART_NUMBER default "Skyrim" if BOARD_GOOGLE_SKYRIM +config OVERRIDE_DEVICETREE + string + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" + +config VARIANT_DIR + string + default "skyrim" if BOARD_GOOGLE_SKYRIM + config VBOOT select VBOOT_NO_BOARD_SUPPORT select VBOOT_SEPARATE_VERSTAGE diff --git a/src/mainboard/google/skyrim/Makefile.inc b/src/mainboard/google/skyrim/Makefile.inc index d076bc1ae0..9afae2d5c7 100644 --- a/src/mainboard/google/skyrim/Makefile.inc +++ b/src/mainboard/google/skyrim/Makefile.inc @@ -8,5 +8,7 @@ ramstage-y += mainboard.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c subdirs-y += variants/baseboard +subdirs-y += variants/$(VARIANT_DIR) CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include diff --git a/src/mainboard/google/skyrim/mainboard.c b/src/mainboard/google/skyrim/mainboard.c index 1ed5006ec4..5a021206d0 100644 --- a/src/mainboard/google/skyrim/mainboard.c +++ b/src/mainboard/google/skyrim/mainboard.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include +#include #include static void mainboard_configure_gpios(void) @@ -22,7 +23,7 @@ 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"); } struct chip_operations mainboard_ops = { diff --git a/src/mainboard/google/skyrim/variants/skyrim/include/variant/ec.h b/src/mainboard/google/skyrim/variants/skyrim/include/variant/ec.h new file mode 100644 index 0000000000..9e61a440cf --- /dev/null +++ b/src/mainboard/google/skyrim/variants/skyrim/include/variant/ec.h @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include diff --git a/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb new file mode 100644 index 0000000000..ed77b0b181 --- /dev/null +++ b/src/mainboard/google/skyrim/variants/skyrim/overridetree.cb @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +chip soc/amd/sabrina + device domain 0 on + end # domain +end # chip soc/amd/sabrina