Uday Bhat has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86121?usp=email )
Change subject: mb/google/fatcat/variants/fatcat: Enable BT audio offload ......................................................................
mb/google/fatcat/variants/fatcat: Enable BT audio offload
vGPIO configs are configured to enable SSP2 for BT audio offload.
BUG=b:391771159 Test=Verified BT offload with I2S and soundwire configuration
Change-Id: Id68667d674386cf9e6abc066a4637ee055a967f3 Signed-off-by: Uday M Bhat uday.m.bhat@intel.com --- M src/mainboard/google/fatcat/variants/fatcat/fw_config.c M src/mainboard/google/fatcat/variants/fatcat/variant.c 2 files changed, 37 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/86121/1
diff --git a/src/mainboard/google/fatcat/variants/fatcat/fw_config.c b/src/mainboard/google/fatcat/variants/fatcat/fw_config.c index 3e6a192..12fce92 100644 --- a/src/mainboard/google/fatcat/variants/fatcat/fw_config.c +++ b/src/mainboard/google/fatcat/variants/fatcat/fw_config.c @@ -85,6 +85,25 @@ PAD_CFG_GPO(GPP_D13, 1, PLTRST), };
+static const struct pad_config bt_i2s_enable_pads[] = { + /* GPP_V30 : [] ==> BT_I2S_BCLK - SSP2 */ + PAD_CFG_NF(GPP_VGPIO30, NONE, DEEP, NF3), + /* GPP_V31 : [] ==> BT_I2S_SYNC - SSP2 */ + PAD_CFG_NF(GPP_VGPIO31, NONE, DEEP, NF3), + /* GPP_V32 : [] ==> BT_I2S_SDO - SSP2 */ + PAD_CFG_NF(GPP_VGPIO32, NONE, DEEP, NF3), + /* GPP_V33 : [] ==> BT_I2S_SDI - SSP2 */ + PAD_CFG_NF(GPP_VGPIO33, NONE, DEEP, NF3), + /* GPP_V34 : [] ==> SSP_SCLK */ + PAD_CFG_NF(GPP_VGPIO34, NONE, DEEP, NF1), + /* GPP_V35 : [] ==> SSP_SFRM */ + PAD_CFG_NF(GPP_VGPIO35, NONE, DEEP, NF1), + /* GPP_V36 : [] ==> SSP_TXD */ + PAD_CFG_NF(GPP_VGPIO36, NONE, DEEP, NF1), + /* GPP_V37 : [] ==> SSP_RXD */ + PAD_CFG_NF(GPP_VGPIO37, NONE, DEEP, NF1), +}; + static const struct pad_config sndw_alc722_enable_pads[] = { /* SNDW3_CLK */ PAD_CFG_NF(GPP_S00, NONE, DEEP, NF1), @@ -541,15 +560,27 @@
if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_NONE))) GPIO_PADBASED_OVERRIDE(padbased_table, audio_disable_pads); - else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98360_ALC5682I_I2S))) + else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98360_ALC5682I_I2S))) { + printk(BIOS_INFO, "Configure GPIOs for I2S MAX98360 ALC5682 audio.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, i2s_enable_pads); + printk(BIOS_INFO, "Configure GPIOs for BT offload mode.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_enable_pads); + } else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98373_ALC5682_SNDW))) GPIO_PADBASED_OVERRIDE(padbased_table, sndw_external_codec_enable_pads); else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC722_SNDW)) || - fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC721_SNDW))) + fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC721_SNDW))) { + printk(BIOS_INFO, "Configure GPIOs for Soundwire audio.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, sndw_alc722_enable_pads); - else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256_HDA))) + printk(BIOS_INFO, "Configure GPIOs for BT offload mode.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_enable_pads); + } + else if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256_HDA))) { + printk(BIOS_INFO, "Configure GPIOs for HDA ALC 256 mode.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, hda_enable_pads); + printk(BIOS_INFO, "Configure GPIOs for BT offload mode.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_enable_pads); + }
if (fw_config_probe(FW_CONFIG(WIFI, WIFI_PCIE_6)) || fw_config_probe(FW_CONFIG(WIFI, WIFI_PCIE_7))) { diff --git a/src/mainboard/google/fatcat/variants/fatcat/variant.c b/src/mainboard/google/fatcat/variants/fatcat/variant.c index 086f709..8774b2f 100644 --- a/src/mainboard/google/fatcat/variants/fatcat/variant.c +++ b/src/mainboard/google/fatcat/variants/fatcat/variant.c @@ -14,10 +14,13 @@ { config->cnvi_wifi_core = false; config->cnvi_bt_core = false; + printk(BIOS_INFO, "Configure BT audio offload config.\n"); /* CNVi */ if (fw_config_probe(FW_CONFIG(WIFI, WIFI_CNVI_6)) || fw_config_probe(FW_CONFIG(WIFI, WIFI_CNVI_7))) { config->cnvi_wifi_core = true; config->cnvi_bt_core = true; + printk(BIOS_INFO, "Configure BT audio offload config to true.\n"); + config->cnvi_bt_audio_offload = true; } }