Poornima Tom | d5bcfe1 | 2023-12-22 05:34:31 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <device/azalia_device.h> |
| 4 | |
| 5 | const u32 cim_verb_data[] = { |
| 6 | /* coreboot specific header */ |
| 7 | 0x10ec0256, // Codec Vendor / Device ID: Realtek ALC256 |
| 8 | 0x10ec12ac, // Subsystem ID |
poornima tom | d45f6ea | 2024-02-09 20:11:09 +0530 | [diff] [blame] | 9 | 0x00000013, // Number of jacks (NID entries) |
Poornima Tom | d5bcfe1 | 2023-12-22 05:34:31 +0530 | [diff] [blame] | 10 | |
| 11 | AZALIA_RESET(0x1), |
| 12 | /* NID 0x01, HDA Codec Subsystem ID Verb table */ |
| 13 | AZALIA_SUBVENDOR(0, 0x10ec12ac), |
| 14 | |
| 15 | /* Pin Widget Verb Table */ |
| 16 | |
| 17 | /* |
| 18 | * DMIC |
| 19 | * Requirement is to use PCH DMIC. Hence, |
| 20 | * commented out codec's Internal DMIC. |
| 21 | * AZALIA_PIN_CFG(0, 0x12, 0x90A60130), |
| 22 | * AZALIA_PIN_CFG(0, 0x13, 0x40000000), |
| 23 | */ |
| 24 | |
| 25 | /* Pin widget 0x14 - Front (Port-D) */ |
| 26 | AZALIA_PIN_CFG(0, 0x14, 0x90170110), |
| 27 | /* Pin widget 0x18 - NPC */ |
| 28 | AZALIA_PIN_CFG(0, 0x18, 0x411111F0), |
| 29 | /* Pin widget 0x19 - MIC2 (Port-F) */ |
| 30 | AZALIA_PIN_CFG(0, 0x19, 0x04A11040), |
| 31 | /* Pin widget 0x1A - LINE1 (Port-C) */ |
| 32 | AZALIA_PIN_CFG(0, 0x1a, 0x411111F0), |
| 33 | /* Pin widget 0x1B - NPC */ |
| 34 | AZALIA_PIN_CFG(0, 0x1b, 0x411111F0), |
| 35 | /* Pin widget 0x1D - BEEP-IN */ |
| 36 | AZALIA_PIN_CFG(0, 0x1d, 0x40610041), |
| 37 | /* Pin widget 0x1E - NPC */ |
| 38 | AZALIA_PIN_CFG(0, 0x1e, 0x411111F0), |
| 39 | /* Pin widget 0x21 - HP1-OUT (Port-I) */ |
| 40 | AZALIA_PIN_CFG(0, 0x21, 0x04211020), |
| 41 | /* |
| 42 | * Widget node 0x20 - 1 |
| 43 | * Codec hidden reset and speaker power 2W/4ohm |
| 44 | */ |
| 45 | 0x0205001A, |
| 46 | 0x0204C003, |
| 47 | 0x02050038, |
| 48 | 0x02047901, |
| 49 | /* |
| 50 | * Widget node 0x20 - 2 |
| 51 | * Class D power on Reset |
| 52 | */ |
| 53 | 0x0205003C, |
| 54 | 0x02040354, |
| 55 | 0x0205003C, |
| 56 | 0x02040314, |
| 57 | /* |
| 58 | * Widget node 0x20 - 3 |
| 59 | * Disable AGC and set AGC limit to -1.5dB |
| 60 | */ |
| 61 | 0x02050016, |
| 62 | 0x02040C50, |
| 63 | 0x02050012, |
| 64 | 0x0204EBC1, |
| 65 | /* |
| 66 | * Widget node 0x20 - 4 |
| 67 | * Set AGC Post gain +1.5dB then Enable AGC |
| 68 | */ |
| 69 | 0x02050013, |
| 70 | 0x02044023, |
| 71 | 0x02050016, |
| 72 | 0x02040E50, |
| 73 | /* |
| 74 | * Widget node 0x20 - 5 |
| 75 | * Silence detector enabling + Set EAPD to verb control |
| 76 | */ |
| 77 | 0x02050037, |
| 78 | 0x0204FE15, |
| 79 | 0x02050010, |
| 80 | 0x02040020, |
| 81 | /* |
| 82 | * Widget node 0x20 - 6 |
| 83 | * Silence data mode Threshold (-90dB) |
| 84 | */ |
| 85 | 0x02050030, |
| 86 | 0x0204A000, |
| 87 | 0x0205001B, |
| 88 | 0x02040A4B, |
| 89 | /* |
| 90 | * Widget node 0x20 - 7 |
| 91 | * Default setting - 1 |
| 92 | */ |
| 93 | 0x05750003, |
| 94 | 0x05740DA3, |
| 95 | 0x02050046, |
| 96 | 0x02040004, |
| 97 | /* |
| 98 | * Widget node 0x20 - 8 |
| 99 | * support 1 pin detect two port |
| 100 | */ |
| 101 | 0x02050009, |
| 102 | 0x0204E003, |
| 103 | 0x0205000A, |
| 104 | 0x02047770, |
| 105 | /* |
| 106 | * Widget node 0x20 - 9 |
| 107 | * To set LDO1/LDO2 as default (used for headset) |
| 108 | */ |
| 109 | 0x02050008, |
Poornima Tom | f867c9c | 2024-04-03 12:13:31 +0530 | [diff] [blame^] | 110 | 0x0204EA0C, |
Poornima Tom | d5bcfe1 | 2023-12-22 05:34:31 +0530 | [diff] [blame] | 111 | 0x02050008, |
Poornima Tom | f867c9c | 2024-04-03 12:13:31 +0530 | [diff] [blame^] | 112 | 0x0204EA0C, |
Poornima Tom | d5bcfe1 | 2023-12-22 05:34:31 +0530 | [diff] [blame] | 113 | }; |
| 114 | |
| 115 | const u32 pc_beep_verbs[] = { |
poornima tom | d45f6ea | 2024-02-09 20:11:09 +0530 | [diff] [blame] | 116 | /* Dos beep path - 1 */ |
| 117 | 0x01470C00, |
| 118 | 0x02050036, |
| 119 | 0x02047151, |
| 120 | 0x01470740, |
| 121 | /* Dos beep path - 2 */ |
| 122 | 0x0143b000, |
| 123 | 0x01470C02, |
| 124 | 0x01470C02, |
| 125 | 0x01470C02, |
Poornima Tom | d5bcfe1 | 2023-12-22 05:34:31 +0530 | [diff] [blame] | 126 | }; |
| 127 | |
| 128 | AZALIA_ARRAY_SIZES; |