blob: 3070c462bac4ad3b30ea08c639267e4e7f80007e [file] [log] [blame]
Angel Pons3bd1e3d2020-04-05 15:47:17 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Lee Leahyb0005132015-05-12 18:19:47 -07002
Lee Leahy1d14b3e2015-05-12 18:23:27 -07003#ifndef _SOC_CHIP_H_
4#define _SOC_CHIP_H_
5
Furquan Shaikh76cedd22020-05-02 10:24:23 -07006#include <acpi/acpi_device.h>
Nico Huber0f2dd1e2017-08-01 14:02:40 +02007#include <device/i2c_simple.h>
Chris Chingb8dc63b2017-12-06 14:26:15 -07008#include <drivers/i2c/designware/dw_i2c.h>
Michael Niewöhner97e21d32020-12-28 00:49:33 +01009#include <drivers/intel/gma/gma.h>
Dinesh Gehlot770a46c2023-01-17 05:54:17 +000010#include <gpio.h>
Kyösti Mälkki32d47eb2019-09-28 00:00:30 +030011#include <intelblocks/cfg.h>
Furquan Shaikh05a6f292017-03-31 14:02:47 -070012#include <intelblocks/gspi.h>
Nico Huber44e89af2019-02-23 19:24:51 +010013#include <intelblocks/lpc_lib.h>
Sumeet R Pawnikar97c54642020-05-10 01:24:11 +053014#include <intelblocks/power_limit.h>
Reka Normana5215c42023-09-22 15:26:54 +100015#include <intelblocks/xhci.h>
Felix Singer743242b2023-06-16 01:33:25 +020016#include <stdbool.h>
Aaron Durbin9a8dc372015-08-07 22:29:42 -050017#include <stdint.h>
Duncan Laurie011533e2016-05-11 15:08:50 -070018#include <soc/gpe.h>
Barnali Sarkar8f2f22d2016-08-03 12:15:22 +053019#include <soc/irq.h>
Aaron Durbin9a8dc372015-08-07 22:29:42 -050020#include <soc/pci_devs.h>
21#include <soc/pmc.h>
22#include <soc/serialio.h>
Duncan Lauriefe866662015-10-16 13:58:11 -070023#include <soc/usb.h>
Rizwan Qureshi2b1e8b32015-11-20 11:46:54 +053024#include <soc/vr_config.h>
Aaron Durbin9a8dc372015-08-07 22:29:42 -050025
Maxim Polyakov0220d1e2019-03-18 17:38:44 +030026#define MAX_PEG_PORTS 3
27
Duncan Lauriec8d45ac2016-06-06 17:21:00 -070028enum skylake_i2c_voltage {
29 I2C_VOLTAGE_3V3,
30 I2C_VOLTAGE_1V8
31};
32
Lee Leahy1d14b3e2015-05-12 18:23:27 -070033struct soc_intel_skylake_config {
Subrata Banikc4986eb2018-05-09 14:55:09 +053034
35 /* Common struct containing soc config data required by common code */
36 struct soc_intel_common_config common_soc_config;
37
Sumeet R Pawnikar97c54642020-05-10 01:24:11 +053038 /* Common struct containing power limits configuration information */
39 struct soc_power_limits_config power_limits_config;
40
Nico Huber1a650172018-12-16 02:39:28 +010041 /* IGD panel configuration */
Michael Niewöhner97e21d32020-12-28 00:49:33 +010042 struct i915_gpu_panel_config panel_cfg;
Nico Huber1a650172018-12-16 02:39:28 +010043
Aaron Durbin9a8dc372015-08-07 22:29:42 -050044 /* Gpio group routed to each dword of the GPE0 block. Values are
45 * of the form GPP_[A:G] or GPD. */
46 uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
47 uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
48 uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
Lee Leahyb0005132015-05-12 18:19:47 -070049
Wim Vervoorn5f2adfe2020-02-03 15:32:54 +010050 /* LPC fixed enables and ranges */
51 uint16_t lpc_iod;
52 uint16_t lpc_ioe;
53
Lee Leahyb0005132015-05-12 18:19:47 -070054 /* Generic IO decode ranges */
55 uint32_t gen1_dec;
56 uint32_t gen2_dec;
57 uint32_t gen3_dec;
58 uint32_t gen4_dec;
59
Lee Leahyb0005132015-05-12 18:19:47 -070060 /* Enable S0iX support */
Felix Singer743242b2023-06-16 01:33:25 +020061 bool s0ix_enable;
Lee Leahyb0005132015-05-12 18:19:47 -070062
Duncan Laurie7fce30c2015-09-04 13:53:14 -070063 /* Enable DPTF support */
Felix Singer552da562023-06-19 23:44:36 +020064 bool dptf_enable;
Duncan Laurie7fce30c2015-09-04 13:53:14 -070065
Duncan Laurie1fe32d62017-04-10 21:02:13 -070066 /* Deep SX enables */
Felix Singer552da562023-06-19 23:44:36 +020067 bool deep_s3_enable_ac;
68 bool deep_s3_enable_dc;
69 bool deep_s5_enable_ac;
70 bool deep_s5_enable_dc;
Lee Leahyb0005132015-05-12 18:19:47 -070071
Duncan Laurieedf1cb72015-07-24 15:37:13 -070072 /*
73 * Deep Sx Configuration
74 * DSX_EN_WAKE_PIN - Enable WAKE# pin
75 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
Furquan Shaikha7104d02017-12-03 21:43:58 -080076 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin
Duncan Laurieedf1cb72015-07-24 15:37:13 -070077 */
78 uint32_t deep_sx_config;
79
Lee Leahyb0005132015-05-12 18:19:47 -070080 /* TCC activation offset */
Angel Pons643c82e2020-09-24 16:43:21 +020081 uint32_t tcc_offset;
Lee Leahy1d14b3e2015-05-12 18:23:27 -070082
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +053083 /*
84 * System Agent dynamic frequency configuration
85 * When enabled memory will be trained at two different frequencies.
86 * 0 = Disabled
87 * 1 = FixedLow
88 * 2 = FixedHigh
89 * 3 = Enabled
90 */
Praveen hodagatta praneshf7fdc3a2018-12-19 19:19:24 +080091 enum {
92 SaGv_Disabled,
93 SaGv_FixedLow,
94 SaGv_FixedHigh,
95 SaGv_Enabled,
96 } SaGv;
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +053097
98 /* Enable/disable Rank Margin Tool */
Felix Singer552da562023-06-19 23:44:36 +020099 bool RMT;
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +0530100
Shaunak Sahaef250c42018-08-31 12:49:08 -0700101 /* Disable Command TriState */
Felix Singer552da562023-06-19 23:44:36 +0200102 bool CmdTriStateDis;
Shaunak Sahaef250c42018-08-31 12:49:08 -0700103
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700104 /* Lan */
Felix Singer552da562023-06-19 23:44:36 +0200105 bool EnableLanLtr;
106 bool EnableLanK1Off;
107 bool LanClkReqSupported;
Duncan Laurie14485ef2017-12-13 13:58:35 -0800108 u8 LanClkReqNumber;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700109
110 /* SATA related */
Nico Huberefc0fa02017-07-25 12:12:29 +0200111 enum {
Felix Singerd60abfc2020-12-06 11:51:10 +0100112 SATA_AHCI = 0,
113 SATA_RAID = 1,
Nico Huberefc0fa02017-07-25 12:12:29 +0200114 } SataMode;
Felix Singer552da562023-06-19 23:44:36 +0200115 bool SataSalpSupport;
116 bool SataPortsEnable[8];
117 bool SataPortsDevSlp[8];
118 bool SataPortsSpinUp[8];
119 bool SataPortsHotPlug[8];
Matt DeVillier9e0d69b2017-10-10 14:03:36 -0500120 u8 SataSpeedLimit;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700121
122 /* Audio related */
Felix Singer552da562023-06-19 23:44:36 +0200123 bool DspEnable;
Duncan Laurie0c66e862015-09-03 16:05:59 -0700124
Michael Niewöhner62385632019-09-23 14:38:41 +0200125 /* HDA Virtual Channel Type Select */
126 enum {
127 Vc0,
128 Vc1,
129 } PchHdaVcType;
130
Duncan Laurie0c66e862015-09-03 16:05:59 -0700131 /*
132 * I/O Buffer Ownership:
133 * 0: HD-A Link
134 * 1 Shared, HD-A Link and I2S Port
135 * 3: I2S Ports
136 */
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700137 u8 IoBufferOwnership;
138
139 /* Trace Hub function */
Aamir Bohra63755122017-02-06 21:48:48 +0530140 u32 TraceHubMemReg0Size;
141 u32 TraceHubMemReg1Size;
142
143 /* DCI Enable/Disable */
Felix Singer552da562023-06-19 23:44:36 +0200144 bool PchDciEn;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700145
Rizwan Qureshi03937392017-09-16 01:54:20 +0530146 /*
Elyes HAOUAS79ccc692020-02-24 13:43:39 +0100147 * PCIe Root Port configuration:
Rizwan Qureshi03937392017-09-16 01:54:20 +0530148 * each element of array corresponds to
149 * respective PCIe root port.
150 */
151
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300152 /* PEG Max Link Width */
153 enum {
154 Peg0_x16,
155 Peg0_x1,
156 Peg0_x2,
157 Peg0_x4,
158 Peg0_x8,
159 } Peg0MaxLinkWidth;
160
161 enum {
162 Peg1_x8,
163 Peg1_x1,
164 Peg1_x2,
165 Peg1_x4,
166 } Peg1MaxLinkWidth;
167
168 enum {
169 Peg2_x4,
170 Peg2_x1,
171 Peg2_x2,
172 } Peg2MaxLinkWidth;
173
Rizwan Qureshi03937392017-09-16 01:54:20 +0530174 /*
175 * Enable/Disable Root Port
176 * 0: Disable Root Port
177 * 1: Enable Root Port
178 */
Felix Singer552da562023-06-19 23:44:36 +0200179 bool PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530180
181 /*
182 * Enable/Disable Clk-req support for Root Port
183 * 0: Disable Clk-Req
184 * 1: Enable Clk-req
185 */
Felix Singer552da562023-06-19 23:44:36 +0200186 bool PcieRpClkReqSupport[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530187
188 /*
189 * Clk-req source for Root Port
190 */
Rizwan Qureshid8bb69a2016-11-08 21:01:09 +0530191 u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530192
193 /*
Divya Chellape7fb7ce2017-12-19 20:16:50 +0530194 * Clk source number for Root Port
195 */
196 u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS];
197
198 /*
Rizwan Qureshi03937392017-09-16 01:54:20 +0530199 * Enable/Disable AER (Advanced Error Reporting) for Root Port
200 * 0: Disable AER
201 * 1: Enable AER
202 */
Felix Singer552da562023-06-19 23:44:36 +0200203 bool PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700204
Rizwan Qureshi03937392017-09-16 01:54:20 +0530205 /*
206 * Enable/Disable Latency Tolerance Reporting for Root Port
207 * 0: Disable LTR
208 * 1: Enable LTR
209 */
Felix Singer552da562023-06-19 23:44:36 +0200210 bool PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530211
Duncan Laurie74ea48e2018-01-29 12:00:47 -0800212 /* Enable/Disable HotPlug support for Root Port */
Felix Singer552da562023-06-19 23:44:36 +0200213 bool PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
Duncan Laurie74ea48e2018-01-29 12:00:47 -0800214
Wim Vervoornd6b682c2020-05-07 12:41:13 +0200215 /* PCIE RP Max Payload, Max Payload Size supported */
216 enum {
217 RpMaxPayload_128,
218 RpMaxPayload_256,
219 } PcieRpMaxPayload[CONFIG_MAX_ROOT_PORTS];
220
Wim Vervoorn5819eab2020-05-07 13:16:32 +0200221 /* PCIE RP ASPM, ASPM support for the root port */
222 enum {
223 AspmDefault,
224 AspmDisabled,
225 AspmL0s,
226 AspmL1,
227 AspmL0sL1,
228 AspmAutoConfig,
Benjamin Doronb53858b2020-10-12 04:19:42 +0000229 } pcie_rp_aspm[CONFIG_MAX_ROOT_PORTS];
Wim Vervoorn5819eab2020-05-07 13:16:32 +0200230
Benjamin Doronadcb8702020-03-14 01:53:25 +0000231 /* PCIe RP L1 substate */
232 enum {
233 L1SS_Default,
234 L1SS_Disabled,
235 L1SS_L1_1,
236 L1SS_L1_2,
237 } pcie_rp_l1substates[CONFIG_MAX_ROOT_PORTS];
238
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700239 /* USB related */
Duncan Lauriefe866662015-10-16 13:58:11 -0700240 struct usb2_port_config usb2_ports[16];
241 struct usb3_port_config usb3_ports[10];
Felix Singer552da562023-06-19 23:44:36 +0200242 bool SsicPortEnable;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700243
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700244 /*
245 * SerialIO device mode selection:
246 *
247 * Device index:
248 * PchSerialIoIndexI2C0
249 * PchSerialIoIndexI2C1
250 * PchSerialIoIndexI2C2
251 * PchSerialIoIndexI2C3
252 * PchSerialIoIndexI2C4
253 * PchSerialIoIndexI2C5
254 * PchSerialIoIndexI2C6
255 * PchSerialIoIndexSpi0
256 * PchSerialIoIndexSpi1
257 * PchSerialIoIndexUart0
258 * PchSerialIoIndexUart1
259 * PchSerialIoIndexUart2
260 *
261 * Mode select:
262 * PchSerialIoDisabled
263 * PchSerialIoAcpi
264 * PchSerialIoPci
265 * PchSerialIoAcpiHidden
266 * PchSerialIoLegacyUart
267 */
268 u8 SerialIoDevMode[PchSerialIoIndexMax];
269
Duncan Lauriec8d45ac2016-06-06 17:21:00 -0700270 /* I2C */
Aaron Durbined14a4e2016-11-09 17:04:15 -0600271 /* Bus voltage level, default is 3.3V */
Subrata Banikc4986eb2018-05-09 14:55:09 +0530272 enum skylake_i2c_voltage i2c_voltage[CONFIG_SOC_INTEL_I2C_DEV_MAX];
Furquan Shaikh05a6f292017-03-31 14:02:47 -0700273
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700274 /* eMMC and SD */
Felix Singer552da562023-06-19 23:44:36 +0200275 bool ScsEmmcHs400Enabled;
276 bool EmmcHs400DllNeed;
Pratik Prajapatie0722472018-08-22 18:58:38 -0700277 u8 ScsEmmcHs400RxStrobeDll1;
278 u8 ScsEmmcHs400TxDataDll;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700279
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300280 enum {
281 Display_iGFX,
282 Display_PEG,
283 Display_PCH_PCIe,
284 Display_Auto,
285 Display_Switchable,
286 } PrimaryDisplay;
Felix Singer552da562023-06-19 23:44:36 +0200287 bool SkipExtGfxScan;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700288
Subrata Banikd0def392015-07-22 12:19:28 +0530289 /* GPIO IRQ Route The valid values is 14 or 15*/
290 u8 GpioIrqSelect;
291 /* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23*/
292 u8 SciIrqSelect;
293 /* TCO IRQ Select The valid values is 9, 10, 11, 20 21, 22, 23*/
294 u8 TcoIrqSelect;
Felix Singer552da562023-06-19 23:44:36 +0200295 bool TcoIrqEnable;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530296 /* Enable SMI_LOCK bit to prevent writes to the Global SMI Enable bit.*/
Felix Singer552da562023-06-19 23:44:36 +0200297 bool LockDownConfigGlobalSmi;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530298 /*
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530299 * Enable RTC lower and upper 128 byte Lock bits to lock Bytes 38h-3Fh
Elyes HAOUAS59ab2032021-01-16 14:55:58 +0100300 * in the upper and lower 128-byte bank of RTC RAM.
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530301 */
Felix Singer552da562023-06-19 23:44:36 +0200302 bool LockDownConfigRtcLock;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530303
304 /*
305 * Determine if WLAN wake from Sx, corresponds to the
306 * HOST_WLAN_PP_EN bit in the PWRM_CFG3 register.
307 */
Felix Singer552da562023-06-19 23:44:36 +0200308 bool PchPmWoWlanEnable;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530309
310 /*
311 * Determine if WLAN wake from DeepSx, corresponds to
312 * the DSX_WLAN_PP_EN bit in the PWRM_CFG3 register.
313 */
Felix Singer552da562023-06-19 23:44:36 +0200314 bool PchPmWoWlanDeepSxEnable;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530315
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530316 /*
317 * Corresponds to the "WOL Enable Override" bit in the General PM
318 * Configuration B (GEN_PMCON_B) register
319 */
Felix Singer552da562023-06-19 23:44:36 +0200320 bool WakeConfigWolEnableOverride;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530321 /* Determine if enable PCIe to wake from deep Sx*/
Felix Singer552da562023-06-19 23:44:36 +0200322 bool WakeConfigPcieWakeFromDeepSx;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530323 /* Deep Sx Policy. Values 0: PchDeepSxPolDisable,
324 * 1: PchDpS5BatteryEn, 2: PchDpS5AlwaysEn, 3: PchDpS4S5BatteryEn,
325 * 4: PchDpS4S5AlwaysEn, 5: PchDpS3S4S5BatteryEn, 6: PchDpS3S4S5AlwaysEn
326 */
327 u8 PmConfigDeepSxPol;
Nico Huber503965f2017-05-09 16:11:27 +0200328
329 enum {
330 SLP_S3_MIN_ASSERT_60US = 0,
331 SLP_S3_MIN_ASSERT_1MS = 1,
332 SLP_S3_MIN_ASSERT_50MS = 2,
333 SLP_S3_MIN_ASSERT_2S = 3,
334 } PmConfigSlpS3MinAssert;
335
336 enum {
337 SLP_S4_MIN_ASSERT_PCH = 0,
338 SLP_S4_MIN_ASSERT_1S = 1,
339 SLP_S4_MIN_ASSERT_2S = 2,
340 SLP_S4_MIN_ASSERT_3S = 3,
341 SLP_S4_MIN_ASSERT_4S = 4,
342 } PmConfigSlpS4MinAssert;
343
344 /* When deep Sx enabled: Must be greater than or equal to
345 all other minimum assertion widths. */
346 enum {
347 SLP_SUS_MIN_ASSERT_0MS = 0,
348 SLP_SUS_MIN_ASSERT_500MS = 1,
349 SLP_SUS_MIN_ASSERT_1S = 2,
350 SLP_SUS_MIN_ASSERT_4S = 3,
351 } PmConfigSlpSusMinAssert;
352
353 enum {
354 SLP_A_MIN_ASSERT_0MS = 0,
355 SLP_A_MIN_ASSERT_4S = 1,
356 SLP_A_MIN_ASSERT_98MS = 2,
357 SLP_A_MIN_ASSERT_2S = 3,
358 } PmConfigSlpAMinAssert;
359
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530360 /*
Lee Leahyb439a922017-03-16 16:44:36 -0700361 * SLP_X Stretching After SUS Well Power Up. Values 0: Disabled,
362 * 1: Enabled
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530363 */
Felix Singer552da562023-06-19 23:44:36 +0200364 bool PmConfigSlpStrchSusUp;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530365 /*
366 * PCH power button override period.
367 * Values: 0x0 - 4s, 0x1 - 6s, 0x2 - 8s, 0x3 - 10s, 0x4 - 12s, 0x5 - 14s
368 */
369 u8 PmConfigPwrBtnOverridePeriod;
Rizwan Qureshi0da186c2017-02-23 14:43:39 +0530370
371 /*
372 * PCH Pm Slp S0 Voltage Margining Enable
373 * Indicates platform supports VCCPrim_Core Voltage Margining
374 * in SLP_S0# asserted state.
375 */
Felix Singer552da562023-06-19 23:44:36 +0200376 bool PchPmSlpS0VmEnable;
Rizwan Qureshi0da186c2017-02-23 14:43:39 +0530377
Nico Huber503965f2017-05-09 16:11:27 +0200378 enum {
379 RESET_POWER_CYCLE_DEFAULT = 0,
380 RESET_POWER_CYCLE_1S = 1,
381 RESET_POWER_CYCLE_2S = 2,
382 RESET_POWER_CYCLE_3S = 3,
383 RESET_POWER_CYCLE_4S = 4,
384 } PmConfigPwrCycDur;
385
Nico Huber44e89af2019-02-23 19:24:51 +0100386 enum serirq_mode serirq_mode;
Nico Huber503965f2017-05-09 16:11:27 +0200387
388 enum {
389 SERIAL_IRQ_FRAME_PULSE_4CLK = 0,
390 SERIAL_IRQ_FRAME_PULSE_6CLK = 1,
391 SERIAL_IRQ_FRAME_PULSE_8CLK = 2,
392 } SerialIrqConfigStartFramePulse;
393
Subrata Banikce23d4c2018-06-04 10:05:07 +0530394 /*
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530395 * VrConfig Settings for 5 domains
Rizwan Qureshi2b1e8b32015-11-20 11:46:54 +0530396 * 0 = System Agent, 1 = IA Core, 2 = Ring,
397 * 3 = GT unsliced, 4 = GT sliced
398 */
399 struct vr_config domain_vr_config[NUM_VR_DOMAINS];
Michael Niewöhnera64b4f42020-10-15 00:36:29 +0200400
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530401 /*
402 * Enable VR specific mailbox command
Subrata Banik9a8b67d2016-04-20 14:19:53 +0530403 * 000b - Don't Send any VR command
404 * 001b - VR command specifically for the MPS IMPV8 VR will be sent
405 * 010b - VR specific command sent for PS4 exit issue
406 * 011b - VR specific command sent for both MPS IMPV8 & PS4 exit issue
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530407 */
408 u8 SendVrMbxCmd;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530409
Rizwan Qureshiffe58102017-02-10 15:58:24 +0530410 /* Enable/Disable host reads to PMC XRAM registers */
Felix Singer552da562023-06-19 23:44:36 +0200411 bool PchPmPmcReadDisable;
Rizwan Qureshiffe58102017-02-10 15:58:24 +0530412
Duncan Laurieb25a45c2016-05-10 15:56:16 -0700413 /*
414 * Use SD card detect GPIO with default config:
415 * - Edge triggered
416 * - No internal pull
417 * - Active both (high + low)
418 * - Can wake device from D3
419 * - 100ms debounce timeout
420 *
421 * GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
422 * "\\_SB.PCI0.GPIO", 0, ResourceConsumer)
Angel Pons6bd99f92021-02-20 00:16:47 +0100423 * { sdcard_cd_gpio }
Duncan Laurieb25a45c2016-05-10 15:56:16 -0700424 */
Angel Pons6bd99f92021-02-20 00:16:47 +0100425 unsigned int sdcard_cd_gpio;
Furquan Shaikh3bfe3402016-10-18 14:25:25 -0700426
427 /* Wake Enable Bitmap for USB2 ports */
428 u16 usb2_wake_enable_bitmap;
429
430 /* Wake Enable Bitmap for USB3 ports */
431 u8 usb3_wake_enable_bitmap;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800432
433 /*
434 * Acoustic Noise Mitigation
435 * 0b - Disable
436 * 1b - Enable noise mitigation
437 */
Felix Singer552da562023-06-19 23:44:36 +0200438 bool AcousticNoiseMitigation;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800439
440 /*
441 * Disable Fast Package C-state ramping
442 * Need to set AcousticNoiseMitigation = '1' first
443 * 0b - Enabled
444 * 1b - Disabled
445 */
Felix Singer552da562023-06-19 23:44:36 +0200446 bool FastPkgCRampDisableIa;
447 bool FastPkgCRampDisableGt;
448 bool FastPkgCRampDisableSa;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800449
450 /*
451 * Adjust the VR slew rates
452 * Need to set AcousticNoiseMitigation = '1' first
453 * 000b - Fast/2
454 * 001b - Fast/4
455 * 010b - Fast/8
456 * 011b - Fast/16
457 */
458 u8 SlowSlewRateForIa;
459 u8 SlowSlewRateForGt;
460 u8 SlowSlewRateForSa;
Robbie Zhang7de03172017-02-21 14:00:31 -0800461
Subrata Banik6b45ee42017-05-12 11:43:57 +0530462 /* Enable/Disable EIST
463 * 1b - Enabled
464 * 0b - Disabled
465 */
Felix Singer552da562023-06-19 23:44:36 +0200466 bool eist_enable;
Rizwan Qureshib3e18c72017-09-25 17:35:15 +0530467
468 /*
469 * Activates VR mailbox command for Intersil VR C-state issues.
470 * 0 - no mailbox command sent.
471 * 1 - VR mailbox command sent for IA/GT rails only.
472 * 2 - VR mailbox command sent for IA/GT/SA rails.
473 */
474 u8 IslVrCmd;
Subrata Banik771d6112017-11-29 16:17:13 +0530475
Matt DeVillierddb4cf02020-03-27 14:13:07 -0500476 /* i915 struct for GMA backlight control */
477 struct i915_gpu_controller_info gfx;
Lee Leahyb0005132015-05-12 18:19:47 -0700478};
479
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700480typedef struct soc_intel_skylake_config config_t;
Lee Leahyb0005132015-05-12 18:19:47 -0700481
Lee Leahyb0005132015-05-12 18:19:47 -0700482#endif