summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/variants/primus/overridetree.cb2
-rw-r--r--src/mainboard/google/brya/variants/primus/variant.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/variants/primus/overridetree.cb b/src/mainboard/google/brya/variants/primus/overridetree.cb
index 8028798f3c..48319b7f5b 100644
--- a/src/mainboard/google/brya/variants/primus/overridetree.cb
+++ b/src/mainboard/google/brya/variants/primus/overridetree.cb
@@ -182,7 +182,7 @@ chip soc/intel/alderlake
register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
register "property_list[0].name" = ""realtek,jd-src""
register "property_list[0].integer" = "1"
- device i2c 1a on
+ device i2c 1a alias audio_codec on
probe AUDIO MAX98360_ALC5682I_I2S
end
end
diff --git a/src/mainboard/google/brya/variants/primus/variant.c b/src/mainboard/google/brya/variants/primus/variant.c
index 4780334779..b783ac08e7 100644
--- a/src/mainboard/google/brya/variants/primus/variant.c
+++ b/src/mainboard/google/brya/variants/primus/variant.c
@@ -3,6 +3,7 @@
#include <baseboard/variants.h>
#include <boardid.h>
#include <device/device.h>
+#include <drivers/i2c/hid/chip.h>
static void devtree_update_emmc_rtd3(uint32_t board_ver)
{
@@ -13,8 +14,21 @@ static void devtree_update_emmc_rtd3(uint32_t board_ver)
emmc_rtd3->enabled = 0;
}
+static void devtree_update_audio_codec(uint32_t board_ver)
+{
+ struct device *audio_codec = DEV_PTR(audio_codec);
+ struct drivers_i2c_generic_config *config = audio_codec->chip_info;
+
+ if (board_ver <= 1)
+ return;
+
+ config->hid = "RTL5682";
+ audio_codec->enabled = 1;
+}
+
void variant_devtree_update(void)
{
uint32_t board_ver = board_id();
devtree_update_emmc_rtd3(board_ver);
+ devtree_update_audio_codec(board_ver);
}