blob: f2da2c475634a1d9cf86dcc11adacbecdfc5965c [file] [log] [blame]
Tobias Diedrichcee930a2017-02-12 14:09:06 +01001/*
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 * Copyright (C) 2017 Tobias Diedrich
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18
19#include <device/azalia_device.h>
20
21const u32 cim_verb_data[] = {
22 /* coreboot specific header */
23 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC
24 0x17aa21fa, // Subsystem ID
25 0x0000000c, // Number of 4 dword sets
26
27 /* Bits 31:28 - Codec Address */
28 /* Bits 27:20 - NID */
29 /* Bits 19:8 - Verb ID */
30 /* Bits 7:0 - Payload */
31
32 /* NID 0x01 - NodeInfo */
33 AZALIA_SUBVENDOR(0x0, 0x17AA21FA),
34
35 /*
36 * PIN_CFG:
37 * 31:30 Port connectivity
38 * 00 Connected to jack
39 * 01 No physical connection
40 * 10 Fixed function (integrated speaker/mic)
41 * 11 Jack + internal
42 * 29:24 Location
43 * See HDA spec for full matrix
44 * 23:20 Default device
45 * 0 Line out 4 S/PDIF out 8 Line in c S/PDIF in
46 * 1 Speaker 5 Digital out 9 Aux d Digital in
47 * 2 HP out 6 Modem line a Mic in e Reserved
48 * 3 CD 7 Modem handse b Telephony f Other
49 * 19:16 Connection type
50 * 0 Unknown 4 RCA 8 Multichannel analog DIN
51 * 1 1/8" jack 5 Optical 9 XLR
52 * 2 1/4" jack 6 Digital a RJ-11
53 * 3 ATAPI 7 Analog b Combination f Other
54 * 15:12 Color
55 * 0 Unknown 4 Green 8 Purple
56 * 1 Black 5 Red 9 Pink
57 * 2 Grey 6 Orange a-d Reserved
58 * 3 Blue 7 Yellow e White f Other
59 * 11:8 Misc
60 * bit0 Jack detect override 1-3 Reserved
61 * 7:4 Default association
62 * 0 Reserved/Not initialized
63 * f Lowest priority
64 * 3:0 Sequence
65 * For stream channel to in/out mapping
66 */
67
68 /*
69 * NID 0x12 - Digital MIC
70 * Fixed function, mic in, digital
71 */
72 AZALIA_PIN_CFG(0x0, 0x12, 0x90a60940),
73 /*
74 * NID 0x14 - SPK out
75 * Fixed function, speaker, analog
76 */
77 AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
78 /*
79 * NID 0x15 - HP out
80 * Location left, headphone out, 1/8" jack, black
81 */
82 AZALIA_PIN_CFG(0x0, 0x15, 0x03211020),
83 /* NID 0x17 - ? (Unconnected) */
84 AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
85 /*
86 * NID 0x18 - MIC1 in
87 * Location left, mic in, 1/8" jack, black
88 */
89 AZALIA_PIN_CFG(0x0, 0x18, 0x03a11830),
90 /* NID 0x19 - MIC2 in (Unconnected) */
91 AZALIA_PIN_CFG(0x0, 0x19, 0x411111f0),
92 /* NID 0x1a - Line1 in (Unconnected) */
93 AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
94 /* NID 0x1b - Line2 in (Unconnected) */
95 AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0),
96 /* NID 0x1d - PCBEEP */
97 AZALIA_PIN_CFG(0x0, 0x1d, 0x40148605),
98 /* NID 0x1e - S/PDIF out (Unconnected) */
99 AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
100
101 0x01470740, // Enable output for NID 0x14 (Speaker out)
102 0x015707C0, // Enable output & HP amp for NID 0x15 (HP out)
103 0x01870724, // Enable Vrefout NID 0x18 (MIC1 in)
104 0x00170500, // Set power state to D0
105
106 /* coreboot specific header */
107 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI
108 0x80860101, // Subsystem ID
109 0x00000004, // Number of IDs
110
111 /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
112 AZALIA_SUBVENDOR(0x3, 0x80860101),
113
114 /* Pin Complex (NID 0x05) Digital Out at Int HDMI */
115 AZALIA_PIN_CFG(0x3, 0x05, 0x18560010),
116
117 /* Pin Complex (NID 0x06) Digital Out at Int HDMI */
118 AZALIA_PIN_CFG(0x3, 0x06, 0x18560020),
119
120 /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
121 AZALIA_PIN_CFG(0x3, 0x07, 0x58560030)
122};
123
124const u32 pc_beep_verbs[] = {
125 /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
126 0x02177a00,
127};
128
129AZALIA_ARRAY_SIZES;