summaryrefslogtreecommitdiffstats
path: root/src/mainboard/siemens/mc_ehl
diff options
context:
space:
mode:
authorMario Scheithauer <mario.scheithauer@siemens.com>2023-07-04 15:41:35 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-07-06 13:55:43 +0000
commit0ec7a9f1740003e013c1f26262efef3734aebeb1 (patch)
tree1cf1313889494a2cc0367c7ecabe4625343c6aaf /src/mainboard/siemens/mc_ehl
parent81fb981e8ecec077674b5d3bce823b0efd9459cc (diff)
downloadcoreboot-0ec7a9f1740003e013c1f26262efef3734aebeb1.tar.gz
coreboot-0ec7a9f1740003e013c1f26262efef3734aebeb1.tar.bz2
coreboot-0ec7a9f1740003e013c1f26262efef3734aebeb1.zip
mb/siemens/mc_ehl4: Make DRAM population depending on GPIO GPP_B5
GPIO GPP_B5 is used as input on this mainboard. For a full-populated DRAM configuration, the input signal is connected to ground and for a half-populated configuration it is connected to 3.3 V. BUG=none TEST=Use different HW configurations and check coreboot log GPP_B5 = 0: [DEBUG] 2 DIMMs found GPP_B5 = 1: [INFO ] meminit_channels: DRAM half-populated [DEBUG] 1 DIMMs found Change-Id: I48b4a3bea7f1ff804b78b7c648a7ea1925627b8a Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76245 Reviewed-by: Jan Samek <jan.samek@siemens.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/mainboard/siemens/mc_ehl')
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl4/gpio.c1
-rw-r--r--src/mainboard/siemens/mc_ehl/variants/mc_ehl4/memory.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/gpio.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/gpio.c
index 9f1c77f20a62..4919ac74335e 100644
--- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/gpio.c
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/gpio.c
@@ -118,6 +118,7 @@ static const struct pad_config gpio_table[] = {
/* Early pad configuration in bootblock */
static const struct pad_config early_gpio_table[] = {
+ PAD_CFG_GPI(GPP_B5, NONE, DEEP), /* DRAM population */
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 */
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/memory.c b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/memory.c
index 7b7dad1129f8..dc0f073201bf 100644
--- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/memory.c
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl4/memory.c
@@ -57,3 +57,11 @@ const struct mb_cfg *variant_memcfg_config(void)
{
return &mc_ehl_lpddr4x_memcfg_cfg;
}
+
+bool half_populated(void)
+{
+ /* There are two different memory expansion variants of this mainboard.
+ The GPIO GPP_B5 indicates whether the mainboard is equipped with half- or
+ full-populated DRAM. */
+ return gpio_get(GPP_B5);
+}