summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2024-05-13 11:11:53 +0200
committerMaximilian Brune <maximilian.brune@9elements.com>2024-05-20 12:58:07 +0000
commit78a26aca8b8324115f3d8078747a74ee27a257a6 (patch)
tree68aa65929c9d5634fc77cf57bba3fd82c5bd8bf2 /src/mainboard
parentf2d260d9885264e1da8dbcd5609d0d082d7fcfe8 (diff)
mb/prodrive/hermes/hda_verb.c: Refactor port B Vref cfg
Refactor the `get_port_b_vref_cfg()` function to only return the variable bits of the value. The NID itself is not connected, and the `misc` field in the verb conveys the Vref value. Change-Id: I5108f5339c5b002403a4e5339da6d52046c8bcbe Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82395 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/prodrive/hermes/hda_verb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c
index cab4fd344b..5876df5a2b 100644
--- a/src/mainboard/prodrive/hermes/hda_verb.c
+++ b/src/mainboard/prodrive/hermes/hda_verb.c
@@ -95,15 +95,15 @@ static u32 get_port_b_vref_cfg(uint8_t pink_rear_vref)
switch (pink_rear_vref) {
default:
case 0:
- return 0x411110f0; /* Disabled (Hi-Z) */
+ return 0; /* Disabled (Hi-Z) */
case 1:
- return 0x411111f0; /* 50% of LDO out */
+ return 1; /* 50% of LDO out */
case 2:
- return 0x411114f0; /* 80% of LDO out */
+ return 4; /* 80% of LDO out */
case 3:
- return 0x411115f0; /* 100% of LDO out */
+ return 5; /* 100% of LDO out */
case 4:
- return 0x411112f0; /* Ground */
+ return 2; /* Ground */
}
}
@@ -145,7 +145,7 @@ static void mainboard_r0x_configure_alc888(u8 *base, u32 viddid)
* persist after codec resets, a custom Realtek driver (ab)uses NID 0x12
* to restore port B Vref after resetting the codec.
*/
- AZALIA_PIN_CFG(0, 0x12, port_b_vref_cfg),
+ AZALIA_PIN_CFG(0, 0x12, 0x411110f0 | port_b_vref_cfg << 8),
AZALIA_PIN_CFG(0, 0x19, front_mic_cfg),
AZALIA_PIN_CFG(0, 0x1b, front_panel_cfg),
0x0205000d, /* Pin 37 vrefo hidden register - used as port C vref */