summaryrefslogtreecommitdiff
path: root/src/mainboard/google/asurada/mainboard.c
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@chromium.org>2021-01-05 17:57:04 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-01-08 08:31:32 +0000
commit3f80a7aa6db62c16a724b86dfdcfe6202859e6e8 (patch)
tree2f22c41662a0c9303fe2dc18f4931011e25f7f1f /src/mainboard/google/asurada/mainboard.c
parent3436bb03f6c328a02688847f929ec28e1c98eab0 (diff)
mb/google/asurada: Support audio
- Turns audio-related things power on. - Selects I2S pin-muxing. - Exposes GPIO "speaker enable" for switching on and off. BUG=b:176856418 Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: If595657bbddad85bc9a154b3648bae1190cb00b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49135 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/asurada/mainboard.c')
-rw-r--r--src/mainboard/google/asurada/mainboard.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c
index f836724df6..812cb006da 100644
--- a/src/mainboard/google/asurada/mainboard.c
+++ b/src/mainboard/google/asurada/mainboard.c
@@ -193,10 +193,23 @@ static void configure_sdcard(void)
mainboard_enable_regulator(MTK_REGULATOR_VCCQ, enable);
}
+static void configure_audio(void)
+{
+ /* Audio PWR */
+ mtcmos_audio_power_on();
+
+ /* SoC I2S */
+ gpio_set_mode(GPIO(I2S3_MCK), PAD_I2S3_MCK_FUNC_I2S3_MCK);
+ gpio_set_mode(GPIO(I2S3_BCK), PAD_I2S3_BCK_FUNC_I2S3_BCK);
+ gpio_set_mode(GPIO(I2S3_LRCK), PAD_I2S3_LRCK_FUNC_I2S3_LRCK);
+ gpio_set_mode(GPIO(I2S3_DO), PAD_I2S3_DO_FUNC_I2S3_DO);
+}
+
static void mainboard_init(struct device *dev)
{
configure_emmc();
configure_sdcard();
+ configure_audio();
setup_usb_host();
register_reset_to_bl31();