Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/60738 )
Change subject: mb/google/corsola: Configure audio ......................................................................
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 --- M src/mainboard/google/corsola/mainboard.c 1 file changed, 13 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved Rex-BC Chen: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/corsola/mainboard.c b/src/mainboard/google/corsola/mainboard.c index 910d8d6..959dca6 100644 --- a/src/mainboard/google/corsola/mainboard.c +++ b/src/mainboard/google/corsola/mainboard.c @@ -24,6 +24,17 @@ register_bl31_aux_param(¶m_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 @@
setup_usb_host();
+ configure_audio(); + if (spm_init()) printk(BIOS_ERR, "spm init failed, system suspend may not work\n");