Angel Pons | 96d93d1 | 2020-04-05 13:22:23 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 2 | |
| 3 | /* |
| 4 | * Parrot audio ports: |
| 5 | * ALC269: |
| 6 | * out: |
| 7 | * Internal Speaker: PORT D (0x14) |
| 8 | * Headphone: PORT A - (0x21) (SenseA) |
| 9 | * |
| 10 | * in: |
| 11 | * Mic2: PORT F (0x19) (SenseB) |
| 12 | * Line2 (internal Mic): PORT E (0x1B) |
| 13 | * PCBeep |
| 14 | * |
| 15 | * HDMI PatherPoint |
| 16 | */ |
| 17 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 18 | #include <device/azalia_device.h> |
| 19 | |
| 20 | const u32 cim_verb_data[] = { |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 21 | /* coreboot specific header */ |
| 22 | 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269 |
| 23 | 0x10250742, // Subsystem ID |
| 24 | 0x0000000E, // Number of jacks (NID entries) |
| 25 | |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 26 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10250742 */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 27 | AZALIA_SUBVENDOR(0, 0x10250742), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 28 | |
| 29 | /* Pin Widget Verb Table */ |
| 30 | |
| 31 | /* Pin Complex (NID 0x12) DMIC */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 32 | AZALIA_PIN_CFG(0, 0x12, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 33 | |
| 34 | /* Pin Complex (NID 0x14) SPKR-OUT PORTD */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 35 | // group 1, front left/right |
| 36 | // no connector, no jack detect |
| 37 | // speaker out, analog |
| 38 | // fixed function, internal |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 39 | AZALIA_PIN_CFG(0, 0x14, 0x90170110), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 40 | |
| 41 | /* Pin Complex (NID 0x17) */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 42 | AZALIA_PIN_CFG(0, 0x17, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 43 | |
| 44 | /* Pin Complex (NID 0x18) MIC1 PORTB */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 45 | AZALIA_PIN_CFG(0, 0x18, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 46 | |
| 47 | /* Pin Complex (NID 0x19) MIC2 PORTF */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 48 | // group 2, cap 1 |
| 49 | // black, jack detect |
| 50 | // mic in, analog |
| 51 | // connector, right panel |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 52 | AZALIA_PIN_CFG(0, 0x19, 0x04a71021), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 53 | |
| 54 | /* Pin Complex (NID 0x1A) LINE1 PORTC */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 55 | AZALIA_PIN_CFG(0, 0x1a, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 56 | |
| 57 | /* Pin Complex (NID 0x1B) LINE2 PORTE */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 58 | // group 2, cap 0 |
| 59 | // no connector, no jack detect |
| 60 | // mic in, analog |
| 61 | // fixed function, internal |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 62 | AZALIA_PIN_CFG(0, 0x1b, 0x90a70120), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 63 | |
| 64 | /* Pin Complex (NID 0x1d) PCBeep */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 65 | // eapd low on ex-amp, laptop, custom enable |
| 66 | // mute spkr on hpout |
Elyes HAOUAS | 22f8ee0 | 2020-02-22 14:13:59 +0100 | [diff] [blame] | 67 | // pcbeep enable, checksum |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 68 | // no physical, internal |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 69 | AZALIA_PIN_CFG(0, 0x1d, 0x4015812d), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 70 | |
| 71 | /* Pin Complex (NID 0x1E) SPDIF-OUT */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 72 | AZALIA_PIN_CFG(0, 0x1e, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 73 | |
| 74 | /* Pin Complex (NID 0x21) HPOUT PORTA? */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 75 | // group1, |
| 76 | // black, jack detect |
| 77 | // HPOut, 1/8 stereo |
| 78 | // connector, right panel |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 79 | AZALIA_PIN_CFG(0, 0x21, 0x0421101f), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 80 | |
| 81 | /* Undocumented speaker output volume settings from Compal and Realtek */ |
| 82 | /* Widget node 0x20 */ |
| 83 | 0x02050011, |
| 84 | 0x02040710, |
| 85 | 0x02050012, |
| 86 | 0x02041901, |
| 87 | |
| 88 | 0x02050002, |
| 89 | 0x0204AAB8, |
| 90 | 0x0205000D, |
| 91 | 0x02044440, |
| 92 | |
| 93 | 0x02050008, |
| 94 | 0x02040300, |
| 95 | 0x02050017, |
| 96 | 0x020400AF, |
| 97 | |
| 98 | /* --- Next Codec --- */ |
| 99 | |
| 100 | /* coreboot specific header */ |
| 101 | 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI |
| 102 | 0x80860101, // Subsystem ID |
| 103 | 0x00000004, // Number of jacks |
| 104 | |
| 105 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
Angel Pons | d8ce9a8 | 2019-12-19 19:44:11 +0100 | [diff] [blame] | 106 | AZALIA_SUBVENDOR(3, 0x80860101), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 107 | |
| 108 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 109 | AZALIA_PIN_CFG(3, 0x05, 0x18560010), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 110 | |
| 111 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 112 | AZALIA_PIN_CFG(3, 0x06, 0x18560020), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 113 | |
| 114 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
Angel Pons | ec21170 | 2019-12-19 19:37:21 +0100 | [diff] [blame] | 115 | AZALIA_PIN_CFG(3, 0x07, 0x18560030), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 116 | }; |
| 117 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 118 | const u32 pc_beep_verbs[] = { |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 119 | 0x00170500, /* power up everything (codec, dac, adc, mixers) */ |
| 120 | 0x01470740, /* enable speaker out */ |
| 121 | 0x01470c02, /* set speaker EAPD pin */ |
| 122 | 0x0143b01f, /* unmute speaker */ |
| 123 | 0x00c37100, /* unmute mixer nid 0xc input 1 */ |
| 124 | 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ |
| 125 | }; |
| 126 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 127 | AZALIA_ARRAY_SIZES; |