Angel Pons | f5627e8 | 2020-04-05 15:46:52 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 2 | |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 3 | #include <device/pci_ids.h> |
| 4 | #include <device/pci_ops.h> |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 5 | #include <fsp/api.h> |
| 6 | #include <soc/ramstage.h> |
| 7 | #include <soc/vr_config.h> |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 8 | #include <console/console.h> |
| 9 | #include <intelblocks/cpulib.h> |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 10 | |
| 11 | static const struct vr_config default_configs[NUM_VR_DOMAINS] = { |
Roy Mingi Park | 1ac2ad0 | 2019-02-13 11:10:45 -0800 | [diff] [blame] | 12 | [VR_SYSTEM_AGENT] = { |
| 13 | .vr_config_enable = 1, |
| 14 | .psi1threshold = VR_CFG_AMP(20), |
| 15 | .psi2threshold = VR_CFG_AMP(5), |
| 16 | .psi3threshold = VR_CFG_AMP(1), |
| 17 | .psi3enable = 1, |
| 18 | .psi4enable = 1, |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 19 | .imon_slope = 0, |
| 20 | .imon_offset = 0, |
| 21 | .icc_max = 0, |
Roy Mingi Park | 1ac2ad0 | 2019-02-13 11:10:45 -0800 | [diff] [blame] | 22 | .voltage_limit = 1520, |
| 23 | }, |
| 24 | [VR_IA_CORE] = { |
| 25 | .vr_config_enable = 1, |
| 26 | .psi1threshold = VR_CFG_AMP(20), |
| 27 | .psi2threshold = VR_CFG_AMP(5), |
| 28 | .psi3threshold = VR_CFG_AMP(1), |
| 29 | .psi3enable = 1, |
| 30 | .psi4enable = 1, |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 31 | .imon_slope = 0, |
| 32 | .imon_offset = 0, |
| 33 | .icc_max = 0, |
Roy Mingi Park | 1ac2ad0 | 2019-02-13 11:10:45 -0800 | [diff] [blame] | 34 | .voltage_limit = 1520, |
| 35 | }, |
| 36 | [VR_GT_UNSLICED] = { |
| 37 | .vr_config_enable = 1, |
| 38 | .psi1threshold = VR_CFG_AMP(20), |
| 39 | .psi2threshold = VR_CFG_AMP(5), |
| 40 | .psi3threshold = VR_CFG_AMP(1), |
| 41 | .psi3enable = 1, |
| 42 | .psi4enable = 1, |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 43 | .imon_slope = 0, |
| 44 | .imon_offset = 0, |
| 45 | .icc_max = 0, |
Roy Mingi Park | 1ac2ad0 | 2019-02-13 11:10:45 -0800 | [diff] [blame] | 46 | .voltage_limit = 1520, |
| 47 | }, |
| 48 | [VR_GT_SLICED] = { |
| 49 | .vr_config_enable = 1, |
| 50 | .psi1threshold = VR_CFG_AMP(20), |
| 51 | .psi2threshold = VR_CFG_AMP(5), |
| 52 | .psi3threshold = VR_CFG_AMP(1), |
| 53 | .psi3enable = 1, |
| 54 | .psi4enable = 1, |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 55 | .imon_slope = 0, |
| 56 | .imon_offset = 0, |
| 57 | .icc_max = 0, |
Roy Mingi Park | 1ac2ad0 | 2019-02-13 11:10:45 -0800 | [diff] [blame] | 58 | .voltage_limit = 1520, |
| 59 | }, |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 60 | }; |
| 61 | |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 62 | struct vr_lookup_item { |
| 63 | uint16_t tdp_min; |
| 64 | enum chip_pl2_4_cfg pl2_4_cfg; /* Use 'value_not_set' for don't care */ |
| 65 | uint16_t conf[NUM_VR_DOMAINS]; |
| 66 | }; |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 67 | |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 68 | struct vr_lookup { |
| 69 | uint16_t mchid; |
| 70 | uint8_t num_items; |
| 71 | const struct vr_lookup_item *items; |
| 72 | }; |
| 73 | |
| 74 | #define VR_CONFIG(x, y) \ |
| 75 | static const struct vr_lookup_item vr_config_##x##_##y[] = |
| 76 | #define VR_CONFIG_ICC(x) VR_CONFIG(x, ICC) |
| 77 | #define VR_CONFIG_LL(x) VR_CONFIG(x, LL) |
| 78 | #define VR_CONFIG_TDC(x) VR_CONFIG(x, TDC) |
| 79 | |
| 80 | #define VR_REFITEM(x, y) { x, ARRAY_SIZE(vr_config_##x##_##y), vr_config_##x##_##y} |
| 81 | #define VR_REFITEM_ICC(x) VR_REFITEM(x, ICC) |
| 82 | #define VR_REFITEM_LL(x) VR_REFITEM(x, LL) |
| 83 | #define VR_REFITEM_TDC(x) VR_REFITEM(x, TDC) |
| 84 | |
| 85 | static uint16_t load_table(const struct vr_lookup *tbl, |
| 86 | const int tbl_entries, |
| 87 | const int domain, |
| 88 | const uint16_t tdp, |
| 89 | const uint16_t mch_id) |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 90 | { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 91 | const config_t *cfg = config_of_soc(); |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 92 | |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 93 | for (size_t i = 0; i < tbl_entries; i++) { |
| 94 | if (tbl[i].mchid != mch_id) |
| 95 | continue; |
| 96 | |
| 97 | for (size_t j = 0; j < tbl[i].num_items; j++) { |
| 98 | if (tbl[i].items[j].tdp_min > tdp) |
| 99 | continue; |
| 100 | |
| 101 | if ((tbl[i].items[j].pl2_4_cfg != value_not_set) && |
| 102 | (tbl[i].items[j].pl2_4_cfg != cfg->cpu_pl2_4_cfg)) |
| 103 | continue; |
| 104 | |
| 105 | return tbl[i].items[j].conf[domain]; |
| 106 | } |
| 107 | break; |
| 108 | } |
| 109 | |
Julius Werner | e966595 | 2022-01-21 17:06:20 -0800 | [diff] [blame] | 110 | printk(BIOS_ERR, "Unknown MCH (0x%x) in %s\n", mch_id, __func__); |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 111 | |
| 112 | return 0; |
| 113 | } |
| 114 | |
| 115 | /* |
| 116 | * Iccmax table from Doc #337344 Section 7.2 DC Specifications for CFL. |
| 117 | * Iccmax table from Doc #338023 Section 7.2 DC Specifications for WHL. |
| 118 | * Iccmax table from Doc #606599 Section 7.2 DC Specifications for CML. |
| 119 | * |
| 120 | * Platform Segment SA IA GT (GT/GTx) |
| 121 | * --------------------------------------------------------------------- |
| 122 | * CFL-U (28W) GT3 quad 8.5 64 64 |
| 123 | * CFL-U (28W) GT3 dual 8.5 64 64 |
| 124 | * |
| 125 | * CFL-H (45W) GT2 hex 11.1 128 0 |
| 126 | * CFL-H (45W) GT2 quad 11.1 86 0 |
| 127 | * |
| 128 | * CFL-S (95W) GT2 octa 11.1 193 45 |
| 129 | * |
| 130 | * CFL-S (95W) GT2 hex 11.1 138 45 |
| 131 | * CFL-S (65W) GT2 hex 11.1 133 45 |
| 132 | * CFL-S (80W) GT2 hex 11.1 133 45 |
| 133 | * CFL-S (35W) GT2 hex 11.1 104 35 |
| 134 | * |
| 135 | * CFL-S (91W) GT2 quad 11.1 100 45 |
| 136 | * CFL-S (83W) GT2 quad 11.1 100 45 |
| 137 | * CFL-S (71W) GT2 quad 11.1 100 45 |
| 138 | * CFL-S (65W) GT2 quad 11.1 79 45 |
| 139 | * CFL-S (62W) GT2 quad 11.1 79 45 |
| 140 | * CFL-S (35W) GT2 quad 11.1 66 35 |
| 141 | * |
| 142 | * CFL-S (58W) GT2 dual 11.1 79 45 |
| 143 | * CFL-S (54W) GT2 dual 11.1 58 45 |
| 144 | * CFL-S (35W) GT2 dual 11.1 40 35 |
| 145 | * |
| 146 | * CNL-U (15W) 13 34 0 |
| 147 | * |
| 148 | * WHL-U (15W) GT2 quad 6 70 31 |
| 149 | * WHL-U (15W) GT2 dual 6 35 31 |
| 150 | * |
| 151 | * CML-U v1/v2 (15W) GT2 hex 6 85(70) 31 |
| 152 | * CML-U v1/v2 (15W) GT2 quad 6 85(70) 31 |
| 153 | * CML-U v1/v2 (15W) GT2 dual 6 35 31 |
| 154 | * |
| 155 | * CML-H (65W) GT2 octa 11.1 192(165) 32 |
| 156 | * CML-H (45W) GT2 octa 11.1 165(140) 32 |
| 157 | * CML-H (45W) GT2 hex 11.1 140(128) 32 |
| 158 | * CML-H (45W) GT2 quad 11.1 105(86) 32 |
| 159 | * |
| 160 | * CML-S (125W)GT2 deca 11.1 245(210) 35 |
| 161 | * CML-S (125W)GT2 octa 11.1 245(210) 35 |
| 162 | * CML-S (125W)GT2 hex 11.1 140 35 |
| 163 | * CML-S XeonW (80W) GT2 deca 11.1 210 35 |
| 164 | * CML-S XeonW (80W) GT2 octa 11.1 210 35 |
| 165 | * CML-S XeonW (80W) GT2 hex 11.1 140 35 |
| 166 | * CML-S (65W) GT2 deca 11.1 210(175) 35 |
| 167 | * CML-S (65W) GT2 octa 11.1 210(175) 35 |
| 168 | * CML-S (65W) GT2 hex 11.1 140 35 |
| 169 | * CML-S (35W) GT2 deca 11.1 140(104) 35 |
| 170 | * CML-S (35W) GT2 octa 11.1 140(104) 35 |
| 171 | * CML-S (35W) GT2 hex 11.1 104 35 |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 172 | * CML-S (65W) GT2 quad 11.1 102 35 |
| 173 | * CML-S (35W) GT2 quad 11.1 65 35 |
| 174 | * CML-S (58W) GT2 dual 11.1 60 35 |
| 175 | * CML-S (35W) GT2 dual 11.1 55 35 |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 176 | * |
| 177 | * GT0 versions are the same as GT2/GT3, but have GT/GTx set to 0. |
| 178 | * The above values in () are for baseline. |
| 179 | */ |
| 180 | |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 181 | VR_CONFIG_ICC(PCI_DID_INTEL_CNL_ID_U) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 182 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(13, 34, 0, 0) }, |
| 183 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 184 | VR_CONFIG_ICC(PCI_DID_INTEL_CNL_ID_Y) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 185 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(13, 34, 0, 0) }, |
| 186 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 187 | VR_CONFIG_ICC(PCI_DID_INTEL_WHL_ID_W_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 188 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(6, 70, 31, 31) }, |
| 189 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 190 | VR_CONFIG_ICC(PCI_DID_INTEL_WHL_ID_W_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 191 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(6, 35, 31, 31) }, |
| 192 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 193 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_U) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 194 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(8.5, 64, 64, 64) }, |
| 195 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 196 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_U_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 197 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(8.5, 64, 64, 64) }, |
| 198 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 199 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_H_8) { /* undocumented */ |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 200 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 128, 0, 0) }, |
| 201 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 202 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_H) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 203 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 128, 0, 0) }, |
| 204 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 205 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_H_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 206 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 86, 0, 0) }, |
| 207 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 208 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_DT_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 209 | { 58, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 79, 35, 35) }, |
| 210 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 58, 45, 45) }, |
| 211 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 40, 35, 35) }, |
| 212 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 213 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_DT_4) { |
Angel Pons | 16c06c2 | 2020-11-11 10:39:20 +0100 | [diff] [blame] | 214 | { 71, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 100, 45, 45) }, |
| 215 | { 62, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 79, 45, 45) }, |
| 216 | { 35, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 66, 35, 35) }, |
| 217 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 218 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_DT_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 219 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 193, 45, 45) }, |
| 220 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 186, 45, 45) }, |
| 221 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 222 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 223 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_S_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 224 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 193, 45, 45) }, |
| 225 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 186, 45, 45) }, |
| 226 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 227 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 228 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_WS_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 229 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 193, 45, 45) }, |
| 230 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 186, 45, 45) }, |
| 231 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 232 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 233 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 234 | { 95, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 138, 45, 45) }, |
| 235 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 133, 45, 45) }, |
| 236 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 45, 45) }, |
| 237 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 238 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 239 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_WS_6) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 240 | { 95, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 138, 45, 45) }, |
| 241 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 133, 45, 45) }, |
| 242 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 45, 45) }, |
| 243 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 244 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 245 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_S_6) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 246 | { 95, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 138, 45, 45) }, |
| 247 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 133, 45, 45) }, |
| 248 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 45, 45) }, |
| 249 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 250 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 251 | VR_CONFIG_ICC(PCI_DID_INTEL_CFL_ID_S_S_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 252 | { 71, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 100, 45, 45) }, |
| 253 | { 62, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 79, 45, 45) }, |
| 254 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 66, 45, 45) }, |
| 255 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 66, 35, 35) }, |
| 256 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 257 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_ULT) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 258 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(6, 85, 31, 31) }, |
| 259 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(6, 70, 31, 31) }, |
| 260 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 261 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_ULT_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 262 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(6, 85, 31, 31) }, |
| 263 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(6, 70, 31, 31) }, |
| 264 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 265 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_ULT_2_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 266 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(6, 35, 31, 31) }, |
| 267 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 268 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_H_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 269 | { 65, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 165, 32, 32) }, |
| 270 | { 65, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 192, 32, 32) }, |
| 271 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 32, 32) }, |
| 272 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 165, 32, 32) }, |
| 273 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 274 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_H) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 275 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 32, 32) }, |
| 276 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 32, 32) }, |
| 277 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 278 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_H_4_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 279 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 105, 32, 32) }, |
| 280 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 86, 32, 32) }, |
| 281 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 282 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_S_P0P1_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 283 | {125, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 245, 35, 35) }, |
| 284 | {125, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 285 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 286 | { 65, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 287 | { 65, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 175, 35, 35) }, |
| 288 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 35, 35) }, |
| 289 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 290 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 291 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_S_P0P1_10_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 292 | {125, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 245, 35, 35) }, |
| 293 | {125, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 294 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 295 | { 65, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 210, 35, 35) }, |
| 296 | { 65, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 175, 35, 35) }, |
| 297 | { 0, performance, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 35, 35) }, |
| 298 | { 0, baseline, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 299 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 300 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 301 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 140, 35, 35) }, |
| 302 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 104, 35, 35) }, |
| 303 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 304 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_S_G0G1_4) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 305 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 102, 35, 35) }, |
| 306 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 65, 35, 35) }, |
| 307 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 308 | VR_CONFIG_ICC(PCI_DID_INTEL_CML_S_G0G1_2) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 309 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 60, 35, 35) }, |
| 310 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_ICC(11.1, 55, 35, 35) }, |
| 311 | }; |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 312 | |
| 313 | static const struct vr_lookup vr_config_icc[] = { |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 314 | VR_REFITEM_ICC(PCI_DID_INTEL_CNL_ID_U), |
| 315 | VR_REFITEM_ICC(PCI_DID_INTEL_CNL_ID_Y), |
| 316 | VR_REFITEM_ICC(PCI_DID_INTEL_WHL_ID_W_4), |
| 317 | VR_REFITEM_ICC(PCI_DID_INTEL_WHL_ID_W_2), |
| 318 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_U), |
| 319 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_U_2), |
| 320 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_H_8), |
| 321 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_H), |
| 322 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_H_4), |
| 323 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_DT_2), |
| 324 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_DT_4), |
| 325 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_DT_8), |
| 326 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_S_8), |
| 327 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_WS_8), |
| 328 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S), |
| 329 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_WS_6), |
| 330 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_S_6), |
| 331 | VR_REFITEM_ICC(PCI_DID_INTEL_CFL_ID_S_S_4), |
| 332 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_ULT), |
| 333 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_ULT_6_2), |
| 334 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_ULT_2_2), |
| 335 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_H_8_2), |
| 336 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_H), |
| 337 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_H_4_2), |
| 338 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_S_P0P1_8_2), |
| 339 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_S_P0P1_10_2), |
| 340 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2), |
| 341 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_S_G0G1_4), |
| 342 | VR_REFITEM_ICC(PCI_DID_INTEL_CML_S_G0G1_2), |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 343 | }; |
| 344 | |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 345 | VR_CONFIG_LL(PCI_DID_INTEL_CNL_ID_U) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 346 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 2.0, 2.0) }, |
| 347 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 348 | VR_CONFIG_LL(PCI_DID_INTEL_CNL_ID_Y) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 349 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 2.0, 2.0) }, |
| 350 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 351 | VR_CONFIG_LL(PCI_DID_INTEL_WHL_ID_W_4) { /* unspecified */ |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 352 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 0, 0) }, |
| 353 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 354 | VR_CONFIG_LL(PCI_DID_INTEL_WHL_ID_W_2) { /* unspecified */ |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 355 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 0, 0) }, |
| 356 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 357 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_U) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 358 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 2.0, 2.0) }, |
| 359 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 360 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_U_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 361 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 2.0, 2.0) }, |
| 362 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 363 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_H_8) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 364 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 2.7, 2.7) }, |
| 365 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 366 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_H) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 367 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 2.7, 2.7) }, |
| 368 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 369 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_H_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 370 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 2.7, 2.7) }, |
| 371 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 372 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_WS_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 373 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 374 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 375 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_DT_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 376 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 377 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 378 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_DT_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 379 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 380 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 381 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_DT_8) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 382 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.6, 3.1, 3.1) }, |
| 383 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 384 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_S_8) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 385 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.6, 3.1, 3.1) }, |
| 386 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 387 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_WS_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 388 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.6, 3.1, 3.1) }, |
| 389 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 390 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 391 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 392 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 393 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_WS_6) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 394 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 395 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 396 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_S_6) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 397 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 398 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 399 | VR_CONFIG_LL(PCI_DID_INTEL_CFL_ID_S_S_4) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 400 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.1, 3.1, 3.1) }, |
| 401 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 402 | VR_CONFIG_LL(PCI_DID_INTEL_CML_ULT) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 403 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 3.1, 3.1) }, |
| 404 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 405 | VR_CONFIG_LL(PCI_DID_INTEL_CML_ULT_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 406 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.8, 3.1, 3.1) }, |
| 407 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 408 | VR_CONFIG_LL(PCI_DID_INTEL_CML_ULT_2_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 409 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 3.1, 3.1) }, |
| 410 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 411 | VR_CONFIG_LL(PCI_DID_INTEL_CML_H_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 412 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 2.7, 2.7) }, |
| 413 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 414 | VR_CONFIG_LL(PCI_DID_INTEL_CML_H) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 415 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 2.7, 2.7) }, |
| 416 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 417 | VR_CONFIG_LL(PCI_DID_INTEL_CML_H_4_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 418 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 2.7, 2.7) }, |
| 419 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 420 | VR_CONFIG_LL(PCI_DID_INTEL_CML_S_P0P1_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 421 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 4.0, 4.0) }, |
| 422 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.7, 4.0, 4.0) }, |
| 423 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 424 | VR_CONFIG_LL(PCI_DID_INTEL_CML_S_P0P1_10_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 425 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 4.0, 4.0) }, |
| 426 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.7, 4.0, 4.0) }, |
| 427 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 428 | VR_CONFIG_LL(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 429 | {125, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.1, 4.0, 4.0) }, |
| 430 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.7, 4.0, 4.0) }, |
| 431 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 432 | VR_CONFIG_LL(PCI_DID_INTEL_CML_S_G0G1_4) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 433 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.7, 4.0, 4.0) }, |
| 434 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 435 | VR_CONFIG_LL(PCI_DID_INTEL_CML_S_G0G1_2) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 436 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 1.7, 4.0, 4.0) }, |
| 437 | }; |
| 438 | |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 439 | |
| 440 | static const struct vr_lookup vr_config_ll[] = { |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 441 | VR_REFITEM_LL(PCI_DID_INTEL_CNL_ID_U), |
| 442 | VR_REFITEM_LL(PCI_DID_INTEL_CNL_ID_Y), |
| 443 | VR_REFITEM_LL(PCI_DID_INTEL_WHL_ID_W_4), |
| 444 | VR_REFITEM_LL(PCI_DID_INTEL_WHL_ID_W_2), |
| 445 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_U), |
| 446 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_U_2), |
| 447 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_H_8), |
| 448 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_H), |
| 449 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_H_4), |
| 450 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_WS_4), |
| 451 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_DT_4), |
| 452 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_DT_2), |
| 453 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_DT_8), |
| 454 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_S_8), |
| 455 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_WS_8), |
| 456 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S), |
| 457 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_WS_6), |
| 458 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_S_6), |
| 459 | VR_REFITEM_LL(PCI_DID_INTEL_CFL_ID_S_S_4), |
| 460 | VR_REFITEM_LL(PCI_DID_INTEL_CML_ULT), |
| 461 | VR_REFITEM_LL(PCI_DID_INTEL_CML_ULT_6_2), |
| 462 | VR_REFITEM_LL(PCI_DID_INTEL_CML_ULT_2_2), |
| 463 | VR_REFITEM_LL(PCI_DID_INTEL_CML_H_8_2), |
| 464 | VR_REFITEM_LL(PCI_DID_INTEL_CML_H), |
| 465 | VR_REFITEM_LL(PCI_DID_INTEL_CML_H_4_2), |
| 466 | VR_REFITEM_LL(PCI_DID_INTEL_CML_S_P0P1_8_2), |
| 467 | VR_REFITEM_LL(PCI_DID_INTEL_CML_S_P0P1_10_2), |
| 468 | VR_REFITEM_LL(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2), |
| 469 | VR_REFITEM_LL(PCI_DID_INTEL_CML_S_G0G1_4), |
| 470 | VR_REFITEM_LL(PCI_DID_INTEL_CML_S_G0G1_2), |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 471 | }; |
| 472 | |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 473 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_H) { |
Nico Huber | b06d847 | 2021-07-26 14:20:30 +0000 | [diff] [blame] | 474 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 80, 25, 25) }, |
| 475 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 476 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 477 | { 58, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 33, 30, 30) }, |
| 478 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 31, 30, 30) }, |
| 479 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 29, 25, 25) }, |
| 480 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 481 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_DT_2) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 482 | { 58, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 33, 30, 30) }, |
| 483 | { 54, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 31, 30, 30) }, |
| 484 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 29, 25, 25) }, |
| 485 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 486 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_S_4) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 487 | { 71, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 70, 30, 30) }, |
| 488 | { 62, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 62, 30, 30) }, |
| 489 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 45, 25, 25) }, |
| 490 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 491 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_WS_4) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 492 | { 71, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 70, 30, 30) }, |
| 493 | { 62, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 62, 30, 30) }, |
| 494 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 45, 25, 25) }, |
| 495 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 496 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_DT_4) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 497 | { 71, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 70, 30, 30) }, |
| 498 | { 62, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 62, 30, 30) }, |
| 499 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 45, 25, 25) }, |
| 500 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 501 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_WS_6) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 502 | { 95, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 100, 30, 30) }, |
| 503 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 89, 30, 30) }, |
| 504 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 91, 30, 30) }, |
| 505 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 25, 25) }, |
| 506 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 507 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_S_6) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 508 | { 95, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 100, 30, 30) }, |
| 509 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 89, 30, 30) }, |
| 510 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 91, 30, 30) }, |
| 511 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 25, 25) }, |
| 512 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 513 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_S_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 514 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 150, 30, 30) }, |
| 515 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 146, 30, 30) }, |
| 516 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 25, 25) }, |
| 517 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 518 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_WS_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 519 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 150, 30, 30) }, |
| 520 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 146, 30, 30) }, |
| 521 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 25, 25) }, |
| 522 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 523 | VR_CONFIG_TDC(PCI_DID_INTEL_CFL_ID_S_DT_8) { |
Patrick Rudolph | c59d9e3 | 2020-05-22 12:13:43 +0200 | [diff] [blame] | 524 | { 80, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 150, 30, 30) }, |
| 525 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 146, 30, 30) }, |
| 526 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 25, 25) }, |
| 527 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 528 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_ULT) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 529 | { 0, baseline, VR_CFG_ALL_DOMAINS_TDC(4, 48, 22, 22) }, |
| 530 | { 0, performance, VR_CFG_ALL_DOMAINS_TDC(4, 58, 22, 22) }, |
| 531 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 532 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_ULT_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 533 | { 0, baseline, VR_CFG_ALL_DOMAINS_TDC(4, 48, 22, 22) }, |
| 534 | { 0, performance, VR_CFG_ALL_DOMAINS_TDC(4, 58, 22, 22) }, |
| 535 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 536 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_ULT_2_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 537 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(4, 24, 22, 22) }, |
| 538 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 539 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_H_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 540 | { 65, performance, VR_CFG_ALL_DOMAINS_TDC(10, 146, 25, 25) }, |
| 541 | { 65, baseline, VR_CFG_ALL_DOMAINS_TDC(10, 117, 25, 25) }, |
| 542 | { 0, performance, VR_CFG_ALL_DOMAINS_TDC(10, 125, 25, 25) }, |
| 543 | { 0, baseline, VR_CFG_ALL_DOMAINS_TDC(10, 86, 25, 25) }, |
| 544 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 545 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_H) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 546 | { 0, performance, VR_CFG_ALL_DOMAINS_TDC(10, 92, 25, 25) }, |
| 547 | { 0, baseline, VR_CFG_ALL_DOMAINS_TDC(10, 80, 25, 25) }, |
| 548 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 549 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_H_4_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 550 | { 0, performance, VR_CFG_ALL_DOMAINS_TDC(10, 80, 25, 25) }, |
| 551 | { 0, baseline, VR_CFG_ALL_DOMAINS_TDC(10, 60, 25, 25) }, |
| 552 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 553 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_S_P0P1_8_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 554 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 175, 28, 28) }, |
| 555 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 100, 28, 28) }, |
| 556 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 557 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_S_P0P1_10_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 558 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 175, 28, 28) }, |
| 559 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 100, 28, 28) }, |
| 560 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 561 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2) { |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 562 | {125, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 132, 28, 28) }, |
| 563 | { 65, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 104, 28, 28) }, |
| 564 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 74, 28, 28) }, |
| 565 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 566 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_S_G0G1_4) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 567 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 68, 28, 28) }, |
| 568 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 42, 28, 28) }, |
| 569 | }; |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 570 | VR_CONFIG_TDC(PCI_DID_INTEL_CML_S_G0G1_2) { |
Gaggery Tsai | 8d12784 | 2020-01-08 15:35:11 -0800 | [diff] [blame] | 571 | { 36, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 38, 28, 28) }, |
| 572 | { 0, value_not_set, VR_CFG_ALL_DOMAINS_TDC(10, 25, 28, 28) }, |
| 573 | }; |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 574 | |
| 575 | static const struct vr_lookup vr_config_tdc[] = { |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 576 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_H), |
| 577 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S), |
| 578 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_DT_2), |
| 579 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_S_4), |
| 580 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_WS_4), |
| 581 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_DT_4), |
| 582 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_WS_6), |
| 583 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_S_6), |
| 584 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_S_8), |
| 585 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_WS_8), |
| 586 | VR_REFITEM_TDC(PCI_DID_INTEL_CFL_ID_S_DT_8), |
| 587 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_ULT), |
| 588 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_ULT_6_2), |
| 589 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_ULT_2_2), |
| 590 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_H_8_2), |
| 591 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_H), |
| 592 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_H_4_2), |
| 593 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_S_P0P1_8_2), |
| 594 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_S_P0P1_10_2), |
| 595 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_S_G0G1_P0P1_6_2), |
| 596 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_S_G0G1_4), |
| 597 | VR_REFITEM_TDC(PCI_DID_INTEL_CML_S_G0G1_2), |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 598 | }; |
| 599 | |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 600 | static uint16_t get_sku_voltagelimit(int domain) |
| 601 | { |
| 602 | return 1520; |
| 603 | } |
| 604 | |
| 605 | static uint16_t get_sku_icc_max(const int domain, |
| 606 | const uint16_t tdp, |
| 607 | const uint16_t mch_id, |
| 608 | const uint16_t igd_id) |
| 609 | { |
| 610 | if (igd_id == 0xffff && ((domain == VR_GT_SLICED) || (domain == VR_GT_UNSLICED))) |
| 611 | return 0; |
| 612 | |
| 613 | return load_table(vr_config_icc, ARRAY_SIZE(vr_config_icc), domain, tdp, mch_id); |
| 614 | } |
| 615 | |
| 616 | void fill_vr_domain_config(void *params, |
| 617 | int domain, const struct vr_config *chip_cfg) |
| 618 | { |
| 619 | FSP_S_CONFIG *vr_params = (FSP_S_CONFIG *)params; |
| 620 | const struct vr_config *cfg; |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 621 | static uint16_t mch_id = 0, igd_id = 0; |
Angel Pons | 92226dc | 2021-12-09 12:16:39 +0100 | [diff] [blame] | 622 | const uint16_t tdp = cpu_get_power_max() / 1000; |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 623 | |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 624 | if (!mch_id) { |
| 625 | struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT); |
| 626 | mch_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff; |
| 627 | } |
| 628 | if (!igd_id) { |
| 629 | struct device *dev = pcidev_path_on_root(SA_DEVFN_IGD); |
| 630 | igd_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff; |
| 631 | } |
| 632 | |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 633 | if (domain < 0 || domain >= NUM_VR_DOMAINS) |
| 634 | return; |
| 635 | |
| 636 | /* Use device tree override if requested. */ |
| 637 | if (chip_cfg->vr_config_enable) |
| 638 | cfg = chip_cfg; |
| 639 | else |
| 640 | cfg = &default_configs[domain]; |
| 641 | |
| 642 | vr_params->VrConfigEnable[domain] = cfg->vr_config_enable; |
| 643 | vr_params->Psi1Threshold[domain] = cfg->psi1threshold; |
| 644 | vr_params->Psi2Threshold[domain] = cfg->psi2threshold; |
| 645 | vr_params->Psi3Threshold[domain] = cfg->psi3threshold; |
| 646 | vr_params->Psi3Enable[domain] = cfg->psi3enable; |
| 647 | vr_params->Psi4Enable[domain] = cfg->psi4enable; |
| 648 | vr_params->ImonSlope[domain] = cfg->imon_slope; |
| 649 | vr_params->ImonOffset[domain] = cfg->imon_offset; |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 650 | printk(BIOS_INFO, "VR config[%d]:\n", domain); |
| 651 | printk(BIOS_INFO, " Psi1Threshold: %u\n", cfg->psi1threshold); |
| 652 | printk(BIOS_INFO, " Psi2Threshold: %u\n", cfg->psi2threshold); |
| 653 | printk(BIOS_INFO, " Psi3Threshold: %u\n", cfg->psi3threshold); |
| 654 | printk(BIOS_INFO, " Psi3Enable: %u\n", cfg->psi3enable); |
| 655 | printk(BIOS_INFO, " Psi4Enable: %u\n", cfg->psi4enable); |
| 656 | printk(BIOS_INFO, " ImonSlope: %u\n", cfg->imon_slope); |
| 657 | printk(BIOS_INFO, " ImonOffset: %u\n", cfg->imon_offset); |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 658 | |
| 659 | /* If board provided non-zero value, use it. */ |
| 660 | if (cfg->voltage_limit) |
| 661 | vr_params->VrVoltageLimit[domain] = cfg->voltage_limit; |
| 662 | else |
| 663 | vr_params->VrVoltageLimit[domain] = get_sku_voltagelimit(domain); |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 664 | printk(BIOS_INFO, " VrVoltageLimit: %u\n", vr_params->VrVoltageLimit[domain]); |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 665 | |
| 666 | if (cfg->icc_max) |
| 667 | vr_params->IccMax[domain] = cfg->icc_max; |
| 668 | else |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 669 | vr_params->IccMax[domain] = get_sku_icc_max(domain, tdp, mch_id, igd_id); |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 670 | printk(BIOS_INFO, " IccMax: %u\n", vr_params->IccMax[domain]); |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 671 | |
| 672 | if (cfg->ac_loadline) |
| 673 | vr_params->AcLoadline[domain] = cfg->ac_loadline; |
| 674 | else |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 675 | vr_params->AcLoadline[domain] = load_table(vr_config_ll, |
| 676 | ARRAY_SIZE(vr_config_ll), |
| 677 | domain, tdp, mch_id); |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 678 | printk(BIOS_INFO, " AcLoadline: %u\n", vr_params->AcLoadline[domain]); |
Patrick Rudolph | 9b5447b | 2019-12-04 13:51:00 +0100 | [diff] [blame] | 679 | |
| 680 | if (cfg->dc_loadline) |
| 681 | vr_params->DcLoadline[domain] = cfg->dc_loadline; |
| 682 | else |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 683 | vr_params->DcLoadline[domain] = load_table(vr_config_ll, |
| 684 | ARRAY_SIZE(vr_config_ll), |
| 685 | domain, tdp, mch_id); |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 686 | printk(BIOS_INFO, " DcLoadline: %u\n", vr_params->DcLoadline[domain]); |
Marx Wang | 9318d6d | 2020-02-07 16:44:14 +0800 | [diff] [blame] | 687 | |
| 688 | vr_params->TdcEnable[domain] = !cfg->tdc_disable; |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 689 | printk(BIOS_INFO, " TdcEnable: %u\n", vr_params->TdcEnable[domain]); |
Marx Wang | 9318d6d | 2020-02-07 16:44:14 +0800 | [diff] [blame] | 690 | |
| 691 | if (cfg->tdc_powerlimit) |
| 692 | vr_params->TdcPowerLimit[domain] = cfg->tdc_powerlimit; |
| 693 | else |
Patrick Rudolph | 9de8c80 | 2020-05-18 12:03:52 +0200 | [diff] [blame] | 694 | vr_params->TdcPowerLimit[domain] = load_table(vr_config_tdc, |
| 695 | ARRAY_SIZE(vr_config_tdc), |
| 696 | domain, tdp, mch_id); |
Nico Huber | 6ac8a9f | 2021-07-27 12:43:25 +0000 | [diff] [blame] | 697 | printk(BIOS_INFO, " TdcPowerLimit: %u\n", vr_params->TdcPowerLimit[domain]); |
Pratik Prajapati | 9027e1b | 2017-08-23 17:37:43 -0700 | [diff] [blame] | 698 | } |