summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rex/variants
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/rex/variants')
-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;
+}