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>
diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c
index cab4fd3..5876df5 100644
--- a/src/mainboard/prodrive/hermes/hda_verb.c
+++ b/src/mainboard/prodrive/hermes/hda_verb.c
@@ -95,15 +95,15 @@
 	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 @@
 		 * 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 */