Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44429 )
Change subject: util: Add spd_tools to generate SPDs for TGL boards ......................................................................
Patch Set 16:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44429/11/util/spd_tools/intel/ddr4/... File util/spd_tools/intel/ddr4/gen_spd.go:
https://review.coreboot.org/c/coreboot/+/44429/11/util/spd_tools/intel/ddr4/... PS11, Line 468: 8: 1 << 4,
That means that the settings for the H5ANAG6NCMR-XN part (a x16 part) is incorrect in the global json file as it's listed with 4 bank groups and 4 banks per group with deviceBusWidth of 16.
Actually, it is correct because that part is a DDP part and so each die has 2 bank groups. Thus, it has a total of 4 bank groups.
If that is true, doesn't that mean that all x4/x8 parts have one bankGroups/banksPerGroup setting and all x16 parts have a second bankGroups/banksPerGroup, then we don't need to specify banks or bank groups as part of the json, we can determine that based on deviceBusWidth?
Based on section 2.8 from JESD79-4C, these are the combinations I see:
x4 - always has 4 bank groups and 4 banks per group x8 - always has 4 bank groups and 4 banks per group x16 SDP - always has 2 bank groups and 4 banks per group x16 DDP - always has 4 bank groups and 4 banks per group
So, to answer your question, yes, based on deviceBusWidth and # of dies, it is possible to calculate bank groups. # banks per group stays constant always. Does that make sense?