Joey Peng has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60532 )
Change subject: mb/google/brya/var/taniks:Add probe for audio 4 channel speaker ......................................................................
mb/google/brya/var/taniks:Add probe for audio 4 channel speaker
Use probe statement to enable AUDIO_MAX98357_ALC5682I_I2S_2WAY for fw_config.
BUG=b:207808510 TEST=dmidecode -t 11 shows correct audio fw_config.
Signed-off-by: Joey Peng joey.peng@lcfc.corp-partner.google.com Change-Id: I2986bd212cef47f70dfeedc642a8db3314c947f6 --- M src/mainboard/google/brya/variants/taniks/fw_config.c M src/mainboard/google/brya/variants/taniks/overridetree.cb 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/60532/1
diff --git a/src/mainboard/google/brya/variants/taniks/fw_config.c b/src/mainboard/google/brya/variants/taniks/fw_config.c index 8a7c6b4..1b18a09 100644 --- a/src/mainboard/google/brya/variants/taniks/fw_config.c +++ b/src/mainboard/google/brya/variants/taniks/fw_config.c @@ -52,5 +52,11 @@ gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads)); gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(i2s_enable_pads)); } + + if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_MAX98357_ALC5682I_I2S_2WAY))) { + printk(BIOS_INFO, "Configure audio over I2S with MAX98357 ALC5682I 2 Way.\n"); + gpio_configure_pads(dmic_enable_pads, ARRAY_SIZE(dmic_enable_pads)); + gpio_configure_pads(i2s_enable_pads, ARRAY_SIZE(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/taniks/overridetree.cb b/src/mainboard/google/brya/variants/taniks/overridetree.cb index cb8c99a..e97f92a 100644 --- a/src/mainboard/google/brya/variants/taniks/overridetree.cb +++ b/src/mainboard/google/brya/variants/taniks/overridetree.cb @@ -16,6 +16,7 @@ field AUDIO 5 7 option AUDIO_UNKNOWN 0 option AUDIO_MAX98357_ALC5682I_I2S 1 + option AUDIO_MAX98357_ALC5682I_I2S_2WAY 2 end field KB_LAYOUT 8 9 option KB_LAYOUT_DEFAULT 0 @@ -249,6 +250,7 @@ register "property_list[0].integer" = "1" device i2c 1a on probe AUDIO AUDIO_MAX98357_ALC5682I_I2S + probe AUDIO AUDIO_MAX98357_ALC5682I_I2S_2WAY end end end @@ -325,6 +327,7 @@ register "sdmode_delay" = "5" device generic 0 on probe AUDIO AUDIO_MAX98357_ALC5682I_I2S + probe AUDIO AUDIO_MAX98357_ALC5682I_I2S_2WAY end end end