blob: 54dfd31ebef2aa86f4f498cc4544ed9b50d41a63 [file] [log] [blame]
Aaron Durbindf214402015-12-14 16:44:26 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2015 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * 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.
14 *
15 */
16
Gaggery Tsaie1a75d42018-01-02 12:13:40 +080017#include <device/pci_ids.h>
Patrick Rudolphe56189c2018-04-18 10:11:59 +020018#include <device/pci_ops.h>
Rizwan Qureshi1222a732016-08-23 14:31:23 +053019#include <fsp/api.h>
20#include <soc/ramstage.h>
Aaron Durbindf214402015-12-14 16:44:26 -060021#include <soc/vr_config.h>
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020022#include <console/console.h>
Patrick Rudolph69e826d2019-08-14 10:23:30 +020023#include <intelblocks/cpulib.h>
Gaggery Tsaie1a75d42018-01-02 12:13:40 +080024
Aaron Durbindf214402015-12-14 16:44:26 -060025/* Default values for domain configuration. PSI3 and PSI4 are disabled. */
26static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
27 [VR_SYSTEM_AGENT] = {
28 .vr_config_enable = 1,
29 .psi1threshold = VR_CFG_AMP(20),
30 .psi2threshold = VR_CFG_AMP(4),
31 .psi3threshold = VR_CFG_AMP(1),
32 .psi3enable = 0,
33 .psi4enable = 0,
34 .imon_slope = 0x0,
35 .imon_offset = 0x0,
36 .icc_max = VR_CFG_AMP(7),
37 .voltage_limit = 1520,
38 },
39 [VR_IA_CORE] = {
40 .vr_config_enable = 1,
41 .psi1threshold = VR_CFG_AMP(20),
42 .psi2threshold = VR_CFG_AMP(5),
43 .psi3threshold = VR_CFG_AMP(1),
44 .psi3enable = 0,
45 .psi4enable = 0,
46 .imon_slope = 0x0,
47 .imon_offset = 0x0,
48 .icc_max = VR_CFG_AMP(34),
49 .voltage_limit = 1520,
50 },
Aaron Durbindf214402015-12-14 16:44:26 -060051 [VR_GT_UNSLICED] = {
52 .vr_config_enable = 1,
53 .psi1threshold = VR_CFG_AMP(20),
54 .psi2threshold = VR_CFG_AMP(5),
55 .psi3threshold = VR_CFG_AMP(1),
56 .psi3enable = 0,
57 .psi4enable = 0,
58 .imon_slope = 0x0,
59 .imon_offset = 0x0,
60 .icc_max = VR_CFG_AMP(35),
61 .voltage_limit = 1520,
62 },
63 [VR_GT_SLICED] = {
64 .vr_config_enable = 1,
65 .psi1threshold = VR_CFG_AMP(20),
66 .psi2threshold = VR_CFG_AMP(5),
67 .psi3threshold = VR_CFG_AMP(1),
68 .psi3enable = 0,
69 .psi4enable = 0,
70 .imon_slope = 0x0,
71 .imon_offset = 0x0,
72 .icc_max = VR_CFG_AMP(35),
73 .voltage_limit = 1520,
74 },
75};
76
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020077static uint16_t get_sku_icc_max(int domain)
Gaggery Tsaie1a75d42018-01-02 12:13:40 +080078{
Patrick Rudolph69e826d2019-08-14 10:23:30 +020079 const uint16_t tdp = cpu_get_power_max();
80
Maxim Polyakov24ba8502019-08-29 18:40:19 +030081 static uint16_t mch_id = 0, igd_id = 0;
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020082 if (!mch_id) {
83 struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT);
Maxim Polyakov24ba8502019-08-29 18:40:19 +030084 mch_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff;
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020085 }
86 if (!igd_id) {
87 struct device *dev = pcidev_path_on_root(SA_DEVFN_IGD);
Maxim Polyakov24ba8502019-08-29 18:40:19 +030088 igd_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff;
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020089 }
Gaggery Tsaie1a75d42018-01-02 12:13:40 +080090
Patrick Rudolph50aebaf82019-08-14 10:07:38 +020091 /*
Patrick Rudolph69e826d2019-08-14 10:23:30 +020092 * Iccmax table from Doc #559100 Section 7.2 DC Specifications, the
93 * Iccmax is the same among KBL-Y but KBL-U/R.
94 * Addendum for AML-Y #594883, IccMax for IA core is 28A.
Maxim Polyakov24ba8502019-08-29 18:40:19 +030095 * KBL-S #335195, KBL-H #335190, SKL-S #332687, SKL-H #332986,
96 * SKL-U/Y #332990
97 *
98 * Platform Segment SA IA GT (GT/GTx)
99 * ---------------------------------------------------------------------
100 * KBL/SKL-S (95W) quad 11.1 100 45
101 * SKL-S (80W) quad 11.1 82 45
102 * KBL/SKL-S (65W) quad 11.1 79 45
103 * SKL-S (45W) quad 11.1 70 0
104 * KBL/SKL-S (35W) quad 11.1 66 35
105 * SKL-S (25W) quad 11.1 55 35
106 *
107 * KBL/SKL-S (54W) dual 11.1 58 48
108 * KBL/SKL-S (51W) dual 11.1 45 48
109 * KBL/SKL-S (35W) dual 11.1 40 48
110 *
111 * SKL-H + OPC (65W) GT4 quad 8 74 105/24
112 * SKL-H + OPC (45W) GT4 quad 8 74 94/20
113 * SKL-H + OPC (35W) GT4 quad 8 66 94/20
114 *
115 * SKL-H (35W) GT2 dual 11.1 60 55
116 *
117 * KBL/SKL-H (45W) GT2 quad 11.1 68 55
118 * KBL-H (18W) GT2 quad 6.6 60 55
119 *
120 * SKL-U + OPC (28W) GT3 dual 5.1 32 57/19
121 * SKL-U + OPC (15W) GT3 dual 5.1 29 57/19
122 * SKL-U (15W) GT2 dual 4.5 29 31
123 *
Maxim Polyakovc56ca6b2019-10-15 14:13:28 +0300124 * KBL-U + OPC (28W) GT3 dual 5.1 32 57/19
125 * KBL-U + OPC (15W) GT3 dual 5.1 32 57/19
126 * KBL-U (15W) GT1/2 dual 4.5 32 31
127 * KBL-U [*] (15W) GT1 quad 4.5 29 31
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300128 *
129 * KBL-U/R (15W) GT2 quad 6 64 31
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300130 *
131 * SKL/KBL-Y (6W) 4.1 24 24
132 * SKL/KBL-Y (4.5W) 4.1 24 24
Maxim Polyakovc56ca6b2019-10-15 14:13:28 +0300133 *
134 * [*] Pentium/Celeron CPUs with HD Graphics 610
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200135 */
Gaggery Tsaie1a75d42018-01-02 12:13:40 +0800136
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200137 switch (mch_id) {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300138 case PCI_DEVICE_ID_INTEL_SKL_ID_S_2: /* fallthrough */
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200139 case PCI_DEVICE_ID_INTEL_KBL_ID_S: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300140 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(11.1, 40, 48, 48);
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200141 if (tdp >= 54)
142 icc_max[VR_IA_CORE] = VR_CFG_AMP(58);
143 else if (tdp >= 51)
144 icc_max[VR_IA_CORE] = VR_CFG_AMP(45);
145
146 return icc_max[domain];
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200147 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300148 case PCI_DEVICE_ID_INTEL_SKL_ID_S_4: /* fallthrough */
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200149 case PCI_DEVICE_ID_INTEL_KBL_ID_DT_2: /* fallthrough */
150 case PCI_DEVICE_ID_INTEL_KBL_ID_DT: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300151 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(11.1, 55, 45, 45);
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200152 if (tdp >= 91)
153 icc_max[VR_IA_CORE] = VR_CFG_AMP(100);
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300154 else if (tdp >= 80)
155 icc_max[VR_IA_CORE] = VR_CFG_AMP(82);
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200156 else if (tdp >= 65)
157 icc_max[VR_IA_CORE] = VR_CFG_AMP(79);
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300158 else if (tdp >= 45) {
159 icc_max[VR_IA_CORE] = VR_CFG_AMP(70);
160 icc_max[VR_GT_SLICED] = 0;
161 icc_max[VR_GT_UNSLICED] = 0;
162 } else if (tdp >= 25) {
163 if (tdp >= 35)
164 icc_max[VR_IA_CORE] = VR_CFG_AMP(66);
165
Maxim Polyakovb4383fc2019-08-29 16:51:37 +0300166 icc_max[VR_GT_SLICED] = VR_CFG_AMP(35);
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300167 icc_max[VR_GT_UNSLICED] = VR_CFG_AMP(35);
Maxim Polyakovb4383fc2019-08-29 16:51:37 +0300168 }
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200169
170 return icc_max[domain];
171 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300172 case PCI_DEVICE_ID_INTEL_SKL_ID_H_4: {
173 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(11.1, 60, 94, 20);
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200174 if (tdp >= 45) {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300175 icc_max[VR_IA_CORE] = VR_CFG_AMP(74);
176 if (tdp >= 65) {
177 icc_max[VR_GT_SLICED] = VR_CFG_AMP(105);
178 icc_max[VR_GT_UNSLICED] = VR_CFG_AMP(24);
179 }
180 }
181 return icc_max[domain];
182 }
183 case PCI_DEVICE_ID_INTEL_SKL_ID_H_2: /* fallthrough */
184 case PCI_DEVICE_ID_INTEL_SKL_ID_H_EM: /* fallthrough */
185 case PCI_DEVICE_ID_INTEL_KBL_ID_H: {
186 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(6.6, 60, 55, 55);
187 if (tdp >= 35) {
188 if (tdp >= 45)
189 icc_max[VR_IA_CORE] = VR_CFG_AMP(68);
190
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200191 icc_max[VR_SYSTEM_AGENT] = VR_CFG_AMP(11.1);
Patrick Rudolph69e826d2019-08-14 10:23:30 +0200192 }
193
194 return icc_max[domain];
195 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300196 case PCI_DEVICE_ID_INTEL_SKL_ID_U: {
197 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(5.1, 29, 57, 19);
198 if (tdp >= 28)
199 icc_max[VR_IA_CORE] = VR_CFG_AMP(32);
200 else if (igd_id != PCI_DEVICE_ID_INTEL_SKL_GT3E_SULTM_1) {
201 const uint16_t icc_max_gt2[NUM_VR_DOMAINS] =
202 VR_CFG_ALL_DOMAINS_ICC(4.5, 29, 31, 31);
203
204 return icc_max_gt2[domain];
205 }
206 return icc_max[domain];
207 }
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200208 case PCI_DEVICE_ID_INTEL_KBL_U_R: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300209 const uint16_t icc_max[NUM_VR_DOMAINS] =
210 VR_CFG_ALL_DOMAINS_ICC(6, 64, 31, 31);
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200211 return icc_max[domain];
212 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300213 case PCI_DEVICE_ID_INTEL_SKL_ID_Y: /* fallthrough */
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200214 case PCI_DEVICE_ID_INTEL_KBL_ID_Y: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300215 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(4.1, 24, 24, 24);
Gaggery Tsaie1a75d42018-01-02 12:13:40 +0800216
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200217 if (igd_id == PCI_DEVICE_ID_INTEL_AML_GT2_ULX)
218 icc_max[VR_IA_CORE] = VR_CFG_AMP(28);
Gaggery Tsaie1a75d42018-01-02 12:13:40 +0800219
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200220 return icc_max[domain];
221 }
222 case PCI_DEVICE_ID_INTEL_KBL_ID_U: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300223 uint16_t icc_max[NUM_VR_DOMAINS] = VR_CFG_ALL_DOMAINS_ICC(4.5, 32, 31, 31);
Gaggery Tsaie1a75d42018-01-02 12:13:40 +0800224
Maxim Polyakovc56ca6b2019-10-15 14:13:28 +0300225 if (igd_id == PCI_DEVICE_ID_INTEL_KBL_GT1_SULTM)
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200226 icc_max[VR_IA_CORE] = VR_CFG_AMP(29);
227
Maxim Polyakovc56ca6b2019-10-15 14:13:28 +0300228 else if ((igd_id == PCI_DEVICE_ID_INTEL_KBL_GT3E_SULTM_1) ||
229 (igd_id == PCI_DEVICE_ID_INTEL_KBL_GT3E_SULTM_2)) {
230 const uint16_t icc_max_gt3[NUM_VR_DOMAINS] =
231 VR_CFG_ALL_DOMAINS_ICC(5.1, 32, 57, 19);
232
233 return icc_max_gt3[domain];
234 }
235
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200236 return icc_max[domain];
237 }
238 default:
Maxim Polyakov5f257602019-10-27 15:01:27 +0300239 printk(BIOS_ERR, "ERROR: Unknown MCH (0x%x) in VR-config\n", mch_id);
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200240 }
241 return 0;
Gaggery Tsaie1a75d42018-01-02 12:13:40 +0800242}
243
Patrick Rudolph9a016232019-08-14 12:10:48 +0200244static uint16_t get_sku_ac_dc_loadline(const int domain)
245{
246 static uint16_t mch_id = 0, igd_id = 0;
247 if (!mch_id) {
248 struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT);
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300249 mch_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff;
Patrick Rudolph9a016232019-08-14 12:10:48 +0200250 }
251 if (!igd_id) {
252 struct device *dev = pcidev_path_on_root(SA_DEVFN_IGD);
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300253 igd_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff;
Patrick Rudolph9a016232019-08-14 12:10:48 +0200254 }
255
256 switch (mch_id) {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300257 case PCI_DEVICE_ID_INTEL_SKL_ID_S_2: /* fallthrough */
258 case PCI_DEVICE_ID_INTEL_SKL_ID_S_4: /* fallthrough */
259 case PCI_DEVICE_ID_INTEL_KBL_ID_S: /* fallthrough */
260 case PCI_DEVICE_ID_INTEL_KBL_ID_DT: /* fallthrough */
Patrick Rudolph9a016232019-08-14 12:10:48 +0200261 case PCI_DEVICE_ID_INTEL_KBL_ID_DT_2: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300262 /* SA Loadline is not specified */
263 const uint16_t loadline[NUM_VR_DOMAINS] =
264 VR_CFG_ALL_DOMAINS_LOADLINE(0, 2.1, 3.1, 3.1);
Patrick Rudolph9a016232019-08-14 12:10:48 +0200265 return loadline[domain];
266 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300267 case PCI_DEVICE_ID_INTEL_SKL_ID_H_2: /* fallthrough */
268 case PCI_DEVICE_ID_INTEL_SKL_ID_H_EM: /* fallthrough */
269 case PCI_DEVICE_ID_INTEL_SKL_ID_H_4: /* fallthrough */
Patrick Rudolph9a016232019-08-14 12:10:48 +0200270 case PCI_DEVICE_ID_INTEL_KBL_ID_H: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300271 const uint16_t loadline[NUM_VR_DOMAINS] =
272 VR_CFG_ALL_DOMAINS_LOADLINE(10, 1.8, 2.65, 2.65);
273
274 if (igd_id == PCI_DEVICE_ID_INTEL_SKL_GT4_SHALM) {
275 const uint16_t loadline_gt4[NUM_VR_DOMAINS] =
276 VR_CFG_ALL_DOMAINS_LOADLINE(6, 1.6, 1.4, 6);
277 return loadline_gt4[domain];
278 }
Patrick Rudolph9a016232019-08-14 12:10:48 +0200279
280 return loadline[domain];
281 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300282 case PCI_DEVICE_ID_INTEL_SKL_ID_Y: /* fallthrough */
Patrick Rudolph9a016232019-08-14 12:10:48 +0200283 case PCI_DEVICE_ID_INTEL_KBL_ID_Y: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300284 uint16_t loadline[NUM_VR_DOMAINS] =
285 VR_CFG_ALL_DOMAINS_LOADLINE(18, 5.9, 5.7, 5.7);
Patrick Rudolph9a016232019-08-14 12:10:48 +0200286
287 if (igd_id == PCI_DEVICE_ID_INTEL_AML_GT2_ULX)
288 loadline[VR_IA_CORE] = VR_CFG_MOHMS(4);
289
290 return loadline[domain];
291 }
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300292 case PCI_DEVICE_ID_INTEL_SKL_ID_U: /* fallthrough */
293 case PCI_DEVICE_ID_INTEL_KBL_U_R: /* fallthrough */
Patrick Rudolph9a016232019-08-14 12:10:48 +0200294 case PCI_DEVICE_ID_INTEL_KBL_ID_U: {
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300295 uint16_t loadline[NUM_VR_DOMAINS] =
296 VR_CFG_ALL_DOMAINS_LOADLINE(10.3, 2.4, 3.1, 3.1);
Patrick Rudolph9a016232019-08-14 12:10:48 +0200297
Maxim Polyakov24ba8502019-08-29 18:40:19 +0300298 if ((igd_id == PCI_DEVICE_ID_INTEL_SKL_GT3E_SULTM_1) ||
299 (igd_id == PCI_DEVICE_ID_INTEL_SKL_GT3E_SULTM_2) ||
300 (igd_id == PCI_DEVICE_ID_INTEL_KBL_GT3E_SULTM_1) ||
Maxim Polyakov9d68cb22019-10-03 17:07:21 +0300301 (igd_id == PCI_DEVICE_ID_INTEL_KBL_GT3E_SULTM_2)) {
Maxim Polyakov72359132019-10-03 16:50:04 +0300302 loadline[VR_GT_UNSLICED] = VR_CFG_MOHMS(2);
Patrick Rudolph9a016232019-08-14 12:10:48 +0200303 loadline[VR_GT_SLICED] = VR_CFG_MOHMS(6);
304 }
305
306 return loadline[domain];
307 }
308 default:
Maxim Polyakov5f257602019-10-27 15:01:27 +0300309 printk(BIOS_ERR, "ERROR: Unknown MCH (0x%x) in VR-config\n", mch_id);
Patrick Rudolph9a016232019-08-14 12:10:48 +0200310 }
311 return 0;
312}
Patrick Rudolph9a016232019-08-14 12:10:48 +0200313
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530314void fill_vr_domain_config(void *params,
315 int domain, const struct vr_config *chip_cfg)
Aaron Durbindf214402015-12-14 16:44:26 -0600316{
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530317 FSP_SIL_UPD *vr_params = (FSP_SIL_UPD *)params;
Aaron Durbindf214402015-12-14 16:44:26 -0600318 const struct vr_config *cfg;
319
320 if (domain < 0 || domain >= NUM_VR_DOMAINS)
321 return;
322
323 /* Use device tree override if requested. */
324 if (chip_cfg->vr_config_enable)
325 cfg = chip_cfg;
326 else
327 cfg = &default_configs[domain];
328
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530329 vr_params->VrConfigEnable[domain] = cfg->vr_config_enable;
330 vr_params->Psi1Threshold[domain] = cfg->psi1threshold;
331 vr_params->Psi2Threshold[domain] = cfg->psi2threshold;
332 vr_params->Psi3Threshold[domain] = cfg->psi3threshold;
333 vr_params->Psi3Enable[domain] = cfg->psi3enable;
334 vr_params->Psi4Enable[domain] = cfg->psi4enable;
335 vr_params->ImonSlope[domain] = cfg->imon_slope;
336 vr_params->ImonOffset[domain] = cfg->imon_offset;
Patrick Rudolph50aebaf82019-08-14 10:07:38 +0200337 /* If board provided non-zero value, use it. */
338 if (cfg->icc_max)
339 vr_params->IccMax[domain] = cfg->icc_max;
340 else
341 vr_params->IccMax[domain] = get_sku_icc_max(domain);
Rizwan Qureshi1222a732016-08-23 14:31:23 +0530342 vr_params->VrVoltageLimit[domain] = cfg->voltage_limit;
Duncan Laurie86db4692017-03-14 16:40:06 -0700343
Patrick Rudolph9a016232019-08-14 12:10:48 +0200344 if (cfg->ac_loadline)
345 vr_params->AcLoadline[domain] = cfg->ac_loadline;
346 else
347 vr_params->AcLoadline[domain] = get_sku_ac_dc_loadline(domain);
348 if (cfg->dc_loadline)
349 vr_params->DcLoadline[domain] = cfg->dc_loadline;
350 else
351 vr_params->DcLoadline[domain] = get_sku_ac_dc_loadline(domain);
Aaron Durbindf214402015-12-14 16:44:26 -0600352}