Nicolas Reinecke | 29d358e | 2015-01-31 19:20:50 +0100 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. |
| 5 | * Copyright (C) 2014 Vladimir Serbinenko |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Nicolas Reinecke | 29d358e | 2015-01-31 19:20:50 +0100 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | /* Vendor Name : Realtek |
| 18 | * Vendor ID : 0x10ec0269 |
| 19 | * Subsystem ID : 0x17aa21fb |
| 20 | * Revision ID : 0x100203 |
| 21 | */ |
| 22 | |
| 23 | |
| 24 | #include <device/azalia_device.h> |
| 25 | |
| 26 | const u32 cim_verb_data[] = { |
| 27 | /* coreboot specific header */ |
| 28 | 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC |
| 29 | 0x17aa21fb, // Subsystem ID |
| 30 | 0x00000013, // Number of 4 dword sets |
| 31 | |
| 32 | /* Bits 31:28 - Codec Address */ |
| 33 | /* Bits 27:20 - NID */ |
| 34 | /* Bits 19:8 - Verb ID */ |
| 35 | /* Bits 7:0 - Payload */ |
| 36 | |
| 37 | /* NID 0x01 - NodeInfo */ |
| 38 | AZALIA_SUBVENDOR(0x0, 0x17AA21FB), |
| 39 | |
| 40 | /* NID 0x0A - External Microphone Connector |
| 41 | * Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq) |
| 42 | */ |
| 43 | AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020), |
| 44 | |
| 45 | /* NID 0x0B - Headphone Connector |
| 46 | * Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq) |
| 47 | */ |
| 48 | AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F), |
| 49 | |
| 50 | /* NID 0x0C - Not connected |
| 51 | * Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq) |
| 52 | */ |
| 53 | AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0), |
| 54 | |
| 55 | /* NID 0x0D - Internal Speakers |
| 56 | * Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq) |
| 57 | */ |
| 58 | AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110), |
| 59 | |
| 60 | /* NID 0x0F - Not connected |
| 61 | * Config=0x40F000F0 |
| 62 | */ |
| 63 | AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0), |
| 64 | |
| 65 | /* NID 0x11 - Internal Microphone |
| 66 | * Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq) |
| 67 | */ |
| 68 | AZALIA_PIN_CFG(0x0, 0x12, 0x90A60140), |
| 69 | AZALIA_PIN_CFG(0x0, 0x14, 0x90170110), |
| 70 | AZALIA_PIN_CFG(0x0, 0x15, 0x03211020), |
| 71 | AZALIA_PIN_CFG(0x0, 0x17, 0x411111F0), |
| 72 | AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830), |
| 73 | AZALIA_PIN_CFG(0x0, 0x19, 0x411111F0), |
| 74 | |
| 75 | 0x01970804, |
| 76 | 0x01870803, |
| 77 | 0x01470740, |
| 78 | 0x00970600, |
| 79 | |
| 80 | AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0), |
| 81 | AZALIA_PIN_CFG(0x0, 0x1B, 0x411111F0), |
| 82 | AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205), |
| 83 | AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0), |
| 84 | |
| 85 | /* Misc entries */ |
| 86 | 0x00370600, |
| 87 | 0x00270600, |
| 88 | 0x00B707C0, /* Enable PortB as Output with HP amp */ |
| 89 | 0x00D70740, /* Enable PortD as Output */ |
| 90 | 0x0017A200, /* Disable ClkEn of PortSenseTst */ |
| 91 | 0x0017C621, /* Slave Port - Port A used as microphone input for |
| 92 | combo Jack |
| 93 | Master Port - Port B used for Jack Presence Detect |
| 94 | Enable Combo Jack Detection */ |
| 95 | 0x0017A208, /* Enable ClkEn of PortSenseTst */ |
| 96 | 0x00170500, /* Set power state to D0 */ |
| 97 | |
| 98 | /* --- Next Codec --- */ |
| 99 | |
| 100 | /* Vendor Name : Intel |
| 101 | * Vendor ID : 0x80862806 |
| 102 | * Subsystem ID : 0x80860101 |
| 103 | * Revision ID : 0x100000 |
| 104 | */ |
| 105 | /* coreboot specific header */ |
| 106 | 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI |
| 107 | 0x80860101, // Subsystem ID |
| 108 | 0x00000004, // Number of IDs |
| 109 | |
| 110 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
| 111 | AZALIA_SUBVENDOR(0x3, 0x80860101), |
| 112 | |
| 113 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
| 114 | AZALIA_PIN_CFG(0x3, 0x05, 0x18560010), |
| 115 | |
| 116 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
| 117 | AZALIA_PIN_CFG(0x3, 0x06, 0x18560020), |
| 118 | |
| 119 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
| 120 | AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) |
| 121 | }; |
| 122 | |
| 123 | const u32 pc_beep_verbs[] = { |
| 124 | 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ |
| 125 | }; |
| 126 | |
| 127 | AZALIA_ARRAY_SIZES; |