Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [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. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
| 21 | /* Vendor Name : IDT |
| 22 | * Vendor ID : 0x10ec0269 |
| 23 | * Subsystem ID : 0x17aa21fa |
| 24 | * Revision ID : 0x100303 |
| 25 | */ |
| 26 | |
| 27 | |
| 28 | static const u32 mainboard_cim_verb_data[] = { |
| 29 | /* coreboot specific header */ |
| 30 | 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC |
| 31 | 0x17aa21fa, // Subsystem ID |
| 32 | 0x0000007d, // Number of 4 dword sets |
| 33 | |
| 34 | /* Bits 31:28 - Codec Address */ |
| 35 | /* Bits 27:20 - NID */ |
| 36 | /* Bits 19:8 - Verb ID */ |
| 37 | /* Bits 7:0 - Payload */ |
| 38 | |
| 39 | /* NID 0x01 - NodeInfo */ |
| 40 | 0x001720FA, |
| 41 | 0x00172121, |
| 42 | 0x001722AA, |
| 43 | 0x00172317, |
| 44 | |
| 45 | /* NID 0x0A - External Microphone Connector |
| 46 | * Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq) |
| 47 | */ |
| 48 | 0x00A71C20, |
| 49 | 0x00A71D10, |
| 50 | 0x00A71EA1, |
| 51 | 0x00A71F04, |
| 52 | |
| 53 | /* NID 0x0B - Headphone Connector |
| 54 | * Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq) |
| 55 | */ |
| 56 | 0x00B71C1F, |
| 57 | 0x00B71D10, |
| 58 | 0x00B71E21, |
| 59 | 0x00B71F04, |
| 60 | |
| 61 | /* NID 0x0C - Not connected |
| 62 | * Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq) |
| 63 | */ |
| 64 | 0x00C71CF0, |
| 65 | 0x00C71D00, |
| 66 | 0x00C71EF0, |
| 67 | 0x00C71F40, |
| 68 | |
| 69 | /* NID 0x0D - Internal Speakers |
| 70 | * Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq) |
| 71 | */ |
| 72 | 0x00D71C10, |
| 73 | 0x00D71D01, |
| 74 | 0x00D71E17, |
| 75 | 0x00D71F90, |
| 76 | |
| 77 | /* NID 0x0F - Not connected |
| 78 | * Config=0x40F000F0 |
| 79 | */ |
| 80 | 0x00F71CF0, |
| 81 | 0x00F71D00, |
| 82 | 0x00F71EF0, |
| 83 | 0x00F71F40, |
| 84 | |
| 85 | /* NID 0x11 - Internal Microphone |
| 86 | * Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq) |
| 87 | */ |
| 88 | 0x01171C40, |
| 89 | 0x01171D01, |
| 90 | 0x01171EA3, |
| 91 | 0x01171FD5, |
| 92 | |
| 93 | 0x01271C40, |
| 94 | 0x01271D01, |
| 95 | 0x01271EA6, |
| 96 | 0x01271F90, |
| 97 | |
| 98 | 0x01471C10, |
| 99 | 0x01471D01, |
| 100 | 0x01471E17, |
| 101 | 0x01471F90, |
| 102 | |
| 103 | 0x01571C20, |
| 104 | 0x01571D10, |
| 105 | 0x01571E21, |
| 106 | 0x01571F03, |
| 107 | |
| 108 | 0x01871C30, |
| 109 | 0x01871D18, |
| 110 | 0x01871EA1, |
| 111 | 0x01871F03, |
| 112 | |
| 113 | 0x01971CF0, |
| 114 | 0x01971D11, |
| 115 | 0x01971E11, |
| 116 | 0x01971F41, |
| 117 | |
| 118 | 0x01970804, |
| 119 | 0x01870803, |
| 120 | 0x01470740, |
| 121 | 0x00970600, |
| 122 | |
| 123 | 0x00370600, |
| 124 | 0x00270600, |
| 125 | 0x00270600, |
| 126 | 0x00270600, |
| 127 | |
| 128 | 0x01A71CF0, |
| 129 | 0x01A71D11, |
| 130 | 0x01A71E11, |
| 131 | 0x01A71F41, |
| 132 | |
| 133 | 0x01D71C05, |
| 134 | 0x01D71D82, |
| 135 | 0x01D71E13, |
| 136 | 0x01D71F40, |
| 137 | |
| 138 | 0x01E71CF0, |
| 139 | 0x01E71D11, |
| 140 | 0x01E71E11, |
| 141 | 0x01E71F41, |
| 142 | |
| 143 | /* |
| 144 | * Hardware EQ Parameters |
| 145 | * Sample Rate 88200 |
| 146 | */ |
| 147 | 0x0227A63F, 0x0227A73E, 0x0227A8EB, 0x0227A93F, |
| 148 | 0x0227AA3E, 0x0227ABEB, 0x0227AC00, 0x0227AD80, |
| 149 | 0x0227A681, 0x0227A782, 0x0227A829, 0x0227A981, |
| 150 | 0x0227AA82, 0x0227AB29, 0x0227AC01, 0x0227AD80, |
| 151 | 0x0227A63F, 0x0227A73E, 0x0227A8EB, 0x0227A93F, |
| 152 | 0x0227AA3E, 0x0227ABEB, 0x0227AC02, 0x0227AD80, |
| 153 | 0x0227A67E, 0x0227A77B, 0x0227A846, 0x0227A97E, |
| 154 | 0x0227AA7B, 0x0227AB46, 0x0227AC03, 0x0227AD80, |
| 155 | 0x0227A6C1, 0x0227A77F, 0x0227A898, 0x0227A9C1, |
| 156 | 0x0227AA7F, 0x0227AB98, 0x0227AC04, 0x0227AD80, |
| 157 | 0x0227A63E, 0x0227A7D1, 0x0227A84F, 0x0227A93E, |
| 158 | 0x0227AAD1, 0x0227AB4F, 0x0227AC05, 0x0227AD80, |
| 159 | 0x0227A683, 0x0227A7BE, 0x0227A855, 0x0227A983, |
| 160 | 0x0227AABE, 0x0227AB55, 0x0227AC06, 0x0227AD80, |
| 161 | 0x0227A63D, 0x0227A7B9, 0x0227A856, 0x0227A93D, |
| 162 | 0x0227AAB9, 0x0227AB56, 0x0227AC07, 0x0227AD80, |
| 163 | 0x0227A67C, 0x0227A741, 0x0227A8AB, 0x0227A97C, |
| 164 | 0x0227AA41, 0x0227ABAB, 0x0227AC08, 0x0227AD80, |
| 165 | 0x0227A6C3, 0x0227A775, 0x0227A85A, 0x0227A9C3, |
| 166 | 0x0227AA75, 0x0227AB5A, 0x0227AC09, 0x0227AD80, |
| 167 | 0x0227A63F, 0x0227A79E, 0x0227A829, 0x0227A93F, |
| 168 | 0x0227AA9E, 0x0227AB29, 0x0227AC0A, 0x0227AD80, |
| 169 | 0x0227A682, 0x0227A7E3, 0x0227A867, 0x0227A982, |
| 170 | 0x0227AAE3, 0x0227AB67, 0x0227AC0B, 0x0227AD80, |
| 171 | 0x0227A63E, 0x0227A74F, 0x0227A89D, 0x0227A93E, |
| 172 | 0x0227AA4F, 0x0227AB9D, 0x0227AC0C, 0x0227AD80, |
| 173 | 0x0227A67D, 0x0227A71C, 0x0227A899, 0x0227A97D, |
| 174 | 0x0227AA1C, 0x0227AB99, 0x0227AC0D, 0x0227AD80, |
| 175 | 0x0227A6C2, 0x0227A712, 0x0227A839, 0x0227A9C2, |
| 176 | 0x0227AA12, 0x0227AB39, 0x0227AC0E, 0x0227AD80, |
| 177 | 0x0227A63F, 0x0227A708, 0x0227A856, 0x0227A93F, |
| 178 | 0x0227AA08, 0x0227AB56, 0x0227AC0F, 0x0227AD80, |
| 179 | 0x0227A68E, 0x0227A7ED, 0x0227A89D, 0x0227A98E, |
| 180 | 0x0227AAED, 0x0227AB9D, 0x0227AC10, 0x0227AD80, |
| 181 | 0x0227A637, 0x0227A78F, 0x0227A853, 0x0227A937, |
| 182 | 0x0227AA8F, 0x0227AB53, 0x0227AC11, 0x0227AD80, |
| 183 | 0x0227A671, 0x0227A712, 0x0227A863, 0x0227A971, |
| 184 | 0x0227AA12, 0x0227AB63, 0x0227AC12, 0x0227AD80, |
| 185 | 0x0227A6C9, 0x0227A768, 0x0227A856, 0x0227A9C9, |
| 186 | 0x0227AA68, 0x0227AB56, 0x0227AC13, 0x0227AD80, |
| 187 | 0x0227A642, 0x0227A709, 0x0227A838, 0x0227A942, |
| 188 | 0x0227AA09, 0x0227AB38, 0x0227AC14, 0x0227AD80, |
| 189 | 0x0227A69C, 0x0227A78A, 0x0227A867, 0x0227A99C, |
| 190 | 0x0227AA8A, 0x0227AB67, 0x0227AC15, 0x0227AD80, |
| 191 | 0x0227A634, 0x0227A717, 0x0227A8E3, 0x0227A934, |
| 192 | 0x0227AA17, 0x0227ABE3, 0x0227AC16, 0x0227AD80, |
| 193 | 0x0227A663, 0x0227A775, 0x0227A899, 0x0227A963, |
| 194 | 0x0227AA75, 0x0227AB99, 0x0227AC17, 0x0227AD80, |
| 195 | 0x0227A6C9, 0x0227A7DE, 0x0227A8E5, 0x0227A9C9, |
| 196 | 0x0227AADE, 0x0227ABE5, 0x0227AC18, 0x0227AD80, |
| 197 | 0x0227A640, 0x0227A700, 0x0227A800, 0x0227A940, |
| 198 | 0x0227AA00, 0x0227AB00, 0x0227AC19, 0x0227AD80, |
| 199 | |
| 200 | /* |
| 201 | * Hardware EQ Parameters |
| 202 | * Sample Rate 96000 |
| 203 | */ |
| 204 | 0x0227A63F, 0x0227A74E, 0x0227A888, 0x0227A93F, |
| 205 | 0x0227AA4E, 0x0227AB88, 0x0227AC1A, 0x0227AD80, |
| 206 | 0x0227A681, 0x0227A762, 0x0227A8EE, 0x0227A981, |
| 207 | 0x0227AA62, 0x0227ABEE, 0x0227AC1B, 0x0227AD80, |
| 208 | 0x0227A63F, 0x0227A74E, 0x0227A888, 0x0227A93F, |
| 209 | 0x0227AA4E, 0x0227AB88, 0x0227AC1C, 0x0227AD80, |
| 210 | 0x0227A67E, 0x0227A79A, 0x0227A8E7, 0x0227A97E, |
| 211 | 0x0227AA9A, 0x0227ABE7, 0x0227AC1D, 0x0227AD80, |
| 212 | 0x0227A6C1, 0x0227A760, 0x0227A8C3, 0x0227A9C1, |
| 213 | 0x0227AA60, 0x0227ABC3, 0x0227AC1E, 0x0227AD80, |
| 214 | 0x0227A63E, 0x0227A7E9, 0x0227A84B, 0x0227A93E, |
| 215 | 0x0227AAE9, 0x0227AB4B, 0x0227AC1F, 0x0227AD80, |
| 216 | 0x0227A683, 0x0227A76C, 0x0227A8F2, 0x0227A983, |
| 217 | 0x0227AA6C, 0x0227ABF2, 0x0227AC20, 0x0227AD80, |
| 218 | 0x0227A63D, 0x0227A7E7, 0x0227A880, 0x0227A93D, |
| 219 | 0x0227AAE7, 0x0227AB80, 0x0227AC21, 0x0227AD80, |
| 220 | 0x0227A67C, 0x0227A793, 0x0227A80E, 0x0227A97C, |
| 221 | 0x0227AA93, 0x0227AB0E, 0x0227AC22, 0x0227AD80, |
| 222 | 0x0227A6C3, 0x0227A72F, 0x0227A835, 0x0227A9C3, |
| 223 | 0x0227AA2F, 0x0227AB35, 0x0227AC23, 0x0227AD80, |
| 224 | 0x0227A63F, 0x0227A7A5, 0x0227A8FE, 0x0227A93F, |
| 225 | 0x0227AAA5, 0x0227ABFE, 0x0227AC24, 0x0227AD80, |
| 226 | 0x0227A682, 0x0227A798, 0x0227A89D, 0x0227A982, |
| 227 | 0x0227AA98, 0x0227AB9D, 0x0227AC25, 0x0227AD80, |
| 228 | 0x0227A63E, 0x0227A772, 0x0227A839, 0x0227A93E, |
| 229 | 0x0227AA72, 0x0227AB39, 0x0227AC26, 0x0227AD80, |
| 230 | 0x0227A67D, 0x0227A767, 0x0227A863, 0x0227A97D, |
| 231 | 0x0227AA67, 0x0227AB63, 0x0227AC27, 0x0227AD80, |
| 232 | 0x0227A6C1, 0x0227A7E7, 0x0227A8C8, 0x0227A9C1, |
| 233 | 0x0227AAE7, 0x0227ABC8, 0x0227AC28, 0x0227AD80, |
| 234 | 0x0227A63F, 0x0227A71B, 0x0227A81A, 0x0227A93F, |
| 235 | 0x0227AA1B, 0x0227AB1A, 0x0227AC29, 0x0227AD80, |
| 236 | 0x0227A68D, 0x0227A763, 0x0227A872, 0x0227A98D, |
| 237 | 0x0227AA63, 0x0227AB72, 0x0227AC2A, 0x0227AD80, |
| 238 | 0x0227A638, 0x0227A733, 0x0227A809, 0x0227A938, |
| 239 | 0x0227AA33, 0x0227AB09, 0x0227AC2B, 0x0227AD80, |
| 240 | 0x0227A672, 0x0227A79C, 0x0227A88E, 0x0227A972, |
| 241 | 0x0227AA9C, 0x0227AB8E, 0x0227AC2C, 0x0227AD80, |
| 242 | 0x0227A6C8, 0x0227A7B1, 0x0227A8DD, 0x0227A9C8, |
| 243 | 0x0227AAB1, 0x0227ABDD, 0x0227AC2D, 0x0227AD80, |
| 244 | 0x0227A641, 0x0227A7E1, 0x0227A8D8, 0x0227A941, |
| 245 | 0x0227AAE1, 0x0227ABD8, 0x0227AC2E, 0x0227AD80, |
| 246 | 0x0227A699, 0x0227A70D, 0x0227A820, 0x0227A999, |
| 247 | 0x0227AA0D, 0x0227AB20, 0x0227AC2F, 0x0227AD80, |
| 248 | 0x0227A634, 0x0227A7FE, 0x0227A823, 0x0227A934, |
| 249 | 0x0227AAFE, 0x0227AB23, 0x0227AC30, 0x0227AD80, |
| 250 | 0x0227A666, 0x0227A7F2, 0x0227A8E0, 0x0227A966, |
| 251 | 0x0227AAF2, 0x0227ABE0, 0x0227AC31, 0x0227AD80, |
| 252 | 0x0227A6C9, 0x0227A720, 0x0227A804, 0x0227A9C9, |
| 253 | 0x0227AA20, 0x0227AB04, 0x0227AC32, 0x0227AD80, |
| 254 | 0x0227A640, 0x0227A700, 0x0227A800, 0x0227A940, |
| 255 | 0x0227AA00, 0x0227AB00, 0x0227AC33, 0x0227AD80, |
| 256 | |
| 257 | /* SAFEDSP Parameters */ |
| 258 | 0x022782C1, 0x02277127, 0x02277227, 0x02278801, |
| 259 | 0x02278C58, 0x02278E90, 0x0227890A, 0x02278A14, |
| 260 | 0x02278B0F, 0x0017B008, |
| 261 | |
| 262 | /* Misc entries */ |
| 263 | 0x00B707C0, /* Enable PortB as Output with HP amp */ |
| 264 | 0x00D70740, /* Enable PortD as Output */ |
| 265 | 0x0017A200, /* Disable ClkEn of PortSenseTst */ |
| 266 | 0x0017C621, /* Slave Port - Port A used as microphone input for |
| 267 | combo Jack |
| 268 | Master Port - Port B used for Jack Presence Detect |
| 269 | Enable Combo Jack Detection */ |
| 270 | 0x0017A208, /* Enable ClkEn of PortSenseTst */ |
| 271 | 0x00170500, /* Set power state to D0 */ |
| 272 | |
| 273 | /* --- Next Codec --- */ |
| 274 | |
| 275 | /* Vendor Name : Intel |
| 276 | * Vendor ID : 0x80862806 |
| 277 | * Subsystem ID : 0x80860101 |
| 278 | * Revision ID : 0x100000 |
| 279 | */ |
| 280 | /* coreboot specific header */ |
| 281 | 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI |
| 282 | 0x80860101, // Subsystem ID |
| 283 | 0x00000004, // Number of IDs |
| 284 | |
| 285 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
| 286 | 0x30172001, |
| 287 | 0x30172101, |
| 288 | 0x30172286, |
| 289 | 0x30172380, |
| 290 | |
| 291 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
| 292 | 0x30571c10, |
| 293 | 0x30571d00, |
| 294 | 0x30571e56, |
| 295 | 0x30571f18, |
| 296 | |
| 297 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
| 298 | 0x30671c20, |
| 299 | 0x30671d00, |
| 300 | 0x30671e56, |
| 301 | 0x30671f18, |
| 302 | |
| 303 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
| 304 | 0x30771c30, |
| 305 | 0x30771d00, |
| 306 | 0x30771e56, |
| 307 | 0x30771f18 |
| 308 | }; |
| 309 | |
| 310 | static const u32 mainboard_pc_beep_verbs[] = { |
| 311 | 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ |
| 312 | }; |
| 313 | |
| 314 | static const u32 mainboard_pc_beep_verbs_size = |
| 315 | sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]); |
| 316 | |
| 317 | |