mb/google/corsola: Configure audio

According schematics, we configure audio by turning on setting of
audio power and selecting I2S pin-mux.

Schematics references:
kingler: schematic_kingler_proto0_gerber_20211115.pdf
krabby: crab_proto 0_20211112_final.pdf

BUG=b:204164695
TEST=Verified by CLI command(badusbbeep/devbeep) on kingler and krabby

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Change-Id: Ia6374d0e5535b7cff4df8759312786fef8b94b6b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
Rex-BC Chen 2022-01-04 11:07:22 +08:00 committed by Hung-Te Lin
parent df1d2b4bb9
commit a8a9552d75
1 changed files with 13 additions and 0 deletions

View File

@ -24,6 +24,17 @@ static void register_reset_to_bl31(void)
register_bl31_aux_param(&param_reset.h); register_bl31_aux_param(&param_reset.h);
} }
static void configure_audio(void)
{
mtcmos_audio_power_on();
/* Set up I2S */
gpio_set_mode(GPIO(I2S2_MCK), PAD_I2S2_MCK_FUNC_I2S2_MCK);
gpio_set_mode(GPIO(I2S2_BCK), PAD_I2S2_BCK_FUNC_I2S2_BCK);
gpio_set_mode(GPIO(I2S2_LRCK), PAD_I2S2_LRCK_FUNC_I2S2_LRCK);
gpio_set_mode(GPIO(EINT4), PAD_EINT4_FUNC_I2S3_DO);
}
static void mainboard_init(struct device *dev) static void mainboard_init(struct device *dev)
{ {
mtk_msdc_configure_emmc(true); mtk_msdc_configure_emmc(true);
@ -35,6 +46,8 @@ static void mainboard_init(struct device *dev)
setup_usb_host(); setup_usb_host();
configure_audio();
if (spm_init()) if (spm_init())
printk(BIOS_ERR, "spm init failed, system suspend may not work\n"); printk(BIOS_ERR, "spm init failed, system suspend may not work\n");