mb/google/dedede: Add CFR option menu support

Add CFR option menu support when using edk2 payload and SMMSTORE.
Include relevant items from Jasperlake SoC, Intel common, and ChromeEC.

TEST=build/boot google/dedede (maglia), verify CFR option
functionality.

Change-Id: I36b567a32232cb0f561c9f428157e421319d8dab
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90348
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
This commit is contained in:
Matt DeVillier 2025-12-02 13:06:46 -06:00
commit 1890c6d165
3 changed files with 46 additions and 0 deletions

View file

@ -14,6 +14,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
select DRIVERS_I2C_RT5645
select DRIVERS_INTEL_DPTF
select DRIVERS_INTEL_MIPI_CAMERA
select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE
select DRIVERS_SPI_ACPI
select DRIVERS_USB_ACPI
select EC_GOOGLE_CHROMEEC

View file

@ -12,6 +12,7 @@ ramstage-y += mainboard.c
ramstage-y += ec.c
ramstage-y += board_info.c
ramstage-y += fw_config.c
ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c
subdirs-y += variants/baseboard

View file

@ -0,0 +1,44 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <boot/coreboot_tables.h>
#include <drivers/option/cfr_frontend.h>
#include <ec/google/chromeec/cfr.h>
#include <intelblocks/cfr.h>
#include <soc/cfr.h>
static struct sm_obj_form system = {
.ui_name = "System",
.obj_list = (const struct sm_object *[]) {
&igd_dvmt,
&igd_aperture,
&legacy_8254_timer,
&me_state,
&me_state_counter,
&pciexp_aspm,
&pciexp_clk_pm,
&pciexp_l1ss,
&pciexp_speed,
&s0ix_enable,
&vtd,
NULL
},
};
static struct sm_obj_form ec = {
.ui_name = "ChromeEC Embedded Controller",
.obj_list = (const struct sm_object *[]) {
&ec_kb_backlight,
NULL
},
};
static struct sm_obj_form *sm_root[] = {
&system,
&ec,
NULL
};
void mb_cfr_setup_menu(struct lb_cfr *cfr_root)
{
cfr_write_setup_menu(cfr_root, sm_root);
}