blob: 746cfa22257ca09156299d9ccd3cb4453cdd925c [file] [log] [blame]
Angel Pons16f6aa82020-04-05 15:47:21 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Subrata Banik91e89c52019-11-01 18:30:01 +05302
3#ifndef _SOC_CHIP_H_
4#define _SOC_CHIP_H_
5
Subrata Banik91e89c52019-11-01 18:30:01 +05306#include <drivers/i2c/designware/dw_i2c.h>
Tim Crawford1724b572021-09-21 21:50:49 -06007#include <drivers/intel/gma/gma.h>
Ronak Kanabar1c2313d2019-12-16 18:43:52 +05308#include <intelblocks/cfg.h>
Subrata Banik91e89c52019-11-01 18:30:01 +05309#include <intelblocks/gpio.h>
10#include <intelblocks/gspi.h>
Sean Rhodesf71d8c92021-08-25 12:30:55 +010011#include <intelblocks/lpc_lib.h>
Eric Laide2ab412021-01-11 16:14:14 +080012#include <intelblocks/pcie_rp.h>
Sumeet R Pawnikard2132462020-05-15 15:55:37 +053013#include <intelblocks/power_limit.h>
Tim Wawrzynczak59a621a2021-03-22 10:43:42 -060014#include <intelblocks/tcss.h>
Subrata Banik91e89c52019-11-01 18:30:01 +053015#include <soc/gpe.h>
Michael Niewöhner8913b782020-12-11 22:13:44 +010016#include <soc/gpio.h>
Ronak Kanabar1c2313d2019-12-16 18:43:52 +053017#include <soc/pch.h>
Subrata Banik91e89c52019-11-01 18:30:01 +053018#include <soc/pci_devs.h>
19#include <soc/pmc.h>
20#include <soc/serialio.h>
21#include <soc/usb.h>
Elyes HAOUAS23a60fa2020-07-22 11:44:29 +020022#include <types.h>
Subrata Banik91e89c52019-11-01 18:30:01 +053023
Srinidhi N Kaushik2f2c7eb2020-01-02 16:11:27 -080024#define MAX_HD_AUDIO_DMIC_LINKS 2
25#define MAX_HD_AUDIO_SNDW_LINKS 4
26#define MAX_HD_AUDIO_SSP_LINKS 6
27
Tim Wawrzynczak2dcca0f2020-06-16 10:50:47 -060028/* The first two are for TGL-U */
Jeremy Soller301b09b2021-08-12 10:49:58 -060029enum soc_intel_tigerlake_power_limits {
30 POWER_LIMITS_U_2_CORE,
31 POWER_LIMITS_U_4_CORE,
32 POWER_LIMITS_Y_2_CORE,
33 POWER_LIMITS_Y_4_CORE,
34 POWER_LIMITS_H_6_CORE,
35 POWER_LIMITS_H_8_CORE,
36 POWER_LIMITS_MAX
37};
Tim Wawrzynczak2dcca0f2020-06-16 10:50:47 -060038
Venkata Krishna Nimmagaddae18f7192020-05-15 00:13:40 -070039/*
40 * Enable External V1P05 Rail in: BIT0:S0i1/S0i2,
41 * BIT1:S0i3, BIT2:S3, BIT3:S4, BIT4:S5
42 */
43enum fivr_enable_states {
44 FIVR_ENABLE_S0i1_S0i2 = BIT(0),
45 FIVR_ENABLE_S0i3 = BIT(1),
46 FIVR_ENABLE_S3 = BIT(2),
47 FIVR_ENABLE_S4 = BIT(3),
48 FIVR_ENABLE_S5 = BIT(4),
49};
50
51/*
52 * Enable the following for External V1p05 rail
53 * BIT1: Normal Active voltage supported
54 * BIT2: Minimum active voltage supported
55 * BIT3: Minimum Retention voltage supported
56 */
57enum fivr_voltage_supported {
58 FIVR_VOLTAGE_NORMAL = BIT(1),
59 FIVR_VOLTAGE_MIN_ACTIVE = BIT(2),
60 FIVR_VOLTAGE_MIN_RETENTION = BIT(3),
61};
62
63#define FIVR_ENABLE_ALL_SX (FIVR_ENABLE_S0i1_S0i2 | FIVR_ENABLE_S0i3 | \
64 FIVR_ENABLE_S3 | FIVR_ENABLE_S4 | FIVR_ENABLE_S5)
65
Jes Klinke6fd87ff2020-08-10 13:30:40 -070066/* Bit values for use in LpmStateEnableMask. */
67enum lpm_state_mask {
68 LPM_S0i2_0 = BIT(0),
69 LPM_S0i2_1 = BIT(1),
70 LPM_S0i2_2 = BIT(2),
71 LPM_S0i3_0 = BIT(3),
72 LPM_S0i3_1 = BIT(4),
73 LPM_S0i3_2 = BIT(5),
74 LPM_S0i3_3 = BIT(6),
75 LPM_S0i3_4 = BIT(7),
76 LPM_S0iX_ALL = LPM_S0i2_0 | LPM_S0i2_1 | LPM_S0i2_2
77 | LPM_S0i3_0 | LPM_S0i3_1 | LPM_S0i3_2 | LPM_S0i3_3 | LPM_S0i3_4,
78};
79
Shaunak Saha0d0f43f2020-09-02 15:37:00 -070080/*
Shaunak Saha0d0f43f2020-09-02 15:37:00 -070081 * Slew Rate configuration for Deep Package C States for VR domain.
82 * They are fast time divided by 2.
83 * 0 - Fast/2
84 * 1 - Fast/4
85 * 2 - Fast/8
86 * 3 - Fast/16
87 */
88enum slew_rate {
89 SLEW_FAST_2,
90 SLEW_FAST_4,
91 SLEW_FAST_8,
92 SLEW_FAST_16
93};
94
Angel Ponsda4e1d72022-05-04 17:08:11 +020095enum ddi_port_config {
96 DDI_PORT_CFG_NO_LFP = 0,
97 DDI_PORT_CFG_EDP = 1,
98 DDI_PORT_CFG_MIPI_DSI = 2,
99};
100
Subrata Banik91e89c52019-11-01 18:30:01 +0530101struct soc_intel_tigerlake_config {
102
103 /* Common struct containing soc config data required by common code */
104 struct soc_intel_common_config common_soc_config;
105
Sumeet R Pawnikard2132462020-05-15 15:55:37 +0530106 /* Common struct containing power limits configuration information */
Tim Wawrzynczak2dcca0f2020-06-16 10:50:47 -0600107 struct soc_power_limits_config power_limits_config[POWER_LIMITS_MAX];
Sumeet R Pawnikard2132462020-05-15 15:55:37 +0530108
Derek Huanged6bda22021-01-27 17:01:00 +0800109 /* Configuration for boot TDP selection; */
110 uint8_t ConfigTdpLevel;
111
Subrata Banik91e89c52019-11-01 18:30:01 +0530112 /* Gpio group routed to each dword of the GPE0 block. Values are
Ravi Sarawadi2fd49722019-12-16 23:41:36 -0800113 * of the form PMC_GPP_[A:U] or GPD. */
114 uint8_t pmc_gpe0_dw0; /* GPE0_31_0 STS/EN */
115 uint8_t pmc_gpe0_dw1; /* GPE0_63_32 STS/EN */
116 uint8_t pmc_gpe0_dw2; /* GPE0_95_64 STS/EN */
Subrata Banik91e89c52019-11-01 18:30:01 +0530117
Sean Rhodesf71d8c92021-08-25 12:30:55 +0100118 /* LPC fixed enables and ranges */
119 uint32_t lpc_ioe;
120
Subrata Banik91e89c52019-11-01 18:30:01 +0530121 /* Generic IO decode ranges */
122 uint32_t gen1_dec;
123 uint32_t gen2_dec;
124 uint32_t gen3_dec;
125 uint32_t gen4_dec;
126
127 /* Enable S0iX support */
128 int s0ix_enable;
Jes Klinke6fd87ff2020-08-10 13:30:40 -0700129 /* S0iX: Selectively disable individual sub-states, by default all are enabled. */
130 enum lpm_state_mask LpmStateDisableMask;
131
John Zhao8aac8812020-05-16 13:06:25 -0700132 /* Support for TCSS xhci, xdci, TBT PCIe root ports and DMA controllers */
John Zhaobd615d62020-07-27 13:22:11 -0700133 uint8_t TcssD3HotDisable;
John Zhao8aac8812020-05-16 13:06:25 -0700134 /* Support for TBT PCIe root ports and DMA controllers with D3Hot->D3Cold */
John Zhaobd615d62020-07-27 13:22:11 -0700135 uint8_t TcssD3ColdDisable;
John Zhao8aac8812020-05-16 13:06:25 -0700136
Subrata Banik91e89c52019-11-01 18:30:01 +0530137 /* Enable DPTF support */
138 int dptf_enable;
139
140 /* Deep SX enable for both AC and DC */
141 int deep_s3_enable_ac;
142 int deep_s3_enable_dc;
143 int deep_s5_enable_ac;
144 int deep_s5_enable_dc;
145
146 /* Deep Sx Configuration
147 * DSX_EN_WAKE_PIN - Enable WAKE# pin
148 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
149 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
150 uint32_t deep_sx_config;
151
152 /* TCC activation offset */
153 uint32_t tcc_offset;
154
Subrata Banik91e89c52019-11-01 18:30:01 +0530155 /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs.
156 * When enabled memory will be training at two different frequencies.
Ravi Sarawadi2fd49722019-12-16 23:41:36 -0800157 * 0:Disabled, 1:FixedPoint0, 2:FixedPoint1, 3:FixedPoint2,
158 * 4:FixedPoint3, 5:Enabled */
Subrata Banik91e89c52019-11-01 18:30:01 +0530159 enum {
160 SaGv_Disabled,
Ravi Sarawadi2fd49722019-12-16 23:41:36 -0800161 SaGv_FixedPoint0,
162 SaGv_FixedPoint1,
163 SaGv_FixedPoint2,
164 SaGv_FixedPoint3,
Subrata Banik91e89c52019-11-01 18:30:01 +0530165 SaGv_Enabled,
166 } SaGv;
167
Subrata Banik91e89c52019-11-01 18:30:01 +0530168 /* Rank Margin Tool. 1:Enable, 0:Disable */
169 uint8_t RMT;
170
David Wu63ce2602020-06-11 14:46:24 +0800171 /* Command Pins Mirrored */
172 uint32_t CmdMirror;
173
Subrata Banik91e89c52019-11-01 18:30:01 +0530174 /* USB related */
175 struct usb2_port_config usb2_ports[16];
176 struct usb3_port_config usb3_ports[10];
Subrata Banik91e89c52019-11-01 18:30:01 +0530177 /* Wake Enable Bitmap for USB2 ports */
178 uint16_t usb2_wake_enable_bitmap;
179 /* Wake Enable Bitmap for USB3 ports */
180 uint16_t usb3_wake_enable_bitmap;
Derek Huang80561872021-03-15 12:11:19 +0800181 /* PCH USB2 PHY Power Gating disable */
182 uint8_t usb2_phy_sus_pg_disable;
Nick Vaccaro4b3e06e2021-05-11 16:39:32 -0700183 /* Program OC pins for TCSS */
184 struct tcss_port_config tcss_ports[MAX_TYPE_C_PORTS];
Subrata Banik91e89c52019-11-01 18:30:01 +0530185
Shaunak Saha0d0f43f2020-09-02 15:37:00 -0700186 /*
187 * Acoustic Noise Mitigation
188 * 0 - Disable
189 * 1 - Enable noise mitigation
190 */
191 uint8_t AcousticNoiseMitigation;
192
193 /*
194 * Offset 0x054B - Disable Fast Slew Rate for Deep Package
Shaunak Saha82d51232021-02-17 23:26:43 -0800195 * C States for VCCin in VR domain. Disable Fast Slew Rate
196 * for Deep Package C States based on Acoustic Noise
197 * Mitigation feature enabled.
Shaunak Saha0d0f43f2020-09-02 15:37:00 -0700198 * 0 - False
199 * 1 - True
200 */
Shaunak Saha82d51232021-02-17 23:26:43 -0800201 uint8_t FastPkgCRampDisable;
Shaunak Saha0d0f43f2020-09-02 15:37:00 -0700202
203 /*
204 * Offset 0x0550 - Slew Rate configuration for Deep Package
Shaunak Saha82d51232021-02-17 23:26:43 -0800205 * C States for VCCin in VR domain. Slew Rate configuration
206 * for Deep Package C States for VR domain based on Acoustic
207 * Noise Mitigation feature enabled.
Shaunak Saha0d0f43f2020-09-02 15:37:00 -0700208 */
Shaunak Saha82d51232021-02-17 23:26:43 -0800209 uint8_t SlowSlewRate;
Shaunak Saha0d0f43f2020-09-02 15:37:00 -0700210
Subrata Banik91e89c52019-11-01 18:30:01 +0530211 /* SATA related */
Subrata Banik91e89c52019-11-01 18:30:01 +0530212 uint8_t SataMode;
213 uint8_t SataSalpSupport;
214 uint8_t SataPortsEnable[8];
215 uint8_t SataPortsDevSlp[8];
216
Shaunak Saha1a8949c2020-06-08 18:59:47 -0700217 /*
218 * Enable(0)/Disable(1) SATA Power Optimizer on PCH side.
219 * Default 0. Setting this to 1 disables the SATA Power Optimizer.
220 */
221 uint8_t SataPwrOptimizeDisable;
222
223 /*
224 * SATA Port Enable Dito Config.
225 * Enable DEVSLP Idle Timeout settings (DmVal, DitoVal).
226 */
227 uint8_t SataPortsEnableDitoConfig[8];
228
229 /* SataPortsDmVal is the DITO multiplier. Default is 15. */
230 uint8_t SataPortsDmVal[8];
231 /* SataPortsDitoVal is the DEVSLP Idle Timeout, default is 625ms */
232 uint16_t SataPortsDitoVal[8];
233
Subrata Banik91e89c52019-11-01 18:30:01 +0530234 /* Audio related */
Subrata Banik91e89c52019-11-01 18:30:01 +0530235 uint8_t PchHdaDspEnable;
Srinidhi N Kaushik2f2c7eb2020-01-02 16:11:27 -0800236 uint8_t PchHdaAudioLinkHdaEnable;
237 uint8_t PchHdaAudioLinkDmicEnable[MAX_HD_AUDIO_DMIC_LINKS];
238 uint8_t PchHdaAudioLinkSspEnable[MAX_HD_AUDIO_SSP_LINKS];
239 uint8_t PchHdaAudioLinkSndwEnable[MAX_HD_AUDIO_SNDW_LINKS];
Eric Lai54b706e2020-05-14 13:58:01 +0800240 uint8_t PchHdaIDispCodecDisconnect;
Subrata Banik91e89c52019-11-01 18:30:01 +0530241
242 /* PCIe Root Ports */
243 uint8_t PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
Wonkyu Kimc66c1532020-05-27 13:34:04 -0700244 uint8_t PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
Michael Niewöhner45b60802022-01-08 20:47:11 +0100245 /* Implemented as slot or built-in? */
246 uint8_t PcieRpSlotImplemented[CONFIG_MAX_ROOT_PORTS];
Elyes HAOUAS79ccc692020-02-24 13:43:39 +0100247 /* PCIe output clocks type to PCIe devices.
Subrata Banik91e89c52019-11-01 18:30:01 +0530248 * 0-23: PCH rootport, 0x70: LAN, 0x80: unspecified but in use,
249 * 0xFF: not used */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530250 uint8_t PcieClkSrcUsage[CONFIG_MAX_PCIE_CLOCK_SRC];
Subrata Banik91e89c52019-11-01 18:30:01 +0530251 /* PCIe ClkReq-to-ClkSrc mapping, number of clkreq signal assigned to
252 * clksrc. */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530253 uint8_t PcieClkSrcClkReq[CONFIG_MAX_PCIE_CLOCK_SRC];
Subrata Banik91e89c52019-11-01 18:30:01 +0530254
Meera Ravindranath0d6cc222020-04-29 12:19:33 +0530255 /* Probe CLKREQ# signal before enabling CLKREQ# based power management.*/
256 uint8_t PcieRpClkReqDetect[CONFIG_MAX_ROOT_PORTS];
257
Duncan Laurie17e905ac2020-10-27 17:57:13 -0700258 /* Enable PCIe Precision Time Measurement for Root Ports (disabled by default) */
259 uint8_t PciePtm[CONFIG_MAX_ROOT_PORTS];
260
Wonkyu Kim84b48822020-03-09 13:34:38 -0700261 /* PCIe RP L1 substate */
Eric Laide2ab412021-01-11 16:14:14 +0800262 enum L1_substates_control PcieRpL1Substates[CONFIG_MAX_ROOT_PORTS];
Wonkyu Kim84b48822020-03-09 13:34:38 -0700263
Wonkyu Kim59431172020-04-07 20:45:28 -0700264 /* PCIe LTR: Enable (1) / Disable (0) */
265 uint8_t PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
266
267 /* PCIE RP Advanced Error Report: Enable (1) / Disable (0) */
268 uint8_t PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
269
Subrata Banik91e89c52019-11-01 18:30:01 +0530270 /* Gfx related */
Subrata Banik91e89c52019-11-01 18:30:01 +0530271 uint8_t SkipExtGfxScan;
272
Subrata Banik91e89c52019-11-01 18:30:01 +0530273 /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */
274 uint8_t eist_enable;
275
276 /* Enable C6 DRAM */
277 uint8_t enable_c6dram;
Michael Niewöhnerd2fadda2021-09-27 19:26:20 +0200278
Subrata Banik91e89c52019-11-01 18:30:01 +0530279 /*
280 * SerialIO device mode selection:
281 * PchSerialIoDisabled,
282 * PchSerialIoPci,
283 * PchSerialIoHidden,
284 * PchSerialIoLegacyUart,
285 * PchSerialIoSkipInit
286 */
287 uint8_t SerialIoI2cMode[CONFIG_SOC_INTEL_I2C_DEV_MAX];
288 uint8_t SerialIoGSpiMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
289 uint8_t SerialIoUartMode[CONFIG_SOC_INTEL_UART_DEV_MAX];
290 /*
291 * GSPIn Default Chip Select Mode:
292 * 0:Hardware Mode,
293 * 1:Software Mode
294 */
295 uint8_t SerialIoGSpiCsMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
296 /*
297 * GSPIn Default Chip Select State:
298 * 0: Low,
299 * 1: High
300 */
301 uint8_t SerialIoGSpiCsState[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
302
Ronak Kanabar35d78432020-03-04 19:03:47 +0530303 /*
304 * TraceHubMode config
305 * 0: Disable, 1: Target Debugger Mode, 2: Host Debugger Mode
306 */
307 uint8_t TraceHubMode;
308
Maulik V Vagheladba6c4c2020-01-17 18:56:58 +0530309 /* Debug interface selection */
310 enum {
311 DEBUG_INTERFACE_RAM = (1 << 0),
Subrata Banik7be0df82020-04-30 12:23:16 +0530312 DEBUG_INTERFACE_UART_8250IO = (1 << 1),
Maulik V Vagheladba6c4c2020-01-17 18:56:58 +0530313 DEBUG_INTERFACE_USB3 = (1 << 3),
Subrata Banik7be0df82020-04-30 12:23:16 +0530314 DEBUG_INTERFACE_LPSS_SERIAL_IO = (1 << 4),
Maulik V Vagheladba6c4c2020-01-17 18:56:58 +0530315 DEBUG_INTERFACE_TRACEHUB = (1 << 5),
316 } debug_interface_flag;
317
Cliff Huangb34be4d2021-02-04 15:37:24 -0800318 /* CNVi BT Core Enable/Disable */
319 bool CnviBtCore;
320
Subrata Banik91e89c52019-11-01 18:30:01 +0530321 /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */
Angel Pons98521c52021-03-01 21:16:49 +0100322 bool CnviBtAudioOffload;
Subrata Banik91e89c52019-11-01 18:30:01 +0530323
John Zhao8aac8812020-05-16 13:06:25 -0700324 /* TCSS USB */
Wonkyu Kim1ab6f0c2020-01-28 22:06:37 -0800325 uint8_t TcssXhciEn;
326 uint8_t TcssXdciEn;
327
Subrata Banik91e89c52019-11-01 18:30:01 +0530328 /*
Brandon Breitensteinbf50c312020-12-21 14:55:38 -0800329 * Specifies which Type-C Ports are enabled on the system
330 * each bit represents a port starting at 0
331 * Example: set value to 0x3 for ports 0 and 1 to be enabled
332 */
333 uint8_t UsbTcPortEn;
334
335 /*
Tim Wawrzynczak59a621a2021-03-22 10:43:42 -0600336 * These GPIOs will be programmed by the IOM to handle biasing of the
337 * Type-C aux (SBU) signals when certain alternate modes are used.
338 * `pad_auxn_dc` should be assigned to the GPIO pad providing negative
339 * bias (name usually contains `AUXN_DC` or `AUX_N`); similarly,
340 * `pad_auxp_dc` should be assigned to the GPIO providing positive bias
341 * (name often contains `AUXP_DC` or `_AUX_P`).
Brandon Breitenstein71d365d2020-04-06 15:31:34 -0700342 */
Tim Wawrzynczak59a621a2021-03-22 10:43:42 -0600343 struct typec_aux_bias_pads typec_aux_bias_pads[MAX_TYPE_C_PORTS];
Brandon Breitenstein71d365d2020-04-06 15:31:34 -0700344
345 /*
Brandon Breitensteinfc932372020-03-11 14:07:23 -0700346 * SOC Aux orientation override:
347 * This is a bitfield that corresponds to up to 4 TCSS ports on TGL.
348 * Even numbered bits (0, 2, 4, 6) control the retimer being handled by SOC.
349 * Odd numbered bits (1, 3, 5, 7) control the orientation of the physical aux lines
350 * on the motherboard.
351 */
352 uint16_t TcssAuxOri;
353
John Zhao92a3a302020-06-03 13:06:24 -0700354 /* Connect Topology Command timeout value */
355 uint16_t ITbtConnectTopologyTimeoutInMs;
356
Brandon Breitensteinfc932372020-03-11 14:07:23 -0700357 /*
Subrata Banik91e89c52019-11-01 18:30:01 +0530358 * Override GPIO PM configuration:
359 * 0: Use FSP default GPIO PM program,
360 * 1: coreboot to override GPIO PM program
361 */
362 uint8_t gpio_override_pm;
363
364 /*
365 * GPIO PM configuration: 0 to disable, 1 to enable power gating
366 * Bit 6-7: Reserved
367 * Bit 5: MISCCFG_GPSIDEDPCGEN
368 * Bit 4: MISCCFG_GPRCOMPCDLCGEN
369 * Bit 3: MISCCFG_GPRTCDLCGEN
370 * Bit 2: MISCCFG_GSXLCGEN
371 * Bit 1: MISCCFG_GPDPCGEN
372 * Bit 0: MISCCFG_GPDLCGEN
373 */
374 uint8_t gpio_pm[TOTAL_GPIO_COMM];
Wonkyu Kim9f2e3ad2020-01-23 00:06:07 -0800375
Angel Ponsda4e1d72022-05-04 17:08:11 +0200376 /* DDI port config */
377 enum ddi_port_config DdiPortAConfig;
378 enum ddi_port_config DdiPortBConfig;
Wonkyu Kim9f2e3ad2020-01-23 00:06:07 -0800379
380 /* Enable(1)/Disable(0) HPD */
381 uint8_t DdiPortAHpd;
382 uint8_t DdiPortBHpd;
383 uint8_t DdiPortCHpd;
384 uint8_t DdiPort1Hpd;
385 uint8_t DdiPort2Hpd;
386 uint8_t DdiPort3Hpd;
387 uint8_t DdiPort4Hpd;
388
389 /* Enable(1)/Disable(0) DDC */
390 uint8_t DdiPortADdc;
391 uint8_t DdiPortBDdc;
392 uint8_t DdiPortCDdc;
393 uint8_t DdiPort1Ddc;
394 uint8_t DdiPort2Ddc;
395 uint8_t DdiPort3Ddc;
396 uint8_t DdiPort4Ddc;
Wonkyu Kim2b4ded02020-03-03 01:43:45 -0800397
398 /* Hybrid storage mode enable (1) / disable (0)
399 * This mode makes FSP detect Optane and NVME and set PCIe lane mode
400 * accordingly */
401 uint8_t HybridStorageMode;
Srinidhi N Kaushik4b9fa2d2020-03-13 00:54:30 -0700402
403 /*
404 * Override CPU flex ratio value:
405 * CPU ratio value controls the maximum processor non-turbo ratio.
406 * Valid Range 0 to 63.
407 * In general descriptor provides option to set default cpu flex ratio.
408 * Default cpu flex ratio 0 ensures booting with non-turbo max frequency.
409 * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0.
410 * Only override CPU flex ratio to not boot with non-turbo max.
411 */
412 uint8_t cpu_ratio_override;
413
Wonkyu Kim3180af72020-03-19 15:30:06 -0700414 /* HyperThreadingDisable : Yes (1) / No (0) */
415 uint8_t HyperThreadingDisable;
Shaunak Saha32b8a512020-03-31 22:56:13 -0700416
417 /*
418 * Enable(0)/Disable(1) DMI Power Optimizer on PCH side.
419 * Default 0. Setting this to 1 disables the DMI Power Optimizer.
420 */
421 uint8_t DmiPwrOptimizeDisable;
422
Venkata Krishna Nimmagaddae18f7192020-05-15 00:13:40 -0700423 /* structure containing various settings for PCH FIVRs */
424 struct {
425 bool configure_ext_fivr;
426 enum fivr_enable_states v1p05_enable_bitmap;
427 enum fivr_enable_states vnn_enable_bitmap;
428 enum fivr_voltage_supported v1p05_supported_voltage_bitmap;
429 enum fivr_voltage_supported vnn_supported_voltage_bitmap;
430 /* External Icc Max for V1p05 rail in mA */
431 int v1p05_icc_max_ma;
432 /* External Vnn Voltage in mV */
433 int vnn_sx_voltage_mv;
434 } ext_fivr_settings;
Jamie Ryuf8668e92020-06-24 14:45:13 -0700435
436 /*
437 * Enable(1)/Disable(0) CPU Replacement check.
438 * Default 0. Setting this to 1 to check CPU replacement.
439 */
440 uint8_t CpuReplacementCheck;
Jamie Ryu5b7daa22020-08-18 18:54:49 -0700441
442 /*
443 * SLP_S3 Minimum Assertion Width Policy
444 * 1 = 60us
445 * 2 = 1ms
446 * 3 = 50ms (default)
447 * 4 = 2s
448 */
449 uint8_t PchPmSlpS3MinAssert;
450
451 /*
452 * SLP_S4 Minimum Assertion Width Policy
453 * 1 = 1s (default)
454 * 2 = 2s
455 * 3 = 3s
456 * 4 = 4s
457 */
458 uint8_t PchPmSlpS4MinAssert;
459
460 /*
461 * SLP_SUS Minimum Assertion Width Policy
462 * 1 = 0ms
463 * 2 = 500ms
464 * 3 = 1s
465 * 4 = 4s (default)
466 */
467 uint8_t PchPmSlpSusMinAssert;
468
469 /*
470 * SLP_A Minimum Assertion Width Policy
471 * 1 = 0ms
472 * 2 = 4s
473 * 3 = 98ms
474 * 4 = 2s (default)
475 */
476 uint8_t PchPmSlpAMinAssert;
477
478 /*
479 * PCH PM Reset Power Cycle Duration
480 * 0 = 4s (default)
481 * 1 = 1s
482 * 2 = 2s
483 * 3 = 3s
484 * 4 = 4s
485 *
486 * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the
487 * stretch duration programmed in the following registers:
488 * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert)
489 * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert)
490 * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert)
491 * - PM_CFG.SLP_LAN_MIN_ASST_WDTH
492 */
493 uint8_t PchPmPwrCycDur;
Shreesh Chhabbifbad99f2021-01-20 09:07:25 -0800494
495 /*
496 * External Clock Gate
497 * true = Mainboard design uses external clock gating
498 * false = Mainboard design does not use external clock gating
499 *
500 */
501 bool external_clk_gated;
502
503 /*
504 * External PHY Gate
505 * true = Mainboard design uses external phy gating
506 * false = Mainboard design does not use external phy gating
507 *
508 */
509 bool external_phy_gated;
510
511 /*
512 * External Bypass Enable
513 * true = Mainboard design uses external bypass rail
514 * false = Mainboard design does not use external bypass rail
515 *
516 */
517 bool external_bypass;
Tim Crawford1724b572021-09-21 21:50:49 -0600518
519 /* i915 struct for GMA backlight control */
520 struct i915_gpu_controller_info gfx;
Subrata Banik91e89c52019-11-01 18:30:01 +0530521};
522
523typedef struct soc_intel_tigerlake_config config_t;
524
525#endif