summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2022-01-04 11:07:22 +0800
committerHung-Te Lin <hungte@chromium.org>2022-01-06 02:24:33 +0000
commita8a9552d75f91b05a65a1da7281e877d71f87b94 (patch)
treeb46bc42d78f9d554c2dc5a50734563513e3412a3
parentdf1d2b4bb9f0a196ac61ec7cafd16b3428d6f1ac (diff)
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>
-rw-r--r--src/mainboard/google/corsola/mainboard.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainboard/google/corsola/mainboard.c b/src/mainboard/google/corsola/mainboard.c
index 910d8d6ea9..959dca6767 100644
--- a/src/mainboard/google/corsola/mainboard.c
+++ b/src/mainboard/google/corsola/mainboard.c
@@ -24,6 +24,17 @@ static void register_reset_to_bl31(void)
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)
{
mtk_msdc_configure_emmc(true);
@@ -35,6 +46,8 @@ static void mainboard_init(struct device *dev)
setup_usb_host();
+ configure_audio();
+
if (spm_init())
printk(BIOS_ERR, "spm init failed, system suspend may not work\n");