From 68e3826071898a1ce7fed249d2f6fed48f1284b1 Mon Sep 17 00:00:00 2001 From: Uday M Bhat Date: Thu, 22 Jun 2023 21:25:55 +0530 Subject: [PATCH] mb/google/rex: Enable Bluetooth offload for soundwire audio This patch enables BT offload feature for soundwire audio over SSP1. BT mode is selected via FW_CONFIG and corresponding VGPIOs are programmed. BUG=b:275538390 TEST=build and verify BT offload on rex soundwire audio Change-Id: I99df78787d9f54c91bcedf6f70352890a715cdb3 Signed-off-by: Uday M Bhat Reviewed-on: https://review.coreboot.org/c/coreboot/+/75924 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/mainboard/google/rex/variants/rex0/fw_config.c | 3 ++- src/mainboard/google/rex/variants/rex0/variant.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/rex/variants/rex0/fw_config.c b/src/mainboard/google/rex/variants/rex0/fw_config.c index 16ded29491..416b4769b1 100644 --- a/src/mainboard/google/rex/variants/rex0/fw_config.c +++ b/src/mainboard/google/rex/variants/rex0/fw_config.c @@ -108,7 +108,8 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) } else if (fw_config_probe(FW_CONFIG(AUDIO, MAX98363_CS42L42_SNDW))) { printk(BIOS_INFO, "Configure GPIOs for SoundWire audio.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, i2s_disable_pads); - GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_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_I2S))) { printk(BIOS_INFO, "Configure GPIOs for I2S audio.\n"); GPIO_PADBASED_OVERRIDE(padbased_table, sndw_disable_pads); diff --git a/src/mainboard/google/rex/variants/rex0/variant.c b/src/mainboard/google/rex/variants/rex0/variant.c index 8cf8ce2420..6641d4b920 100644 --- a/src/mainboard/google/rex/variants/rex0/variant.c +++ b/src/mainboard/google/rex/variants/rex0/variant.c @@ -28,8 +28,10 @@ void variant_generate_s0ix_hook(enum s0ix_entry entry) void variant_update_soc_chip_config(struct soc_intel_meteorlake_config *config) { - config->cnvi_bt_audio_offload = fw_config_probe(FW_CONFIG(AUDIO, - MAX98360_ALC5682I_I2S)); + if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S)) || + fw_config_probe(FW_CONFIG(AUDIO, MAX98363_CS42L42_SNDW))) { + config->cnvi_bt_audio_offload = true; + } if (fw_config_probe(FW_CONFIG(DB_USB, USB4_KB8010)) || fw_config_probe(FW_CONFIG(DB_USB, USB4_ANX7452)) ||