blob: 792579aa3280e44548d2c31004faffb8db5ef36f [file] [log] [blame]
Edward O'Callaghan956c2982014-03-16 17:09:58 +11001/*
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'Callaghan956c2982014-03-16 17:09:58 +110015 */
16
17/* Vendor Name : IDT
18 * Vendor ID : 0x10ec0269
19 * Subsystem ID : 0x17aa21fa
20 * Revision ID : 0x100303
21 */
22
23
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020024#include <device/azalia_device.h>
25
26const u32 cim_verb_data[] = {
Edward O'Callaghan956c2982014-03-16 17:09:58 +110027 /* coreboot specific header */
Nicolas Reinecke76b46e02014-10-30 11:30:36 +010028 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC
29 0x17aa21fa, // Subsystem ID
Vladimir Serbinenko3c6d36d2015-05-25 01:47:20 +020030 0x00000013, // Number of 4 dword sets
Edward O'Callaghan956c2982014-03-16 17:09:58 +110031
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 Serbinenko02d674a2014-09-04 22:04:11 +020038 AZALIA_SUBVENDOR(0x0, 0x17AA21FA),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110039
40/* NID 0x0A - External Microphone Connector
41 * Config=0x04A11020 (External,Right; MicIn,3.5mm; Black,JD; DA,Seq)
42 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020043 AZALIA_PIN_CFG(0x0, 0x0A, 0x04A11020),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110044
45/* NID 0x0B - Headphone Connector
46 * Config=0x0421101F (External,Right; HP,3.5mm; Black,JD; DA,Seq)
47 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020048 AZALIA_PIN_CFG(0x0, 0x0B, 0x0421101F),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110049
50/* NID 0x0C - Not connected
51 * Config=0x40F000F0 (N/A,N/A; Other,Unknown; Unknown,JD; DA,Seq)
52 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020053 AZALIA_PIN_CFG(0x0, 0x0C, 0x40F000F0),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110054
55/* NID 0x0D - Internal Speakers
56 * Config=0x90170110 (Fixed,Int; Speaker,Other Analog; Unknown,nJD; DA,Seq)
57 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020058 AZALIA_PIN_CFG(0x0, 0x0D, 0x90170110),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110059
60/* NID 0x0F - Not connected
61 * Config=0x40F000F0
62 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020063 AZALIA_PIN_CFG(0x0, 0x0F, 0x40F000F0),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110064
65/* NID 0x11 - Internal Microphone
66 * Config=0xD5A30140 (Fixed internal,Top; Mic In,ATIPI; Unknown,nJD; DA,Seq)
67 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020068 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'Callaghan956c2982014-03-16 17:09:58 +110074
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020075 AZALIA_PIN_CFG(0x0, 0x1A, 0x411111F0),
76 AZALIA_PIN_CFG(0x0, 0x1D, 0x40138205),
77 AZALIA_PIN_CFG(0x0, 0x1E, 0x411111F0),
Edward O'Callaghan956c2982014-03-16 17:09:58 +110078
Edward O'Callaghan956c2982014-03-16 17:09:58 +110079 /* Misc entries */
Vladimir Serbinenko3c6d36d2015-05-25 01:47:20 +020080 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'Callaghan956c2982014-03-16 17:09:58 +1100104
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 Serbinenko02d674a2014-09-04 22:04:11 +0200118 AZALIA_SUBVENDOR(0x3, 0x80860101),
Edward O'Callaghan956c2982014-03-16 17:09:58 +1100119
120 /* Pin Complex (NID 0x05) Digital Out at Int HDMI */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +0200121 AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
Edward O'Callaghan956c2982014-03-16 17:09:58 +1100122
123 /* Pin Complex (NID 0x06) Digital Out at Int HDMI */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +0200124 AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
Edward O'Callaghan956c2982014-03-16 17:09:58 +1100125
126 /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +0200127 AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
Edward O'Callaghan956c2982014-03-16 17:09:58 +1100128};
129
Vladimir Serbinenko75c83872014-09-05 01:01:31 +0200130const u32 pc_beep_verbs[] = {
Edward O'Callaghan956c2982014-03-16 17:09:58 +1100131 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
132};
133
Vladimir Serbinenko75c83872014-09-05 01:01:31 +0200134AZALIA_ARRAY_SIZES;