Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
mb/prodrive/hermes/hda_verb: Fix some issues
* Use correct NID port mapping * Fix verb count in ACL888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 74 insertions(+), 60 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/1
diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c index 59b8aa6..6cde639 100644 --- a/src/mainboard/prodrive/hermes/hda_verb.c +++ b/src/mainboard/prodrive/hermes/hda_verb.c @@ -5,47 +5,11 @@ const u32 cim_verb_data[] = { 0x10ec0888, /* Codec Vendor / Device ID: Realtek ALC888 */ 0x10ec0888, /* Subsystem ID */ - 10, /* Number of 4 dword sets */ + 13, /* Number of 4 dword sets */ AZALIA_SUBVENDOR(0, 0x10ec0888),
- /* Port A: Front, Audio Header #1 */ - AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - SPECIAL7, - LINE_OUT, - OTHER_ANALOG, - COLOR_UNKNOWN, - false, - 0xf, - 0 - )), - /* Port B: Mic1, Line input (pink) */ - AZALIA_PIN_CFG(0, 0x15, AZALIA_PIN_DESC( - JACK, - EXTERNAL_PRIMARY_CHASSIS, - REAR, //FIXME - LINE_IN, - STEREO_MONO_1_8, - PINK, - false, - 0xf, - 0 - )), - /* Port C: Line, Speaker (only L) */ - AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - NA, - SPEAKER, - TYPE_UNKNOWN, - COLOR_UNKNOWN, - false, - 0xf, - 0 - )), /* Port D: Sidesurr, Line out (green) */ - AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_DESC( + AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC( //JACK, LINE_OUT, EXTERNAL_PRIMARY_CHASSIS, @@ -57,14 +21,50 @@ 0xf, 0 )), - /* Port E: Line2, Line input (blue) */ + /* Port A: Front, Audio Header #1 */ + AZALIA_PIN_CFG(0, 0x15, AZALIA_PIN_DESC( + INTEGRATED, + INTERNAL, + SPECIAL7, + LINE_OUT, + OTHER_ANALOG, + COLOR_UNKNOWN, + false, + 0xf, + 0 + )), + /* Port G: Not connected */ + AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_DESC( + NC, + LOCATION_OTHER, + NA, + DEVICE_OTHER, + TYPE_OTHER, + COLOR_OTHER, + true, + 0, + 0 + )), + /* Port H: Not connected */ + AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_DESC( + NC, + LOCATION_OTHER, + NA, + DEVICE_OTHER, + TYPE_OTHER, + COLOR_OTHER, + true, + 0, + 0 + )), + /* Port B: Mic1, Line input (pink) */ AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_DESC( JACK, EXTERNAL_PRIMARY_CHASSIS, REAR, //FIXME LINE_IN, STEREO_MONO_1_8, - BLUE, + PINK, false, 0xf, 0 @@ -81,20 +81,32 @@ 0xf, 0 )), - /* Port G: Not connected */ + /* Port C: Line, Speaker (only L) */ AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_DESC( - NC, - LOCATION_OTHER, + INTEGRATED, + INTERNAL, NA, - DEVICE_OTHER, - TYPE_OTHER, - COLOR_OTHER, - true, - 0, + SPEAKER, + TYPE_UNKNOWN, + COLOR_UNKNOWN, + false, + 0xf, 0 )), - /* Port H: Not connected */ + /* Port E: Line2, Line input (blue) */ AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_DESC( + JACK, + EXTERNAL_PRIMARY_CHASSIS, + REAR, //FIXME + LINE_IN, + STEREO_MONO_1_8, + BLUE, + false, + 0xf, + 0 + )), + /* Port CD: Not connected */ + AZALIA_PIN_CFG(0, 0x1c, AZALIA_PIN_DESC( NC, LOCATION_OTHER, NA, @@ -105,6 +117,8 @@ 0, 0 )), + /* BEEPIN: This NID is also used as SSID. Use magic constant to satisfy the driver. */ + AZALIA_PIN_CFG(0, 0x1d, 0x4000c601),
/* S/PDIF-OUT */ AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_DESC( @@ -131,16 +145,16 @@ 0 )),
- //FIXME COdec ID /* * VerbTable: CFL Display Audio Codec * Revision ID = 0xFF * Codec Vendor: 0x8086280B */ - 0x8086280B, 0xFFFFFFFF, - 5, /* Number of 4 dword sets */ + 6, /* Number of 4 dword sets */ + + AZALIA_SUBVENDOR(2, 0x80860101),
/* * Display Audio Verb Table @@ -148,10 +162,10 @@ * Port to be exposed to the inbox driver in the vanilla mode * PORT C - BIT[7:6] = 01b */ - 0x00878140, - 0x00878140, - 0x00878140, - 0x00878140, + 0x02878140, + 0x02878140, + 0x02878140, + 0x02878140, /* Pin Widget 5 - PORT B - Configuration Default: 0x18560010 */ AZALIA_PIN_CFG(2, 0x05, 0x18560010), /* Pin Widget 6 - PORT C - Configuration Default: 0x18560020 */ @@ -159,10 +173,10 @@ /* Pin Widget 7 - PORT D - Configuration Default: 0x18560030 */ AZALIA_PIN_CFG(2, 0x07, 0x18560030), /* Disable the third converter and third Pin (NID 08h) */ - 0x00878140, - 0x00878140, - 0x00878140, - 0x00878140, + 0x02878140, + 0x02878140, + 0x02878140, + 0x02878140, };
const u32 pc_beep_verbs[0] = {};
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#2).
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
mb/prodrive/hermes/hda_verb: Fix some issues
* Use correct NID port mapping * Fix verb count in ACL888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 86 insertions(+), 70 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 2: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/44772/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/2//COMMIT_MSG@10 PS2, Line 10: ACL888 ALC888
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 5: I don't think we need this blank line
Justin van Son has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 2:
(5 comments)
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 31: COMBINATION, This can be 1/8" mono/stereo. line in on rear will be removed.
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 75: INTEGRATED, this should be JACK, EXTERNAL_PRIMARY_CHASSIS, FRONT, MIC_IN, PINK
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 93: false, shouldn't this be true?
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 128: SEPARATE_CHASSIS, internal was correct here
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 140: SEPARATE_CHASSIS, internal was correct here too
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#3).
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
mb/prodrive/hermes/hda_verb: Fix some issues
* Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 84 insertions(+), 68 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/3
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 2:
(6 comments)
https://review.coreboot.org/c/coreboot/+/44772/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/2//COMMIT_MSG@10 PS2, Line 10: ACL888
ALC888
Done
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 31: COMBINATION,
This can be 1/8" mono/stereo. line in on rear will be removed.
Done
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 75: INTEGRATED,
this should be JACK, EXTERNAL_PRIMARY_CHASSIS, FRONT, MIC_IN, PINK
Done
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 93: false,
shouldn't this be true?
It's not connected to SENSE_A or SENSE_B.
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 128: SEPARATE_CHASSIS,
internal was correct here
Done
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 140: SEPARATE_CHASSIS,
internal was correct here too
Done
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#4).
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
mb/prodrive/hermes/hda_verb: Fix some issues
* Use correct NID port mapping * Fix verb count in ACL888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 85 insertions(+), 70 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/4
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 5:
I don't think we need this blank line
Done
Justin van Son has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 29: MIC_IN, Port A was a combination of rear mic in/ front header line out. so now it should be line out since the rear mic in is being dropped.
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 30: COMBINATION, This should be other analog
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 72: /* Port F: Mic2, Audio Header #2 */ This implies that there are 2 audio headers. Maybe reword?
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#5).
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
mb/prodrive/hermes/hda_verb: Fix some issues
* Use correct NID port mapping * Fix verb count in ACL888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 84 insertions(+), 69 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/5
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 29: MIC_IN,
Port A was a combination of rear mic in/ front header line out. […]
Done
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 30: COMBINATION,
This should be other analog
Done
https://review.coreboot.org/c/coreboot/+/44772/4/src/mainboard/prodrive/herm... PS4, Line 72: /* Port F: Mic2, Audio Header #2 */
This implies that there are 2 audio headers. […]
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Fix some issues ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44772/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/5//COMMIT_MSG@10 PS5, Line 10: ACL888 Looks like an older patchset was pushed.
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#6).
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
mb/prodrive/hermes/hda_verb: Update verb table for latest board revision
* Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs * Add more NIDs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/hda_verb.c 1 file changed, 36 insertions(+), 132 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/6
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 6: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/44772/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/5//COMMIT_MSG@10 PS5, Line 10: ACL888
Looks like an older patchset was pushed.
Done
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/2/src/mainboard/prodrive/herm... PS2, Line 93: false,
It's not connected to SENSE_A or SENSE_B.
Done
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#7).
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
mb/prodrive/hermes/hda_verb: Update verb table for latest board revision
Use different verb tables depending on board revision.
For board revision R02 and older use the existing verb tables.
For revisions newer than R02 use the new verb tables and also apply the dynamic audio configuration recently added.
Also do the following: * Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/Makefile.inc M src/mainboard/prodrive/hermes/hda_verb.c A src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c M src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h A src/mainboard/prodrive/hermes/variants/r02/hda_verb.c A src/mainboard/prodrive/hermes/variants/r03/hda_verb.c 6 files changed, 186 insertions(+), 223 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/7
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 7:
(3 comments)
File src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/bb9ddb1c_c352654e PS7, Line 34: AZALIA_PIN_CFG(0, 0x18, 0x01a19c50), /* PORT B - rear mic in */ Place this one right after 0x17?
File src/mainboard/prodrive/hermes/variants/r02/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/9bee6142_e24c883c PS7, Line 12: AZALIA_PIN_CFG(0, 0x15, 0x02a19c20), /* port A - audio hdr input */ I wonder if we could program these settings statically, and override them for r03+
https://review.coreboot.org/c/coreboot/+/44772/comment/20482fa8_827e0094 PS7, Line 18: return; Should we move this check out of the revision-specific boards? We could then rename these functions to `mainboard_r0x_configure_alc888` or similar
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 7:
(1 comment)
File src/mainboard/prodrive/hermes/variants/r03/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/eed1e225_53d9d9b0 PS7, Line 12: AZALIA_PIN_CFG(0, 0x1b, 0x02214c40), /* PORT E - front hp out */ Already configured using board settings?
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 7:
(5 comments)
File src/mainboard/prodrive/hermes/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/46e7ceef_010dd8bd PS7, Line 18: } adding a line without newline at end of file
File src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/0b7ecedc_fe9d2cdc PS7, Line 71: AZALIA_ARRAY_SIZES; adding a line without newline at end of file
File src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h:
https://review.coreboot.org/c/coreboot/+/44772/comment/4f7eb48e_ab61991d PS7, Line 10: void mainboard_r03_azalia_program_runtime_verbs(u8 *base, u32 viddid); adding a line without newline at end of file
File src/mainboard/prodrive/hermes/variants/r02/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/e5398fca_2a221d96 PS7, Line 21: } adding a line without newline at end of file
File src/mainboard/prodrive/hermes/variants/r03/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/e2ef7d20_02d26c3a PS7, Line 76: } adding a line without newline at end of file
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Christian Walter, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#8).
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
mb/prodrive/hermes/hda_verb: Update verb table for latest board revision
Use different verb tables depending on board revision.
For board revision R02 and older use the existing verb tables.
For revisions newer than R02 use the new verb tables and also apply the dynamic audio configuration recently added.
Also do the following: * Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/Makefile.inc M src/mainboard/prodrive/hermes/hda_verb.c A src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c M src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h A src/mainboard/prodrive/hermes/variants/r03/hda_verb.c 5 files changed, 164 insertions(+), 222 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/8
Attention is currently required from: Martin Roth, Christian Walter, Angel Pons. Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 8:
(3 comments)
File src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/6ba45903_20c37fa2 PS7, Line 34: AZALIA_PIN_CFG(0, 0x18, 0x01a19c50), /* PORT B - rear mic in */
Place this one right after 0x17?
Done
File src/mainboard/prodrive/hermes/variants/r02/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/7b8c89a0_0b98d66b PS7, Line 18: return;
Should we move this check out of the revision-specific boards? We could then rename these functions […]
Done
File src/mainboard/prodrive/hermes/variants/r03/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/007fe03f_8a25c28f PS7, Line 12: AZALIA_PIN_CFG(0, 0x1b, 0x02214c40), /* PORT E - front hp out */
Already configured using board settings?
Done
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 8: Code-Review+2
(1 comment)
File src/mainboard/prodrive/hermes/variants/r02/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/c02cf88b_e5bf83f9 PS7, Line 12: AZALIA_PIN_CFG(0, 0x15, 0x02a19c20), /* port A - audio hdr input */
I wonder if we could program these settings statically, and override them for r03+
Done
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Justin van Son has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 8: Code-Review+1
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/comment/bbdd4dd4_0e68de97 PS8, Line 11: For board revision R02 and older use the existing verb tables. should be R03. R04 are the only boards with the new audio mapping. R03 still use the old mapping.
https://review.coreboot.org/c/coreboot/+/44772/comment/473c9c83_2beba969 PS8, Line 13: For revisions newer than R02 use the new verb tables and also should also be R03
File src/mainboard/prodrive/hermes/variants/r03/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/9a5a81d5_4b605bb5 PS8, Line 9: static const u32 r03_verb_data[] = { should be R04, as should the directory
Attention is currently required from: Martin Roth, Patrick Rudolph, Christian Walter. Hello build bot (Jenkins), Justin van Son, Patrick Georgi, Martin Roth, Christian Walter, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44772
to look at the new patch set (#9).
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
mb/prodrive/hermes/hda_verb: Update verb table for latest board revision
Use different verb tables depending on board revision.
For board revision R03 and older use the existing verb tables.
For revisions newer than R03 use the new verb tables and also apply the dynamic audio configuration recently added.
Also do the following: * Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/mainboard/prodrive/hermes/Makefile.inc M src/mainboard/prodrive/hermes/hda_verb.c A src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c M src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h A src/mainboard/prodrive/hermes/variants/r04/hda_verb.c 5 files changed, 164 insertions(+), 222 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/44772/9
Attention is currently required from: Justin van Son, Martin Roth, Christian Walter. Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 8:
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/44772/comment/2cdb4918_bf9d71bc PS8, Line 11: For board revision R02 and older use the existing verb tables.
should be R03. R04 are the only boards with the new audio mapping. R03 still use the old mapping.
Done
https://review.coreboot.org/c/coreboot/+/44772/comment/ea7a22a7_93f44802 PS8, Line 13: For revisions newer than R02 use the new verb tables and also
should also be R03
Done
File src/mainboard/prodrive/hermes/variants/r03/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/44772/comment/32d6e3ae_2952a84c PS8, Line 9: static const u32 r03_verb_data[] = {
should be R04, as should the directory
Done
Attention is currently required from: Justin van Son, Martin Roth, Patrick Rudolph, Christian Walter. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
Patch Set 9: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44772 )
Change subject: mb/prodrive/hermes/hda_verb: Update verb table for latest board revision ......................................................................
mb/prodrive/hermes/hda_verb: Update verb table for latest board revision
Use different verb tables depending on board revision.
For board revision R03 and older use the existing verb tables.
For revisions newer than R03 use the new verb tables and also apply the dynamic audio configuration recently added.
Also do the following: * Use correct NID port mapping * Fix verb count in ALC888 header * Fix NID in Intel codec verbs
Change-Id: I24ea9149eb2cddb815ff82744a351c926a94aaef Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44772 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/prodrive/hermes/Makefile.inc M src/mainboard/prodrive/hermes/hda_verb.c A src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c M src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h A src/mainboard/prodrive/hermes/variants/r04/hda_verb.c 5 files changed, 164 insertions(+), 222 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/prodrive/hermes/Makefile.inc b/src/mainboard/prodrive/hermes/Makefile.inc index 2dba6da..6f6a638 100644 --- a/src/mainboard/prodrive/hermes/Makefile.inc +++ b/src/mainboard/prodrive/hermes/Makefile.inc @@ -10,3 +10,6 @@ ramstage-y += ramstage.c ramstage-y += mainboard.c ramstage-y += eeprom.c + +ramstage-$(CONFIG_AZALIA_PLUGIN_SUPPORT) += variants/baseboard/hda_verb.c +ramstage-$(CONFIG_AZALIA_PLUGIN_SUPPORT) += variants/r04/hda_verb.c diff --git a/src/mainboard/prodrive/hermes/hda_verb.c b/src/mainboard/prodrive/hermes/hda_verb.c index be7dbb4..23c542c 100644 --- a/src/mainboard/prodrive/hermes/hda_verb.c +++ b/src/mainboard/prodrive/hermes/hda_verb.c @@ -2,232 +2,17 @@
#include <device/azalia_device.h> #include <types.h> +#include <console/console.h>
#include "variants/baseboard/include/eeprom.h" - -const u32 cim_verb_data[] = { - 0x10ec0888, /* Codec Vendor / Device ID: Realtek ALC888 */ - 0x10ec0888, /* Subsystem ID */ - 10, /* Number of 4 dword sets */ - AZALIA_SUBVENDOR(0, 0x10ec0888), - - /* Port A: Front, Audio Header #1 */ - AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - SPECIAL7, - LINE_OUT, - OTHER_ANALOG, - COLOR_UNKNOWN, - false, - 0xf, - 0 - )), - /* Port B: Mic1, Line input (pink) */ - AZALIA_PIN_CFG(0, 0x15, AZALIA_PIN_DESC( - JACK, - EXTERNAL_PRIMARY_CHASSIS, - REAR, //FIXME - LINE_IN, - STEREO_MONO_1_8, - PINK, - false, - 0xf, - 0 - )), - /* Port C: Line, Speaker (only L) */ - AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - NA, - SPEAKER, - TYPE_UNKNOWN, - COLOR_UNKNOWN, - false, - 0xf, - 0 - )), - /* Port D: Sidesurr, Line out (green) */ - AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_DESC( - //JACK, - LINE_OUT, - EXTERNAL_PRIMARY_CHASSIS, - REAR, //FIXME - LINE_OUT, - STEREO_MONO_1_8, - GREEN, - false, - 0xf, - 0 - )), - /* Port E: Line2, Line input (blue) */ - AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_DESC( - JACK, - EXTERNAL_PRIMARY_CHASSIS, - REAR, //FIXME - LINE_IN, - STEREO_MONO_1_8, - BLUE, - false, - 0xf, - 0 - )), - /* Port F: Mic2, Audio Header #2 */ - AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - SPECIAL7, - LINE_IN, - OTHER_ANALOG, - COLOR_UNKNOWN, - false, - 0xf, - 0 - )), - /* Port G: Not connected */ - AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_DESC( - NC, - LOCATION_OTHER, - NA, - DEVICE_OTHER, - TYPE_OTHER, - COLOR_OTHER, - true, - 0, - 0 - )), - /* Port H: Not connected */ - AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_DESC( - NC, - LOCATION_OTHER, - NA, - DEVICE_OTHER, - TYPE_OTHER, - COLOR_OTHER, - true, - 0, - 0 - )), - - /* S/PDIF-OUT */ - AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - NA, - SPDIF_OUT, - OTHER_DIGITAL, - COLOR_UNKNOWN, - true, - 0xf, - 0 - )), - /* S/PDIF-IN */ - AZALIA_PIN_CFG(0, 0x1f, AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - NA, - SPDIF_IN, - OTHER_DIGITAL, - COLOR_UNKNOWN, - true, - 0xf, - 0 - )), - - //FIXME COdec ID - /* - * VerbTable: CFL Display Audio Codec - * Revision ID = 0xFF - * Codec Vendor: 0x8086280B - */ - - 0x8086280B, - 0xFFFFFFFF, - 5, /* Number of 4 dword sets */ - - /* - * Display Audio Verb Table - * For GEN9, the Vendor Node ID is 08h - * Port to be exposed to the inbox driver in the vanilla mode - * PORT C - BIT[7:6] = 01b - */ - 0x00878140, - 0x00878140, - 0x00878140, - 0x00878140, - /* Pin Widget 5 - PORT B - Configuration Default: 0x18560010 */ - AZALIA_PIN_CFG(2, 0x05, 0x18560010), - /* Pin Widget 6 - PORT C - Configuration Default: 0x18560020 */ - AZALIA_PIN_CFG(2, 0x06, 0x18560020), - /* Pin Widget 7 - PORT D - Configuration Default: 0x18560030 */ - AZALIA_PIN_CFG(2, 0x07, 0x18560030), - /* Disable the third converter and third Pin (NID 08h) */ - 0x00878140, - 0x00878140, - 0x00878140, - 0x00878140, -}; - -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) { - default: - case 0: - return AZALIA_PIN_CFG_NC(0); - case 1: - return 0x022a4c40; - case 2: - return AZALIA_PIN_DESC( - INTEGRATED, - INTERNAL, - NA, - SPEAKER, - TYPE_UNKNOWN, - COLOR_UNKNOWN, - false, - 0xf, - 0); - } -} +#include "variants/baseboard/include/variant/variants.h"
void mainboard_azalia_program_runtime_verbs(u8 *base, u32 viddid) { - if (viddid != 0x10ec0888) - return; + if (viddid == 0x10ec0888) { + u8 hsi = get_bmc_hsi();
- const struct eeprom_board_settings *const board_cfg = get_board_settings(); - - if (!board_cfg) - return; - - const u32 config = get_internal_audio_cfg(board_cfg->internal_audio_connection); - - 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)); + if (hsi >= 4) + mainboard_r0x_configure_alc888(base, viddid); + } } diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c b/src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c new file mode 100644 index 0000000..dc97794 --- /dev/null +++ b/src/mainboard/prodrive/hermes/variants/baseboard/hda_verb.c @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/azalia_device.h> +#include <types.h> + +const u32 cim_verb_data[] = { + 0x10ec0888, /* Codec Vendor / Device ID: Realtek ALC888 */ + 0x10ec0888, /* Subsystem ID */ + 17, /* Number of 4 dword sets */ + AZALIA_SUBVENDOR(0, 0x10ec0888), + + /* Port configuration control */ + + 0x018707e1, /* port B VREF 50% of LDO-OUT */ + 0x019707e1, /* port F VREF 50% of LDO-OUT */ + 0x01b707e1, /* port E VREF 50% of LDO-OUT*/ + 0x0205000d, /* pin 37 vrefo hidden register - used as port C vref */ + + 0x02041000, /* pin 37 vrefo 50% of LDO-OUT */ + 0x02041000, /* Dummy entry */ + 0x02041000, /* Dummy entry */ + 0x02041000, /* Dummy entry */ + + /* Pin widgets */ + AZALIA_PIN_CFG(0, 0x11, 0x411111f0), /* SPDIF-OUT2 - disabled */ + AZALIA_PIN_CFG(0, 0x12, 0x411111f0), /* digital MIC - disabled */ + AZALIA_PIN_CFG(0, 0x14, 0x01014430), /* PORT D - rear line out */ + AZALIA_PIN_CFG(0, 0x16, 0x411111f0), /* PORT G - disabled */ + AZALIA_PIN_CFG(0, 0x17, 0x411111f0), /* PORT H - disabled */ + AZALIA_PIN_CFG(0, 0x18, 0x01a19c50), /* PORT B - rear mic in */ + AZALIA_PIN_CFG(0, 0x1c, 0x411111f0), /* CD audio - disabled */ + AZALIA_PIN_CFG(0, 0x1d, 0x4004c601), /* BEEPIN */ + AZALIA_PIN_CFG(0, 0x1e, 0x01452160), /* SPDIF-OUT */ + AZALIA_PIN_CFG(0, 0x1f, 0x01C52170), /* SPDIF-IN */ + + /* Config for R02 and older */ + AZALIA_PIN_CFG(0, 0x19, 0x02214c40), /* port F - front hp out */ + AZALIA_PIN_CFG(0, 0x1a, 0x901001f0), /* port C - internal speaker */ + AZALIA_PIN_CFG(0, 0x1b, 0x01813c10), /* port E - rear line in/mic - Blue */ + AZALIA_PIN_CFG(0, 0x15, 0x02a19c20), /* port A - audio hdr input */ + + /* + * VerbTable: CFL Display Audio Codec + * Revision ID = 0xFF + * Codec Vendor: 0x8086280B + */ + 0x8086280B, + 0xFFFFFFFF, + 5, /* Number of 4 dword sets */ + + AZALIA_SUBVENDOR(2, 0x80860101), + + /* + * Display Audio Verb Table + * For GEN9, the Vendor Node ID is 08h + * Port to be exposed to the inbox driver in the vanilla mode + * PORT C - BIT[7:6] = 01b + */ + 0x20878101, + + /* Pin Widget 5 - PORT B - Configuration Default: 0x18560010 */ + AZALIA_PIN_CFG(2, 0x05, 0x18560010), + /* Pin Widget 6 - PORT C - Configuration Default: 0x18560020 */ + AZALIA_PIN_CFG(2, 0x06, 0x18560020), + /* Pin Widget 7 - PORT D - Configuration Default: 0x18560030 */ + AZALIA_PIN_CFG(2, 0x07, 0x18560030), + /* Disable the third converter and third Pin (NID 08h) */ + 0x20878100, + + /* Dummy entries */ + 0x20878100, + 0x20878100, +}; + +const u32 pc_beep_verbs[0] = {}; + +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h index 83cf232..54a1161 100644 --- a/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h +++ b/src/mainboard/prodrive/hermes/variants/baseboard/include/variant/variants.h @@ -1,4 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + #include <soc/cnl_memcfg_init.h> +#include <types.h>
/* Return memory configuration structure. */ const struct cnl_mb_cfg *variant_memcfg_config(void); + +void mainboard_r0x_configure_alc888(u8 *base, u32 viddid); diff --git a/src/mainboard/prodrive/hermes/variants/r04/hda_verb.c b/src/mainboard/prodrive/hermes/variants/r04/hda_verb.c new file mode 100644 index 0000000..ec008e9 --- /dev/null +++ b/src/mainboard/prodrive/hermes/variants/r04/hda_verb.c @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <device/azalia_device.h> +#include <types.h> + +#include "variant/variants.h" +#include "eeprom.h" + +static const u32 r04_verb_data[] = { + AZALIA_PIN_CFG(0, 0x19, 0x02a19c20), /* PORT F - front mic in */ + AZALIA_PIN_CFG(0, 0x1a, 0x01813c51), /* PORT C - rear line in (mic support) */ + AZALIA_PIN_CFG(0, 0x15, 0x411111f0), /* PORT A - disabled */ +}; + +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) { + default: + case 0: + return AZALIA_PIN_CFG_NC(0); + case 1: + return 0x022a4c40; + case 2: + return AZALIA_PIN_DESC( + INTEGRATED, + INTERNAL, + NA, + SPEAKER, + TYPE_UNKNOWN, + COLOR_UNKNOWN, + false, + 0xf, + 0); + } +} + +void mainboard_r0x_configure_alc888(u8 *base, u32 viddid) +{ + /* Overwrite settings made by baseboard */ + azalia_program_verb_table(base, r04_verb_data, ARRAY_SIZE(r04_verb_data)); + + const struct eeprom_board_settings *const board_cfg = get_board_settings(); + + if (!board_cfg) + return; + + const u32 config = get_internal_audio_cfg(board_cfg->internal_audio_connection); + + 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)); +}