mb/intel/ptlrvp: Add PTL-P RVP and GCS board IDs

This commit introduces new board ID definitions for PTL-P and GCS in the
PTLRVP mainboard code. The changes involve updating the `romstage.c` and
`memory.c` files to handle these new board IDs, ensuring that memory
configuration is correctly initialized based on the detected board
type.

Change-Id: Ia354db27a0124dcde2825e7a05a59ef5d539c4ef
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86833
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
This commit is contained in:
Bora Guvendik 2025-03-11 14:46:39 -07:00 committed by Matt DeVillier
commit 05aa75bd3d
3 changed files with 33 additions and 2 deletions

View file

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
#include <ec/intel/board_id.h>
#include <fsp/api.h>
#include <soc/romstage.h>
#include <string.h>
@ -20,6 +21,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
{
const struct pad_config *pads;
size_t pads_num;
int board_id = get_rvp_board_id();
const struct mb_cfg *mem_config = variant_memory_params();
bool half_populated = variant_is_half_populated();
struct mem_spd spd_info;
@ -32,5 +34,15 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
memset(&spd_info, 0, sizeof(spd_info));
variant_get_spd_info(&spd_info);
memcfg_init(memupd, mem_config, &spd_info, half_populated);
switch (board_id) {
case PTLP_LP5_T3_RVP:
case PTLP_LP5_T4_RVP:
case GCS_32GB:
case GCS_64GB:
memcfg_init(memupd, mem_config, &spd_info, half_populated);
break;
default:
die("Unknown board id = 0x%x\n", board_id);
break;
}
}

View file

@ -9,6 +9,13 @@
#include <stdint.h>
#include <vendorcode/google/chromeos/chromeos.h>
enum ptl_boardid {
PTLP_LP5_T3_RVP = 0x01,
PTLP_LP5_T4_RVP = 0x03,
GCS_32GB = 0x11,
GCS_64GB = 0x12,
};
/* The next set of functions return the gpio table and fill in the number of entries for
* each table.
*/

View file

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
#include <ec/intel/board_id.h>
#include <soc/romstage.h>
#include <soc/meminit.h>
@ -66,7 +67,18 @@ static const struct mb_cfg lp5_mem_config = {
const struct mb_cfg *variant_memory_params(void)
{
return &lp5_mem_config;
int board_id = get_rvp_board_id();
switch (board_id) {
case PTLP_LP5_T3_RVP:
case PTLP_LP5_T4_RVP:
case GCS_32GB:
case GCS_64GB:
return &lp5_mem_config;
default:
die("Unknown board id = 0x%x\n", board_id);
break;
}
}
void variant_get_spd_info(struct mem_spd *spd_info)