blob: 8b8077f6ed63413db1065f30cf8b210e0ab1e3f6 [file] [log] [blame]
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -07001/*
2 * This file is part of the coreboot project.
3 *
Duncan Laurieccd2f28f2013-06-11 08:49:55 -07004 * Copyright (C) 2013 Google Inc.
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -07005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070014 */
15
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020016#include <device/azalia_device.h>
17
18const u32 cim_verb_data[] = {
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070019 /* coreboot specific header */
Duncan Laurieccd2f28f2013-06-11 08:49:55 -070020 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
21 0x10ec0283, // Subsystem ID
Marc Jones4acd8ea2013-08-21 05:21:21 -060022 0x0000000c, // Number of jacks (NID entries)
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070023
Martin Rothaa1b1062013-06-13 14:24:35 +080024 /* Bits 31:28 - Codec Address */
25 /* Bits 27:20 - NID */
26 /* Bits 19:8 - Verb ID */
27 /* Bits 7:0 - Payload */
28
Duncan Laurieccd2f28f2013-06-11 08:49:55 -070029 /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020030 AZALIA_SUBVENDOR(0x0, 0x10ec0283),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070031
32 /* Pin Widget Verb Table */
33
Martin Rothaa1b1062013-06-13 14:24:35 +080034 /* Pin Complex (NID 0x12) DMIC - Disabled */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020035 AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070036
Martin Rothaa1b1062013-06-13 14:24:35 +080037 /* Pin Complex (NID 0x14) SPKR-OUT - Internal Speakers */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020038 // group 1, cap 0
39 // no connector, no jack detect
40 // speaker out, analog
41 // fixed function, internal, Location N/A
42 AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070043
Martin Rothaa1b1062013-06-13 14:24:35 +080044 /* Pin Complex (NID 0x17) MONO Out - Disabled */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020045 AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070046
Martin Rothaa1b1062013-06-13 14:24:35 +080047 /* Pin Complex (NID 0x18) Disabled */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020048 AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
Martin Rothaa1b1062013-06-13 14:24:35 +080049
50 /* Pin Complex (NID 0x19) MIC2 - 3.5mm Jack */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020051 // group2, cap 0
52 // black, jack detect
53 // Mic in, 3.5mm Jack
54 // connector, External left panel
55 AZALIA_PIN_CFG(0x0, 0x19, 0x03a11020),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070056
Martin Rothaa1b1062013-06-13 14:24:35 +080057 /* Pin Complex (NID 0x1A) LINE1 - Internal Mic */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020058 // group 1, cap 1
59 // no connector, no jack detect
60 // mic in, analog connection
61 // Fixed function, internal, Location N/A
62 AZALIA_PIN_CFG(0x0, 0x1a, 0x90a70111),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070063
Martin Rothaa1b1062013-06-13 14:24:35 +080064 /* Pin Complex (NID 0x1B) LINE2 - Disabled */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020065 AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070066
Martin Rothaa1b1062013-06-13 14:24:35 +080067 /* Pin Complex (NID 0x1D) PCBeep */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020068 // eapd low on ex-amp, laptop, custom enable
69 // mute spkr on hpout
70 // pcbeep en able, checksum
71 // no physical, Internal, Location N/A
72 AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070073
Martin Rothaa1b1062013-06-13 14:24:35 +080074 /* Pin Complex (NID 0x1E) SPDIF-OUT - Disabled*/
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020075 AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070076
Martin Rothaa1b1062013-06-13 14:24:35 +080077 /* Pin Complex (NID 0x21) HP-OUT - 3.5mm Jack*/
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020078 // group2, cap 1
79 // black, jack detect
80 // HPOut, 3.5mm Jack
81 // connector, left panel
82 AZALIA_PIN_CFG(0x0, 0x21, 0x03211021),
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070083
Marc Jones4acd8ea2013-08-21 05:21:21 -060084 /* Undocumented settings from Realtek (needed for beep_gen) */
85 /* Widget node 0x20 */
86 0x02050010,
87 0x02040c20,
88 0x0205001b,
89 0x0204081b,
Shawn Nematbakhshe9d060d2013-05-23 15:13:46 -070090};
Marc Jones4acd8ea2013-08-21 05:21:21 -060091
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020092const u32 pc_beep_verbs[] = {
Marc Jones4acd8ea2013-08-21 05:21:21 -060093 0x00170500, /* power up everything (codec, dac, adc, mixers) */
94 0x01470740, /* enable speaker out */
95 0x01470c02, /* set speaker EAPD pin */
96 0x0143b01f, /* unmute speaker */
97 0x00c37100, /* unmute mixer nid 0xc input 1 */
98 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
99};
100
Vladimir Serbinenko75c83872014-09-05 01:01:31 +0200101AZALIA_ARRAY_SIZES;