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