diff options
author | Rui Zhou <zhourui@huaqin.corp-partner.google.com> | 2024-07-01 09:11:14 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-07-03 14:31:32 +0000 |
commit | 16b18a8b3047d4a9fbfe087711e3f3656d90b96d (patch) | |
tree | 0c03103b2ce173359f8c5443d87cd5cf48114b4f /src/mainboard/google/geralt/chromeos.c | |
parent | e301f3934d9ba999042c86c6307ca32b47199e61 (diff) |
mb/google/geralt: Replace GERALT_USE_MAX98390 with FW_CONFIG for TAS2563
Use FW_CONFIG to differentiate MAX98390 and TAS2563. Since config
GERALT_USE_MAX98390 is no longer needed after using FW_CONFIG,
we remove GERALT_USE_MAX98390 from Kconfig.
BUG=b:345629159
BRANCH=none
TEST=emerge-GERALT coreboot
TEST=Verify beep function through deploy in depthcharge successfully.
Change-Id: Ie9f0cbc30dd950b85581fc1924fa351efe1e0aab
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83287
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Diffstat (limited to 'src/mainboard/google/geralt/chromeos.c')
-rw-r--r-- | src/mainboard/google/geralt/chromeos.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mainboard/google/geralt/chromeos.c b/src/mainboard/google/geralt/chromeos.c index d66b7d5233..df606f957b 100644 --- a/src/mainboard/google/geralt/chromeos.c +++ b/src/mainboard/google/geralt/chromeos.c @@ -3,6 +3,7 @@ #include <bootmode.h> #include <boot/coreboot_tables.h> #include <drivers/tpm/cr50.h> +#include <fw_config.h> #include <gpio.h> #include "gpio.h" @@ -53,17 +54,18 @@ void fill_lb_gpios(struct lb_gpios *gpios) lb_add_gpios(gpios, sd_card_gpios, ARRAY_SIZE(sd_card_gpios)); } - if (CONFIG(GERALT_USE_MAX98390)) { - struct lb_gpio max98390_gpios[] = { - {GPIO_RST_SPKR_L.id, ACTIVE_LOW, -1, "speaker reset"}, - }; - lb_add_gpios(gpios, max98390_gpios, ARRAY_SIZE(max98390_gpios)); - } else if (CONFIG(GERALT_USE_NAU8318)) { + if (CONFIG(GERALT_USE_NAU8318)) { struct lb_gpio nau8318_gpios[] = { {GPIO_EN_SPKR.id, ACTIVE_HIGH, -1, "speaker enable"}, {GPIO_BEEP_ON_OD.id, ACTIVE_HIGH, -1, "beep enable"}, }; lb_add_gpios(gpios, nau8318_gpios, ARRAY_SIZE(nau8318_gpios)); + } else if (fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_MAX98390)) || + fw_config_probe(FW_CONFIG(AUDIO_AMP, AMP_TAS2563))) { + struct lb_gpio smartamp_gpios[] = { + {GPIO_RST_SPKR_L.id, ACTIVE_LOW, -1, "speaker reset"}, + }; + lb_add_gpios(gpios, smartamp_gpios, ARRAY_SIZE(smartamp_gpios)); } } |