From 651b765567ce5d8216679a72e9f213b4be0f546a Mon Sep 17 00:00:00 2001 From: Amanda Huang Date: Wed, 23 Mar 2022 00:25:07 +0800 Subject: [PATCH] mb/google/brya/var/brya0: Replace amp max98357 with max98360 Based on Brya EVT schametic, replace audio amp max98357 with max98360. Add a new audio FW_CONFIG field to support ALC5682I+MAX98360. BUG=b:224423056 BRANCH=firmware-brya-14505.B TEST=dmidecode -t 11 Change-Id: I3033e31cf5c2dade02dc19531f5e5365eeeb7a78 Signed-off-by: Amanda Huang Reviewed-on: https://review.coreboot.org/c/coreboot/+/62998 Tested-by: build bot (Jenkins) Reviewed-by: Frank Wu Reviewed-by: Tim Wawrzynczak Reviewed-by: Eric Lai --- .../google/brya/variants/brya0/fw_config.c | 5 +++++ .../brya/variants/brya0/overridetree.cb | 22 ++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c index 17d284aa29..e1c6f89dc1 100644 --- a/src/mainboard/google/brya/variants/brya0/fw_config.c +++ b/src/mainboard/google/brya/variants/brya0/fw_config.c @@ -126,5 +126,10 @@ static void fw_config_handle(void *unused) printk(BIOS_INFO, "Configure audio over I2S with ALC1019 NAU88L25B.\n"); enable_i2s(); } + + if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S_AMP_SSP2))) { + printk(BIOS_INFO, "Configure audio over I2S with MAX98360 ALC5682I.\n"); + enable_i2s(); + } } BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL); diff --git a/src/mainboard/google/brya/variants/brya0/overridetree.cb b/src/mainboard/google/brya/variants/brya0/overridetree.cb index 0f1c693529..e566067535 100644 --- a/src/mainboard/google/brya/variants/brya0/overridetree.cb +++ b/src/mainboard/google/brya/variants/brya0/overridetree.cb @@ -12,11 +12,12 @@ fw_config option KB_BL_PRESENT 1 end field AUDIO 8 10 - option AUDIO_UNKNOWN 0 - option MAX98357_ALC5682I_I2S 1 - option MAX98373_ALC5682_SNDW 2 - option MAX98373_NAU88L25B_I2S 3 - option ALC1019_NAU88L25B_I2S 4 + option AUDIO_UNKNOWN 0 + option MAX98357_ALC5682I_I2S 1 + option MAX98373_ALC5682_SNDW 2 + option MAX98373_NAU88L25B_I2S 3 + option ALC1019_NAU88L25B_I2S 4 + option MAX98360_ALC5682I_I2S_AMP_SSP2 5 end field DB_LTE 11 12 option LTE_ABSENT 0 @@ -254,6 +255,7 @@ chip soc/intel/alderlake register "property_list[0].integer" = "1" device i2c 1a on probe AUDIO MAX98357_ALC5682I_I2S + probe AUDIO MAX98360_ALC5682I_I2S_AMP_SSP2 end end chip drivers/i2c/nau8825 @@ -611,6 +613,16 @@ chip soc/intel/alderlake end end + chip drivers/generic/max98357a + register "hid" = ""MX98360A"" + register "sdmode_gpio" = + "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)" + register "sdmode_delay" = "5" + device generic 0 on + probe AUDIO MAX98360_ALC5682I_I2S_AMP_SSP2 + end + end + chip drivers/intel/soundwire device generic 0 on probe AUDIO MAX98373_ALC5682_SNDW