diff options
Diffstat (limited to 'src/soc/intel/meteorlake')
-rw-r--r-- | src/soc/intel/meteorlake/fsp_params.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index 702820a788..c2770e630c 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -9,6 +9,7 @@ #include <cpu/intel/microcode.h> #include <device/device.h> #include <device/pci.h> +#include <drivers/usb/acpi/chip.h> #include <fsp/api.h> #include <fsp/fsp_debug_event.h> #include <fsp/fsp_gop_blt.h> @@ -576,6 +577,23 @@ static void fill_fsps_lan_params(FSP_S_CONFIG *s_cfg, static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_meteorlake_config *config) { + struct device *port = NULL; + struct drivers_usb_acpi_config *usb_cfg; + bool usb_audio_offload = false; + + /* Search through the devicetree for matching USB devices */ + while ((port = dev_find_path(port, DEVICE_PATH_USB)) != NULL) { + /* Skip ports that are not enabled or not of USB type */ + if (!port->enabled || port->path.type != DEVICE_PATH_USB) + continue; + + usb_cfg = port->chip_info; + if (usb_cfg && usb_cfg->cnvi_bt_audio_offload) { + usb_audio_offload = true; + break; + } + } + /* CNVi */ s_cfg->CnviMode = is_devfn_enabled(PCI_DEVFN_CNVI_WIFI); s_cfg->CnviWifiCore = config->cnvi_wifi_core; @@ -594,6 +612,13 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg, s_cfg->CnviBtCore = 0; s_cfg->CnviBtAudioOffload = 0; } + if (s_cfg->CnviBtAudioOffload && !usb_audio_offload) { + printk(BIOS_WARNING, "CNVi BT Audio offload enabled but not in USB driver\n"); + } + if (!s_cfg->CnviBtAudioOffload && usb_audio_offload) { + printk(BIOS_ERR, "USB BT Audio offload enabled but CNVi BT offload disabled\n"); + usb_cfg->cnvi_bt_audio_offload = 0; + } } static void fill_fsps_vmd_params(FSP_S_CONFIG *s_cfg, |