Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Duncan Laurie | ccd2f28f | 2013-06-11 08:49:55 -0700 | [diff] [blame] | 4 | * Copyright (C) 2013 Google Inc. |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 5 | * |
| 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 Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 14 | */ |
| 15 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 16 | #include <device/azalia_device.h> |
| 17 | |
| 18 | const u32 cim_verb_data[] = { |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 19 | /* coreboot specific header */ |
Duncan Laurie | ccd2f28f | 2013-06-11 08:49:55 -0700 | [diff] [blame] | 20 | 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 |
| 21 | 0x10ec0283, // Subsystem ID |
Marc Jones | 4acd8ea | 2013-08-21 05:21:21 -0600 | [diff] [blame] | 22 | 0x0000000c, // Number of jacks (NID entries) |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 23 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 24 | /* Bits 31:28 - Codec Address */ |
| 25 | /* Bits 27:20 - NID */ |
| 26 | /* Bits 19:8 - Verb ID */ |
| 27 | /* Bits 7:0 - Payload */ |
| 28 | |
Duncan Laurie | ccd2f28f | 2013-06-11 08:49:55 -0700 | [diff] [blame] | 29 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10ec0283 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 30 | AZALIA_SUBVENDOR(0x0, 0x10ec0283), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 31 | |
| 32 | /* Pin Widget Verb Table */ |
| 33 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 34 | /* Pin Complex (NID 0x12) DMIC - Disabled */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 35 | AZALIA_PIN_CFG(0x0, 0x12, 0x411111f0), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 36 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 37 | /* Pin Complex (NID 0x14) SPKR-OUT - Internal Speakers */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 38 | // 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 Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 43 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 44 | /* Pin Complex (NID 0x17) MONO Out - Disabled */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 45 | AZALIA_PIN_CFG(0x0, 0x17, 0x411111f0), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 46 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 47 | /* Pin Complex (NID 0x18) Disabled */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 48 | AZALIA_PIN_CFG(0x0, 0x18, 0x411111f0), |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 49 | |
| 50 | /* Pin Complex (NID 0x19) MIC2 - 3.5mm Jack */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 51 | // 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 Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 56 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 57 | /* Pin Complex (NID 0x1A) LINE1 - Internal Mic */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 58 | // 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 Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 63 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 64 | /* Pin Complex (NID 0x1B) LINE2 - Disabled */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 65 | AZALIA_PIN_CFG(0x0, 0x1b, 0x411111f0), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 66 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 67 | /* Pin Complex (NID 0x1D) PCBeep */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 68 | // 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 Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 73 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 74 | /* Pin Complex (NID 0x1E) SPDIF-OUT - Disabled*/ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 75 | AZALIA_PIN_CFG(0x0, 0x1e, 0x411111f0), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 76 | |
Martin Roth | aa1b106 | 2013-06-13 14:24:35 +0800 | [diff] [blame] | 77 | /* Pin Complex (NID 0x21) HP-OUT - 3.5mm Jack*/ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 78 | // group2, cap 1 |
| 79 | // black, jack detect |
| 80 | // HPOut, 3.5mm Jack |
| 81 | // connector, left panel |
| 82 | AZALIA_PIN_CFG(0x0, 0x21, 0x03211021), |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 83 | |
Marc Jones | 4acd8ea | 2013-08-21 05:21:21 -0600 | [diff] [blame] | 84 | /* Undocumented settings from Realtek (needed for beep_gen) */ |
| 85 | /* Widget node 0x20 */ |
| 86 | 0x02050010, |
| 87 | 0x02040c20, |
| 88 | 0x0205001b, |
| 89 | 0x0204081b, |
Shawn Nematbakhsh | e9d060d | 2013-05-23 15:13:46 -0700 | [diff] [blame] | 90 | }; |
Marc Jones | 4acd8ea | 2013-08-21 05:21:21 -0600 | [diff] [blame] | 91 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 92 | const u32 pc_beep_verbs[] = { |
Marc Jones | 4acd8ea | 2013-08-21 05:21:21 -0600 | [diff] [blame] | 93 | 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 Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 101 | AZALIA_ARRAY_SIZES; |