diff options
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/fw_config.c | 16 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/overridetree.cb | 3 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/variant.c | 3 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/mainboard/google/rex/variants/rex0/fw_config.c b/src/mainboard/google/rex/variants/rex0/fw_config.c index 417bc39f33..ce5fe8d03c 100644 --- a/src/mainboard/google/rex/variants/rex0/fw_config.c +++ b/src/mainboard/google/rex/variants/rex0/fw_config.c @@ -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))) { diff --git a/src/mainboard/google/rex/variants/rex0/overridetree.cb b/src/mainboard/google/rex/variants/rex0/overridetree.cb index 5c7958a72f..c08ff2b493 100644 --- a/src/mainboard/google/rex/variants/rex0/overridetree.cb +++ b/src/mainboard/google/rex/variants/rex0/overridetree.cb @@ -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 diff --git a/src/mainboard/google/rex/variants/rex0/variant.c b/src/mainboard/google/rex/variants/rex0/variant.c index 2441f96cfd..a7e26e69e5 100644 --- a/src/mainboard/google/rex/variants/rex0/variant.c +++ b/src/mainboard/google/rex/variants/rex0/variant.c @@ -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; } |