diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig index fea28b4f25..a9b45920db 100644 --- a/src/mainboard/google/poppy/Kconfig +++ b/src/mainboard/google/poppy/Kconfig @@ -6,6 +6,7 @@ config BOARD_GOOGLE_BASEBOARD_POPPY select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_OPTION_CFR_ENABLED if PAYLOAD_EDK2 && SMMSTORE select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_BOARDID select EC_GOOGLE_CHROMEEC_ESPI diff --git a/src/mainboard/google/poppy/Makefile.mk b/src/mainboard/google/poppy/Makefile.mk index 9f36e79463..65b8a87895 100644 --- a/src/mainboard/google/poppy/Makefile.mk +++ b/src/mainboard/google/poppy/Makefile.mk @@ -8,6 +8,7 @@ verstage-$(CONFIG_CHROMEOS) += chromeos.c romstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c +ramstage-$(CONFIG_DRIVERS_OPTION_CFR) += cfr.c ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c ramstage-y += mainboard.c ramstage-y += ramstage.c diff --git a/src/mainboard/google/poppy/cfr.c b/src/mainboard/google/poppy/cfr.c new file mode 100644 index 0000000000..2025ad32ee --- /dev/null +++ b/src/mainboard/google/poppy/cfr.c @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include +#include + +static struct sm_obj_form system = { + .ui_name = "System", + .obj_list = (const struct sm_object *[]) { + &hyper_threading, + &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 *[]) { + &auto_fan_control, + &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); +}