From 9bea3130b5329d3de07a04066df5f0ec7ef2eb1c Mon Sep 17 00:00:00 2001 From: Cai Chen Date: Wed, 5 Nov 2025 10:42:13 +0800 Subject: [PATCH] mb/google/skywalker: Add AW88081 support for beep sound Add the FW_CONFIG configuration for the audio amp. BUG=b:426678967 TEST=emerge-skywalker coreboot chromeos-bootimage BRANCH=Skywalker Change-Id: Iaf461a26db92597883c8fa61f292bf14a145145c Signed-off-by: Cai Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/89913 Reviewed-by: Yidi Lin Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/mainboard/google/skywalker/devicetree.cb | 1 + src/mainboard/google/skywalker/mainboard.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/mainboard/google/skywalker/devicetree.cb b/src/mainboard/google/skywalker/devicetree.cb index e2618d1f19..e02d63e686 100644 --- a/src/mainboard/google/skywalker/devicetree.cb +++ b/src/mainboard/google/skywalker/devicetree.cb @@ -8,6 +8,7 @@ fw_config field AUDIO_AMP 25 27 option AMP_RT9123 0 option AMP_RT1019 1 + option AMP_AW88081 2 option AMP_ALC5645 3 option AMP_CS35L51 4 end diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index 9a1b0adb89..e219861b63 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -50,6 +50,17 @@ static void configure_cs35l51(void) printk(BIOS_INFO, "%s: AMP configuration done\n", __func__); } +static void configure_aw88081(void) +{ + /* Set the SOC corresponding pin to I2S related function */ + setup_i2s_speaker(); + + /* Init I2C bus timing register for audio codecs */ + mtk_i2c_bus_init(I2C8, I2C_SPEED_STANDARD); + + printk(BIOS_INFO, "%s: AMP configuration done\n", __func__); +} + static void configure_alc5645(void) { /* SoC I2S */ @@ -75,6 +86,8 @@ static void configure_audio(void) if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_RT9123)) || fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_RT1019))) configure_rt9123_rt1019(); + else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_AW88081))) + configure_aw88081(); else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_ALC5645))) configure_alc5645(); else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_CS35L51)))