summaryrefslogtreecommitdiff
path: root/src/mainboard/siemens
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2021-09-30 13:57:48 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-01 14:07:41 +0000
commit264ace99e8f6b380664e1f307c36f90979b9d0ac (patch)
treeba5575c16baaf7a7160a1bbe8748a6fbe0cd541f /src/mainboard/siemens
parent0bebcdb16576780de8679cbe24f6dee8d2e0121f (diff)
mb/siemens/mc_ehl: Add a new variant mc_ehl2
Add a new variant of the mc_ehl board called mc_ehl2. This patch just copies the files and renames things where needed. Following patches will adapt the needed features for this new variant. Change-Id: I3ec3c091017fd66fe6a09216203cdc7c9e833846 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58051 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Diffstat (limited to 'src/mainboard/siemens')
-rw-r--r--src/mainboard/siemens/mc_ehl/Kconfig2
-rw-r--r--src/mainboard/siemens/mc_ehl/Kconfig.name4
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Kconfig11
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Makefile.inc9
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb262
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/gpio.c178
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/memory.c59
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/empty.spd.hex32
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/mc_ehl2.spd.hex32
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/spd.h16
10 files changed, 605 insertions, 0 deletions
diff --git a/src/mainboard/siemens/mc_ehl/Kconfig b/src/mainboard/siemens/mc_ehl/Kconfig
index a1a5666e23..8e5d95f490 100644
--- a/src/mainboard/siemens/mc_ehl/Kconfig
+++ b/src/mainboard/siemens/mc_ehl/Kconfig
@@ -22,9 +22,11 @@ config MAINBOARD_DIR
config VARIANT_DIR
default "mc_ehl1" if BOARD_SIEMENS_MC_EHL1
+ default "mc_ehl2" if BOARD_SIEMENS_MC_EHL2
config MAINBOARD_PART_NUMBER
default "MC EHL1" if BOARD_SIEMENS_MC_EHL1
+ default "MC EHL2" if BOARD_SIEMENS_MC_EHL2
config DEVICETREE
default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb"
diff --git a/src/mainboard/siemens/mc_ehl/Kconfig.name b/src/mainboard/siemens/mc_ehl/Kconfig.name
index e38e1e4046..9cdab8a952 100644
--- a/src/mainboard/siemens/mc_ehl/Kconfig.name
+++ b/src/mainboard/siemens/mc_ehl/Kconfig.name
@@ -3,3 +3,7 @@ comment "MC EHLx"
config BOARD_SIEMENS_MC_EHL1
bool "-> MC EHL1"
select BOARD_SIEMENS_BASEBOARD_MC_EHL
+
+config BOARD_SIEMENS_MC_EHL2
+ bool "-> MC EHL2"
+ select BOARD_SIEMENS_BASEBOARD_MC_EHL
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Kconfig b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Kconfig
new file mode 100644
index 0000000000..645379f907
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Kconfig
@@ -0,0 +1,11 @@
+if BOARD_SIEMENS_MC_EHL2
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select DRIVER_INTEL_I210
+ select INTEL_LPSS_UART_FOR_CONSOLE
+
+config FMDFILE
+ default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/mc_ehl.fmd"
+
+endif # BOARD_SIEMENS_MC_EHL2
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Makefile.inc b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Makefile.inc
new file mode 100644
index 0000000000..9cb0f1d4d4
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/Makefile.inc
@@ -0,0 +1,9 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+bootblock-y += gpio.c
+romstage-y += memory.c
+ramstage-y += gpio.c
+
+SPD_SOURCES = mc_ehl2 # 0b000
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), \
+ src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
new file mode 100644
index 0000000000..be98a15700
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
@@ -0,0 +1,262 @@
+chip soc/intel/elkhartlake
+
+ device cpu_cluster 0 on
+ device lapic 0 on end
+ end
+
+ # GPE configuration
+ # Note that GPE events called out in ASL code rely on this
+ # route. i.e. If this route changes then the affected GPE
+ # offset bits also need to be changed.
+ register "pmc_gpe0_dw0" = "GPP_B"
+ register "pmc_gpe0_dw1" = "GPP_F"
+ register "pmc_gpe0_dw2" = "GPP_E"
+
+ # Enable heci1 communication
+ register "HeciEnabled" = "1"
+
+ # FSP configuration
+ register "SaGv" = "SaGv_Disabled"
+ register "SmbusEnable" = "1"
+ register "Heci2Enable" = "1"
+
+ # Enable IBECC for the complete memory
+ register "ibecc" = "{
+ .enable = 1,
+ .mode = IBECC_ALL
+ }"
+
+ # USB related UPDs
+ register "usb2_ports[0]" = "USB2_PORT_SHORT(OC_SKIP)" # USB3/2 Type A port 1
+ register "usb2_ports[1]" = "USB2_PORT_SHORT(OC_SKIP)" # USB3/2 Type A Port 2
+ register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # Onboard USB
+ register "usb2_ports[3]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[4]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[5]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[6]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[7]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[8]" = "USB2_PORT_EMPTY" # Port is unused
+ register "usb2_ports[9]" = "USB2_PORT_EMPTY" # Port is unused
+
+ register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB3/2 Type A port1
+ register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB3/2 Type A port2
+ register "usb3_ports[2]" = "USB3_PORT_EMPTY" # Port is not used
+ register "usb3_ports[3]" = "USB3_PORT_EMPTY" # Port is not used
+
+ # Skip the CPU repalcement check
+ register "SkipCpuReplacementCheck" = "1"
+
+ # PCIe root ports related UPDs
+ register "PcieRpEnable[0]" = "1"
+ register "PcieRpEnable[1]" = "1"
+ register "PcieRpEnable[2]" = "1"
+ register "PcieRpEnable[3]" = "1"
+ register "PcieRpEnable[4]" = "1"
+ register "PcieRpEnable[5]" = "1"
+ register "PcieRpEnable[6]" = "1"
+
+ register "PcieClkSrcUsage[0]" = "0x00"
+ register "PcieClkSrcUsage[1]" = "0x01"
+ register "PcieClkSrcUsage[2]" = "0x02"
+ register "PcieClkSrcUsage[3]" = "0xFF"
+ register "PcieClkSrcUsage[4]" = "0xFF"
+ register "PcieClkSrcUsage[5]" = "0xFF"
+
+ register "PcieClkSrcClkReq[0]" = "0xFF"
+ register "PcieClkSrcClkReq[1]" = "0xFF"
+ register "PcieClkSrcClkReq[2]" = "0xFF"
+ register "PcieClkSrcClkReq[3]" = "0xFF"
+ register "PcieClkSrcClkReq[4]" = "0xFF"
+ register "PcieClkSrcClkReq[5]" = "0xFF"
+
+ # Disable all L1 substates for PCIe root ports
+ register "PcieRpL1Substates[0]" = "L1_SS_DISABLED"
+ register "PcieRpL1Substates[1]" = "L1_SS_DISABLED"
+ register "PcieRpL1Substates[2]" = "L1_SS_DISABLED"
+ register "PcieRpL1Substates[3]" = "L1_SS_DISABLED"
+ register "PcieRpL1Substates[4]" = "L1_SS_DISABLED"
+ register "PcieRpL1Substates[5]" = "L1_SS_DISABLED"
+
+ # Disable LTR for all PCIe root ports
+ register "PcieRpLtrDisable[0]" = "true"
+ register "PcieRpLtrDisable[1]" = "true"
+ register "PcieRpLtrDisable[2]" = "true"
+ register "PcieRpLtrDisable[3]" = "true"
+ register "PcieRpLtrDisable[4]" = "true"
+ register "PcieRpLtrDisable[5]" = "true"
+
+ # Storage (SATA/SDCARD/EMMC) related UPDs
+ register "SataSalpSupport" = "0"
+ register "SataPortsEnable[0]" = "1"
+ register "SataPortsEnable[1]" = "1"
+ register "SataPortsDevSlp[0]" = "0"
+ register "SataPortsDevSlp[1]" = "0"
+
+ register "ScsEmmcHs400Enabled" = "1"
+ register "ScsEmmcDdr50Enabled" = "1"
+ register "SdCardPowerEnableActiveHigh" = "1"
+
+ # LPSS Serial IO (I2C/UART/GSPI) related UPDs
+ register "SerialIoI2cMode" = "{
+ [PchSerialIoIndexI2C0] = PchSerialIoDisabled,
+ [PchSerialIoIndexI2C1] = PchSerialIoPci,
+ [PchSerialIoIndexI2C2] = PchSerialIoDisabled,
+ [PchSerialIoIndexI2C3] = PchSerialIoDisabled,
+ [PchSerialIoIndexI2C4] = PchSerialIoPci,
+ [PchSerialIoIndexI2C5] = PchSerialIoDisabled,
+ [PchSerialIoIndexI2C6] = PchSerialIoDisabled,
+ [PchSerialIoIndexI2C7] = PchSerialIoDisabled,
+ }"
+
+ register "SerialIoI2cPadsTermination" = "{
+ [PchSerialIoIndexI2C0] = 1,
+ [PchSerialIoIndexI2C1] = 1,
+ [PchSerialIoIndexI2C2] = 1,
+ [PchSerialIoIndexI2C3] = 1,
+ [PchSerialIoIndexI2C4] = 1,
+ [PchSerialIoIndexI2C5] = 1,
+ [PchSerialIoIndexI2C6] = 1,
+ [PchSerialIoIndexI2C7] = 1,
+ }"
+
+ register "SerialIoUartMode" = "{
+ [PchSerialIoIndexUART0] = PchSerialIoDisabled,
+ [PchSerialIoIndexUART1] = PchSerialIoDisabled,
+ [PchSerialIoIndexUART2] = PchSerialIoSkipInit,
+ }"
+
+ register "SerialIoUartDmaEnable" = "{
+ [PchSerialIoIndexUART0] = 1,
+ [PchSerialIoIndexUART1] = 1,
+ [PchSerialIoIndexUART2] = 1,
+ }"
+
+ # TSN GBE related UPDs
+ register "PchTsnGbeLinkSpeed" = "Tsn_2_5_Gbps"
+ register "PchTsnGbeSgmiiEnable" = "1"
+
+ device domain 0 on
+ device pci 00.0 on end # Host Bridge
+ device pci 02.0 on end # Integrated Graphics Device
+ device pci 04.0 off end # SA Thermal device
+ device pci 08.0 off end # GNA
+ device pci 09.0 off end # CPU Intel Trace Hub
+
+ device pci 10.0 off end # I2C6
+ device pci 10.1 off end # I2C7
+ device pci 10.5 on end # Integrated Error Handler
+
+ device pci 11.0 off end # Intel PSE UART0
+ device pci 11.1 off end # Intel PSE UART1
+ device pci 11.2 off end # Intel PSE UART2
+ device pci 11.3 off end # Intel PSE UART3
+ device pci 11.4 off end # Intel PSE UART4
+ device pci 11.5 off end # Intel PSE UART5
+ device pci 11.6 off end # Intel PSE IS20
+ device pci 11.7 off end # Intel PSE IS21
+
+ device pci 12.0 off end # GSPI2
+ device pci 12.3 on end # Management Engine UMA Access
+ device pci 12.4 on end # Management Engine PTT DMA Controller
+ device pci 12.5 off end # UFS0
+ device pci 12.7 off end # UFS1
+
+ device pci 13.0 off end # Intel PSE GSPI0
+ device pci 13.1 off end # Intel PSE GSPI1
+ device pci 13.2 off end # Intel PSE GSPI2
+ device pci 13.3 off end # Intel PSE GSPI3
+ device pci 13.4 off end # Intel PSE GPIO0
+ device pci 13.5 off end # Intel PSE GPIO1
+
+ device pci 14.0 on end # USB3.1 xHCI
+ device pci 14.1 off end # USB3.1 xDCI (OTG)
+
+ device pci 15.0 off end # I2C0
+ device pci 15.1 on end # I2C1
+ device pci 15.2 off end # I2C2
+ device pci 15.3 off end # I2C3
+
+ device pci 16.0 on end # Management Engine Interface 1
+ device pci 16.1 on end # Management Engine Interface 2
+ device pci 16.4 on end # Management Engine Interface 3
+ device pci 16.5 on end # Management Engine Interface 4
+
+ device pci 17.0 on end # SATA
+
+ device pci 18.0 off end # Intel PSE I2C7
+ device pci 18.1 off end # Intel PSE CAN0
+ device pci 18.2 off end # Intel PSE CAN1
+ device pci 18.3 off end # Intel PSE QEP0
+ device pci 18.4 off end # Intel PSE QEP1
+ device pci 18.5 off end # Intel PSE QEP2
+ device pci 18.6 off end # Intel PSE QEP3
+
+ device pci 19.0 on end # I2C4
+ device pci 19.1 off end # I2C5
+ device pci 19.2 on end # UART2
+
+ device pci 1a.0 on end # eMMC
+ device pci 1a.1 off end # SD
+ device pci 1a.3 off end # Intel Safety Island
+
+ device pci 1b.0 off end # Intel PSE I2C0
+ device pci 1b.1 off end # Intel PSE I2C1
+ device pci 1b.2 off end # Intel PSE I2C2
+ device pci 1b.3 off end # Intel PSE I2C3
+ device pci 1b.4 off end # Intel PSE I2C4
+ device pci 1b.5 off end # Intel PSE I2C5
+ device pci 1b.6 off end # Intel PSE I2C6
+
+ device pci 1c.0 on end # RP1 (pcie0 single VC)
+ device pci 1c.1 on end # RP2 (pcie0 single VC)
+ device pci 1c.2 on end # RP3 (pcie0 single VC)
+ device pci 1c.3 on end # RP4 (pcie0 single VC)
+ device pci 1c.4 on end # RP5 (pcie1 multi VC)
+ device pci 1c.5 on end # RP6 (pcie2 multi VC)
+ device pci 1c.6 on end # RP7 (pcie3 multi VC)
+
+ device pci 1d.0 off end # Intel PSE IPC (local host to PSE)
+ device pci 1d.1 on end # Intel PSE Time-Sensitive Networking GbE 0
+ device pci 1d.2 on end # Intel PSE Time-Sensitive Networking GbE 1
+ device pci 1d.3 off end # Intel PSE DMA0
+ device pci 1d.4 off end # Intel PSE DMA1
+ device pci 1d.5 off end # Intel PSE DMA2
+ device pci 1d.6 off end # Intel PSE PWM
+ device pci 1d.7 off end # Intel PSE ADC
+
+ device pci 1e.0 on end # UART0
+ device pci 1e.1 on end # UART1
+ device pci 1e.2 off end # GSPI0
+ device pci 1e.3 off end # GSPI1
+ device pci 1e.4 on end # PCH Time-Sensitive Networking GbE
+ device pci 1e.6 on end # HPET
+ device pci 1e.7 on end # IOAPIC
+
+ device pci 1f.0 on # eSPI Interface
+ chip drivers/pc80/tpm
+ device pnp 0c31.0 on end
+ end
+ end
+ device pci 1f.1 on end # P2SB
+ device pci 1f.2 hidden end # Power Management Controller
+ device pci 1f.3 off end # Intel cAVS/HDA
+ device pci 1f.4 on # SMBus
+ # Enable external RTC chip
+ chip drivers/i2c/rx6110sa
+ register "bus_speed" = "I2C_SPEED_STANDARD"
+ register "pmon_sampling" = "PMON_SAMPL_256_MS"
+ register "bks_on" = "0"
+ register "bks_off" = "1"
+ register "iocut_en" = "1"
+ register "set_user_date" = "1"
+ register "user_year" = "04"
+ register "user_month" = "07"
+ register "user_day" = "01"
+ register "user_weekday" = "4"
+ device i2c 0x32 on end # RTC RX6110 SA
+ end
+ end
+ device pci 1f.5 on end # PCH SPI (flash & TPM)
+ device pci 1f.7 off end # PCH Intel Trace Hub
+ end
+end
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/gpio.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/gpio.c
new file mode 100644
index 0000000000..91c041756f
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/gpio.c
@@ -0,0 +1,178 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <baseboard/variants.h>
+#include <commonlib/helpers.h>
+
+/* Pad configuration in ramstage*/
+static const struct pad_config gpio_table[] = {
+ /* Community 0 - GpioGroup GPP_B */
+ PAD_CFG_NF(GPP_B2, NONE, PLTRST, NF1), /* PMC_VRALERT_N */
+ PAD_CFG_NF(GPP_B3, NONE, PLTRST, NF4), /* ESPI_ALERT0_N */
+ PAD_CFG_NF(GPP_B4, NONE, PLTRST, NF4), /* ESPI_ALERT1_N */
+ PAD_NC(GPP_B9, NONE), /* Not connected */
+ PAD_NC(GPP_B10, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_B11, NONE, PLTRST, NF1), /* PMC_ALERT_N */
+ PAD_NC(GPP_B14, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_B15, NONE, PLTRST, NF5), /* ESPI_CS1_N */
+ PAD_NC(GPP_B18, NONE), /* Not connected */
+ PAD_NC(GPP_B19, NONE), /* Not connected */
+ PAD_NC(GPP_B20, NONE), /* Not connected */
+ PAD_NC(GPP_B21, NONE), /* Not connected */
+ PAD_NC(GPP_B22, NONE), /* Not connected */
+ PAD_NC(GPP_B23, NONE), /* Not connected */
+
+ /* Community 0 - GpioGroup GPP_T */
+ PAD_CFG_NF(GPP_T4, UP_20K, DEEP, NF1), /* PSE_GBE0_INT */
+ PAD_CFG_NF(GPP_T5, DN_20K, DEEP, NF1), /* PSE_GBE0_RST_N */
+ PAD_CFG_NF(GPP_T6, NONE, DEEP, NF1), /* PSE_GBE0_AUXTS */
+ PAD_CFG_NF(GPP_T7, NONE, DEEP, NF1), /* PSE_GBE0_PPS */
+ PAD_CFG_NF(GPP_T12, NONE, DEEP, NF2), /* SIO_UART0_RXD */
+ PAD_CFG_NF(GPP_T13, NONE, DEEP, NF2), /* SIO_UART0_TXD */
+
+ /* Community 0 - GpioGroup GPP_G */
+ PAD_NC(GPP_G8, NONE), /* Not connected */
+ PAD_NC(GPP_G9, NONE), /* Not connected */
+ PAD_NC(GPP_G12, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_G15, NONE, DEEP, NF1), /* ESPI_IO_0 */
+ PAD_CFG_NF(GPP_G16, NONE, DEEP, NF1), /* ESPI_IO_1 */
+ PAD_CFG_NF(GPP_G17, NONE, DEEP, NF1), /* ESPI_IO_2 */
+ PAD_CFG_NF(GPP_G18, NONE, DEEP, NF1), /* ESPI_IO_3 */
+ PAD_CFG_GPI(GPP_G19, UP_20K, PLTRST), /* TPM_IRQ_N */
+ PAD_CFG_NF(GPP_G20, NONE, DEEP, NF1), /* ESPI_CSO_N */
+ PAD_CFG_NF(GPP_G21, NONE, DEEP, NF1), /* ESPI_CLK */
+ PAD_CFG_NF(GPP_G22, NONE, DEEP, NF1), /* ESPI_RST0_N */
+
+ /* Community 1 - GpioGroup GPP_V */
+ PAD_CFG_NF(GPP_V0, UP_20K, DEEP, NF1), /* EMMC_CMD */
+ PAD_CFG_NF(GPP_V1, UP_20K, DEEP, NF1), /* EMMC_DATA0 */
+ PAD_CFG_NF(GPP_V2, UP_20K, DEEP, NF1), /* EMMC_DATA1 */
+ PAD_CFG_NF(GPP_V3, UP_20K, DEEP, NF1), /* EMMC_DATA2 */
+ PAD_CFG_NF(GPP_V4, UP_20K, DEEP, NF1), /* EMMC_DATA3 */
+ PAD_CFG_NF(GPP_V5, UP_20K, DEEP, NF1), /* EMMC_DATA4 */
+ PAD_CFG_NF(GPP_V6, UP_20K, DEEP, NF1), /* EMMC_DATA5 */
+ PAD_CFG_NF(GPP_V7, UP_20K, DEEP, NF1), /* EMMC_DATA6 */
+ PAD_CFG_NF(GPP_V8, UP_20K, DEEP, NF1), /* EMMC_DATA7 */
+ PAD_CFG_NF(GPP_V9, DN_20K, DEEP, NF1), /* EMMC_RCLK */
+ PAD_CFG_NF(GPP_V10, DN_20K, DEEP, NF1), /* EMMC_CLK */
+ PAD_CFG_NF(GPP_V11, NONE, DEEP, NF1), /* EMMC_RESET_N */
+
+ /* Community 1 - GpioGroup GPP_H */
+ PAD_CFG_NF(GPP_H0, DN_20K, DEEP, NF1), /* PSE_GBE1_INT */
+ PAD_CFG_NF(GPP_H1, DN_20K, DEEP, NF1), /* PSE_GBE1_RST_N */
+ PAD_CFG_NF(GPP_H2, NONE, DEEP, NF1), /* PSE_GBE1_AUXTS */
+ PAD_CFG_NF(GPP_H3, NONE, DEEP, NF1), /* PSE_GBE1_PPS */
+ PAD_CFG_NF(GPP_H8, UP_20K, DEEP, NF1), /* SIO_I2C4_SDA */
+ PAD_CFG_NF(GPP_H9, UP_20K, DEEP, NF1), /* SIO_I2C4_SCL */
+
+ /* Community 1 - GpioGroup GPP_D */
+ PAD_CFG_GPO(GPP_D16, 0, DEEP), /* EMMC_PWR_EN_N */
+
+ /* Community 1 - GpioGroup GPP_U */
+ PAD_CFG_NF(GPP_U0, DN_20K, DEEP, NF1), /* GBE_INT */
+ PAD_CFG_NF(GPP_U1, DN_20K, DEEP, NF1), /* GBE_RST_N */
+ PAD_CFG_NF(GPP_U2, NONE, DEEP, NF1), /* GBE_PPS */
+ PAD_CFG_NF(GPP_U3, NONE, DEEP, NF1), /* GBE_AUXTS */
+ PAD_NC(GPP_U12, NONE), /* Not connected */
+ PAD_NC(GPP_U13, NONE), /* Not connected */
+ PAD_NC(GPP_U16, NONE), /* Not connected */
+ PAD_NC(GPP_U17, NONE), /* Not connected */
+ PAD_NC(GPP_U18, NONE), /* Not connected */
+ PAD_CFG_GPO(GPP_U19, 1, DEEP), /* UPD_REQ_N */
+
+ /* Community 2 - GpioGroup DSW */
+ PAD_CFG_NF(GPD4, NONE, PLTRST, NF1), /* SLP_S3 */
+ PAD_CFG_NF(GPD5, NONE, PLTRST, NF1), /* SLP_S4 */
+ PAD_NC(GPD7, NONE), /* Not connected */
+ PAD_CFG_NF(GPD10, NONE, PLTRST, NF1), /* SLP_S5 */
+
+ /* Community 3 - GpioGroup GPP_S */
+ PAD_NC(GPP_S0, NONE), /* Not connected */
+ PAD_NC(GPP_S1, NONE), /* Not connected */
+
+ /* Community 3 - GpioGroup GPP_A */
+ PAD_CFG_NF(GPP_A0, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXD3 */
+ PAD_CFG_NF(GPP_A1, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXD2 */
+ PAD_CFG_NF(GPP_A2, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXD1 */
+ PAD_CFG_NF(GPP_A3, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXD0 */
+ PAD_CFG_NF(GPP_A4, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXCLK */
+ PAD_CFG_NF(GPP_A5, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_TXCTL */
+ PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXCLK */
+ PAD_CFG_NF(GPP_A7, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXD3 */
+ PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXD2 */
+ PAD_CFG_NF(GPP_A9, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXD1 */
+ PAD_CFG_NF(GPP_A10, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXD0 */
+ PAD_CFG_NF(GPP_A23, NONE, DEEP, NF1), /* PSE_GBE0_RGMII_RXCTL */
+
+ /* Community 4 - GpioGroup GPP_C */
+ PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1), /* PSE_GBE0_MDC */
+ PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1), /* PSE_GBE0_MDIO */
+ PAD_NC(GPP_C5, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1), /* PSE_GBE0_AUXTS */
+ PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1), /* PSE_GBE0_PPS */
+ PAD_NC(GPP_C8, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_C12, NONE, DEEP, NF4), /* SIO_UART1_RXD */
+ PAD_CFG_NF(GPP_C13, NONE, DEEP, NF4), /* SIO_UART1_TXD */
+ PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1), /* GBE_MDIO */
+ PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1), /* GBE_MDC */
+ PAD_CFG_NF(GPP_C18, NONE, DEEP, NF4), /* SIO_I2C1_SDA */
+ PAD_CFG_NF(GPP_C19, NONE, DEEP, NF4), /* SIO_I2C1_SCL */
+
+ /* Community 4 - GpioGroup GPP_F */
+ PAD_NC(GPP_F0, NONE), /* Not connected */
+ PAD_NC(GPP_F1, NONE), /* Not connected */
+ PAD_NC(GPP_F2, NONE), /* Not connected */
+ PAD_NC(GPP_F3, NONE), /* Not connected */
+ PAD_NC(GPP_F4, NONE), /* Not connected */
+ PAD_NC(GPP_F5, NONE), /* Not connected */
+ PAD_NC(GPP_F7, NONE), /* Not connected */
+ PAD_NC(GPP_F8, NONE), /* Not connected */
+ PAD_NC(GPP_F10, NONE), /* Not connected */
+ PAD_NC(GPP_F11, NONE), /* Not connected */
+ PAD_NC(GPP_F12, NONE), /* Not connected */
+ PAD_NC(GPP_F13, NONE), /* Not connected */
+ PAD_NC(GPP_F14, NONE), /* Not connected */
+ PAD_NC(GPP_F15, NONE), /* Not connected */
+ PAD_NC(GPP_F16, NONE), /* Not connected */
+ PAD_NC(GPP_F17, NONE), /* Not connected */
+ PAD_NC(GPP_F20, NONE), /* Not connected */
+ PAD_NC(GPP_F21, NONE), /* Not connected */
+
+ /* Community 4 - GpioGroup GPP_E */
+ PAD_CFG_NF(GPP_E0, NONE, DEEP, NF1), /* SATA_LED_N */
+ PAD_CFG_NF(GPP_E3, NONE, DEEP, NF1), /* DDI1_HPD */
+ PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1), /* DDI1_DDC_SDA */
+ PAD_NC(GPP_E6, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_E7, NONE, DEEP, NF1), /* DDI1_DDC_SCL */
+ PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), /* DDI0_HPD */
+ PAD_NC(GPP_E15, NONE), /* Not connected */
+ PAD_NC(GPP_E16, NONE), /* Not connected */
+ PAD_CFG_NF(GPP_E18, NONE, DEEP, NF1), /* DDI0_DDC_SDA */
+ PAD_CFG_NF(GPP_E19, NONE, DEEP, NF1), /* DDI0_DDC_SCL */
+ PAD_NC(GPP_E23, NONE), /* Not connected */
+
+ /* Community 5 - GpioGroup GPP_R */
+ PAD_NC(GPP_R1, NONE), /* Not connected */
+ PAD_NC(GPP_R2, NONE), /* Not connected */
+ PAD_NC(GPP_R3, NONE), /* Not connected */
+};
+
+/* Early pad configuration in bootblock */
+static const struct pad_config early_gpio_table[] = {
+ PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), /* SMB_CLK */
+ PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), /* SMB_DATA */
+ PAD_CFG_NF(GPP_C2, NONE, DEEP, NF2), /* SMB_ALERT_N */
+ PAD_CFG_NF(GPP_C20, NONE, DEEP, NF4), /* SIO_UART2_RXD */
+ PAD_CFG_NF(GPP_C21, NONE, DEEP, NF4), /* SIO_UART2_TXD */
+};
+
+const struct pad_config *variant_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(gpio_table);
+ return gpio_table;
+}
+
+const struct pad_config *variant_early_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(early_gpio_table);
+ return early_gpio_table;
+}
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/memory.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/memory.c
new file mode 100644
index 0000000000..7b7dad1129
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/memory.c
@@ -0,0 +1,59 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <baseboard/variants.h>
+#include <gpio.h>
+#include <soc/meminit.h>
+#include <soc/romstage.h>
+
+static const struct mb_cfg mc_ehl_lpddr4x_memcfg_cfg = {
+
+ .dq_map[DDR_CH0] = {
+ {0xf, 0xf0},
+ {0xf, 0xf0},
+ {0xff, 0x0},
+ {0x0, 0x0},
+ {0x0, 0x0},
+ {0x0, 0x0}
+ },
+
+ .dq_map[DDR_CH1] = {
+ {0xf, 0xf0},
+ {0xf, 0xf0},
+ {0xff, 0x0},
+ {0x0, 0x0},
+ {0x0, 0x0},
+ {0x0, 0x0}
+ },
+
+ /*
+ * The dqs_map arrays map the ddr4 pins to the SoC pins
+ * for both channels.
+ *
+ * the index = pin number on ddr4 part
+ * the value = pin number on SoC
+ */
+ .dqs_map[DDR_CH0] = {3, 0, 1, 2, 7, 4, 5, 6},
+ .dqs_map[DDR_CH1] = {3, 0, 1, 2, 7, 4, 5, 6},
+
+ /* Baseboard uses 100, 100 and 100 rcomp resistors */
+ .rcomp_resistor = {100, 100, 100},
+
+ .rcomp_targets = {60, 40, 30, 20, 30},
+
+ /* LPDDR4x does not allow interleaved memory */
+ .dq_pins_interleaved = 0,
+
+ /* Baseboard is using config 2 for vref_ca */
+ .vref_ca_config = 2,
+
+ /* Enable Early Command Training */
+ .ect = 1,
+
+ /* Set Board Type */
+ .UserBd = BOARD_TYPE_MOBILE,
+};
+
+const struct mb_cfg *variant_memcfg_config(void)
+{
+ return &mc_ehl_lpddr4x_memcfg_cfg;
+}
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/empty.spd.hex b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/empty.spd.hex
new file mode 100644
index 0000000000..67b46cd239
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/empty.spd.hex
@@ -0,0 +1,32 @@
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/mc_ehl2.spd.hex b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/mc_ehl2.spd.hex
new file mode 100644
index 0000000000..71e5456542
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/mc_ehl2.spd.hex
@@ -0,0 +1,32 @@
+23 11 11 0E 15 21 90 08 00 40 00 00 02 22 00 00
+00 00 04 0F 92 54 05 00 87 00 90 A8 90 C0 08 60
+04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 E1 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 20 00 00 00 20 20 20 20 20 20 20
+20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/spd.h b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/spd.h
new file mode 100644
index 0000000000..f667e7422e
--- /dev/null
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/spd/spd.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef MAINBOARD_SPD_H
+#define MAINBOARD_SPD_H
+
+#include <stdint.h>
+
+#define RCOMP_TARGET_PARAMS 0x5
+
+void mainboard_fill_dq_map_ch0(u8 *dq_map_ptr);
+void mainboard_fill_dq_map_ch1(u8 *dq_map_ptr);
+void mainboard_fill_dqs_map_ch0(u8 *dqs_map_ptr);
+void mainboard_fill_dqs_map_ch1(u8 *dqs_map_ptr);
+void mainboard_fill_rcomp_res_data(u16 *rcomp_ptr);
+void mainboard_fill_rcomp_strength_data(u16 *rcomp_strength_ptr);
+#endif