blob: 7997f7df442d06799e19dab01049ef3fc08030f5 [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 /* Common struct containing soc config data required by common code */
35 struct soc_intel_common_config common_soc_config;
36
Sumeet R Pawnikar97c54642020-05-10 01:24:11 +053037 /* Common struct containing power limits configuration information */
38 struct soc_power_limits_config power_limits_config;
39
Nico Huber1a650172018-12-16 02:39:28 +010040 /* IGD panel configuration */
Michael Niewöhner97e21d32020-12-28 00:49:33 +010041 struct i915_gpu_panel_config panel_cfg;
Nico Huber1a650172018-12-16 02:39:28 +010042
Aaron Durbin9a8dc372015-08-07 22:29:42 -050043 /* Gpio group routed to each dword of the GPE0 block. Values are
44 * of the form GPP_[A:G] or GPD. */
45 uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
46 uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
47 uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
Lee Leahyb0005132015-05-12 18:19:47 -070048
Wim Vervoorn5f2adfe2020-02-03 15:32:54 +010049 /* LPC fixed enables and ranges */
50 uint16_t lpc_iod;
51 uint16_t lpc_ioe;
52
Lee Leahyb0005132015-05-12 18:19:47 -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
Lee Leahyb0005132015-05-12 18:19:47 -070059 /* Enable S0iX support */
Felix Singer743242b2023-06-16 01:33:25 +020060 bool s0ix_enable;
Lee Leahyb0005132015-05-12 18:19:47 -070061
Duncan Laurie7fce30c2015-09-04 13:53:14 -070062 /* Enable DPTF support */
Felix Singer552da562023-06-19 23:44:36 +020063 bool dptf_enable;
Duncan Laurie7fce30c2015-09-04 13:53:14 -070064
Duncan Laurie1fe32d62017-04-10 21:02:13 -070065 /* Deep SX enables */
Felix Singer552da562023-06-19 23:44:36 +020066 bool deep_s3_enable_ac;
67 bool deep_s3_enable_dc;
68 bool deep_s5_enable_ac;
69 bool deep_s5_enable_dc;
Lee Leahyb0005132015-05-12 18:19:47 -070070
Duncan Laurieedf1cb72015-07-24 15:37:13 -070071 /*
72 * Deep Sx Configuration
73 * DSX_EN_WAKE_PIN - Enable WAKE# pin
74 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
Furquan Shaikha7104d02017-12-03 21:43:58 -080075 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin
Duncan Laurieedf1cb72015-07-24 15:37:13 -070076 */
77 uint32_t deep_sx_config;
78
Lee Leahyb0005132015-05-12 18:19:47 -070079 /* TCC activation offset */
Angel Pons643c82e2020-09-24 16:43:21 +020080 uint32_t tcc_offset;
Lee Leahy1d14b3e2015-05-12 18:23:27 -070081
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +053082 /*
83 * System Agent dynamic frequency configuration
84 * When enabled memory will be trained at two different frequencies.
85 * 0 = Disabled
86 * 1 = FixedLow
87 * 2 = FixedHigh
88 * 3 = Enabled
89 */
Praveen hodagatta praneshf7fdc3a2018-12-19 19:19:24 +080090 enum {
91 SaGv_Disabled,
92 SaGv_FixedLow,
93 SaGv_FixedHigh,
94 SaGv_Enabled,
95 } SaGv;
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +053096
97 /* Enable/disable Rank Margin Tool */
Felix Singer552da562023-06-19 23:44:36 +020098 bool RMT;
Rizwan Qureshi5c1c3d62015-07-21 20:21:50 +053099
Shaunak Sahaef250c42018-08-31 12:49:08 -0700100 /* Disable Command TriState */
Felix Singer552da562023-06-19 23:44:36 +0200101 bool CmdTriStateDis;
Shaunak Sahaef250c42018-08-31 12:49:08 -0700102
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700103 /* Lan */
Felix Singer552da562023-06-19 23:44:36 +0200104 bool EnableLanLtr;
105 bool EnableLanK1Off;
106 bool LanClkReqSupported;
Duncan Laurie14485ef2017-12-13 13:58:35 -0800107 u8 LanClkReqNumber;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700108
109 /* SATA related */
Nico Huberefc0fa02017-07-25 12:12:29 +0200110 enum {
Felix Singerd60abfc2020-12-06 11:51:10 +0100111 SATA_AHCI = 0,
112 SATA_RAID = 1,
Nico Huberefc0fa02017-07-25 12:12:29 +0200113 } SataMode;
Felix Singer552da562023-06-19 23:44:36 +0200114 bool SataSalpSupport;
115 bool SataPortsEnable[8];
116 bool SataPortsDevSlp[8];
117 bool SataPortsSpinUp[8];
118 bool SataPortsHotPlug[8];
Matt DeVillier9e0d69b2017-10-10 14:03:36 -0500119 u8 SataSpeedLimit;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700120
121 /* Audio related */
Felix Singer552da562023-06-19 23:44:36 +0200122 bool DspEnable;
Duncan Laurie0c66e862015-09-03 16:05:59 -0700123
Michael Niewöhner62385632019-09-23 14:38:41 +0200124 /* HDA Virtual Channel Type Select */
125 enum {
126 Vc0,
127 Vc1,
128 } PchHdaVcType;
129
Duncan Laurie0c66e862015-09-03 16:05:59 -0700130 /*
131 * I/O Buffer Ownership:
132 * 0: HD-A Link
133 * 1 Shared, HD-A Link and I2S Port
134 * 3: I2S Ports
135 */
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700136 u8 IoBufferOwnership;
137
138 /* Trace Hub function */
Aamir Bohra63755122017-02-06 21:48:48 +0530139 u32 TraceHubMemReg0Size;
140 u32 TraceHubMemReg1Size;
141
142 /* DCI Enable/Disable */
Felix Singer552da562023-06-19 23:44:36 +0200143 bool PchDciEn;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700144
Rizwan Qureshi03937392017-09-16 01:54:20 +0530145 /*
Elyes HAOUAS79ccc692020-02-24 13:43:39 +0100146 * PCIe Root Port configuration:
Rizwan Qureshi03937392017-09-16 01:54:20 +0530147 * each element of array corresponds to
148 * respective PCIe root port.
149 */
150
Maxim Polyakov0220d1e2019-03-18 17:38:44 +0300151 /* PEG Max Link Width */
152 enum {
153 Peg0_x16,
154 Peg0_x1,
155 Peg0_x2,
156 Peg0_x4,
157 Peg0_x8,
158 } Peg0MaxLinkWidth;
159
160 enum {
161 Peg1_x8,
162 Peg1_x1,
163 Peg1_x2,
164 Peg1_x4,
165 } Peg1MaxLinkWidth;
166
167 enum {
168 Peg2_x4,
169 Peg2_x1,
170 Peg2_x2,
171 } Peg2MaxLinkWidth;
172
Rizwan Qureshi03937392017-09-16 01:54:20 +0530173 /*
174 * Enable/Disable Root Port
175 * 0: Disable Root Port
176 * 1: Enable Root Port
177 */
Felix Singer552da562023-06-19 23:44:36 +0200178 bool PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530179
180 /*
181 * Enable/Disable Clk-req support for Root Port
182 * 0: Disable Clk-Req
183 * 1: Enable Clk-req
184 */
Felix Singer552da562023-06-19 23:44:36 +0200185 bool PcieRpClkReqSupport[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530186
187 /*
188 * Clk-req source for Root Port
189 */
Rizwan Qureshid8bb69a2016-11-08 21:01:09 +0530190 u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530191
192 /*
Divya Chellape7fb7ce2017-12-19 20:16:50 +0530193 * Clk source number for Root Port
194 */
195 u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS];
196
197 /*
Rizwan Qureshi03937392017-09-16 01:54:20 +0530198 * Enable/Disable AER (Advanced Error Reporting) for Root Port
199 * 0: Disable AER
200 * 1: Enable AER
201 */
Felix Singer552da562023-06-19 23:44:36 +0200202 bool PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700203
Rizwan Qureshi03937392017-09-16 01:54:20 +0530204 /*
205 * Enable/Disable Latency Tolerance Reporting for Root Port
206 * 0: Disable LTR
207 * 1: Enable LTR
208 */
Felix Singer552da562023-06-19 23:44:36 +0200209 bool PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
Rizwan Qureshi03937392017-09-16 01:54:20 +0530210
Duncan Laurie74ea48e2018-01-29 12:00:47 -0800211 /* Enable/Disable HotPlug support for Root Port */
Felix Singer552da562023-06-19 23:44:36 +0200212 bool PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
Duncan Laurie74ea48e2018-01-29 12:00:47 -0800213
Wim Vervoornd6b682c2020-05-07 12:41:13 +0200214 /* PCIE RP Max Payload, Max Payload Size supported */
215 enum {
216 RpMaxPayload_128,
217 RpMaxPayload_256,
218 } PcieRpMaxPayload[CONFIG_MAX_ROOT_PORTS];
219
Wim Vervoorn5819eab2020-05-07 13:16:32 +0200220 /* PCIE RP ASPM, ASPM support for the root port */
221 enum {
222 AspmDefault,
223 AspmDisabled,
224 AspmL0s,
225 AspmL1,
226 AspmL0sL1,
227 AspmAutoConfig,
Benjamin Doronb53858b2020-10-12 04:19:42 +0000228 } pcie_rp_aspm[CONFIG_MAX_ROOT_PORTS];
Wim Vervoorn5819eab2020-05-07 13:16:32 +0200229
Benjamin Doronadcb8702020-03-14 01:53:25 +0000230 /* PCIe RP L1 substate */
231 enum {
232 L1SS_Default,
233 L1SS_Disabled,
234 L1SS_L1_1,
235 L1SS_L1_2,
236 } pcie_rp_l1substates[CONFIG_MAX_ROOT_PORTS];
237
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700238 /* USB related */
Duncan Lauriefe866662015-10-16 13:58:11 -0700239 struct usb2_port_config usb2_ports[16];
240 struct usb3_port_config usb3_ports[10];
Felix Singer552da562023-06-19 23:44:36 +0200241 bool SsicPortEnable;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700242
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700243 /*
244 * SerialIO device mode selection:
245 *
246 * Device index:
247 * PchSerialIoIndexI2C0
248 * PchSerialIoIndexI2C1
249 * PchSerialIoIndexI2C2
250 * PchSerialIoIndexI2C3
251 * PchSerialIoIndexI2C4
252 * PchSerialIoIndexI2C5
253 * PchSerialIoIndexI2C6
254 * PchSerialIoIndexSpi0
255 * PchSerialIoIndexSpi1
256 * PchSerialIoIndexUart0
257 * PchSerialIoIndexUart1
258 * PchSerialIoIndexUart2
259 *
260 * Mode select:
261 * PchSerialIoDisabled
262 * PchSerialIoAcpi
263 * PchSerialIoPci
264 * PchSerialIoAcpiHidden
265 * PchSerialIoLegacyUart
266 */
267 u8 SerialIoDevMode[PchSerialIoIndexMax];
268
Duncan Lauriec8d45ac2016-06-06 17:21:00 -0700269 /* I2C */
Aaron Durbined14a4e2016-11-09 17:04:15 -0600270 /* Bus voltage level, default is 3.3V */
Subrata Banikc4986eb2018-05-09 14:55:09 +0530271 enum skylake_i2c_voltage i2c_voltage[CONFIG_SOC_INTEL_I2C_DEV_MAX];
Furquan Shaikh05a6f292017-03-31 14:02:47 -0700272
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700273 /* eMMC and SD */
Felix Singer552da562023-06-19 23:44:36 +0200274 bool ScsEmmcHs400Enabled;
275 bool EmmcHs400DllNeed;
Pratik Prajapatie0722472018-08-22 18:58:38 -0700276 u8 ScsEmmcHs400RxStrobeDll1;
277 u8 ScsEmmcHs400TxDataDll;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700278
Maxim Polyakovde08ae12019-03-21 18:50:42 +0300279 enum {
280 Display_iGFX,
281 Display_PEG,
282 Display_PCH_PCIe,
283 Display_Auto,
284 Display_Switchable,
285 } PrimaryDisplay;
Felix Singer552da562023-06-19 23:44:36 +0200286 bool SkipExtGfxScan;
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700287
Subrata Banikd0def392015-07-22 12:19:28 +0530288 /* GPIO IRQ Route The valid values is 14 or 15*/
289 u8 GpioIrqSelect;
290 /* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23*/
291 u8 SciIrqSelect;
292 /* TCO IRQ Select The valid values is 9, 10, 11, 20 21, 22, 23*/
293 u8 TcoIrqSelect;
Felix Singer552da562023-06-19 23:44:36 +0200294 bool TcoIrqEnable;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530295 /* Enable SMI_LOCK bit to prevent writes to the Global SMI Enable bit.*/
Felix Singer552da562023-06-19 23:44:36 +0200296 bool LockDownConfigGlobalSmi;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530297 /*
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530298 * Enable RTC lower and upper 128 byte Lock bits to lock Bytes 38h-3Fh
Elyes HAOUAS59ab2032021-01-16 14:55:58 +0100299 * in the upper and lower 128-byte bank of RTC RAM.
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530300 */
Felix Singer552da562023-06-19 23:44:36 +0200301 bool LockDownConfigRtcLock;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530302
303 /*
304 * Determine if WLAN wake from Sx, corresponds to the
305 * HOST_WLAN_PP_EN bit in the PWRM_CFG3 register.
306 */
Felix Singer552da562023-06-19 23:44:36 +0200307 bool PchPmWoWlanEnable;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530308
309 /*
310 * Determine if WLAN wake from DeepSx, corresponds to
311 * the DSX_WLAN_PP_EN bit in the PWRM_CFG3 register.
312 */
Felix Singer552da562023-06-19 23:44:36 +0200313 bool PchPmWoWlanDeepSxEnable;
Naresh G Solankia2d40622016-08-30 20:47:13 +0530314
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530315 /*
316 * Corresponds to the "WOL Enable Override" bit in the General PM
317 * Configuration B (GEN_PMCON_B) register
318 */
Felix Singer552da562023-06-19 23:44:36 +0200319 bool WakeConfigWolEnableOverride;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530320 /* Determine if enable PCIe to wake from deep Sx*/
Felix Singer552da562023-06-19 23:44:36 +0200321 bool WakeConfigPcieWakeFromDeepSx;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530322 /* Deep Sx Policy. Values 0: PchDeepSxPolDisable,
323 * 1: PchDpS5BatteryEn, 2: PchDpS5AlwaysEn, 3: PchDpS4S5BatteryEn,
324 * 4: PchDpS4S5AlwaysEn, 5: PchDpS3S4S5BatteryEn, 6: PchDpS3S4S5AlwaysEn
325 */
326 u8 PmConfigDeepSxPol;
Nico Huber503965f2017-05-09 16:11:27 +0200327
328 enum {
329 SLP_S3_MIN_ASSERT_60US = 0,
330 SLP_S3_MIN_ASSERT_1MS = 1,
331 SLP_S3_MIN_ASSERT_50MS = 2,
332 SLP_S3_MIN_ASSERT_2S = 3,
333 } PmConfigSlpS3MinAssert;
334
335 enum {
336 SLP_S4_MIN_ASSERT_PCH = 0,
337 SLP_S4_MIN_ASSERT_1S = 1,
338 SLP_S4_MIN_ASSERT_2S = 2,
339 SLP_S4_MIN_ASSERT_3S = 3,
340 SLP_S4_MIN_ASSERT_4S = 4,
341 } PmConfigSlpS4MinAssert;
342
343 /* When deep Sx enabled: Must be greater than or equal to
344 all other minimum assertion widths. */
345 enum {
346 SLP_SUS_MIN_ASSERT_0MS = 0,
347 SLP_SUS_MIN_ASSERT_500MS = 1,
348 SLP_SUS_MIN_ASSERT_1S = 2,
349 SLP_SUS_MIN_ASSERT_4S = 3,
350 } PmConfigSlpSusMinAssert;
351
352 enum {
353 SLP_A_MIN_ASSERT_0MS = 0,
354 SLP_A_MIN_ASSERT_4S = 1,
355 SLP_A_MIN_ASSERT_98MS = 2,
356 SLP_A_MIN_ASSERT_2S = 3,
357 } PmConfigSlpAMinAssert;
358
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530359 /*
Lee Leahyb439a922017-03-16 16:44:36 -0700360 * SLP_X Stretching After SUS Well Power Up. Values 0: Disabled,
361 * 1: Enabled
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530362 */
Felix Singer552da562023-06-19 23:44:36 +0200363 bool PmConfigSlpStrchSusUp;
Rizwan Qureshie64f7942015-11-19 16:01:54 +0530364 /*
365 * PCH power button override period.
366 * Values: 0x0 - 4s, 0x1 - 6s, 0x2 - 8s, 0x3 - 10s, 0x4 - 12s, 0x5 - 14s
367 */
368 u8 PmConfigPwrBtnOverridePeriod;
Rizwan Qureshi0da186c2017-02-23 14:43:39 +0530369
370 /*
371 * PCH Pm Slp S0 Voltage Margining Enable
372 * Indicates platform supports VCCPrim_Core Voltage Margining
373 * in SLP_S0# asserted state.
374 */
Felix Singer552da562023-06-19 23:44:36 +0200375 bool PchPmSlpS0VmEnable;
Rizwan Qureshi0da186c2017-02-23 14:43:39 +0530376
Nico Huber503965f2017-05-09 16:11:27 +0200377 enum {
378 RESET_POWER_CYCLE_DEFAULT = 0,
379 RESET_POWER_CYCLE_1S = 1,
380 RESET_POWER_CYCLE_2S = 2,
381 RESET_POWER_CYCLE_3S = 3,
382 RESET_POWER_CYCLE_4S = 4,
383 } PmConfigPwrCycDur;
384
Nico Huber44e89af2019-02-23 19:24:51 +0100385 enum serirq_mode serirq_mode;
Nico Huber503965f2017-05-09 16:11:27 +0200386
387 enum {
388 SERIAL_IRQ_FRAME_PULSE_4CLK = 0,
389 SERIAL_IRQ_FRAME_PULSE_6CLK = 1,
390 SERIAL_IRQ_FRAME_PULSE_8CLK = 2,
391 } SerialIrqConfigStartFramePulse;
392
Subrata Banikce23d4c2018-06-04 10:05:07 +0530393 /*
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530394 * VrConfig Settings for 5 domains
Rizwan Qureshi2b1e8b32015-11-20 11:46:54 +0530395 * 0 = System Agent, 1 = IA Core, 2 = Ring,
396 * 3 = GT unsliced, 4 = GT sliced
397 */
398 struct vr_config domain_vr_config[NUM_VR_DOMAINS];
Michael Niewöhnera64b4f42020-10-15 00:36:29 +0200399
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530400 /*
401 * Enable VR specific mailbox command
Subrata Banik9a8b67d2016-04-20 14:19:53 +0530402 * 000b - Don't Send any VR command
403 * 001b - VR command specifically for the MPS IMPV8 VR will be sent
404 * 010b - VR specific command sent for PS4 exit issue
405 * 011b - VR specific command sent for both MPS IMPV8 & PS4 exit issue
Rizwan Qureshiaf31a992016-02-24 14:31:40 +0530406 */
407 u8 SendVrMbxCmd;
Barnali Sarkar5bf42c62016-08-24 20:48:46 +0530408
Rizwan Qureshiffe58102017-02-10 15:58:24 +0530409 /* Enable/Disable host reads to PMC XRAM registers */
Felix Singer552da562023-06-19 23:44:36 +0200410 bool PchPmPmcReadDisable;
Rizwan Qureshiffe58102017-02-10 15:58:24 +0530411
Duncan Laurieb25a45c2016-05-10 15:56:16 -0700412 /*
413 * Use SD card detect GPIO with default config:
414 * - Edge triggered
415 * - No internal pull
416 * - Active both (high + low)
417 * - Can wake device from D3
418 * - 100ms debounce timeout
419 *
420 * GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
421 * "\\_SB.PCI0.GPIO", 0, ResourceConsumer)
Angel Pons6bd99f92021-02-20 00:16:47 +0100422 * { sdcard_cd_gpio }
Duncan Laurieb25a45c2016-05-10 15:56:16 -0700423 */
Angel Pons6bd99f92021-02-20 00:16:47 +0100424 unsigned int sdcard_cd_gpio;
Furquan Shaikh3bfe3402016-10-18 14:25:25 -0700425
426 /* Wake Enable Bitmap for USB2 ports */
427 u16 usb2_wake_enable_bitmap;
428
429 /* Wake Enable Bitmap for USB3 ports */
430 u8 usb3_wake_enable_bitmap;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800431
432 /*
433 * Acoustic Noise Mitigation
434 * 0b - Disable
435 * 1b - Enable noise mitigation
436 */
Felix Singer552da562023-06-19 23:44:36 +0200437 bool AcousticNoiseMitigation;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800438
439 /*
440 * Disable Fast Package C-state ramping
441 * Need to set AcousticNoiseMitigation = '1' first
442 * 0b - Enabled
443 * 1b - Disabled
444 */
Felix Singer552da562023-06-19 23:44:36 +0200445 bool FastPkgCRampDisableIa;
446 bool FastPkgCRampDisableGt;
447 bool FastPkgCRampDisableSa;
Duncan Laurieb2aac852017-03-07 19:12:02 -0800448
449 /*
450 * Adjust the VR slew rates
451 * Need to set AcousticNoiseMitigation = '1' first
452 * 000b - Fast/2
453 * 001b - Fast/4
454 * 010b - Fast/8
455 * 011b - Fast/16
456 */
457 u8 SlowSlewRateForIa;
458 u8 SlowSlewRateForGt;
459 u8 SlowSlewRateForSa;
Robbie Zhang7de03172017-02-21 14:00:31 -0800460
Subrata Banik6b45ee42017-05-12 11:43:57 +0530461 /* Enable/Disable EIST
462 * 1b - Enabled
463 * 0b - Disabled
464 */
Felix Singer552da562023-06-19 23:44:36 +0200465 bool eist_enable;
Rizwan Qureshib3e18c72017-09-25 17:35:15 +0530466
467 /*
468 * Activates VR mailbox command for Intersil VR C-state issues.
469 * 0 - no mailbox command sent.
470 * 1 - VR mailbox command sent for IA/GT rails only.
471 * 2 - VR mailbox command sent for IA/GT/SA rails.
472 */
473 u8 IslVrCmd;
Subrata Banik771d6112017-11-29 16:17:13 +0530474
Matt DeVillierddb4cf02020-03-27 14:13:07 -0500475 /* i915 struct for GMA backlight control */
476 struct i915_gpu_controller_info gfx;
Lee Leahyb0005132015-05-12 18:19:47 -0700477};
478
Lee Leahy1d14b3e2015-05-12 18:23:27 -0700479typedef struct soc_intel_skylake_config config_t;
Lee Leahyb0005132015-05-12 18:19:47 -0700480
Lee Leahyb0005132015-05-12 18:19:47 -0700481#endif