summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorpchandri <preetham.chandrian@intel.com>2015-08-14 12:18:31 -0700
committerAaron Durbin <adurbin@chromium.org>2015-08-27 14:19:38 +0000
commit415022a86c1033e7b233fc2ca16e1d6367425ab5 (patch)
treedb3f3e7b1e9f7bb35fe66091fc1c00cbf2d40349 /src/mainboard
parent028bcaae32e8ca779d216dc61a9b3dd468ff4be2 (diff)
downloadcoreboot-415022a86c1033e7b233fc2ca16e1d6367425ab5.tar.xz
skylake: FAB3 Adding Support for various SPD.
This pach enables memory configuration based on PCH_MEM_CFG and EC_BRD_ID. BRANCH=None BUG=chrome-os-partner:44087 CQ-DEPEND=CL:293832 TEST=Build and Boot FAB3 (Kunimitsu) Original-Change-Id: I7999e609c4b0b3c89a9689ee6bb6b98c88703809 Original-Signed-off-by: pchandri <preetham.chandrian@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/293787 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Change-Id: I52a1af1683b74e5cad71b9e4861942a23869f255 Signed-off-by: pchandri <preetham.chandrian@intel.com> Reviewed-on: http://review.coreboot.org/11284 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/intel/kunimitsu/boardid.h31
-rw-r--r--src/mainboard/intel/kunimitsu/spd/Makefile.inc20
-rw-r--r--src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866.spd.hex16
-rw-r--r--src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866.spd.hex16
-rw-r--r--src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E6E304EE-EGCF-2G-1866.spd.hex16
-rw-r--r--src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E8E304EE-EGCF-1G-1866.spd.hex16
-rw-r--r--src/mainboard/intel/kunimitsu/spd/spd.c33
7 files changed, 140 insertions, 8 deletions
diff --git a/src/mainboard/intel/kunimitsu/boardid.h b/src/mainboard/intel/kunimitsu/boardid.h
new file mode 100644
index 0000000000..ef003f3ead
--- /dev/null
+++ b/src/mainboard/intel/kunimitsu/boardid.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google Inc.
+ * Copyright (C) 2015 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+#ifndef _BOARDID_H_
+#define _BOARDID_H_
+
+#define SCRD_SKU1 0x3
+#define SCRD_SKU2 0x4
+#define SCRD_SKU3 0x1
+#define SCRD_SKU4 0x2
+#define SCRD_SKU5 0x5
+#define SCRD_SKU6 0x6
+
+#endif
diff --git a/src/mainboard/intel/kunimitsu/spd/Makefile.inc b/src/mainboard/intel/kunimitsu/spd/Makefile.inc
index c50252f073..a344f0bdae 100644
--- a/src/mainboard/intel/kunimitsu/spd/Makefile.inc
+++ b/src/mainboard/intel/kunimitsu/spd/Makefile.inc
@@ -22,9 +22,23 @@ romstage-y += spd.c
SPD_BIN = $(obj)/spd.bin
-# SPD data by index. No method for board identification yet
-SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCE # 0
-SPD_SOURCES += empty # 1
+SPD_SOURCES = hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866 # 0b0000
+SPD_SOURCES += hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866 # 0b0001
+SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF-1G-1866 # 0b0010
+SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF-2G-1866 # 0b0011
+SPD_SOURCES += empty # 0b0100
+SPD_SOURCES += empty # 0b0101
+SPD_SOURCES += empty # 0b0110
+SPD_SOURCES += empty # 0b0111
+SPD_SOURCES += empty # 0b1000
+SPD_SOURCES += empty # 0b1001
+SPD_SOURCES += empty # 0b1010
+SPD_SOURCES += empty # 0b1011
+SPD_SOURCES += empty # 0b1100
+SPD_SOURCES += empty # 0b1101
+SPD_SOURCES += empty # 0b1110
+SPD_SOURCES += empty # 0b1111
+
SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866.spd.hex
new file mode 100644
index 0000000000..cce75a81ac
--- /dev/null
+++ b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNN8JTALAR-NUD-1G-1866.spd.hex
@@ -0,0 +1,16 @@
+91 20 F1 03 04 11 05 0B 03 11 01 08 09 00 40 05
+78 78 90 50 90 11 50 E0 90 06 3C 3C 01 90 00 00
+00 00 CA FA 00 00 00 A8 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 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 AD 01 00 00 00 00 00 00 00 00
+48 39 43 43 4E 4E 4E 38 4A 54 41 4C 41 52 2D 4E
+55 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 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/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866.spd.hex
new file mode 100644
index 0000000000..84888160a8
--- /dev/null
+++ b/src/mainboard/intel/kunimitsu/spd/hynix_dimm_H9CCNNNBLTALAR-NUD-2G-1866.spd.hex
@@ -0,0 +1,16 @@
+91 20 F1 03 04 12 05 0A 03 11 01 08 09 00 40 05
+78 78 90 50 90 11 50 E0 90 06 3C 3C 01 90 00 00
+00 00 CA FA 00 00 00 A8 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 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 AD 01 00 00 00 00 00 00 00 00
+48 39 43 43 4E 4E 4E 42 4C 54 41 4C 41 52 2D 4E
+55 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 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/intel/kunimitsu/spd/samsung_dimm_K4E6E304EE-EGCF-2G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E6E304EE-EGCF-2G-1866.spd.hex
new file mode 100644
index 0000000000..2718e2aa1b
--- /dev/null
+++ b/src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E6E304EE-EGCF-2G-1866.spd.hex
@@ -0,0 +1,16 @@
+91 20 F1 03 04 12 05 0A 03 11 01 08 09 00 40 05
+78 78 90 50 90 11 50 E0 10 04 3C 3C 01 90 00 00
+00 00 CA FA 00 00 00 A8 00 88 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 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 CE 01 00 00 55 00 00 00 00 00
+4B 34 45 36 45 33 30 34 45 45 2D 45 47 43 46 20
+20 20 00 00 80 CE 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 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/intel/kunimitsu/spd/samsung_dimm_K4E8E304EE-EGCF-1G-1866.spd.hex b/src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E8E304EE-EGCF-1G-1866.spd.hex
new file mode 100644
index 0000000000..24167ebd0a
--- /dev/null
+++ b/src/mainboard/intel/kunimitsu/spd/samsung_dimm_K4E8E304EE-EGCF-1G-1866.spd.hex
@@ -0,0 +1,16 @@
+91 20 F1 03 04 11 05 0B 03 11 01 08 09 00 40 05
+78 78 90 50 90 11 50 E0 10 04 3C 3C 01 90 00 00
+00 00 CA FA 00 00 00 A8 00 88 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 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 CE 01 00 00 55 00 00 00 00 00
+4B 34 45 38 45 33 30 34 45 45 2D 45 47 43 46 20
+20 20 00 00 80 CE 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 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/intel/kunimitsu/spd/spd.c b/src/mainboard/intel/kunimitsu/spd/spd.c
index cdcbe1e4e5..e54f1a6bb1 100644
--- a/src/mainboard/intel/kunimitsu/spd/spd.c
+++ b/src/mainboard/intel/kunimitsu/spd/spd.c
@@ -22,11 +22,14 @@
#include <cbfs.h>
#include <console/console.h>
#include <string.h>
+#include <gpio.h>
#include <soc/gpio.h>
#include <soc/pei_data.h>
#include <soc/romstage.h>
#include <ec/google/chromeec/ec.h>
#include <mainboard/intel/kunimitsu/spd/spd.h>
+#include <boardid.h>
+#include <mainboard/intel/kunimitsu/boardid.h>
static void mainboard_print_spd_info(uint8_t spd[])
{
@@ -84,7 +87,23 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
{
char *spd_file;
size_t spd_file_len;
- int spd_index;
+ int spd_index, sku_id;
+
+ gpio_t spd_gpios[] = {
+ GPP_C12, /* PCH_MEM_CONFIG[0] */
+ GPP_C13, /* PCH_MEM_CONFIG[1] */
+ GPP_C14, /* PCH_MEM_CONFIG[2] */
+ GPP_C15, /* PCH_MEM_CONFIG[3] */
+ };
+
+ spd_index = gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
+ /*
+ * XXX: This is incorrect usage.The Board ID should be the revision ID
+ * and not SKU ID but on SCRD it indicates SKU.
+ */
+ sku_id = board_id();
+ printk(BIOS_ERR, "SPD index %d\n", spd_index);
+ printk(BIOS_ERR, "Board ID %d\n", sku_id);
/* Load SPD data from CBFS */
spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
@@ -96,9 +115,6 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
if (spd_file_len < SPD_LEN)
die("Missing SPD data.");
- /* Add board SKU detection here. Currently we only support one. */
- spd_index = 0;
-
/* Make sure we did not overrun the buffer */
if (spd_file_len < ((spd_index + 1) * SPD_LEN)) {
printk(BIOS_ERR, "SPD index override to 0 - old hardware?\n");
@@ -108,7 +124,14 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
/* Assume same memory in both channels */
spd_index *= SPD_LEN;
memcpy(pei_data->spd_data[0][0], spd_file + spd_index, SPD_LEN);
- memcpy(pei_data->spd_data[1][0], spd_file + spd_index, SPD_LEN);
+ /*
+ * XXX: This is incorrect usage. mem_cfg should be used here instead of
+ * SKU ID. The current implementation of mem_config does not
+ * support channel population.
+ */
+
+ if (sku_id != SCRD_SKU1)
+ memcpy(pei_data->spd_data[1][0], spd_file + spd_index, SPD_LEN);
/* Make sure a valid SPD was found */
if (pei_data->spd_data[0][0][0] == 0)