summaryrefslogtreecommitdiff
path: root/util/spd_tools
diff options
context:
space:
mode:
authorAmanda Huang <amanda_hwang@compal.corp-partner.google.com>2020-12-10 14:41:14 +0800
committerTim Wawrzynczak <twawrzynczak@chromium.org>2020-12-17 21:56:43 +0000
commit8edb48baa6bf0f3397445f129473d8e80d09c1a2 (patch)
treea0fe538bd92be0fbff16417aa0cdea399b2889d2 /util/spd_tools
parent2e0053b84098512c5b3c98394998e66a8f83803b (diff)
util: Modify LPDDR4 spd_tools to generate SPDs for ADL boards
Generates de-duplicated SPD files using a global memory part list provided by the mainboard in JSON format. BUG=b:173132516 Change-Id: I4964ec28d74ab36c6b6f2e9dce6c923d1df95c84 Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48526 Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/spd_tools')
-rw-r--r--util/spd_tools/lp4x/gen_spd.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/util/spd_tools/lp4x/gen_spd.go b/util/spd_tools/lp4x/gen_spd.go
index e63ca8df6f..2575b5d436 100644
--- a/util/spd_tools/lp4x/gen_spd.go
+++ b/util/spd_tools/lp4x/gen_spd.go
@@ -27,13 +27,14 @@ import (
const (
SPDManifestFileName = "lp4x_spd_manifest.generated.txt"
- PlatformTGL = 0
+ PlatformTGLADL = 0
PlatformJSL = 1
)
var platformMap = map[string]int {
- "TGL": PlatformTGL,
+ "TGL": PlatformTGLADL,
"JSL": PlatformJSL,
+ "ADL": PlatformTGLADL,
}
var currPlatform int
@@ -210,7 +211,7 @@ const (
/* Returns density to encode as per Intel MRC expectations. */
func getMRCDensity(memAttribs *memAttributes) int {
- if currPlatform == PlatformTGL {
+ if currPlatform == PlatformTGLADL {
/*
* Intel MRC on TGL expects density per logical channel to be encoded in
* SPDIndexDensityBanks. Logical channel on TGL is an x16 channel.
@@ -270,7 +271,7 @@ func encodePackage(dies int) byte {
func encodeDiesPerPackage(memAttribs *memAttributes) byte {
var dies int = 0
- if currPlatform == PlatformTGL {
+ if currPlatform == PlatformTGLADL {
/* Intel MRC expects logical dies to be encoded for TGL. */
dies = memAttribs.ChannelsPerDie * memAttribs.RanksPerChannel * memAttribs.BitWidthPerChannel / 16
} else if currPlatform == PlatformJSL {
@@ -330,7 +331,7 @@ const (
)
func encodeBusWidth(memAttribs *memAttributes) byte {
- if currPlatform == PlatformTGL {
+ if currPlatform == PlatformTGLADL {
return SPDValueBusWidthTGL
} else if currPlatform == PlatformJSL {
return SPDValueBusWidthJSL
@@ -895,7 +896,7 @@ func updateTRPPB(memAttribs *memAttributes) {
}
func normalizeMemoryAttributes(memAttribs *memAttributes) {
- if currPlatform == PlatformTGL {
+ if currPlatform == PlatformTGLADL {
/*
* TGL does not really use physical organization of dies per package when
* generating the SPD. So, set it to 0 here so that deduplication ignores