Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 Google Inc. |
| 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. |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [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[] = { |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 19 | /* coreboot specific header */ |
| 20 | 0x11020011, // Codec Vendor / Device ID: Creative CA0132 |
| 21 | 0x144dc0c2, // Subsystem ID |
| 22 | 0x00000014, // Number of jacks + Number of Malcolm setup blocks. |
| 23 | |
| 24 | /* Malcolm Setup */ |
| 25 | |
| 26 | 0x01570d09, |
| 27 | 0x01570c23, |
| 28 | 0x01570a01, |
| 29 | 0x01570df0, |
| 30 | |
| 31 | 0x01570efe, |
| 32 | 0x01570775, |
| 33 | 0x015707d3, |
| 34 | 0x01570709, |
| 35 | |
| 36 | 0x01570753, |
| 37 | 0x015707d4, |
| 38 | 0x015707ef, |
| 39 | 0x01570775, |
| 40 | |
| 41 | 0x015707d3, |
| 42 | 0x01570709, |
| 43 | 0x01570702, |
| 44 | 0x01570737, |
| 45 | |
| 46 | 0x01570778, |
| 47 | 0x01553cce, |
| 48 | 0x015575c9, |
| 49 | 0x01553dce, |
| 50 | |
| 51 | 0x0155b7c9, |
| 52 | 0x01570de8, |
| 53 | 0x01570efe, |
| 54 | 0x01570702, |
| 55 | |
| 56 | 0x01570768, |
| 57 | 0x01570762, |
| 58 | 0x01553ace, |
| 59 | 0x015546c9, |
| 60 | |
| 61 | 0x01553bce, |
| 62 | 0x0155e8c9, |
| 63 | 0x01570d49, |
| 64 | 0x01570c88, |
| 65 | |
| 66 | 0x01570d20, |
| 67 | 0x01570e19, |
| 68 | 0x01570700, |
| 69 | 0x01571a05, |
| 70 | |
| 71 | 0x01571b29, |
| 72 | 0x01571a04, |
| 73 | 0x01571b29, |
| 74 | 0x01570a01, |
| 75 | |
| 76 | /* Pin Widget Verb Table */ |
| 77 | |
| 78 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x144DC0C2 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 79 | AZALIA_SUBVENDOR(0x0, 0x144dc0c2), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 80 | |
| 81 | /* Pin Complex (NID 0x0B) Port-G Analog Unknown Speaker at Int N/A */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 82 | AZALIA_PIN_CFG(0x0, 0x0b, 0x901700f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 83 | |
| 84 | /* Pin Complex (NID 0x0C) N/C */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 85 | AZALIA_PIN_CFG(0x0, 0x0c, 0x70f000f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 86 | |
| 87 | /* Pin Complex (NID 0x0D) N/C */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 88 | AZALIA_PIN_CFG(0x0, 0x0d, 0x70f000f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 89 | |
| 90 | /* Pin Complex (NID 0x0E) N/C */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 91 | AZALIA_PIN_CFG(0x0, 0x0e, 0x70f000f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 92 | |
| 93 | /* Pin Complex (NID 0x0F) N/C */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 94 | AZALIA_PIN_CFG(0x0, 0x0f, 0x70f000f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 95 | |
| 96 | /* Pin Complex (NID 0x10) Port-D 1/8 Black HP Out at Ext Left */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 97 | AZALIA_PIN_CFG(0x0, 0x10, 0x032110f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 98 | |
| 99 | /* Pin Complex (NID 0x11) Port-B Click Mic */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 100 | AZALIA_PIN_CFG(0x0, 0x11, 0x90a700f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 101 | |
| 102 | /* Pin Complex (NID 0x12) Port-C Combo Jack Mic or D-Mic */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 103 | AZALIA_PIN_CFG(0x0, 0x12, 0x03a110f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 104 | |
| 105 | /* Pin Complex (NID 0x13) What you hear */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 106 | AZALIA_PIN_CFG(0x0, 0x13, 0x90d600f0), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 107 | |
| 108 | /* coreboot specific header */ |
| 109 | 0x80862806, // Codec Vendor / Device ID: Intel CougarPoint HDMI |
| 110 | 0x80860101, // Subsystem ID |
| 111 | 0x00000004, // Number of jacks |
| 112 | |
| 113 | /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 114 | AZALIA_SUBVENDOR(0x3, 0x80860101), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 115 | |
| 116 | /* Pin Complex (NID 0x05) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 117 | AZALIA_PIN_CFG(0x3, 0x05, 0x18560010), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 118 | |
| 119 | /* Pin Complex (NID 0x06) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 120 | AZALIA_PIN_CFG(0x3, 0x06, 0x18560020), |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 121 | |
| 122 | /* Pin Complex (NID 0x07) Digital Out at Int HDMI */ |
Vladimir Serbinenko | 02d674a | 2014-09-04 22:04:11 +0200 | [diff] [blame] | 123 | AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 127 | const u32 pc_beep_verbs[] = { |
Stefan Reinauer | 49428d8 | 2013-02-21 15:48:37 -0800 | [diff] [blame] | 128 | 0x00170500, /* power up codec */ |
| 129 | 0x00270500, /* power up DAC */ |
| 130 | 0x00b70500, /* power up speaker */ |
| 131 | 0x00b70740, /* enable speaker out */ |
| 132 | 0x00b78d00, /* enable EAPD pin */ |
| 133 | 0x00b70c02, /* set EAPD pin */ |
| 134 | 0x0143b013, /* beep volume */ |
| 135 | }; |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 136 | AZALIA_ARRAY_SIZES; |