blob: 994f2aebef4c4f3b9b8aa89ef1b3343fd47aef5f [file] [log] [blame]
Angel Ponsf5627e82020-04-05 15:46:52 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Lijian Zhao2f764f72017-07-14 11:09:10 -07002
3#ifndef _SOC_CHIP_H_
4#define _SOC_CHIP_H_
5
Chris Chingb8dc63b2017-12-06 14:26:15 -07006#include <drivers/i2c/designware/dw_i2c.h>
Michael Niewöhnerc4f8fbd2020-12-19 14:11:32 +01007#include <drivers/intel/gma/gma.h>
Dinesh Gehlot8a2c9042023-01-17 05:12:07 +00008#include <gpio.h>
9#include <intelblocks/cfg.h>
Lijian Zhao32111172017-08-16 11:40:03 -070010#include <intelblocks/gspi.h>
Jeremy Soller1af482c92019-02-20 16:39:55 -070011#include <intelblocks/lpc_lib.h>
Sumeet R Pawnikar309ccf72020-05-09 16:37:30 +053012#include <intelblocks/power_limit.h>
Reka Normana5215c42023-09-22 15:26:54 +100013#include <intelblocks/xhci.h>
lilacious2c7b6eb2023-06-20 20:32:52 +020014#include <stdbool.h>
Lijian Zhao2f764f72017-07-14 11:09:10 -070015#include <stdint.h>
Lijian Zhao580bc412017-10-04 13:43:47 -070016#include <soc/pch.h>
Bora Guvendikd2c63652017-09-19 14:04:37 -070017#include <soc/pci_devs.h>
Subrata Banik69b18f02018-11-06 16:59:56 +053018#include <soc/pm.h>
Lijian Zhao031020e2017-12-15 12:58:07 -080019#include <soc/pmc.h>
Jamie Chenc004857da2020-01-15 11:17:21 +080020#include <soc/sata.h>
Lijian Zhao08231832017-09-05 18:16:21 -070021#include <soc/serialio.h>
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070022#include <soc/usb.h>
23#include <soc/vr_config.h>
Julius Wernercd49cce2019-03-05 16:53:33 -080024#if CONFIG(SOC_INTEL_CANNONLAKE_PCH_H)
praveen hodagatta pranesh521e48c2018-09-27 00:00:13 +080025#include <soc/gpio_defs_cnp_h.h>
26#else
27#include <soc/gpio_defs.h>
28#endif
29
Subrata Banik41483c92019-02-02 13:32:49 +053030#define SOC_INTEL_CML_UART_DEV_MAX 3
Jamie Chenc004857da2020-01-15 11:17:21 +080031#define SOC_INTEL_CML_SATA_DEV_MAX 8
Subrata Banik41483c92019-02-02 13:32:49 +053032
Patrick Rudolph9de8c802020-05-18 12:03:52 +020033enum chip_pl2_4_cfg {
34 baseline,
35 performance,
36 value_not_set /* vr_config internal use only */
37};
38
Lijian Zhao2f764f72017-07-14 11:09:10 -070039struct soc_intel_cannonlake_config {
Subrata Banikc4986eb2018-05-09 14:55:09 +053040
41 /* Common struct containing soc config data required by common code */
42 struct soc_intel_common_config common_soc_config;
Lijian Zhaob3dfcb82017-08-16 22:18:52 -070043
Sumeet R Pawnikar309ccf72020-05-09 16:37:30 +053044 /* Common struct containing power limits configuration information */
45 struct soc_power_limits_config power_limits_config;
46
Lijian Zhaob3dfcb82017-08-16 22:18:52 -070047 /* Gpio group routed to each dword of the GPE0 block. Values are
48 * of the form GPP_[A:G] or GPD. */
49 uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
50 uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
51 uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
52
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070053 /* Generic IO decode ranges */
54 uint32_t gen1_dec;
55 uint32_t gen2_dec;
56 uint32_t gen3_dec;
57 uint32_t gen4_dec;
58
Aamir Bohra4d9d3f12019-12-09 16:05:52 +053059 /* S0ix configuration */
60
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070061 /* Enable S0iX support */
lilacious2c7b6eb2023-06-20 20:32:52 +020062 bool s0ix_enable;
Aamir Bohra4d9d3f12019-12-09 16:05:52 +053063 /* Enable Audio DSP oscillator qualification for S0ix */
lilacious2c7b6eb2023-06-20 20:32:52 +020064 bool cppmvric2_adsposcdis;
Aamir Bohra4d9d3f12019-12-09 16:05:52 +053065
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070066 /* Enable DPTF support */
lilacious2c7b6eb2023-06-20 20:32:52 +020067 bool dptf_enable;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070068
Nico Huber234e7ec2021-07-27 10:26:31 +000069 enum {
70 MAX_PC_DEFAULT = 0,
71 MAX_PC0_1 = 1,
72 MAX_PC2 = 2,
73 MAX_PC3 = 3,
74 MAX_PC6 = 4,
75 MAX_PC7 = 5,
76 MAX_PC7S = 6,
77 MAX_PC8 = 7,
78 MAX_PC9 = 8,
79 MAX_PC10 = 9,
80 } max_package_c_state;
81
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070082 /* Deep SX enable for both AC and DC */
lilacious2c7b6eb2023-06-20 20:32:52 +020083 bool deep_s3_enable_ac;
84 bool deep_s3_enable_dc;
85 bool deep_s5_enable_ac;
86 bool deep_s5_enable_dc;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070087
88 /* Deep Sx Configuration
89 * DSX_EN_WAKE_PIN - Enable WAKE# pin
90 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
Furquan Shaikh02ce8372017-12-03 21:53:52 -080091 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070092 uint32_t deep_sx_config;
93
94 /* TCC activation offset */
95 uint32_t tcc_offset;
96
Pratik Prajapati0f2f0692017-08-17 16:47:34 -070097 /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs.
Angel Ponsacb6e132019-01-25 20:05:38 +010098 * For CNL, options are as following
99 * When enabled, memory will be training at three different frequencies.
Ronak Kanabardc666f52019-01-14 21:47:56 +0530100 * 0:Disabled, 1:FixedLow, 2:FixedMid, 3:FixedHigh, 4:Enabled
Subrata Banik41483c92019-02-02 13:32:49 +0530101 * For WHL/CFL/CML options are as following
Angel Ponsacb6e132019-01-25 20:05:38 +0100102 * When enabled, memory will be training at two different frequencies.
Ronak Kanabardc666f52019-01-14 21:47:56 +0530103 * 0:Disabled, 1:FixedLow, 2:FixedHigh, 3:Enabled*/
Lijian Zhaof5205a32018-03-12 12:13:15 -0700104 enum {
105 SaGv_Disabled,
106 SaGv_FixedLow,
Lijian Zhaof5205a32018-03-12 12:13:15 -0700107 SaGv_FixedHigh,
108 SaGv_Enabled,
109 } SaGv;
110
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700111 /* Rank Margin Tool. 1:Enable, 0:Disable */
lilacious2c7b6eb2023-06-20 20:32:52 +0200112 bool RMT;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700113
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700114 /* USB related */
115 struct usb2_port_config usb2_ports[16];
116 struct usb3_port_config usb3_ports[10];
Lijian Zhao2b074d92017-08-17 14:25:24 -0700117 /* Wake Enable Bitmap for USB2 ports */
118 uint16_t usb2_wake_enable_bitmap;
119 /* Wake Enable Bitmap for USB3 ports */
120 uint16_t usb3_wake_enable_bitmap;
Surendranath Gurivireddyd3675032019-10-31 15:45:39 -0700121 /* USB2 PHY power gating */
lilacious2c7b6eb2023-06-20 20:32:52 +0200122 bool PchUsb2PhySusPgDisable;
Lijian Zhao2b074d92017-08-17 14:25:24 -0700123
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700124 /* SATA related */
Lijian Zhaoba820292018-12-06 15:05:19 -0800125 enum {
Felix Singer1e3b2ce2020-12-07 01:28:59 +0100126 SATA_AHCI,
127 SATA_RAID,
Lijian Zhaoba820292018-12-06 15:05:19 -0800128 } SataMode;
Aamir Bohra87bb5f52019-09-10 08:39:14 +0530129
130 /* SATA devslp pad reset configuration */
131 enum {
132 SataDevSlpResumeReset = 1,
133 SataDevSlpHostDeepReset = 3,
134 SataDevSlpPlatformReset = 5,
135 SataDevSlpDswReset = 7
136 } SataDevSlpRstConfig;
137
lilacious2c7b6eb2023-06-20 20:32:52 +0200138 bool SataSalpSupport;
139 bool SataPortsEnable[8];
140 bool SataPortsDevSlp[8];
Aamir Bohra87bb5f52019-09-10 08:39:14 +0530141 uint8_t SataPortsDevSlpResetConfig[8];
lilacious2c7b6eb2023-06-20 20:32:52 +0200142 bool SataPortsHotPlug[8];
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700143
Krzysztof Sywula9bc9da9d2019-03-21 17:11:02 -0700144 /* Enable/Disable SLP_S0 with GBE Support. 0: disable, 1: enable */
lilacious2c7b6eb2023-06-20 20:32:52 +0200145 bool SlpS0WithGbeSupport;
Krzysztof Sywula9bc9da9d2019-03-21 17:11:02 -0700146 /* SLP_S0 Voltage Margining Policy. 0: disable, 1: enable */
lilacious2c7b6eb2023-06-20 20:32:52 +0200147 bool PchPmSlpS0VmRuntimeControl;
Krzysztof Sywula9bc9da9d2019-03-21 17:11:02 -0700148 /* SLP_S0 Voltage Margining 0.70V Policy. 0: disable, 1: enable */
lilacious2c7b6eb2023-06-20 20:32:52 +0200149 bool PchPmSlpS0Vm070VSupport;
Krzysztof Sywula9bc9da9d2019-03-21 17:11:02 -0700150 /* SLP_S0 Voltage Margining 0.75V Policy. 0: disable, 1: enable */
lilacious2c7b6eb2023-06-20 20:32:52 +0200151 bool PchPmSlpS0Vm075VSupport;
Krzysztof Sywula9bc9da9d2019-03-21 17:11:02 -0700152
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700153 /* Audio related */
lilacious2c7b6eb2023-06-20 20:32:52 +0200154 bool PchHdaDspEnable;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700155
156 /* Enable/Disable HD Audio Link. Muxed with SSP0/SSP1/SNDW1 */
lilacious2c7b6eb2023-06-20 20:32:52 +0200157 bool PchHdaAudioLinkHda;
158 bool PchHdaIDispCodecDisconnect;
159 bool PchHdaAudioLinkDmic0;
160 bool PchHdaAudioLinkDmic1;
161 bool PchHdaAudioLinkSsp0;
162 bool PchHdaAudioLinkSsp1;
163 bool PchHdaAudioLinkSsp2;
164 bool PchHdaAudioLinkSndw1;
165 bool PchHdaAudioLinkSndw2;
166 bool PchHdaAudioLinkSndw3;
167 bool PchHdaAudioLinkSndw4;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700168
Lijian Zhao580bc412017-10-04 13:43:47 -0700169 /* PCIe Root Ports */
lilacious2c7b6eb2023-06-20 20:32:52 +0200170 bool PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
Elyes HAOUAS79ccc692020-02-24 13:43:39 +0100171 /* PCIe output clocks type to PCIe devices.
Lijian Zhao580bc412017-10-04 13:43:47 -0700172 * 0-23: PCH rootport, 0x70: LAN, 0x80: unspecified but in use,
173 * 0xFF: not used */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530174 uint8_t PcieClkSrcUsage[CONFIG_MAX_PCIE_CLOCK_SRC];
Lijian Zhao580bc412017-10-04 13:43:47 -0700175 /* PCIe ClkReq-to-ClkSrc mapping, number of clkreq signal assigned to
176 * clksrc. */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530177 uint8_t PcieClkSrcClkReq[CONFIG_MAX_PCIE_CLOCK_SRC];
Lijian Zhao79152f32018-11-14 16:15:46 -0800178 /* PCIe LTR(Latency Tolerance Reporting) mechanism */
lilacious2c7b6eb2023-06-20 20:32:52 +0200179 bool PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
Nico Huber119ace02019-10-02 16:02:06 +0200180 /* Implemented as slot or built-in? */
lilacious2c7b6eb2023-06-20 20:32:52 +0200181 bool PcieRpSlotImplemented[CONFIG_MAX_ROOT_PORTS];
Jeremy Soller4185de52019-02-20 16:36:13 -0700182 /* Enable/Disable HotPlug support for Root Port */
lilacious2c7b6eb2023-06-20 20:32:52 +0200183 bool PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700184
Christian Walter061cd782020-05-23 15:54:43 +0200185 /*
186 * Enable/Disable AER (Advanced Error Reporting) for Root Port
187 * 0: Disable AER
188 * 1: Enable AER
189 */
lilacious2c7b6eb2023-06-20 20:32:52 +0200190 bool PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
Christian Walter061cd782020-05-23 15:54:43 +0200191
192 /* PCIE RP ASPM, ASPM support for the root port */
193 enum {
194 AspmDefault,
195 AspmDisabled,
196 AspmL0s,
197 AspmL1,
198 AspmL0sL1,
199 AspmAutoConfig,
200 } PcieRpAspm[CONFIG_MAX_ROOT_PORTS];
201
202 /* PCIE RP Max Payload, Max Payload Size supported */
203 enum {
204 RpMaxPayload_128,
205 RpMaxPayload_256,
206 } PcieRpMaxPayload[CONFIG_MAX_ROOT_PORTS];
207
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700208 /* eMMC and SD */
lilacious2c7b6eb2023-06-20 20:32:52 +0200209 bool ScsEmmcHs400Enabled;
Lijian Zhao93fde112018-02-05 18:14:11 -0800210 /* Need to update DLL setting to get Emmc running at HS400 speed */
lilacious2c7b6eb2023-06-20 20:32:52 +0200211 bool EmmcHs400DllNeed;
Lijian Zhao93fde112018-02-05 18:14:11 -0800212 /* 0-39: number of active delay for RX strobe, unit is 125 psec */
213 uint8_t EmmcHs400RxStrobeDll1;
214 /* 0-78: number of active delay for TX data, unit is 125 psec */
215 uint8_t EmmcHs400TxDataDll;
Aamir Bohra662c61d2019-08-16 11:56:40 +0530216 /* Enable/disable SD card write protect pin configuration on CML */
lilacious2c7b6eb2023-06-20 20:32:52 +0200217 bool ScsSdCardWpPinEnabled;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700218
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700219 /* Heci related */
lilacious2c7b6eb2023-06-20 20:32:52 +0200220 bool DisableHeciRetry;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700221
222 /* Gfx related */
lilacious2c7b6eb2023-06-20 20:32:52 +0200223 bool SkipExtGfxScan;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700224
lilacious2c7b6eb2023-06-20 20:32:52 +0200225 bool Device4Enable;
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700226
Jamie Chen3ccae2b2019-12-20 17:28:38 +0800227 /* CPU PL2/4 Config
228 * Performance: Maximum PLs for maximum performance.
229 * Baseline: Baseline PLs for balanced performance at lower power.
230 */
Patrick Rudolph9de8c802020-05-18 12:03:52 +0200231 enum chip_pl2_4_cfg cpu_pl2_4_cfg;
Jamie Chen3ccae2b2019-12-20 17:28:38 +0800232
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700233 /* VrConfig Settings for 5 domains
234 * 0 = System Agent, 1 = IA Core, 2 = Ring,
235 * 3 = GT unsliced, 4 = GT sliced */
236 struct vr_config domain_vr_config[NUM_VR_DOMAINS];
Sumeet Pawnikarc896e92e2019-01-08 19:52:54 +0530237
Edward O'Callaghanfa043c42020-02-21 16:08:04 +1100238 /* Enables support for Teton Glacier hybrid storage device */
lilacious2c7b6eb2023-06-20 20:32:52 +0200239 bool TetonGlacierMode;
Edward O'Callaghanfa043c42020-02-21 16:08:04 +1100240
Pratik Prajapati0f2f0692017-08-17 16:47:34 -0700241 /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */
lilacious2c7b6eb2023-06-20 20:32:52 +0200242 bool eist_enable;
Lijian Zhaoa5158492017-08-29 14:37:17 -0700243
Subrata Banik2678cd62017-08-29 17:25:46 +0530244 /* Enable C6 DRAM */
lilacious2c7b6eb2023-06-20 20:32:52 +0200245 bool enable_c6dram;
Michael Niewöhner7736bfc2019-10-22 23:05:06 +0200246
Duncan Laurie55012d12019-01-07 12:06:07 -0800247 /*
248 * SLP_S3 Minimum Assertion Width Policy
249 * 1 = 60us
250 * 2 = 1ms (default)
251 * 3 = 50ms
252 * 4 = 2s
253 */
254 uint8_t PchPmSlpS3MinAssert;
255
256 /*
257 * SLP_S4 Minimum Assertion Width Policy
258 * 1 = 1s
259 * 2 = 2s
260 * 3 = 3s
261 * 4 = 4s (default)
262 */
263 uint8_t PchPmSlpS4MinAssert;
264
265 /*
266 * SLP_SUS Minimum Assertion Width Policy
267 * 1 = 0ms
268 * 2 = 500ms
269 * 3 = 1s (default)
270 * 4 = 4s
271 */
272 uint8_t PchPmSlpSusMinAssert;
273
274 /*
275 * SLP_A Minimum Assertion Width Policy
276 * 1 = 0ms
277 * 2 = 4s
278 * 3 = 98ms (default)
279 * 4 = 2s
280 */
281 uint8_t PchPmSlpAMinAssert;
282
Lijian Zhao08231832017-09-05 18:16:21 -0700283 /*
Sridhar Siricillae40b9482020-06-17 00:38:20 +0530284 * PCH PM Reset Power Cycle Duration
285 * 0 = 4s
286 * 1 = 1s
287 * 2 = 2s
288 * 3 = 3s
289 * 4 = 4s (default)
290 *
291 * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the
292 * stretch duration programmed in the following registers -
293 * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert)
294 * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert)
295 * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert)
296 * - PM_CFG.SLP_LAN_MIN_ASST_WDTH
297 */
298 uint8_t PchPmPwrCycDur;
299
300 /*
Lijian Zhao08231832017-09-05 18:16:21 -0700301 * SerialIO device mode selection:
302 *
303 * Device index:
304 * PchSerialIoIndexI2C0
305 * PchSerialIoIndexI2C1
306 * PchSerialIoIndexI2C2
307 * PchSerialIoIndexI2C3
308 * PchSerialIoIndexI2C4
309 * PchSerialIoIndexI2C5
310 * PchSerialIoIndexSPI0
311 * PchSerialIoIndexSPI1
312 * PchSerialIoIndexSPI2
313 * PchSerialIoIndexUART0
314 * PchSerialIoIndexUART1
315 * PchSerialIoIndexUART2
316 *
317 * Mode select:
Subrata Banik41483c92019-02-02 13:32:49 +0530318 * For Cannonlake PCH following values are supported:
319 * PchSerialIoNotInitialized
Lijian Zhao08231832017-09-05 18:16:21 -0700320 * PchSerialIoDisabled
321 * PchSerialIoPci
322 * PchSerialIoAcpi
323 * PchSerialIoHidden
Subrata Banik41483c92019-02-02 13:32:49 +0530324 * PchSerialIoMax
325 *
326 * For Cometlake following values are supported:
327 * PchSerialIoNotInitialized
328 * PchSerialIoDisabled,
329 * PchSerialIoPci,
330 * PchSerialIoHidden,
331 * PchSerialIoLegacyUart,
332 * PchSerialIoSkipInit,
333 * PchSerialIoMax
334 *
335 * NOTE:
336 * PchSerialIoNotInitialized is not an option provided by FSP, this
337 * option is default selected in case devicetree doesn't fill this param
338 * In case PchSerialIoNotInitialized is selected or an invalid value is
339 * provided from devicetree, coreboot will configure device into PCI
340 * mode by default.
341 *
Lijian Zhao08231832017-09-05 18:16:21 -0700342 */
343 uint8_t SerialIoDevMode[PchSerialIoIndexMAX];
Bora Guvendikd2c63652017-09-19 14:04:37 -0700344
Jeremy Soller1af482c92019-02-20 16:39:55 -0700345 enum serirq_mode serirq_mode;
346
Bora Guvendikd2c63652017-09-19 14:04:37 -0700347 /* GPIO SD card detect pin */
348 unsigned int sdcard_cd_gpio;
Lijian Zhao9bb684a2017-10-30 17:03:06 -0700349
Lijian Zhao1b64ae12018-01-22 20:08:15 -0800350 /* Enable Pch iSCLK */
lilacious2c7b6eb2023-06-20 20:32:52 +0200351 bool pch_isclk;
Lijian Zhao91c8e232018-03-12 18:05:53 -0700352
Lijian Zhaoae754002018-12-12 11:19:46 -0800353 /*
354 * Acoustic Noise Mitigation
355 * 0b - Disable
356 * 1b - Enable noise mitigation
357 */
lilacious2c7b6eb2023-06-20 20:32:52 +0200358 bool AcousticNoiseMitigation;
Lijian Zhaoae754002018-12-12 11:19:46 -0800359
360 /*
361 * Disable Fast Package C-state ramping
362 * Need to set AcousticNoiseMitigation = '1' first
363 * 0b - Enabled
364 * 1b - Disabled
365 */
lilacious2c7b6eb2023-06-20 20:32:52 +0200366 bool FastPkgCRampDisableIa;
367 bool FastPkgCRampDisableGt;
368 bool FastPkgCRampDisableSa;
369 bool FastPkgCRampDisableFivr;
Lijian Zhaoae754002018-12-12 11:19:46 -0800370
371 /*
372 * Adjust the VR slew rates
373 * Need to set AcousticNoiseMitigation = '1' first
374 * 000b - Fast/2
375 * 001b - Fast/4
376 * 010b - Fast/8
377 * 011b - Fast/16
378 */
379 uint8_t SlowSlewRateForIa;
380 uint8_t SlowSlewRateForGt;
381 uint8_t SlowSlewRateForSa;
382 uint8_t SlowSlewRateForFivr;
Lijian Zhao9bf1d8f2018-12-13 09:12:34 -0800383
Lijian Zhao9bf1d8f2018-12-13 09:12:34 -0800384 /* SATA Power Optimizer */
lilacious2c7b6eb2023-06-20 20:32:52 +0200385 bool satapwroptimize;
Krishna Prasad Bhatcaa85f22019-02-20 15:05:33 +0530386
Jamie Chenc004857da2020-01-15 11:17:21 +0800387 /* SATA Gen3 Strength */
388 struct sata_port_config sata_port[SOC_INTEL_CML_SATA_DEV_MAX];
389
Krishna Prasad Bhatcaa85f22019-02-20 15:05:33 +0530390 /* Enable or disable eDP device */
lilacious2c7b6eb2023-06-20 20:32:52 +0200391 bool DdiPortEdp;
Krishna Prasad Bhatcaa85f22019-02-20 15:05:33 +0530392
393 /* Enable or disable HPD of DDI port B/C/D/F */
lilacious2c7b6eb2023-06-20 20:32:52 +0200394 bool DdiPortBHpd;
395 bool DdiPortCHpd;
396 bool DdiPortDHpd;
397 bool DdiPortFHpd;
Krishna Prasad Bhatcaa85f22019-02-20 15:05:33 +0530398
399 /* Enable or disable DDC of DDI port B/C/D/F */
lilacious2c7b6eb2023-06-20 20:32:52 +0200400 bool DdiPortBDdc;
401 bool DdiPortCDdc;
402 bool DdiPortDDdc;
403 bool DdiPortFDdc;
Krishna Prasad Bhatdffa8d02019-03-28 21:51:58 +0530404
405 /* Unlock all GPIO Pads */
lilacious2c7b6eb2023-06-20 20:32:52 +0200406 bool PchUnlockGpioPads;
Eric Lai43a3c512019-04-29 16:25:01 +0800407
408 /* Enable GBE wakeup */
lilacious2c7b6eb2023-06-20 20:32:52 +0200409 bool LanWakeFromDeepSx;
410 bool WolEnableOverride;
Subrata Banik76a8f9e2019-05-15 21:23:18 +0530411
Christian Waltere6e9fa62020-05-06 09:18:37 +0200412#if !CONFIG(SOC_INTEL_COMETLAKE)
413 uint32_t VrPowerDeliveryDesign;
414#endif
415
Subrata Banik76a8f9e2019-05-15 21:23:18 +0530416 /*
417 * Override GPIO PM configuration:
418 * 0: Use FSP default GPIO PM program,
419 * 1: coreboot to override GPIO PM program
420 */
lilacious2c7b6eb2023-06-20 20:32:52 +0200421 bool gpio_override_pm;
Subrata Banik76a8f9e2019-05-15 21:23:18 +0530422 /*
423 * GPIO PM configuration: 0 to disable, 1 to enable power gating
424 * Bit 6-7: Reserved
425 * Bit 5: MISCCFG_GPSIDEDPCGEN
426 * Bit 4: MISCCFG_GPRCOMPCDLCGEN
427 * Bit 3: MISCCFG_GPRTCDLCGEN
428 * Bit 2: MISCCFG_GSXLCGEN
429 * Bit 1: MISCCFG_GPDPCGEN
430 * Bit 0: MISCCFG_GPDLCGEN
431 */
432 uint8_t gpio_pm[TOTAL_GPIO_COMM];
Subrata Banike1470ea2019-11-18 14:08:08 +0530433
434 /*
435 * Override CPU flex ratio value:
436 * CPU ratio value controls the maximum processor non-turbo ratio.
437 * Valid Range 0 to 63.
438 *
439 * In general descriptor provides option to set default cpu flex ratio.
440 * Default cpu flex ratio is 0 ensures booting with non-turbo max frequency.
Martin Roth26f97f92021-10-01 14:53:22 -0600441 * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0.
Subrata Banike1470ea2019-11-18 14:08:08 +0530442 *
443 * Only override CPU flex ratio if don't want to boot with non-turbo max.
444 */
445 uint8_t cpu_ratio_override;
Michael Niewöhnerc4f8fbd2020-12-19 14:11:32 +0100446
447 struct i915_gpu_panel_config panel_cfg;
448
449 struct i915_gpu_controller_info gfx;
Patrick Rudolphe9b08302021-02-16 11:52:38 +0100450
451 /* Disable CPU Turbo in IA32_MISC_ENABLE */
452 bool cpu_turbo_disable;
Angel Pons67d06722022-01-31 17:41:29 +0100453
454 bool disable_vmx;
Lijian Zhao2f764f72017-07-14 11:09:10 -0700455};
456
457typedef struct soc_intel_cannonlake_config config_t;
458
459#endif