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>
This commit is contained in:
Malik_Hsu 2021-11-11 15:03:50 +08:00 committed by Felix Held
parent b25576fa63
commit df99e57289
2 changed files with 15 additions and 1 deletions

View File

@ -182,7 +182,7 @@ chip soc/intel/alderlake
register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
register "property_list[0].name" = ""realtek,jd-src"" register "property_list[0].name" = ""realtek,jd-src""
register "property_list[0].integer" = "1" register "property_list[0].integer" = "1"
device i2c 1a on device i2c 1a alias audio_codec on
probe AUDIO MAX98360_ALC5682I_I2S probe AUDIO MAX98360_ALC5682I_I2S
end end
end end

View File

@ -3,6 +3,7 @@
#include <baseboard/variants.h> #include <baseboard/variants.h>
#include <boardid.h> #include <boardid.h>
#include <device/device.h> #include <device/device.h>
#include <drivers/i2c/hid/chip.h>
static void devtree_update_emmc_rtd3(uint32_t board_ver) 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; 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) void variant_devtree_update(void)
{ {
uint32_t board_ver = board_id(); uint32_t board_ver = board_id();
devtree_update_emmc_rtd3(board_ver); devtree_update_emmc_rtd3(board_ver);
devtree_update_audio_codec(board_ver);
} }