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. |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | /* Vendor Name : IDT |
| 18 | * Vendor ID : 0x10ec0269 |
| 19 | * Subsystem ID : 0x17aa21fa |
| 20 | * Revision ID : 0x100303 |
| 21 | */ |
| 22 | |
| 23 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 24 | #include <device/azalia_device.h> |
| 25 | |
| 26 | const u32 cim_verb_data[] = { |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 27 | /* coreboot specific header */ |
Nicolas Reinecke | 76b46e0 | 2014-10-30 11:30:36 +0100 | [diff] [blame] | 28 | 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC |
| 29 | 0x17aa21fa, // Subsystem ID |
Vladimir Serbinenko | 3c6d36d | 2015-05-25 01:47:20 +0200 | [diff] [blame] | 30 | 0x00000013, // Number of 4 dword sets |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 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 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 38 | AZALIA_SUBVENDOR(0x0, 0x17AA21FA), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 39 | |
| 40 | /* NID 0x0A - External Microphone Connector |
| 41 | * Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq) |
| 42 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 43 | AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 44 | |
| 45 | /* NID 0x0B - Headphone Connector |
| 46 | * Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq) |
| 47 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 48 | AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 49 | |
| 50 | /* NID 0x0C - Not connected |
| 51 | * Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq) |
| 52 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 53 | AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 54 | |
| 55 | /* NID 0x0D - Internal Speakers |
| 56 | * Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq) |
| 57 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 58 | AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 59 | |
| 60 | /* NID 0x0F - Not connected |
| 61 | * Config=0x40F000F0 |
| 62 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 63 | AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 64 | |
| 65 | /* NID 0x11 - Internal Microphone |
| 66 | * Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq) |
| 67 | */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 68 | AZALIA_PIN_CFG(0x0, 0x11, 0xD5A30140), |
| 69 | AZALIA_PIN_CFG(0x0, 0x12, 0x90A60140), |
| 70 | AZALIA_PIN_CFG(0x0, 0x14, 0x90170110), |
| 71 | AZALIA_PIN_CFG(0x0, 0x15, 0x03211020), |
| 72 | AZALIA_PIN_CFG(0x0, 0x18, 0x03A11830), |
| 73 | AZALIA_PIN_CFG(0x0, 0x19, 0x411111F0), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 74 | |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 75 | AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0), |
| 76 | AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205), |
| 77 | AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 78 | |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 79 | /* Misc entries */ |
Vladimir Serbinenko | 3c6d36d | 2015-05-25 01:47:20 +0200 | [diff] [blame] | 80 | 0x01970804, |
| 81 | 0x01870803, |
| 82 | 0x01470740, |
| 83 | 0x00970640, |
| 84 | |
| 85 | 0x00370680, |
| 86 | 0x00270680, |
| 87 | 0x01470C02, |
| 88 | 0x01570C02, |
| 89 | |
| 90 | /* ALC coefficients. */ |
| 91 | |
| 92 | /* 08 */ |
| 93 | 0x02050008, |
| 94 | 0x02040700, |
| 95 | /* 18 */ |
| 96 | 0x02050018, |
| 97 | 0x02045184, |
| 98 | /* 1c */ |
| 99 | 0x0205001c, |
| 100 | 0x02042800, |
| 101 | |
| 102 | 0x01870724, /* Enable Vrefout for mic */ |
| 103 | 0x00170500, /* Set power state to D0 */ |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 104 | |
| 105 | /* --- Next Codec --- */ |
| 106 | |
| 107 | /* Vendor Name : Intel |
| 108 | * Vendor ID : 0x80862806 |
| 109 | * Subsystem ID : 0x80860101 |
| 110 | * Revision ID : 0x100000 |
| 111 | */ |
| 112 | /* coreboot specific header */ |
| 113 | 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI |
| 114 | 0x80860101, // Subsystem ID |
| 115 | 0x00000004, // Number of IDs |
| 116 | |
| 117 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 118 | AZALIA_SUBVENDOR(0x3, 0x80860101), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 119 | |
| 120 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 121 | AZALIA_PIN_CFG(0x3, 0x05, 0x18560010), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 122 | |
| 123 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 124 | AZALIA_PIN_CFG(0x3, 0x06, 0x18560020), |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 125 | |
| 126 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 127 | AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 128 | }; |
| 129 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 130 | const u32 pc_beep_verbs[] = { |
Edward O'Callaghan | 956c298 | 2014-03-16 17:09:58 +1100 | [diff] [blame] | 131 | 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ |
| 132 | }; |
| 133 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 134 | AZALIA_ARRAY_SIZES; |