From 80594b79f99bcb72a02685bccd6bd063070470f6 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 8 Feb 2021 13:35:59 +0100 Subject: mb/prodrive/hermes: Set Port C VREF as per EEPROM config Configure Port C VREF according to the settings in the EEPROM. Change-Id: I5b4f0d91fc30c6b585434b9450544281f4411ff4 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/50396 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/mainboard/prodrive/hermes/hda_verb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mainboard/prodrive/hermes/hda_verb.c') diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c index 473a2869a9..be7dbb4ec6 100644 --- a/src/mainboard/prodrive/hermes/hda_verb.c +++ b/src/mainboard/prodrive/hermes/hda_verb.c @@ -172,6 +172,23 @@ const u32 pc_beep_verbs[0] = {}; AZALIA_ARRAY_SIZES; +static u32 get_port_c_vref_cfg(uint8_t blue_rear_vref) +{ + switch (blue_rear_vref) { + default: + case 0: + return 0x02040000; + case 1: + return 0x02041000; + case 2: + return 0x02044000; + case 3: + return 0x02045000; + case 4: + return 0x02046000; + } +} + static u32 get_internal_audio_cfg(uint8_t internal_audio_connection) { switch (internal_audio_connection) { @@ -208,6 +225,8 @@ void mainboard_azalia_program_runtime_verbs(u8 *base, u32 viddid) const u32 verbs[] = { AZALIA_PIN_CFG(0, 0x1b, config), + 0x0205000d, + get_port_c_vref_cfg(board_cfg->blue_rear_vref), }; azalia_program_verb_table(base, verbs, ARRAY_SIZE(verbs)); -- cgit v1.2.3