mb/google/rex/var/rex0: Enable BT offload audio for Intel MtP2 module

Enable the required GPIO and FW_CONFIG support to configure BT offload
audio in discrete mode for Intel Mysty Peak module on google/rex
Proto2 HW.

BUG=b:297125514
Test=Verified BT audio playback on google/rex Proto2.

Change-Id: I560f1700f78f8b653dfcc2f26764f0ebf2652689
Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77357
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
This commit is contained in:
Anil Kumar 2023-08-09 11:20:14 -07:00 committed by Jakub Czapiga
parent 7865ce89ff
commit 9acaa2b7fc
3 changed files with 21 additions and 1 deletions

View File

@ -53,6 +53,17 @@ static const struct pad_config bt_i2s_enable_pads[] = {
PAD_CFG_NF(GPP_VGPIO37, NONE, DEEP, NF1),
};
static const struct pad_config discrete_bt_i2s_enable_pads[] = {
/* GPP_S00 : [] ==> I2S1_SCLK */
PAD_CFG_NF(GPP_S00, NONE, DEEP, NF6),
/* GPP_S01 : [] ==> I2S1_SFRM */
PAD_CFG_NF(GPP_S01, NONE, DEEP, NF6),
/* GPP_S02 : [] ==> I2S1_TXD */
PAD_CFG_NF(GPP_S02, NONE, DEEP, NF6),
/* GPP_S03 : [] ==> I2S1_RXD */
PAD_CFG_NF(GPP_S03, NONE, DEEP, NF6),
};
static const struct pad_config bt_i2s_disable_pads[] = {
/* GPP_V30 : [] ==> BT_I2S_BCLK */
PAD_NC(GPP_VGPIO30, NONE),
@ -131,6 +142,11 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
GPIO_PADBASED_OVERRIDE(padbased_table, sndw_disable_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, MAX98360_ALC5682I_DISCRETE_I2S_BT))) {
printk(BIOS_INFO, "Configure GPIOs for I2S audio.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, sndw_disable_pads);
printk(BIOS_INFO, "Configure GPIOs for BT offload mode(discrete).\n");
GPIO_PADBASED_OVERRIDE(padbased_table, discrete_bt_i2s_enable_pads);
}
if (fw_config_probe(FW_CONFIG(ISH, ISH_ENABLE))) {

View File

@ -3,6 +3,7 @@ fw_config
option AUDIO_UNKNOWN 0
option MAX98360_ALC5682I_I2S 1
option MAX98363_CS42L42_SNDW 2
option MAX98360_ALC5682I_DISCRETE_I2S_BT 3
end
field CELLULAR 4 5
option CELLULAR_ABSENT 0
@ -462,6 +463,7 @@ chip soc/intel/meteorlake
register "property_list[0].integer" = "1"
device i2c 1a on
probe AUDIO MAX98360_ALC5682I_I2S
probe AUDIO MAX98360_ALC5682I_DISCRETE_I2S_BT
end
end
chip drivers/intel/mipi_camera
@ -808,6 +810,7 @@ chip soc/intel/meteorlake
register "sdmode_delay" = "5"
device generic 0 on
probe AUDIO MAX98360_ALC5682I_I2S
probe AUDIO MAX98360_ALC5682I_DISCRETE_I2S_BT
end
end
chip drivers/intel/soundwire

View File

@ -29,7 +29,8 @@ void variant_generate_s0ix_hook(enum s0ix_entry entry)
void variant_update_soc_chip_config(struct soc_intel_meteorlake_config *config)
{
if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S)) ||
fw_config_probe(FW_CONFIG(AUDIO, MAX98363_CS42L42_SNDW))) {
fw_config_probe(FW_CONFIG(AUDIO, MAX98363_CS42L42_SNDW)) ||
fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_DISCRETE_I2S_BT))) {
config->cnvi_bt_audio_offload = true;
}