summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/variants/primus/fw_config.c7
-rw-r--r--src/mainboard/google/brya/variants/primus/overridetree.cb2
-rw-r--r--src/mainboard/google/brya/variants/primus/variant.c5
3 files changed, 12 insertions, 2 deletions
diff --git a/src/mainboard/google/brya/variants/primus/fw_config.c b/src/mainboard/google/brya/variants/primus/fw_config.c
index 0beedc7941..c9b4a38be5 100644
--- a/src/mainboard/google/brya/variants/primus/fw_config.c
+++ b/src/mainboard/google/brya/variants/primus/fw_config.c
@@ -80,5 +80,12 @@ static void fw_config_handle(void *unused)
gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
}
+
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_VS_I2S))) {
+ printk(BIOS_INFO, "Configure audio over I2S with MAX98360 ALC5682I-VS.\n");
+ gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads));
+ gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads));
+ gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
+ }
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/primus/overridetree.cb b/src/mainboard/google/brya/variants/primus/overridetree.cb
index 48319b7f5b..ddb78c0ca7 100644
--- a/src/mainboard/google/brya/variants/primus/overridetree.cb
+++ b/src/mainboard/google/brya/variants/primus/overridetree.cb
@@ -14,6 +14,7 @@ fw_config
field AUDIO 8 10
option AUDIO_UNKNOWN 0
option MAX98360_ALC5682I_I2S 1
+ option MAX98360_ALC5682I_VS_I2S 2
end
field DB_LTE 11 12
option LTE_ABSENT 0
@@ -184,6 +185,7 @@ chip soc/intel/alderlake
register "property_list[0].integer" = "1"
device i2c 1a alias audio_codec on
probe AUDIO MAX98360_ALC5682I_I2S
+ probe AUDIO MAX98360_ALC5682I_VS_I2S
end
end
end #I2C0
diff --git a/src/mainboard/google/brya/variants/primus/variant.c b/src/mainboard/google/brya/variants/primus/variant.c
index b783ac08e7..e10648d6c3 100644
--- a/src/mainboard/google/brya/variants/primus/variant.c
+++ b/src/mainboard/google/brya/variants/primus/variant.c
@@ -4,6 +4,7 @@
#include <boardid.h>
#include <device/device.h>
#include <drivers/i2c/hid/chip.h>
+#include <fw_config.h>
static void devtree_update_emmc_rtd3(uint32_t board_ver)
{
@@ -22,8 +23,8 @@ static void devtree_update_audio_codec(uint32_t board_ver)
if (board_ver <= 1)
return;
- config->hid = "RTL5682";
- audio_codec->enabled = 1;
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_VS_I2S)))
+ config->hid = "RTL5682";
}
void variant_devtree_update(void)