Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | /* |
| 17 | * Parrot audio ports: |
| 18 | * ALC269: |
| 19 | * out: |
| 20 | * Internal Speaker: PORT D (0x14) |
| 21 | * Headphone: PORT A - (0x21) (SenseA) |
| 22 | * |
| 23 | * in: |
| 24 | * Mic2: PORT F (0x19) (SenseB) |
| 25 | * Line2 (internal Mic): PORT E (0x1B) |
| 26 | * PCBeep |
| 27 | * |
| 28 | * HDMI PatherPoint |
| 29 | */ |
| 30 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 31 | #include <device/azalia_device.h> |
| 32 | |
| 33 | const u32 cim_verb_data[] = { |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 34 | /* coreboot specific header */ |
| 35 | 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269 |
| 36 | 0x10250742, // Subsystem ID |
| 37 | 0x0000000E, // Number of jacks (NID entries) |
| 38 | |
| 39 | |
| 40 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10250742 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 41 | AZALIA_SUBVENDOR(0x0, 0x10250742), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 42 | |
| 43 | /* Pin Widget Verb Table */ |
| 44 | |
| 45 | /* Pin Complex (NID 0x12) DMIC */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 46 | AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 47 | |
| 48 | /* Pin Complex (NID 0x14) SPKR-OUT PORTD */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 49 | // group 1, front left/right |
| 50 | // no connector, no jack detect |
| 51 | // speaker out, analog |
| 52 | // fixed function, internal |
| 53 | AZALIA_PIN_CFG(0x0, 0x14, 0x90170110), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 54 | |
| 55 | /* Pin Complex (NID 0x17) */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 56 | AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 57 | |
| 58 | /* Pin Complex (NID 0x18) MIC1 PORTB */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 59 | AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 60 | |
| 61 | /* Pin Complex (NID 0x19) MIC2 PORTF */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 62 | // group 2, cap 1 |
| 63 | // black, jack detect |
| 64 | // mic in, analog |
| 65 | // connector, right panel |
| 66 | AZALIA_PIN_CFG(0x0, 0x19, 0x04a71021), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 67 | |
| 68 | /* Pin Complex (NID 0x1A) LINE1 PORTC */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 69 | AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 70 | |
| 71 | /* Pin Complex (NID 0x1B) LINE2 PORTE */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 72 | // group 2, cap 0 |
| 73 | // no connector, no jack detect |
| 74 | // mic in, analog |
| 75 | // fixed function, internal |
| 76 | AZALIA_PIN_CFG(0x0, 0x1b, 0x90a70120), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 77 | |
| 78 | /* Pin Complex (NID 0x1d) PCBeep */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 79 | // eapd low on ex-amp, laptop, custom enable |
| 80 | // mute spkr on hpout |
| 81 | // pcbeep en able, checksum |
| 82 | // no physical, internal |
| 83 | AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 84 | |
| 85 | /* Pin Complex (NID 0x1E) SPDIF-OUT */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 86 | AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 87 | |
| 88 | /* Pin Complex (NID 0x21) HPOUT PORTA? */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 89 | // group1, |
| 90 | // black, jack detect |
| 91 | // HPOut, 1/8 stereo |
| 92 | // connector, right panel |
| 93 | AZALIA_PIN_CFG(0x0, 0x21, 0x0421101f), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 94 | |
| 95 | /* Undocumented speaker output volume settings from Compal and Realtek */ |
| 96 | /* Widget node 0x20 */ |
| 97 | 0x02050011, |
| 98 | 0x02040710, |
| 99 | 0x02050012, |
| 100 | 0x02041901, |
| 101 | |
| 102 | 0x02050002, |
| 103 | 0x0204AAB8, |
| 104 | 0x0205000D, |
| 105 | 0x02044440, |
| 106 | |
| 107 | 0x02050008, |
| 108 | 0x02040300, |
| 109 | 0x02050017, |
| 110 | 0x020400AF, |
| 111 | |
| 112 | /* --- Next Codec --- */ |
| 113 | |
| 114 | /* coreboot specific header */ |
| 115 | 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI |
| 116 | 0x80860101, // Subsystem ID |
| 117 | 0x00000004, // Number of jacks |
| 118 | |
| 119 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 120 | AZALIA_SUBVENDOR(0x0, 0x80860101), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 121 | |
| 122 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 123 | AZALIA_PIN_CFG(0x3, 0x05, 0x18560010), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 124 | |
| 125 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 126 | AZALIA_PIN_CFG(0x3, 0x06, 0x18560020), |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 127 | |
| 128 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 129 | AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 130 | }; |
| 131 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 132 | const u32 pc_beep_verbs[] = { |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 133 | 0x00170500, /* power up everything (codec, dac, adc, mixers) */ |
| 134 | 0x01470740, /* enable speaker out */ |
| 135 | 0x01470c02, /* set speaker EAPD pin */ |
| 136 | 0x0143b01f, /* unmute speaker */ |
| 137 | 0x00c37100, /* unmute mixer nid 0xc input 1 */ |
| 138 | 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ |
| 139 | }; |
| 140 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 141 | AZALIA_ARRAY_SIZES; |