From 3605dac10b88baa22c7a74145a72474aa45a38c4 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Tue, 15 Mar 2022 19:29:23 +1100 Subject: [PATCH] mb/hp/z220_series: Convert z220_sff_workstation into variant No functional change, just refactoring to make room for CMT variant. Built with BUILD_TIMELESS=1 and no config included before and after. $ diff master.rom build/coreboot.rom $ TESTED: boots to SeaBIOS on HP Z220 SFF Flashed bios region internally, mainboard also has FDO (flash descriptor override) jumper that allows r/w to whole flash. Change-Id: I6aaac75216b2d7c8bb48801454ce616ace3b1422 Signed-off-by: Damien Zammit Reviewed-on: https://review.coreboot.org/c/coreboot/+/62808 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- .../Kconfig | 24 +++++++++++++----- .../Kconfig.name | 0 .../Makefile.inc | 4 +-- .../acpi/ec.asl | 0 .../acpi/platform.asl | 0 .../acpi/superio.asl | 0 .../board_info.txt | 0 .../cmos.default | 0 .../cmos.layout | 0 .../data.vbt | Bin .../devicetree.cb | 1 - .../dsdt.asl | 0 .../early_init.c | 0 .../gma-mainboard.ads | 0 .../hda_verb.c | 0 .../mainboard.c | 0 .../variants}/z220_sff_workstation/gpio.c | 0 .../z220_sff_workstation/overridetree.cb | 12 +++++++++ 18 files changed, 32 insertions(+), 9 deletions(-) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/Kconfig (65%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/Kconfig.name (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/Makefile.inc (56%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/acpi/ec.asl (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/acpi/platform.asl (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/acpi/superio.asl (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/board_info.txt (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/cmos.default (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/cmos.layout (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/data.vbt (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/devicetree.cb (99%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/dsdt.asl (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/early_init.c (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/gma-mainboard.ads (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/hda_verb.c (100%) rename src/mainboard/hp/{z220_sff_workstation => z220_series}/mainboard.c (100%) rename src/mainboard/hp/{ => z220_series/variants}/z220_sff_workstation/gpio.c (100%) create mode 100644 src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb diff --git a/src/mainboard/hp/z220_sff_workstation/Kconfig b/src/mainboard/hp/z220_series/Kconfig similarity index 65% rename from src/mainboard/hp/z220_sff_workstation/Kconfig rename to src/mainboard/hp/z220_series/Kconfig index d7066653dd..ee5b5b4f46 100644 --- a/src/mainboard/hp/z220_sff_workstation/Kconfig +++ b/src/mainboard/hp/z220_series/Kconfig @@ -1,7 +1,5 @@ -if BOARD_HP_Z220_SFF_WORKSTATION - -config BOARD_SPECIFIC_OPTIONS - def_bool y +config BOARD_HP_Z220_SERIES_COMMON + def_bool n select BOARD_ROMSIZE_KB_16384 select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES @@ -20,6 +18,11 @@ config BOARD_SPECIFIC_OPTIONS select GFX_GMA_ANALOG_I2C_HDMI_B select MAINBOARD_USES_IFD_GBE_REGION +config BOARD_HP_Z220_SFF_WORKSTATION + select BOARD_HP_Z220_SERIES_COMMON + +if BOARD_HP_Z220_SERIES_COMMON + config VBOOT select VBOOT_VBNV_CMOS select VBOOT_NO_BOARD_SUPPORT @@ -36,10 +39,19 @@ config CBFS_SIZE default 0x570000 config MAINBOARD_DIR - default "hp/z220_sff_workstation" + default "hp/z220_series" + +config VARIANT_DIR + default "z220_sff_workstation" if BOARD_HP_Z220_SFF_WORKSTATION config MAINBOARD_PART_NUMBER - default "HP Z220 SFF Workstation" + default "HP Z220 SFF Workstation" if BOARD_HP_Z220_SFF_WORKSTATION + +config OVERRIDE_DEVICETREE + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" + +config INTEL_GMA_VBT_FILE + default "src/mainboard/\$(MAINBOARDDIR)/data.vbt" config DRAM_RESET_GATE_GPIO int diff --git a/src/mainboard/hp/z220_sff_workstation/Kconfig.name b/src/mainboard/hp/z220_series/Kconfig.name similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/Kconfig.name rename to src/mainboard/hp/z220_series/Kconfig.name diff --git a/src/mainboard/hp/z220_sff_workstation/Makefile.inc b/src/mainboard/hp/z220_series/Makefile.inc similarity index 56% rename from src/mainboard/hp/z220_sff_workstation/Makefile.inc rename to src/mainboard/hp/z220_series/Makefile.inc index f0b34f9840..00426a88b9 100644 --- a/src/mainboard/hp/z220_sff_workstation/Makefile.inc +++ b/src/mainboard/hp/z220_series/Makefile.inc @@ -1,5 +1,5 @@ -bootblock-y += gpio.c -romstage-y += gpio.c +bootblock-y += variants/$(VARIANT_DIR)/gpio.c +romstage-y += variants/$(VARIANT_DIR)/gpio.c ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads bootblock-y += early_init.c romstage-y += early_init.c diff --git a/src/mainboard/hp/z220_sff_workstation/acpi/ec.asl b/src/mainboard/hp/z220_series/acpi/ec.asl similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/acpi/ec.asl rename to src/mainboard/hp/z220_series/acpi/ec.asl diff --git a/src/mainboard/hp/z220_sff_workstation/acpi/platform.asl b/src/mainboard/hp/z220_series/acpi/platform.asl similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/acpi/platform.asl rename to src/mainboard/hp/z220_series/acpi/platform.asl diff --git a/src/mainboard/hp/z220_sff_workstation/acpi/superio.asl b/src/mainboard/hp/z220_series/acpi/superio.asl similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/acpi/superio.asl rename to src/mainboard/hp/z220_series/acpi/superio.asl diff --git a/src/mainboard/hp/z220_sff_workstation/board_info.txt b/src/mainboard/hp/z220_series/board_info.txt similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/board_info.txt rename to src/mainboard/hp/z220_series/board_info.txt diff --git a/src/mainboard/hp/z220_sff_workstation/cmos.default b/src/mainboard/hp/z220_series/cmos.default similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/cmos.default rename to src/mainboard/hp/z220_series/cmos.default diff --git a/src/mainboard/hp/z220_sff_workstation/cmos.layout b/src/mainboard/hp/z220_series/cmos.layout similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/cmos.layout rename to src/mainboard/hp/z220_series/cmos.layout diff --git a/src/mainboard/hp/z220_sff_workstation/data.vbt b/src/mainboard/hp/z220_series/data.vbt similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/data.vbt rename to src/mainboard/hp/z220_series/data.vbt diff --git a/src/mainboard/hp/z220_sff_workstation/devicetree.cb b/src/mainboard/hp/z220_series/devicetree.cb similarity index 99% rename from src/mainboard/hp/z220_sff_workstation/devicetree.cb rename to src/mainboard/hp/z220_series/devicetree.cb index 0de9cfabef..4611bec140 100644 --- a/src/mainboard/hp/z220_sff_workstation/devicetree.cb +++ b/src/mainboard/hp/z220_series/devicetree.cb @@ -30,7 +30,6 @@ chip northbridge/intel/sandybridge register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }" register "pcie_port_coalesce" = "true" register "sata_interface_speed_support" = "0x3" - register "sata_port_map" = "0xf" register "spi_lvscc" = "0x2005" register "spi_uvscc" = "0x2005" diff --git a/src/mainboard/hp/z220_sff_workstation/dsdt.asl b/src/mainboard/hp/z220_series/dsdt.asl similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/dsdt.asl rename to src/mainboard/hp/z220_series/dsdt.asl diff --git a/src/mainboard/hp/z220_sff_workstation/early_init.c b/src/mainboard/hp/z220_series/early_init.c similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/early_init.c rename to src/mainboard/hp/z220_series/early_init.c diff --git a/src/mainboard/hp/z220_sff_workstation/gma-mainboard.ads b/src/mainboard/hp/z220_series/gma-mainboard.ads similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/gma-mainboard.ads rename to src/mainboard/hp/z220_series/gma-mainboard.ads diff --git a/src/mainboard/hp/z220_sff_workstation/hda_verb.c b/src/mainboard/hp/z220_series/hda_verb.c similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/hda_verb.c rename to src/mainboard/hp/z220_series/hda_verb.c diff --git a/src/mainboard/hp/z220_sff_workstation/mainboard.c b/src/mainboard/hp/z220_series/mainboard.c similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/mainboard.c rename to src/mainboard/hp/z220_series/mainboard.c diff --git a/src/mainboard/hp/z220_sff_workstation/gpio.c b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/gpio.c similarity index 100% rename from src/mainboard/hp/z220_sff_workstation/gpio.c rename to src/mainboard/hp/z220_series/variants/z220_sff_workstation/gpio.c diff --git a/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb new file mode 100644 index 0000000000..c31bf336d1 --- /dev/null +++ b/src/mainboard/hp/z220_series/variants/z220_sff_workstation/overridetree.cb @@ -0,0 +1,12 @@ +## SPDX-License-Identifier: GPL-2.0-only + +chip northbridge/intel/sandybridge + device domain 0 on + subsystemid 0x103c 0x1791 inherit + + chip southbridge/intel/bd82x6x + register "sata_port_map" = "0xf" + device pci 1c.4 on end # dummy setting + end + end +end