util: Add spd_tools to generate SPDs for TGL and JSL boards
commit70001fe1f7c26ff13a84abf397a881189fa54c10
authorFurquan Shaikh <furquan@google.com>
Thu, 21 May 2020 04:37:51 +0000 (20 21:37 -0700)
committerPatrick Georgi <pgeorgi@google.com>
Sat, 6 Jun 2020 09:27:44 +0000 (6 09:27 +0000)
treefe4504228f6e932370c25b4304f7da29ae79a324
parentae96874e4805f01f68c56128c78ad1c3bab19bde
util: Add spd_tools to generate SPDs for TGL and JSL boards

Serial Presence Detect (SPD) data for memory modules is used by Memory
Reference Code (MRC) for training the memory. This SPD data is
typically obtained from part vendors but has to be massaged to format
it correctly as per JEDEC and MRC expectations. There have been
numerous times in the past where the SPD data used is not always
correct.

In order to reduce the manual effort of creating SPDs and generating
DRAM IDs, this change adds tools for generating SPD files for LPDDR4x
memory used in memory down configurations on Intel Tiger Lake (TGL)
and Jasper Lake (JSL) based platforms. These tools generate SPDs
following JESD209-4C specification and Intel recommendations (doc

Two tools are provided:
* gen_spd.go: Generates de-duplicated SPD files using a global memory
  part list provided by the mainboard in JSON format. Additionally,
  generates a SPD manifest file (in CSV format) with information about
  what memory part from the global list uses which of the generated
  SPD files.

* gen_part_id.go: Allocates DRAM strap IDs for different LPDDR4x
  memory parts used by the board. Takes as input list of memory parts
  used by the board (with one memory part on each line) and the SPD
  manifest file generated by gen_spd.go. Generates Makefile.inc for
  integrating the generated SPD files in the coreboot build.

BUG=b:155239397,b:147321551

Change-Id: Ia9b64d1d48371ccea1c01630a33a245d90f45214
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41612
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
util/spd_tools/intel/lp4x/README.md [new file with mode: 0644]
util/spd_tools/intel/lp4x/gen_part_id.go [new file with mode: 0644]
util/spd_tools/intel/lp4x/gen_spd.go [new file with mode: 0644]