aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya
diff options
context:
space:
mode:
authorMalik_Hsu <malik_hsu@wistron.corp-partner.google.com>2021-11-11 15:03:50 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-11-17 00:34:41 +0000
commitdf99e57289ba2413cc82ef5f8dc70e37059eac31 (patch)
tree5c72d8f3d70061b0b1b1773bf92a9cb8c7b284e0 /src/mainboard/google/brya
parentb25576fa6368f288f1ce3e34f87894d6cd3859d1 (diff)
mb/google/brya/variants/primus: enable ALC5682I-VS
In next phase build, the audio codec will change to ALC5682I-VS BUG=b:205883511 TEST=emerge-brya coreboot chromeos-bootimage and check audio function Signed-off-by: Malik_Hsu <malik_hsu@wistron.corp-partner.google.com> Change-Id: I5906ef9bb88da7fe450a986bf7dd1ee701227f95 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59173 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/brya')
-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);
}