Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48526 )
Change subject: util: Modify LPDDR4 spd_tools to generate SPDs for ADL boards ......................................................................
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 --- M util/spd_tools/lp4x/gen_spd.go 1 file changed, 7 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, but someone else must approve Nick Vaccaro: Looks good to me, but someone else must approve EricR Lai: Looks good to me, but someone else must approve Tim Wawrzynczak: Looks good to me, approved
diff --git a/util/spd_tools/lp4x/gen_spd.go b/util/spd_tools/lp4x/gen_spd.go index e63ca8d..2575b5d 100644 --- a/util/spd_tools/lp4x/gen_spd.go +++ b/util/spd_tools/lp4x/gen_spd.go @@ -27,13 +27,14 @@ 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 @@
/* 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 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 @@ )
func encodeBusWidth(memAttribs *memAttributes) byte { - if currPlatform == PlatformTGL { + if currPlatform == PlatformTGLADL { return SPDValueBusWidthTGL } else if currPlatform == PlatformJSL { return SPDValueBusWidthJSL @@ -895,7 +896,7 @@ }
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