| 1 |
|
| 2 |
|
| 3 |
#include <baseboard/variants.h> |
| 4 |
#include <fw_config.h> |
| 5 |
#include <sar.h> |
| 6 |
#include <soc/gpio_soc_defs.h> |
| 7 |
#include <intelblocks/graphics.h> |
| 8 |
|
| 9 |
|
| 10 |
#define TRANS_DDI_FUNC_CTL2_A 0x60404 |
| 11 |
#define TRANS_DDI_AUDIO_MUTE_OVERRIDE_BITS_FIELDS (3 << 6) |
| 12 |
|
| 13 |
const char *get_wifi_sar_cbfs_filename(void) |
| 14 |
{ |
| 15 |
return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI)); |
| 16 |
} |
| 17 |
|
| 18 |
static const struct pad_config wifi_pcie_enable_pad[] = { |
| 19 |
|
| 20 |
PAD_CFG_GPO(GPP_H20, 1, DEEP), |
| 21 |
|
| 22 |
PAD_CFG_GPO(GPP_B11, 1, DEEP), |
| 23 |
}; |
| 24 |
|
| 25 |
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) |
| 26 |
{ |
| 27 |
if (!fw_config_probe(FW_CONFIG(WIFI, WIFI_6E))) { |
| 28 |
printk(BIOS_INFO, "CNVi bluetooth disabled by fw_config\n"); |
| 29 |
config->cnvi_bt_core = false; |
| 30 |
printk(BIOS_INFO, "CNVi bluetooth audio offload disabled by fw_config\n"); |
| 31 |
config->cnvi_bt_audio_offload = false; |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
void fw_config_gpio_padbased_override(struct pad_config *padbased_table) |
| 36 |
{ |
| 37 |
if (fw_config_probe(FW_CONFIG(WIFI, WIFI_6_7921)) |
| 38 |
|| fw_config_probe(FW_CONFIG(WIFI, WIFI_6_8852))) { |
| 39 |
printk(BIOS_INFO, "Enable PCie based Wifi GPIO pins.\n"); |
| 40 |
gpio_padbased_override(padbased_table, wifi_pcie_enable_pad, |
| 41 |
ARRAY_SIZE(wifi_pcie_enable_pad)); |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
void variant_finalize(void) |
| 46 |
{ |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
graphics_gtt_rmw(TRANS_DDI_FUNC_CTL2_A, ~TRANS_DDI_AUDIO_MUTE_OVERRIDE_BITS_FIELDS, |
| 55 |
TRANS_DDI_AUDIO_MUTE_OVERRIDE_BITS_FIELDS); |
| 56 |
} |