summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Wang <Tyler.Wang@quanta.corp-partner.google.com>2023-11-21 15:38:57 +0800
committerJakub Czapiga <czapiga@google.com>2023-12-18 09:45:04 +0000
commitb24eadb973cdaffabdb03452338aaaca868ca380 (patch)
tree1f3368832a784c53866f28c3505df5c30df6c47c /src
parent8cf64473cbb3ce0d2bffdd46458fd8a827fd0a9e (diff)
mb/google/rex/var/karis: Enable audio BT offload
BUG=b:312099281 TEST=Build and boot to Karis. Verify the config from serial logs. w/o this CL - ``` [SPEW ] ------------------ CNVi Config ------------------ [SPEW ] CNVi Mode = 1 [SPEW ] Wi-Fi Core = 1 [SPEW ] BT Core = 1 [SPEW ] BT Audio Offload = 0 [SPEW ] BT Interface = 1 ``` w/ this CL - ``` [SPEW ] ------------------ CNVi Config ------------------ [SPEW ] CNVi Mode = 1 [SPEW ] Wi-Fi Core = 1 [SPEW ] BT Core = 1 [SPEW ] BT Audio Offload = 1 [SPEW ] BT Interface = 1 ``` Change-Id: Icd2c42261fdcfa5aac17be28fde3804348ddf9b4 Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/rex/variants/karis/fw_config.c51
-rw-r--r--src/mainboard/google/rex/variants/karis/variant.c5
2 files changed, 56 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/variants/karis/fw_config.c b/src/mainboard/google/rex/variants/karis/fw_config.c
index ea9f9ebd18..ae74a42fa4 100644
--- a/src/mainboard/google/rex/variants/karis/fw_config.c
+++ b/src/mainboard/google/rex/variants/karis/fw_config.c
@@ -34,6 +34,43 @@ static const struct pad_config stylus_disable_pads[] = {
PAD_NC(GPP_E09, NONE),
};
+static const struct pad_config cnvi_bt_disable_pads[] = {
+ /* GPP_F04 : [] ==> CNV_RF_RST_L */
+ PAD_NC(GPP_F04, NONE),
+ /* GPP_F05 : [] ==> CNV_CLKREQ */
+ PAD_NC(GPP_F05, NONE),
+};
+
+static const struct pad_config bt_i2s_enable_pads[] = {
+ /* GPP_V30 : [] ==> BT_I2S_BCLK */
+ PAD_CFG_NF(GPP_VGPIO30, NONE, DEEP, NF2),
+ /* GPP_V31 : [] ==> BT_I2S_SYNC */
+ PAD_CFG_NF(GPP_VGPIO31, NONE, DEEP, NF2),
+ /* GPP_V32 : [] ==> BT_I2S_SDO */
+ PAD_CFG_NF(GPP_VGPIO32, NONE, DEEP, NF2),
+ /* GPP_V33 : [] ==> BT_I2S_SDI */
+ PAD_CFG_NF(GPP_VGPIO33, NONE, DEEP, NF2),
+ /* GPP_V34 : [] ==> SSP2_SCLK */
+ PAD_CFG_NF(GPP_VGPIO34, NONE, DEEP, NF1),
+ /* GPP_V35 : [] ==> SSP2_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 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),
+};
+
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
if (fw_config_probe(FW_CONFIG(STYLUS, STYLUS_ABSENT))) {
@@ -44,4 +81,18 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
printk(BIOS_INFO, "Configure GPIOs for no FP module.\n");
GPIO_PADBASED_OVERRIDE(padbased_table, fp_disable_pads);
}
+ if (fw_config_probe(FW_CONFIG(AUDIO, ALC5650_NO_AMP_I2S))) {
+ 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_TYPE, WIFI_CNVI))) {
+ printk(BIOS_INFO, "Configure GPIOs for CNVi WIFI/BT module.\n");
+ GPIO_PADBASED_OVERRIDE(padbased_table, bt_i2s_enable_pads);
+ }
+ if (fw_config_probe(FW_CONFIG(WIFI_TYPE, WIFI_PCIE))) {
+ printk(BIOS_INFO, "Configure GPIOs for discrete WIFI/BT module.\n");
+ GPIO_PADBASED_OVERRIDE(padbased_table, discrete_bt_i2s_enable_pads);
+ printk(BIOS_INFO, "Configure GPIOs for discrete PCM BT path.\n");
+ GPIO_PADBASED_OVERRIDE(padbased_table, cnvi_bt_disable_pads);
+ }
}
diff --git a/src/mainboard/google/rex/variants/karis/variant.c b/src/mainboard/google/rex/variants/karis/variant.c
index 308eea6a28..85a908a846 100644
--- a/src/mainboard/google/rex/variants/karis/variant.c
+++ b/src/mainboard/google/rex/variants/karis/variant.c
@@ -9,3 +9,8 @@ const char *get_wifi_sar_cbfs_filename(void)
{
return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_TYPE));
}
+
+void variant_update_soc_chip_config(struct soc_intel_meteorlake_config *config)
+{
+ config->cnvi_bt_audio_offload = true;
+}