blob: 56c65083998a82830db6b9bb217aab99e487aaa3 [file] [log] [blame]
Duncan Laurie5290f712013-05-22 16:31:09 -07001/*
2 * This file is part of the coreboot project.
3 *
Duncan Laurie28080e42013-06-11 08:43:12 -07004 * Copyright (C) 2013 Google Inc.
Duncan Laurie5290f712013-05-22 16:31:09 -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.
Duncan Laurie5290f712013-05-22 16:31:09 -070014 */
15
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020016#include <device/azalia_device.h>
17
18const u32 cim_verb_data[] = {
Duncan Laurie5290f712013-05-22 16:31:09 -070019 /* coreboot specific header */
Duncan Laurie28080e42013-06-11 08:43:12 -070020 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
21 0x10ec0283, // Subsystem ID
Duncan Laurie9dd01eb2013-08-28 09:53:57 -070022 0x0000000d, // Number of jacks (NID entries)
23
24 0x0017ff00, // Function Reset
25 0x0017ff00, // Double Function Reset
26 0x000F0000, // Pad - get vendor id
27 0x000F0002, // Pad - get revision id
Duncan Laurie5290f712013-05-22 16:31:09 -070028
Duncan Laurie28080e42013-06-11 08:43:12 -070029 /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020030 AZALIA_SUBVENDOR(0x0, 0x10ec0283),
Duncan Laurie5290f712013-05-22 16:31:09 -070031
32 /* Pin Widget Verb Table */
33
Duncan Laurie28080e42013-06-11 08:43:12 -070034 /* Pin Complex (NID 0x12) DMIC - interior mobile lid */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020035 AZALIA_PIN_CFG(0x0, 0x12, 0xb7a61010),
Duncan Laurie5290f712013-05-22 16:31:09 -070036
Duncan Laurie28080e42013-06-11 08:43:12 -070037 /* Pin Complex (NID 0x14) SPKR-OUT PORTD */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020038 // group 1, front left/right
39 // no connector, no jack detect
40 // speaker out, analog
41 // fixed function, internal
42 AZALIA_PIN_CFG(0x0, 0x14, 0x90170110),
Duncan Laurie5290f712013-05-22 16:31:09 -070043
Duncan Laurie28080e42013-06-11 08:43:12 -070044 /* Pin Complex (NID 0x17) */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020045 AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0),
Duncan Laurie5290f712013-05-22 16:31:09 -070046
Duncan Laurie28080e42013-06-11 08:43:12 -070047 /* Pin Complex (NID 0x18) MIC1 PORTB */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020048 // group 1, cap 1
49 // black, jack detect
50 // mic in, analog
51 // connector, left panel
52 AZALIA_PIN_CFG(0x0, 0x19, 0x03a71011),
Duncan Laurie5290f712013-05-22 16:31:09 -070053
Duncan Laurie28080e42013-06-11 08:43:12 -070054 /* Pin Complex (NID 0x19) MIC2 PORTF */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020055 AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0),
Duncan Laurie5290f712013-05-22 16:31:09 -070056
Duncan Laurie28080e42013-06-11 08:43:12 -070057 /* Pin Complex (NID 0x1A) LINE1 PORTC */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020058 AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
Duncan Laurie5290f712013-05-22 16:31:09 -070059
Duncan Laurie28080e42013-06-11 08:43:12 -070060 /* Pin Complex (NID 0x1B) LINE2 PORTE */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020061 AZALIA_PIN_CFG(0x0, 0x1a, 0x411111f0),
Duncan Laurie5290f712013-05-22 16:31:09 -070062
Duncan Laurie28080e42013-06-11 08:43:12 -070063 /* Pin Complex (NID 0x1d) PCBeep */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020064 // eapd low on ex-amp, laptop, custom enable
65 // mute spkr on hpout
66 // pcbeep en able, checksum
67 // no physical, internal
68 AZALIA_PIN_CFG(0x0, 0x1d, 0x4015812d),
Duncan Laurie5290f712013-05-22 16:31:09 -070069
Duncan Laurie28080e42013-06-11 08:43:12 -070070 /* Pin Complex (NID 0x1E) SPDIF-OUT */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020071 AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0),
Duncan Laurie5290f712013-05-22 16:31:09 -070072
Duncan Laurie28080e42013-06-11 08:43:12 -070073 /* Pin Complex (NID 0x21) HPOUT PORT-I */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020074 // group1,
75 // black, jack detect
76 // HPOut, 1/8 stereo
77 // connector, left panel
78 AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
Duncan Laurie5290f712013-05-22 16:31:09 -070079
Marc Jones4acd8ea2013-08-21 05:21:21 -060080 /* Undocumented settings from Realtek (needed for beep_gen) */
81 /* Widget node 0x20 */
82 0x02050010,
83 0x02040c20,
84 0x0205001b,
85 0x0204081b,
Duncan Laurie5290f712013-05-22 16:31:09 -070086};
Marc Jones4acd8ea2013-08-21 05:21:21 -060087
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020088const u32 pc_beep_verbs[] = {
Marc Jones4acd8ea2013-08-21 05:21:21 -060089 0x00170500, /* power up everything (codec, dac, adc, mixers) */
90 0x01470740, /* enable speaker out */
91 0x01470c02, /* set speaker EAPD pin */
92 0x0143b01f, /* unmute speaker */
93 0x00c37100, /* unmute mixer nid 0xc input 1 */
94 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
95};
96
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020097AZALIA_ARRAY_SIZES;