From 78fb910fe2a21ffe7e78954f801fd3ef57a3c519 Mon Sep 17 00:00:00 2001 From: Hualin Wei Date: Mon, 22 Sep 2025 20:38:54 +0800 Subject: [PATCH] mb/google/fatcat/var/lapis: Update the configuration of fw_config Use fw_config to probe WIFI and STORAGE Type. And Add get_wifi_sar_cbfs filename function. BUG=b:438785495 TEST=emerge-fatcat coreboot Change-Id: If59e4ae2f328585525f3651699f84a4000e93dc5 Signed-off-by: Hualin Wei Reviewed-on: https://review.coreboot.org/c/coreboot/+/89291 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal Reviewed-by: Pranava Y N --- .../google/fatcat/variants/lapis/Makefile.mk | 2 + .../google/fatcat/variants/lapis/fw_config.c | 9 ++++ .../fatcat/variants/lapis/overridetree.cb | 47 ++++++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 src/mainboard/google/fatcat/variants/lapis/fw_config.c diff --git a/src/mainboard/google/fatcat/variants/lapis/Makefile.mk b/src/mainboard/google/fatcat/variants/lapis/Makefile.mk index 4c33dad4db..dcd5ec7202 100644 --- a/src/mainboard/google/fatcat/variants/lapis/Makefile.mk +++ b/src/mainboard/google/fatcat/variants/lapis/Makefile.mk @@ -4,3 +4,5 @@ bootblock-y += gpio.c romstage-y += gpio.c romstage-y += memory.c ramstage-y += gpio.c +romstage-$(CONFIG_FW_CONFIG) += fw_config.c +ramstage-$(CONFIG_FW_CONFIG) += fw_config.c diff --git a/src/mainboard/google/fatcat/variants/lapis/fw_config.c b/src/mainboard/google/fatcat/variants/lapis/fw_config.c new file mode 100644 index 0000000000..4221a5bf8e --- /dev/null +++ b/src/mainboard/google/fatcat/variants/lapis/fw_config.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +const char *get_wifi_sar_cbfs_filename(void) +{ + return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI)); +} diff --git a/src/mainboard/google/fatcat/variants/lapis/overridetree.cb b/src/mainboard/google/fatcat/variants/lapis/overridetree.cb index 429c546e99..4d40ef9f7a 100644 --- a/src/mainboard/google/fatcat/variants/lapis/overridetree.cb +++ b/src/mainboard/google/fatcat/variants/lapis/overridetree.cb @@ -1,3 +1,41 @@ +fw_config + field WIFI 2 3 + option WIFI_CNVI_7 0 + option WIFI_CNVI_7E 1 + end + field TOUCHSCREEN 4 5 + option NONE_TOUCH 0 + option 14_TOUCH 1 + end + field TOUCHPAD 6 7 + option TOUCHPAD_UNKNOWN 0 + option TOUCHPAD_LPSS_I2C 1 + option TOUCHPAD_THC_I2C 2 + end + field STORAGE 8 9 + option STORAGE_UNKNOWN 0 + option STORAGE_NVME_GEN4 1 + option STORAGE_NVME_GEN5 2 + option STORAGE_UFS 3 + end + field KB 10 11 + option KB_UNKNOWN 0 + option KB_BL 1 + end + field UFC 12 13 + option UFC_UNKNOWN 0 + option UFC_1080P 1 + end + field FP 14 15 + option FP_ABSENT 0 + option FP_PRESENT 1 + end + field STYLUS 16 16 + option STYLUS_ABSENT 0 + option STYLUS_PRESENT 1 + end +end + chip soc/intel/pantherlake register "power_limits_config[PTL_CORE_1]" = "{ @@ -331,6 +369,8 @@ chip soc/intel/pantherlake end device ref pcie_rp9 on + probe STORAGE STORAGE_UNKNOWN + probe STORAGE STORAGE_NVME_GEN4 register "pcie_rp[PCIE_RP(9)]" = "{ .clk_src = 0, .clk_req = 0, @@ -344,6 +384,8 @@ chip soc/intel/pantherlake end # Gen4 SSD device ref cnvi_wifi on + probe WIFI WIFI_CNVI_7 + probe WIFI WIFI_CNVI_7E chip drivers/wifi/generic register "wake" = "GPE0_PME_B0" register "add_acpi_dma_property" = "true" @@ -353,7 +395,10 @@ chip soc/intel/pantherlake end end # CNVi - device ref cnvi_bluetooth on end + device ref cnvi_bluetooth on + probe WIFI WIFI_CNVI_7 + probe WIFI WIFI_CNVI_7E + end device ref thc0 on register "thc_wake_on_touch[0]" = "true"