diff options
author | Riku Viitanen <riku.viitanen@protonmail.com> | 2024-02-14 01:18:45 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-02-26 13:12:30 +0000 |
commit | 309534183f963c02a87b17493108751f8e3e8b49 (patch) | |
tree | 18baf87a9820a803c1bb4d6eed3c2e22965693c4 | |
parent | 99bf23c9e73c7492ee9d5c1f208bceedf3ff7cb5 (diff) |
mb/hp/snb_ivb_desktops: Make baseboard more generic
In preparation to merging all the other HP sandy/ivy desktops in here
as variants.
Move hda_verb.c, early_init.c, gma-mainboard.ads and data.vbt into
variant directories.
Kconfig:
Move options not common to the others under the variants instead.
devicetree:
Move XHCI to variant overridetrees (8200 gen has no USB 3)
board_info.txt:
Make it more generic. It seems to be copied from 8200 SFF and
inaccurate to Z220 anyway.
TEST: BUILD_TIMELESS=1 & Don't include .config in ROM image. CMT and
SFF ROMs are (SHA1) same as before.
Change-Id: Icce22efb8d353359781db3f03c67058d8fbe11b8
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
14 files changed, 102 insertions, 18 deletions
diff --git a/src/mainboard/hp/snb_ivb_desktops/Kconfig b/src/mainboard/hp/snb_ivb_desktops/Kconfig index 8791686b81..b79f748eef 100644 --- a/src/mainboard/hp/snb_ivb_desktops/Kconfig +++ b/src/mainboard/hp/snb_ivb_desktops/Kconfig @@ -2,8 +2,6 @@ config BOARD_HP_SNB_IVB_DESKTOPS_COMMON def_bool n - select BOARD_ROMSIZE_KB_16384 - select GFX_GMA_ANALOG_I2C_HDMI_B select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES select HAVE_CMOS_DEFAULT @@ -16,15 +14,20 @@ config BOARD_HP_SNB_IVB_DESKTOPS_COMMON select MEMORY_MAPPED_TPM select NORTHBRIDGE_INTEL_SANDYBRIDGE select SERIRQ_CONTINUOUS_MODE - select SOUTHBRIDGE_INTEL_BD82X6X select SUPERIO_NUVOTON_NPCD378 select USE_NATIVE_RAMINIT config BOARD_HP_Z220_CMT_WORKSTATION select BOARD_HP_SNB_IVB_DESKTOPS_COMMON + select BOARD_ROMSIZE_KB_16384 + select GFX_GMA_ANALOG_I2C_HDMI_B + select SOUTHBRIDGE_INTEL_BD82X6X config BOARD_HP_Z220_SFF_WORKSTATION select BOARD_HP_SNB_IVB_DESKTOPS_COMMON + select BOARD_ROMSIZE_KB_16384 + select GFX_GMA_ANALOG_I2C_HDMI_B + select SOUTHBRIDGE_INTEL_BD82X6X if BOARD_HP_SNB_IVB_DESKTOPS_COMMON @@ -54,7 +57,7 @@ config OVERRIDE_DEVICETREE default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" config INTEL_GMA_VBT_FILE - default "src/mainboard/\$(MAINBOARDDIR)/data.vbt" + default "src/mainboard/\$(MAINBOARDDIR)/variants/\$(CONFIG_VARIANT_DIR)/data.vbt" config DRAM_RESET_GATE_GPIO int diff --git a/src/mainboard/hp/snb_ivb_desktops/Makefile.mk b/src/mainboard/hp/snb_ivb_desktops/Makefile.mk index 69ef08873b..4b44049fe4 100644 --- a/src/mainboard/hp/snb_ivb_desktops/Makefile.mk +++ b/src/mainboard/hp/snb_ivb_desktops/Makefile.mk @@ -2,6 +2,7 @@ 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 +ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads +bootblock-y += variants/$(VARIANT_DIR)/early_init.c +romstage-y += variants/$(VARIANT_DIR)/early_init.c +ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c diff --git a/src/mainboard/hp/snb_ivb_desktops/board_info.txt b/src/mainboard/hp/snb_ivb_desktops/board_info.txt index 4d6f6f98b7..813c1c90f2 100644 --- a/src/mainboard/hp/snb_ivb_desktops/board_info.txt +++ b/src/mainboard/hp/snb_ivb_desktops/board_info.txt @@ -1,7 +1,5 @@ Category: desktop -Board URL: https://support.hp.com/de-de/product/HP-Compaq-8200-Elite-Small-Form-Factor-PC/5037931 -ROM IC: MX25L6405 -ROM package: SOIC-8 +ROM package: SOIC-8 or SOIC-16 ROM socketed: no Flashrom support: yes -Release year: 2013 +Release year: 2011-2012 diff --git a/src/mainboard/hp/snb_ivb_desktops/devicetree.cb b/src/mainboard/hp/snb_ivb_desktops/devicetree.cb index d1aa57627a..113b5551ef 100644 --- a/src/mainboard/hp/snb_ivb_desktops/devicetree.cb +++ b/src/mainboard/hp/snb_ivb_desktops/devicetree.cb @@ -9,8 +9,6 @@ chip northbridge/intel/sandybridge register "spd_addresses" = "{0x53, 0x52, 0x51, 0x50}" device domain 0 on - subsystemid 0x103c 0x1791 inherit - device ref host_bridge on end device ref peg10 on end device ref igd on end @@ -25,11 +23,7 @@ chip northbridge/intel/sandybridge register "sata_interface_speed_support" = "0x3" register "spi_lvscc" = "0x2005" register "spi_uvscc" = "0x2005" - register "superspeed_capable_ports" = "0x0000000f" - register "xhci_switchable_ports" = "0x0000000f" - register "xhci_overcurrent_mapping" = "0x0000000f" - device ref xhci on end device ref mei1 on end device ref mei2 off end device ref me_ide_r off end diff --git a/src/mainboard/hp/snb_ivb_desktops/data.vbt b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/data.vbt Binary files differindex c1fd6d1e13..c1fd6d1e13 100644 --- a/src/mainboard/hp/snb_ivb_desktops/data.vbt +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/data.vbt diff --git a/src/mainboard/hp/snb_ivb_desktops/early_init.c b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/early_init.c index 74a646238c..74a646238c 100644 --- a/src/mainboard/hp/snb_ivb_desktops/early_init.c +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/early_init.c diff --git a/src/mainboard/hp/snb_ivb_desktops/gma-mainboard.ads b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/gma-mainboard.ads index 686f7d44db..686f7d44db 100644 --- a/src/mainboard/hp/snb_ivb_desktops/gma-mainboard.ads +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/gma-mainboard.ads diff --git a/src/mainboard/hp/snb_ivb_desktops/hda_verb.c b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/hda_verb.c index 27ab4b5275..27ab4b5275 100644 --- a/src/mainboard/hp/snb_ivb_desktops/hda_verb.c +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/hda_verb.c diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/overridetree.cb b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/overridetree.cb index b82ff8abfb..1867d3a535 100644 --- a/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/overridetree.cb +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_cmt_workstation/overridetree.cb @@ -6,7 +6,11 @@ chip northbridge/intel/sandybridge device ref peg60 on end chip southbridge/intel/bd82x6x register "sata_port_map" = "0x3f" + register "superspeed_capable_ports" = "0x0000000f" + register "xhci_switchable_ports" = "0x0000000f" + register "xhci_overcurrent_mapping" = "0x0000000f" + device ref xhci on end device ref pcie_rp2 on end device ref pcie_rp3 on end device ref pcie_rp4 on end diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/data.vbt b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/data.vbt Binary files differnew file mode 100644 index 0000000000..c1fd6d1e13 --- /dev/null +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/data.vbt diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/early_init.c b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/early_init.c new file mode 100644 index 0000000000..74a646238c --- /dev/null +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/early_init.c @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <bootblock_common.h> +#include <superio/nuvoton/npcd378/npcd378.h> +#include <superio/nuvoton/common/nuvoton.h> +#include <southbridge/intel/bd82x6x/pch.h> + +#define SERIAL_DEV PNP_DEV(0x2e, NPCD378_SP2) + +const struct southbridge_usb_port mainboard_usb_ports[] = { + { 1, 0, 0 }, + { 1, 0, 0 }, + { 1, 0, 0 }, + { 1, 0, 0 }, + { 1, 0, 3 }, + { 1, 0, 3 }, + { 1, 0, 3 }, + { 1, 0, 3 }, + { 1, 1, 5 }, + { 1, 0, 5 }, + { 1, 0, 5 }, + { 1, 0, 5 }, + { 1, 0, 7 }, + { 1, 0, 7 }, +}; + +void bootblock_mainboard_early_init(void) +{ + if (CONFIG(CONSOLE_SERIAL)) + nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); +} diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/gma-mainboard.ads b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/gma-mainboard.ads new file mode 100644 index 0000000000..686f7d44db --- /dev/null +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/gma-mainboard.ads @@ -0,0 +1,17 @@ +-- SPDX-License-Identifier: GPL-2.0-or-later + +with HW.GFX.GMA; +with HW.GFX.GMA.Display_Probing; + +use HW.GFX.GMA; +use HW.GFX.GMA.Display_Probing; + +private package GMA.Mainboard is + + ports : constant Port_List := + (DP2, + HDMI2, + Analog, + others => Disabled); + +end GMA.Mainboard; diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/hda_verb.c b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/hda_verb.c new file mode 100644 index 0000000000..27ab4b5275 --- /dev/null +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/hda_verb.c @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/azalia_device.h> + +const u32 cim_verb_data[] = { + 0x10ec0221, /* Codec Vendor / Device ID: Realtek */ + 0x103c1791, /* Subsystem ID */ + 11, /* Number of 4 dword sets */ + AZALIA_SUBVENDOR(0, 0x103c1791), + AZALIA_PIN_CFG(0, 0x12, 0x403c0000), + AZALIA_PIN_CFG(0, 0x14, 0x01014020), + AZALIA_PIN_CFG(0, 0x17, 0x90170110), + AZALIA_PIN_CFG(0, 0x18, 0x411111f0), + AZALIA_PIN_CFG(0, 0x19, 0x411111f0), + AZALIA_PIN_CFG(0, 0x1a, 0x02a11030), + AZALIA_PIN_CFG(0, 0x1b, 0x0181303f), + AZALIA_PIN_CFG(0, 0x1d, 0x40400001), + AZALIA_PIN_CFG(0, 0x1e, 0x411111f0), + AZALIA_PIN_CFG(0, 0x21, 0x0221102f), + + 0x80862806, /* Codec Vendor / Device ID: Intel */ + 0x103c1791, /* Subsystem ID */ + 4, /* Number of 4 dword sets */ + AZALIA_SUBVENDOR(3, 0x103c1791), + AZALIA_PIN_CFG(3, 0x05, 0x58560010), + AZALIA_PIN_CFG(3, 0x06, 0x18560020), + AZALIA_PIN_CFG(3, 0x07, 0x58560030), +}; + +const u32 pc_beep_verbs[0] = {}; + +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/overridetree.cb b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/overridetree.cb index 8b827f872c..560b407eed 100644 --- a/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/overridetree.cb +++ b/src/mainboard/hp/snb_ivb_desktops/variants/z220_sff_workstation/overridetree.cb @@ -6,7 +6,11 @@ chip northbridge/intel/sandybridge chip southbridge/intel/bd82x6x register "sata_port_map" = "0xf" - device ref pcie_rp5 on end # dummy setting + register "superspeed_capable_ports" = "0x0000000f" + register "xhci_switchable_ports" = "0x0000000f" + register "xhci_overcurrent_mapping" = "0x0000000f" + + device ref xhci on end end end end |