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