diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2021-07-22 00:54:03 -0600 |
---|---|---|
committer | Werner Zeh <werner.zeh@siemens.com> | 2021-07-26 05:31:52 +0000 |
commit | ce79ceec86a38145b3a27aa4c78cf83a76cd51d0 (patch) | |
tree | bb893cbe5a8b101105c1f95ca94a92042739cfbf /src/mainboard | |
parent | 16f2c5082c92ceb4defc252819aaeca96d801543 (diff) | |
download | coreboot-ce79ceec86a38145b3a27aa4c78cf83a76cd51d0.tar.gz coreboot-ce79ceec86a38145b3a27aa4c78cf83a76cd51d0.tar.bz2 coreboot-ce79ceec86a38145b3a27aa4c78cf83a76cd51d0.zip |
mb/google/dedede: Program VCCIO selection for EN_SPKR GPIO
Realtek speaker amplifiers under auto mode operation have Absolute Max
Rating (AMR) at 1.98 V. Hence probe the firmware config for speaker
amplifier and program the VCCIOSEL accordingly.
BUG=b:194120188
TEST=Build and boot to OS in Gallop. Ensure that the VCCIO selection is
configured as expected and probing the GPIO reads the configured
voltage.
Change-Id: Ifa0b272c23bc70d9b0b23f9cc9222d875cd24921
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/dedede/Makefile.inc | 1 | ||||
-rw-r--r-- | src/mainboard/google/dedede/fw_config.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/Makefile.inc b/src/mainboard/google/dedede/Makefile.inc index 1b5503d40f48..cc815d857b22 100644 --- a/src/mainboard/google/dedede/Makefile.inc +++ b/src/mainboard/google/dedede/Makefile.inc @@ -9,6 +9,7 @@ ramstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-y += mainboard.c ramstage-y += ec.c ramstage-y += board_info.c +ramstage-$(CONFIG_FW_CONFIG) += fw_config.c VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR)) diff --git a/src/mainboard/google/dedede/fw_config.c b/src/mainboard/google/dedede/fw_config.c new file mode 100644 index 000000000000..178f0e167903 --- /dev/null +++ b/src/mainboard/google/dedede/fw_config.c @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <bootstate.h> +#include <fw_config.h> +#include <gpio.h> + +static const struct pad_config spkr_pads[] = { + PAD_CFG_GPO_VCCIOSEL(GPP_D17, 0, PLTRST, 1V8), +}; + +static void fw_config_handle(void *unused) +{ + if (fw_config_probe(FW_CONFIG(AUDIO_AMP, RT1015P_AUTO))) { + gpio_configure_pads(spkr_pads, ARRAY_SIZE(spkr_pads)); + } +} +BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL); |