Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31262
Change subject: soc/intel/cannonlake: Use MEM_CH_SEL to initialize MemorySpdPrts ......................................................................
soc/intel/cannonlake: Use MEM_CH_SEL to initialize MemorySpdPrts
MEM_CH_SEL is used to indicate whether we are on a single or dual channel device, where MEM_CH_SEL = 1 for single channel skus and MEM_CH_SEL = 0 for dual channel skus. Initialize MemorySpdPrt pointers based on the value read from MEM_CH_SEL, which is read from GPP_F2. In the first build, we did not use GPP_F2, so we need to add an internal pulldown as those early devices were all dual channel devices.
BUG=b:123062346, b:122959294 BRANCH=None TEST=Boot into current boards and ensure that we have 2 channels as expected Also, verify that GPP_F2 is set to 0.
Change-Id: Ice22b103664187834e255d1359bfd9b51993b5b6 Signed-off-by: Shelley Chen shchen@google.com --- M src/soc/intel/cannonlake/cnl_memcfg_init.c 1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/31262/1
diff --git a/src/soc/intel/cannonlake/cnl_memcfg_init.c b/src/soc/intel/cannonlake/cnl_memcfg_init.c index 4425862..8bd82a6 100644 --- a/src/soc/intel/cannonlake/cnl_memcfg_init.c +++ b/src/soc/intel/cannonlake/cnl_memcfg_init.c @@ -15,7 +15,9 @@ #include <assert.h> #include <console/console.h> #include <fsp/util.h> +#include <gpio.h> #include <soc/cnl_memcfg_init.h> +#include <soc/gpio_soc_defs.h> #include <spd_bin.h> #include <string.h>
@@ -55,8 +57,16 @@ mem_cfg->MemorySpdDataLen = spd_data_len; mem_cfg->MemorySpdPtr00 = spd_data_ptr;
- /* Use the same spd data for channel 1, Dimm 0 */ - mem_cfg->MemorySpdPtr10 = mem_cfg->MemorySpdPtr00; + /* + * GPP_F2 is the MEM_CH_SEL gpio, which is set to 1 for single + * channel skus and 0 for dual channel skus. + */ + if (gpio_get(GPP_F2) == 1) + mem_cfg->MemorySpdPtr10 = 0; + else { + /* Use the same spd data for channel 1, Dimm 0 */ + mem_cfg->MemorySpdPtr10 = mem_cfg->MemorySpdPtr00; + } }
/*