[S] Change in coreboot[main]: mb/google/skywalker: Add RT1019 support for beep sound
Yidi Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/87887?usp=email ) Change subject: mb/google/skywalker: Add RT1019 support for beep sound ...................................................................... mb/google/skywalker: Add RT1019 support for beep sound Derive the audio amplifier from FW_CONFIG, and set up I2C and I2S for RT1019.RT1019 and RT9123 use the same GPIOs on the Skywalker reference design, so the same function is used to improve code reusability. Also pass the corresponding GPIO to the payload. BUG=b:417083722 BRANCH=none TEST=Build pass and test with Depthcharge change: https://chromium-review.googlesource.com/c/chromiumos/platform/depthcharge/+... Check audio cmd in depthcharge with: firmware-shell: AUDIO CMD=audio 500 100 1 Change-Id: I512cd5c8635d08c6b6c54f04d11bf87c64d1b843 Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87887 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> --- M src/mainboard/google/skywalker/chromeos.c M src/mainboard/google/skywalker/devicetree.cb M src/mainboard/google/skywalker/mainboard.c 3 files changed, 10 insertions(+), 3 deletions(-) Approvals: build bot (Jenkins): Verified Yidi Lin: Looks good to me, approved Yu-Ping Wu: Looks good to me, approved diff --git a/src/mainboard/google/skywalker/chromeos.c b/src/mainboard/google/skywalker/chromeos.c index 36be542..700d815 100644 --- a/src/mainboard/google/skywalker/chromeos.c +++ b/src/mainboard/google/skywalker/chromeos.c @@ -56,6 +56,11 @@ {GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "rt9123_spk_en"}, }; lb_add_gpios(gpios, rt9123_gpios, ARRAY_SIZE(rt9123_gpios)); + } else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_RT1019))) { + struct lb_gpio rt1019_gpios[] = { + {GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "rt1019_spk_en"}, + }; + lb_add_gpios(gpios, rt1019_gpios, ARRAY_SIZE(rt1019_gpios)); } else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_ALC5645))) { struct lb_gpio alc5645_gpios[] = { {GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "alc5645_spk_en"}, diff --git a/src/mainboard/google/skywalker/devicetree.cb b/src/mainboard/google/skywalker/devicetree.cb index bb54417..92f9c5d 100644 --- a/src/mainboard/google/skywalker/devicetree.cb +++ b/src/mainboard/google/skywalker/devicetree.cb @@ -7,6 +7,7 @@ fw_config field AUDIO_AMP 25 27 option AMP_RT9123 0 + option AMP_RT1019 1 option AMP_ALC5645 3 end end diff --git a/src/mainboard/google/skywalker/mainboard.c b/src/mainboard/google/skywalker/mainboard.c index bd18299..652d812 100644 --- a/src/mainboard/google/skywalker/mainboard.c +++ b/src/mainboard/google/skywalker/mainboard.c @@ -17,7 +17,7 @@ #define AFE_SE_SECURE_CON1 (AUDIO_BASE + 0x5634) -static void configure_rt9123(void) +static void configure_rt9123_rt1019(void) { /* SoC I2S */ gpio_set_mode(GPIO_I2SOUT1_BCK, GPIO_FUNC(DMIC0_DAT0, I2SOUT1_BCK)); @@ -49,8 +49,9 @@ /* Switch to normal mode */ write32p(AFE_SE_SECURE_CON1, 0x0); - if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_RT9123))) - configure_rt9123(); + 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_ALC5645))) configure_alc5645(); else -- To view, visit https://review.coreboot.org/c/coreboot/+/87887?usp=email To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: coreboot Gerrit-Branch: main Gerrit-Change-Id: I512cd5c8635d08c6b6c54f04d11bf87c64d1b843 Gerrit-Change-Number: 87887 Gerrit-PatchSet: 6 Gerrit-Owner: Vince Liu <vince-wl.liu@mediatek.com> Gerrit-Reviewer: Hung-Te Lin <hungte@chromium.org> Gerrit-Reviewer: Rui Zhou <zhourui@huaqin.corp-partner.google.com> Gerrit-Reviewer: Yidi Lin <yidilin@google.com> Gerrit-Reviewer: Yu-Ping Wu <yupingso@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Jarried Lin <jarried.lin@mediatek.com> Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
participants (1)
-
Yidi Lin (Code Review)