diff --git a/src/mainboard/dell/optiplex_3050/Makefile.mk b/src/mainboard/dell/optiplex_3050/Makefile.mk deleted file mode 100644 index 0bd72fe691..0000000000 --- a/src/mainboard/dell/optiplex_3050/Makefile.mk +++ /dev/null @@ -1,12 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -bootblock-y += bootblock.c -bootblock-y += sch5555_ec.c - -romstage-y += romstage.c - -ramstage-y += ramstage.c -ramstage-y += sch5555_ec.c -ramstage-y += hda_verb.c - -ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads diff --git a/src/mainboard/dell/optiplex_3050/Kconfig b/src/mainboard/dell/sklkbl_desktops/Kconfig similarity index 54% rename from src/mainboard/dell/optiplex_3050/Kconfig rename to src/mainboard/dell/sklkbl_desktops/Kconfig index 17cd2bee67..6d57c1ed10 100644 --- a/src/mainboard/dell/optiplex_3050/Kconfig +++ b/src/mainboard/dell/sklkbl_desktops/Kconfig @@ -1,9 +1,7 @@ ## SPDX-License-Identifier: GPL-2.0-only -if BOARD_DELL_OPTIPLEX_3050 - -config BOARD_SPECIFIC_OPTIONS - def_bool y +config BOARD_DELL_SKLKBL_DESKTOPS_COMMON + bool select AZALIA_USE_LEGACY_VERB_TABLE select BOARD_ROMSIZE_KB_16384 select HAVE_ACPI_RESUME @@ -20,19 +18,31 @@ config BOARD_SPECIFIC_OPTIONS select SOC_INTEL_KABYLAKE select SUPERIO_SMSC_SCH555x +config BOARD_DELL_OPTIPLEX_3050 + bool + select BOARD_DELL_SKLKBL_DESKTOPS_COMMON + +if BOARD_DELL_SKLKBL_DESKTOPS_COMMON + +config MAINBOARD_DIR + default "dell/sklkbl_desktops" + +config MAINBOARD_PART_NUMBER + default "OptiPlex 3050 Micro" if BOARD_DELL_OPTIPLEX_3050 + +config VARIANT_DIR + default "optiplex_3050" if BOARD_DELL_OPTIPLEX_3050 + +config OVERRIDE_DEVICETREE + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" + +config INTEL_GMA_VBT_FILE + default "src/mainboard/\$(MAINBOARDDIR)/variants/\$(CONFIG_VARIANT_DIR)/data.vbt" + config CBFS_SIZE default 0x900000 -config MAINBOARD_DIR - default "dell/optiplex_3050" - -config MAINBOARD_PART_NUMBER - default "OptiPlex 3050 Micro" - -config INTEL_GMA_VBT_FILE - default "src/mainboard/\$(MAINBOARDDIR)/data.vbt" - config DIMM_SPD_SIZE - default 512 # DDR4 + default 512 if BOARD_DELL_OPTIPLEX_3050 # DDR4 endif diff --git a/src/mainboard/dell/optiplex_3050/Kconfig.name b/src/mainboard/dell/sklkbl_desktops/Kconfig.name similarity index 100% rename from src/mainboard/dell/optiplex_3050/Kconfig.name rename to src/mainboard/dell/sklkbl_desktops/Kconfig.name diff --git a/src/mainboard/dell/sklkbl_desktops/Makefile.mk b/src/mainboard/dell/sklkbl_desktops/Makefile.mk new file mode 100644 index 0000000000..305aa2a93f --- /dev/null +++ b/src/mainboard/dell/sklkbl_desktops/Makefile.mk @@ -0,0 +1,15 @@ +## SPDX-License-Identifier: GPL-2.0-only + +bootblock-y += bootblock.c +bootblock-y += variants/$(VARIANT_DIR)/early_gpio.c +bootblock-y += sch5555_ec.c + +romstage-y += variants/$(VARIANT_DIR)/romstage.c + +ramstage-y += ramstage.c +ramstage-y += variants/$(VARIANT_DIR)/gpio.c +ramstage-y += sch5555_ec.c +ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c +ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads + +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include diff --git a/src/mainboard/dell/optiplex_3050/acpi/ec.asl b/src/mainboard/dell/sklkbl_desktops/acpi/ec.asl similarity index 100% rename from src/mainboard/dell/optiplex_3050/acpi/ec.asl rename to src/mainboard/dell/sklkbl_desktops/acpi/ec.asl diff --git a/src/mainboard/dell/sklkbl_desktops/board_info.txt b/src/mainboard/dell/sklkbl_desktops/board_info.txt new file mode 100644 index 0000000000..7ed9d984cd --- /dev/null +++ b/src/mainboard/dell/sklkbl_desktops/board_info.txt @@ -0,0 +1,5 @@ +Category: desktop +ROM package: SOIC-8 +ROM protocol: SPI +ROM socketed: n +Flashrom support: y diff --git a/src/mainboard/dell/optiplex_3050/bootblock.c b/src/mainboard/dell/sklkbl_desktops/bootblock.c similarity index 97% rename from src/mainboard/dell/optiplex_3050/bootblock.c rename to src/mainboard/dell/sklkbl_desktops/bootblock.c index 10689c42a1..fc583ea5a1 100644 --- a/src/mainboard/dell/optiplex_3050/bootblock.c +++ b/src/mainboard/dell/sklkbl_desktops/bootblock.c @@ -4,7 +4,7 @@ #include #include #include -#include "include/early_gpio.h" +#include "../../../include/variant/gpio.h" #include "sch5555_ec.h" struct ec_init_entry { @@ -88,7 +88,7 @@ static void bootblock_ec_init(void) void bootblock_mainboard_early_init(void) { - gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); + variant_configure_early_gpios(); // Super I/O early init will map Runtime and EMI registers sch555x_early_init(GLOBAL_DEV); diff --git a/src/mainboard/dell/optiplex_3050/cmos.default b/src/mainboard/dell/sklkbl_desktops/cmos.default similarity index 100% rename from src/mainboard/dell/optiplex_3050/cmos.default rename to src/mainboard/dell/sklkbl_desktops/cmos.default diff --git a/src/mainboard/dell/optiplex_3050/cmos.layout b/src/mainboard/dell/sklkbl_desktops/cmos.layout similarity index 100% rename from src/mainboard/dell/optiplex_3050/cmos.layout rename to src/mainboard/dell/sklkbl_desktops/cmos.layout diff --git a/src/mainboard/dell/sklkbl_desktops/devicetree.cb b/src/mainboard/dell/sklkbl_desktops/devicetree.cb new file mode 100644 index 0000000000..f66091f679 --- /dev/null +++ b/src/mainboard/dell/sklkbl_desktops/devicetree.cb @@ -0,0 +1,75 @@ +## SPDX-License-Identifier: GPL-2.0-only + +chip soc/intel/skylake + register "deep_sx_config" = "DSX_EN_WAKE_PIN | DSX_EN_LAN_WAKE_PIN" + + # Enable Enhanced Intel SpeedStep + register "eist_enable" = "1" + + device domain 0 on + + device ref peg0 off end + + device ref igpu on + register "PrimaryDisplay" = "Display_iGFX" + end + + device ref south_xhci on end + + # ME interface is 'off' to avoid HECI reset delay due to HAP + device ref heci1 off end + + device ref sata on end + + device ref pcie_rp5 off end + + device ref pcie_rp8 off end + + device ref pcie_rp9 off end + + device ref pcie_rp17 off end + + device ref pcie_rp21 off end + + # UART0 is exposed on test points on the bottom of the board + device ref uart0 on + register "SerialIoDevMode[PchSerialIoIndexUart0]" = "PchSerialIoPci" + end + + device ref lpc_espi on + register "serirq_mode" = "SERIRQ_CONTINUOUS" + + # I/O decode for EMI/Runtime registers + register "gen1_dec" = "0x007c0a01" + + # SCH5553 + chip superio/smsc/sch555x + device pnp 2e.0 on # EMI + io 0x60 = 0xa00 + end + device pnp 2e.1 off end # 8042 + device pnp 2e.7 on # UART1 + io 0x60 = 0x3f8 + irq 0x0f = 2 + irq 0x70 = 4 + end + device pnp 2e.8 off end # UART2 + device pnp 2e.c on # LPC interface + io 0x60 = 0x2e + end + device pnp 2e.a on # Runtime registers + io 0x60 = 0xa40 + end + device pnp 2e.b off end # Floppy Controller + device pnp 2e.11 off end # Parallel Port + end + + end + + device ref hda on end + + device ref smbus on end + + device ref gbe off end + end +end diff --git a/src/mainboard/dell/optiplex_3050/dsdt.asl b/src/mainboard/dell/sklkbl_desktops/dsdt.asl similarity index 100% rename from src/mainboard/dell/optiplex_3050/dsdt.asl rename to src/mainboard/dell/sklkbl_desktops/dsdt.asl diff --git a/src/mainboard/dell/sklkbl_desktops/include/variant/gpio.h b/src/mainboard/dell/sklkbl_desktops/include/variant/gpio.h new file mode 100644 index 0000000000..95d576294f --- /dev/null +++ b/src/mainboard/dell/sklkbl_desktops/include/variant/gpio.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef VARIANT_GPIO_H +#define VARIANT_GPIO_H + +void variant_configure_early_gpios(void); +void variant_configure_gpios(void); + +#endif diff --git a/src/mainboard/dell/optiplex_3050/ramstage.c b/src/mainboard/dell/sklkbl_desktops/ramstage.c similarity index 99% rename from src/mainboard/dell/optiplex_3050/ramstage.c rename to src/mainboard/dell/sklkbl_desktops/ramstage.c index 94778f60c9..b90e71394c 100644 --- a/src/mainboard/dell/optiplex_3050/ramstage.c +++ b/src/mainboard/dell/sklkbl_desktops/ramstage.c @@ -5,12 +5,12 @@ #include #include #include -#include "include/gpio.h" +#include "../../../include/variant/gpio.h" #include "sch5555_ec.h" void mainboard_silicon_init_params(FSP_SIL_UPD *params) { - gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); + variant_configure_gpios(); } #define FORM_FACTOR_MICRO 0 diff --git a/src/mainboard/dell/optiplex_3050/sch5555_ec.c b/src/mainboard/dell/sklkbl_desktops/sch5555_ec.c similarity index 100% rename from src/mainboard/dell/optiplex_3050/sch5555_ec.c rename to src/mainboard/dell/sklkbl_desktops/sch5555_ec.c diff --git a/src/mainboard/dell/optiplex_3050/sch5555_ec.h b/src/mainboard/dell/sklkbl_desktops/sch5555_ec.h similarity index 100% rename from src/mainboard/dell/optiplex_3050/sch5555_ec.h rename to src/mainboard/dell/sklkbl_desktops/sch5555_ec.h diff --git a/src/mainboard/dell/optiplex_3050/board_info.txt b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/board_info.txt similarity index 100% rename from src/mainboard/dell/optiplex_3050/board_info.txt rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/board_info.txt diff --git a/src/mainboard/dell/optiplex_3050/data.vbt b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/data.vbt similarity index 100% rename from src/mainboard/dell/optiplex_3050/data.vbt rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/data.vbt diff --git a/src/mainboard/dell/optiplex_3050/include/early_gpio.h b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/early_gpio.c similarity index 56% rename from src/mainboard/dell/optiplex_3050/include/early_gpio.h rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/early_gpio.c index 17a16371e3..9bc7013f18 100644 --- a/src/mainboard/dell/optiplex_3050/include/early_gpio.h +++ b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/early_gpio.c @@ -1,11 +1,22 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +/* #ifndef __OPTIPLEX_3050_EARLY_GPIO_H__ #define __OPTIPLEX_3050_EARLY_GPIO_H__ +*/ + +#include +#include +#include "../../../include/variant/gpio.h" static const struct pad_config early_gpio_table[] = { PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1), /* UART0_RXD */ PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1), /* UART0_TXD */ }; -#endif +// #endif + +void variant_configure_early_gpios(void) +{ + gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); +} diff --git a/src/mainboard/dell/optiplex_3050/gma-mainboard.ads b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/gma-mainboard.ads similarity index 100% rename from src/mainboard/dell/optiplex_3050/gma-mainboard.ads rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/gma-mainboard.ads diff --git a/src/mainboard/dell/optiplex_3050/include/gpio.h b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/gpio.c similarity index 97% rename from src/mainboard/dell/optiplex_3050/include/gpio.h rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/gpio.c index 83293c32a9..be066941aa 100644 --- a/src/mainboard/dell/optiplex_3050/include/gpio.h +++ b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/gpio.c @@ -1,7 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __OPTIPLEX_3050_GPIO_H__ -#define __OPTIPLEX_3050_GPIO_H__ +#include +#include +#include "../../../include/variant/gpio.h" + +/* #ifndef __OPTIPLEX_3050_GPIO_H__ #define __OPTIPLEX_3050_GPIO_H__ */ static const struct pad_config gpio_table[] = { @@ -238,4 +241,9 @@ static const struct pad_config gpio_table[] = { PAD_CFG_NF(GPP_I10, DN_20K, PLTRST, NF1), /* DDPD_CTRLDATA */ }; -#endif +void variant_configure_gpios(void) +{ + gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); +} + +// #endif diff --git a/src/mainboard/dell/optiplex_3050/hda_verb.c b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/hda_verb.c similarity index 100% rename from src/mainboard/dell/optiplex_3050/hda_verb.c rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/hda_verb.c diff --git a/src/mainboard/dell/optiplex_3050/acpi/superio.asl b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/include/acpi/superio.asl similarity index 100% rename from src/mainboard/dell/optiplex_3050/acpi/superio.asl rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/include/acpi/superio.asl diff --git a/src/mainboard/dell/optiplex_3050/devicetree.cb b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/overridetree.cb similarity index 53% rename from src/mainboard/dell/optiplex_3050/devicetree.cb rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/overridetree.cb index dda5583a16..c5f1749b2c 100644 --- a/src/mainboard/dell/optiplex_3050/devicetree.cb +++ b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/overridetree.cb @@ -1,15 +1,8 @@ ## SPDX-License-Identifier: GPL-2.0-only chip soc/intel/skylake - register "deep_sx_config" = "DSX_EN_WAKE_PIN | DSX_EN_LAN_WAKE_PIN" - - # Enable Enhanced Intel SpeedStep - register "eist_enable" = "1" device domain 0 on - device ref igpu on - register "PrimaryDisplay" = "Display_iGFX" - end device ref south_xhci on register "usb2_ports" = "{ @@ -29,22 +22,9 @@ chip soc/intel/skylake }" end - # ME interface is 'off' to avoid HECI reset delay due to HAP - device ref heci1 off end - device ref sata on - register "SataSalpSupport" = "1" - register "SataPortsEnable[0]" = "1" - end - - # M.2 SSD - device ref pcie_rp21 on - register "PcieRpClkReqSupport[20]" = "true" - register "PcieRpClkReqNumber[20]" = "3" - register "PcieRpAdvancedErrorReporting[20]" = "1" - register "PcieRpLtrEnable[20]" = "true" - register "PcieRpClkSrcNumber[20]" = "3" - register "PcieRpHotPlug[20]" = "1" + register "SataSalpSupport" = "1" + register "SataPortsEnable[0]" = "1" end # Realtek LAN @@ -59,42 +39,15 @@ chip soc/intel/skylake register "PcieRpHotPlug[7]" = "1" end - # UART0 is exposed on test points on the bottom of the board - device ref uart0 on - register "SerialIoDevMode[PchSerialIoIndexUart0]" = "PchSerialIoPci" + # M.2 SSD + device ref pcie_rp21 on + register "PcieRpClkReqSupport[20]" = "true" + register "PcieRpClkReqNumber[20]" = "3" + register "PcieRpAdvancedErrorReporting[20]" = "1" + register "PcieRpLtrEnable[20]" = "true" + register "PcieRpClkSrcNumber[20]" = "3" + register "PcieRpHotPlug[20]" = "1" end - device ref lpc_espi on - register "serirq_mode" = "SERIRQ_CONTINUOUS" - - # I/O decode for EMI/Runtime registers - register "gen1_dec" = "0x007c0a01" - - # SCH5553 - chip superio/smsc/sch555x - device pnp 2e.0 on # EMI - io 0x60 = 0xa00 - end - device pnp 2e.1 off end # 8042 - device pnp 2e.7 on # UART1 - io 0x60 = 0x3f8 - irq 0x0f = 2 - irq 0x70 = 4 - end - device pnp 2e.8 off end # UART2 - device pnp 2e.c on # LPC interface - io 0x60 = 0x2e - end - device pnp 2e.a on # Runtime registers - io 0x60 = 0xa40 - end - device pnp 2e.b off end # Floppy Controller - device pnp 2e.11 off end # Parallel Port - end - end - - device ref hda on end - - device ref smbus on end end end diff --git a/src/mainboard/dell/optiplex_3050/romstage.c b/src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/romstage.c similarity index 100% rename from src/mainboard/dell/optiplex_3050/romstage.c rename to src/mainboard/dell/sklkbl_desktops/variants/optiplex_3050/romstage.c