blob: 66ad223167667070ac5b190a2a738e60b113c4c1 [file] [log] [blame]
Angel Ponsfabfe9d2020-04-05 15:47:07 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aamir Bohradd7acaa2020-03-25 11:36:22 +05302
3#ifndef _SOC_CHIP_H_
4#define _SOC_CHIP_H_
5
Chia-Ling Houb5a03282023-06-07 16:53:00 +08006#include <device/pci_ids.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +05307#include <drivers/i2c/designware/dw_i2c.h>
Dinesh Gehlot4da88302023-01-17 05:46:33 +00008#include <gpio.h>
Matt DeVilliere30d2042023-01-23 10:23:55 -06009#include <drivers/intel/gma/gma.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053010#include <intelblocks/cfg.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053011#include <intelblocks/gspi.h>
Eric Laide2ab412021-01-11 16:14:14 +080012#include <intelblocks/pcie_rp.h>
Sumeet R Pawnikare8d1bef2020-05-08 21:31:44 +053013#include <intelblocks/power_limit.h>
Reka Normand2f6b3f2023-09-22 15:26:58 +100014#include <intelblocks/xhci.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053015#include <soc/gpe.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053016#include <soc/pch.h>
17#include <soc/pci_devs.h>
Jamie Chen1ebcb2a2021-07-20 18:33:57 +080018#include <soc/pcie_modphy.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053019#include <soc/pmc.h>
20#include <soc/serialio.h>
21#include <soc/usb.h>
22#include <stdint.h>
Michael Strosche89003232023-08-22 15:48:26 +020023#include <stdbool.h>
Aamir Bohradd7acaa2020-03-25 11:36:22 +053024
25#define MAX_HD_AUDIO_DMIC_LINKS 2
26#define MAX_HD_AUDIO_SNDW_LINKS 4
27#define MAX_HD_AUDIO_SSP_LINKS 6
28
Chia-Ling Houb5a03282023-06-07 16:53:00 +080029/* Types of different SKUs */
30enum soc_intel_jasperlake_power_limits {
31 JSL_N4500_6W_CORE,
32 JSL_N6000_6W_CORE,
33 JSL_N5100_6W_CORE,
34 JSL_N4505_10W_CORE,
35 JSL_N5105_10W_CORE,
36 JSL_N6005_10W_CORE,
37 JSL_POWER_LIMITS_COUNT
38};
39
40/* TDP values for different SKUs */
41enum soc_intel_jasperlake_cpu_tdps {
42 TDP_6W = 6,
43 TDP_10W = 10
44};
45
46/* Mapping of different SKUs based on CPU ID and TDP values */
47static const struct {
48 unsigned int pci_did;
49 enum soc_intel_jasperlake_power_limits limits;
50 enum soc_intel_jasperlake_cpu_tdps cpu_tdp;
51} cpuid_to_jsl[] = {
52 { PCI_DID_INTEL_JSL_ID_1, JSL_N4500_6W_CORE, TDP_6W },
53 { PCI_DID_INTEL_JSL_ID_2, JSL_N6000_6W_CORE, TDP_6W },
54 { PCI_DID_INTEL_JSL_ID_3, JSL_N5100_6W_CORE, TDP_6W },
55 { PCI_DID_INTEL_JSL_ID_4, JSL_N4505_10W_CORE, TDP_10W },
56 { PCI_DID_INTEL_JSL_ID_5, JSL_N5105_10W_CORE, TDP_10W },
57 { PCI_DID_INTEL_JSL_ID_6, JSL_N6005_10W_CORE, TDP_10W },
58};
59
Aamir Bohra512b77a2020-03-25 13:20:34 +053060struct soc_intel_jasperlake_config {
Aamir Bohradd7acaa2020-03-25 11:36:22 +053061
62 /* Common struct containing soc config data required by common code */
63 struct soc_intel_common_config common_soc_config;
64
Sumeet R Pawnikare8d1bef2020-05-08 21:31:44 +053065 /* Common struct containing power limits configuration information */
Chia-Ling Houb5a03282023-06-07 16:53:00 +080066 struct soc_power_limits_config power_limits_config[JSL_POWER_LIMITS_COUNT];
Sumeet R Pawnikare8d1bef2020-05-08 21:31:44 +053067
Aamir Bohradd7acaa2020-03-25 11:36:22 +053068 /* Gpio group routed to each dword of the GPE0 block. Values are
69 * of the form PMC_GPP_[A:U] or GPD. */
70 uint8_t pmc_gpe0_dw0; /* GPE0_31_0 STS/EN */
71 uint8_t pmc_gpe0_dw1; /* GPE0_63_32 STS/EN */
72 uint8_t pmc_gpe0_dw2; /* GPE0_95_64 STS/EN */
73
74 /* Generic IO decode ranges */
75 uint32_t gen1_dec;
76 uint32_t gen2_dec;
77 uint32_t gen3_dec;
78 uint32_t gen4_dec;
79
80 /* Enable S0iX support */
Michael Strosche89003232023-08-22 15:48:26 +020081 bool s0ix_enable;
Aamir Bohradd7acaa2020-03-25 11:36:22 +053082 /* Enable DPTF support */
Michael Strosche89003232023-08-22 15:48:26 +020083 bool dptf_enable;
Aamir Bohradd7acaa2020-03-25 11:36:22 +053084
85 /* Deep SX enable for both AC and DC */
Michael Strosche89003232023-08-22 15:48:26 +020086 bool deep_s3_enable_ac;
87 bool deep_s3_enable_dc;
88 bool deep_s5_enable_ac;
89 bool deep_s5_enable_dc;
Aamir Bohradd7acaa2020-03-25 11:36:22 +053090
91 /* Deep Sx Configuration
92 * DSX_EN_WAKE_PIN - Enable WAKE# pin
93 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
94 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
95 uint32_t deep_sx_config;
96
97 /* TCC activation offset */
98 uint32_t tcc_offset;
99
Aamir Bohrae9984c82020-09-09 14:28:45 +0530100 /* System Agent dynamic frequency support.
101 * When enabled memory will be training at different frequencies.
102 * 0:Disabled, 1:FixedPoint0(low), 2:FixedPoint1(mid), 3:FixedPoint2
103 * (high), 4:Enabled */
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530104 enum {
105 SaGv_Disabled,
106 SaGv_FixedPoint0,
107 SaGv_FixedPoint1,
108 SaGv_FixedPoint2,
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530109 SaGv_Enabled,
110 } SaGv;
111
Michael Strosche89003232023-08-22 15:48:26 +0200112 /* Rank Margin Tool
113 *
114 * true: Enable
115 * false: Disable
116 */
117 bool RMT;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530118
119 /* USB related */
120 struct usb2_port_config usb2_ports[16];
121 struct usb3_port_config usb3_ports[10];
122 /* Wake Enable Bitmap for USB2 ports */
123 uint16_t usb2_wake_enable_bitmap;
124 /* Wake Enable Bitmap for USB3 ports */
125 uint16_t usb3_wake_enable_bitmap;
126
Ben Kao6eb52532021-07-04 21:24:36 +0800127 /* Set the LFPS periodic sampling off time for USB3 Ports.
128 Default value of PMCTRL_REG bits[7:4] is 9 which means periodic
129 sampling off interval is 9ms, the range is from 0 to 15. */
130 uint8_t xhci_lfps_sampling_offtime_ms;
131
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530132 /* SATA related */
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530133 uint8_t SataMode;
Michael Strosche89003232023-08-22 15:48:26 +0200134 bool SataSalpSupport;
135 bool SataPortsEnable[8];
136 bool SataPortsDevSlp[8];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530137
138 /* Audio related */
Michael Strosche89003232023-08-22 15:48:26 +0200139 bool PchHdaDspEnable;
140 bool PchHdaAudioLinkHdaEnable;
141 bool PchHdaAudioLinkDmicEnable[MAX_HD_AUDIO_DMIC_LINKS];
142 bool PchHdaAudioLinkSspEnable[MAX_HD_AUDIO_SSP_LINKS];
143 bool PchHdaAudioLinkSndwEnable[MAX_HD_AUDIO_SNDW_LINKS];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530144 uint8_t PchHdaIDispLinkTmode;
145 uint8_t PchHdaIDispLinkFrequency;
Michael Strosche89003232023-08-22 15:48:26 +0200146 bool PchHdaIDispCodecDisconnect;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530147
148 /* PCIe Root Ports */
Michael Strosche89003232023-08-22 15:48:26 +0200149 bool PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530150 /* PCIe output clocks type to PCIe devices.
151 * 0-23: PCH rootport, 0x70: LAN, 0x80: unspecified but in use,
152 * 0xFF: not used */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530153 uint8_t PcieClkSrcUsage[CONFIG_MAX_PCIE_CLOCK_SRC];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530154 /* PCIe ClkReq-to-ClkSrc mapping, number of clkreq signal assigned to
155 * clksrc. */
Rizwan Qureshia9794602021-04-08 20:31:47 +0530156 uint8_t PcieClkSrcClkReq[CONFIG_MAX_PCIE_CLOCK_SRC];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530157
Meera Ravindranath798fd4b2020-04-27 22:40:03 +0530158 /* Probe CLKREQ# signal before enabling CLKREQ# based power management.*/
Michael Strosche89003232023-08-22 15:48:26 +0200159 bool PcieRpClkReqDetect[CONFIG_MAX_ROOT_PORTS];
Meera Ravindranath798fd4b2020-04-27 22:40:03 +0530160
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530161 /* PCIe RP L1 substate */
Eric Laide2ab412021-01-11 16:14:14 +0800162 enum L1_substates_control PcieRpL1Substates[CONFIG_MAX_ROOT_PORTS];
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530163
Jamie Chen1ebcb2a2021-07-20 18:33:57 +0800164 /* PCIe ModPhy related */
165 struct pcie_modphy_config pcie_mp_cfg[CONFIG_MAX_ROOT_PORTS];
166
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530167 /* SMBus */
Michael Strosche89003232023-08-22 15:48:26 +0200168 bool SmbusEnable;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530169
170 /* eMMC and SD */
Michael Strosche89003232023-08-22 15:48:26 +0200171 bool ScsEmmcHs400Enabled;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530172
173 /* Enable if SD Card Power Enable Signal is Active High */
Michael Strosche89003232023-08-22 15:48:26 +0200174 bool SdCardPowerEnableActiveHigh;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530175
Meera Ravindranath5b3a0ff2020-09-23 12:43:43 +0530176 /* VR Config Settings for IA Core */
177 uint16_t ImonSlope;
178 uint16_t ImonOffset;
179
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530180 /* Gfx related */
Michael Strosche89003232023-08-22 15:48:26 +0200181 bool SkipExtGfxScan;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530182
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530183 /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */
Michael Strosche89003232023-08-22 15:48:26 +0200184 bool eist_enable;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530185
186 /* Enable C6 DRAM */
Michael Strosche89003232023-08-22 15:48:26 +0200187 bool enable_c6dram;
Michael Niewöhner0e255802021-09-15 12:58:11 +0200188
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530189 /*
190 * SerialIO device mode selection:
191 * PchSerialIoDisabled,
192 * PchSerialIoPci,
193 * PchSerialIoHidden,
194 * PchSerialIoLegacyUart,
195 * PchSerialIoSkipInit
196 */
197 uint8_t SerialIoI2cMode[CONFIG_SOC_INTEL_I2C_DEV_MAX];
198 uint8_t SerialIoGSpiMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
199 uint8_t SerialIoUartMode[CONFIG_SOC_INTEL_UART_DEV_MAX];
200 /*
201 * GSPIn Default Chip Select Mode:
202 * 0:Hardware Mode,
203 * 1:Software Mode
204 */
205 uint8_t SerialIoGSpiCsMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
206 /*
207 * GSPIn Default Chip Select State:
208 * 0: Low,
209 * 1: High
210 */
211 uint8_t SerialIoGSpiCsState[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
212
213 /*
214 * TraceHubMode config
215 * 0: Disable, 1: Target Debugger Mode, 2: Host Debugger Mode
216 */
217 uint8_t TraceHubMode;
218
219 /* Debug interface selection */
220 enum {
221 DEBUG_INTERFACE_RAM = (1 << 0),
Subrata Banik7be0df82020-04-30 12:23:16 +0530222 DEBUG_INTERFACE_UART_8250IO = (1 << 1),
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530223 DEBUG_INTERFACE_USB3 = (1 << 3),
Subrata Banik7be0df82020-04-30 12:23:16 +0530224 DEBUG_INTERFACE_LPSS_SERIAL_IO = (1 << 4),
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530225 DEBUG_INTERFACE_TRACEHUB = (1 << 5),
226 } debug_interface_flag;
227
228 /* GPIO SD card detect pin */
229 unsigned int sdcard_cd_gpio;
230
231 /* Enable Pch iSCLK */
Michael Strosche89003232023-08-22 15:48:26 +0200232 bool pch_isclk;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530233
234 /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */
Angel Pons98521c52021-03-01 21:16:49 +0100235 bool CnviBtAudioOffload;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530236
237 /* Tcss */
Michael Strosche89003232023-08-22 15:48:26 +0200238 bool TcssXhciEn;
239 bool TcssXdciEn;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530240
241 /*
242 * Override GPIO PM configuration:
Michael Strosche89003232023-08-22 15:48:26 +0200243 * false: Use FSP default GPIO PM program,
244 * true: coreboot to override GPIO PM program
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530245 */
Michael Strosche89003232023-08-22 15:48:26 +0200246 bool gpio_override_pm;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530247
248 /*
249 * GPIO PM configuration: 0 to disable, 1 to enable power gating
250 * Bit 6-7: Reserved
251 * Bit 5: MISCCFG_GPSIDEDPCGEN
252 * Bit 4: MISCCFG_GPRCOMPCDLCGEN
253 * Bit 3: MISCCFG_GPRTCDLCGEN
254 * Bit 2: MISCCFG_GSXLCGEN
255 * Bit 1: MISCCFG_GPDPCGEN
256 * Bit 0: MISCCFG_GPDLCGEN
257 */
258 uint8_t gpio_pm[TOTAL_GPIO_COMM];
259
260 /* DP config */
261 /*
262 * Port config
263 * 0:Disabled, 1:eDP, 2:MIPI DSI
264 */
265 uint8_t DdiPortAConfig;
266 uint8_t DdiPortBConfig;
267
Michael Strosche89003232023-08-22 15:48:26 +0200268 /* HDP config
269 *
270 * true: Enable HDB
271 * false: Disable HDP
272 */
273 bool DdiPortAHpd;
274 bool DdiPortBHpd;
275 bool DdiPortCHpd;
276 bool DdiPort1Hpd;
277 bool DdiPort2Hpd;
278 bool DdiPort3Hpd;
279 bool DdiPort4Hpd;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530280
Michael Strosche89003232023-08-22 15:48:26 +0200281 /* DDC config
282 *
283 * true: Enable DDC
284 * false: Disable DDC
285 */
286 bool DdiPortADdc;
287 bool DdiPortBDdc;
288 bool DdiPortCDdc;
289 bool DdiPort1Ddc;
290 bool DdiPort2Ddc;
291 bool DdiPort3Ddc;
292 bool DdiPort4Ddc;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530293
Michael Strosche89003232023-08-22 15:48:26 +0200294 /* Hybrid storage mode
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530295 * This mode makes FSP detect Optane and NVME and set PCIe lane mode
Michael Strosche89003232023-08-22 15:48:26 +0200296 * accordingly
297 *
298 * true: Enable Hybrid storage mode
299 * false Dsiable Hybrid storage mode
300 */
301 bool HybridStorageMode;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530302
303 /*
304 * Override CPU flex ratio value:
305 * CPU ratio value controls the maximum processor non-turbo ratio.
306 * Valid Range 0 to 63.
307 * In general descriptor provides option to set default cpu flex ratio.
308 * Default cpu flex ratio 0 ensures booting with non-turbo max frequency.
309 * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0.
310 * Only override CPU flex ratio to not boot with non-turbo max.
311 */
312 uint8_t cpu_ratio_override;
313
V Sowmyae8156ad2020-06-17 16:17:19 +0530314 /* Skip CPU replacement check
Michael Strosche89003232023-08-22 15:48:26 +0200315 *
V Sowmyae8156ad2020-06-17 16:17:19 +0530316 * Setting this option to skip CPU replacement check to avoid the forced MRC training
317 * for the platforms with soldered down SOC.
Michael Strosche89003232023-08-22 15:48:26 +0200318 *
319 * false: disable
320 * true: enable
V Sowmyae8156ad2020-06-17 16:17:19 +0530321 */
Michael Strosche89003232023-08-22 15:48:26 +0200322 bool SkipCpuReplacementCheck;
V Sowmya7aee5c62020-07-24 08:58:14 +0530323
324 /*
325 * SLP_S3 Minimum Assertion Width Policy
326 * 1 = 60us
327 * 2 = 1ms
328 * 3 = 50ms (default)
329 * 4 = 2s
330 */
331 uint8_t PchPmSlpS3MinAssert;
332
333 /*
334 * SLP_S4 Minimum Assertion Width Policy
335 * 1 = 1s (default)
336 * 2 = 2s
337 * 3 = 3s
338 * 4 = 4s
339 */
340 uint8_t PchPmSlpS4MinAssert;
341
342 /*
343 * SLP_SUS Minimum Assertion Width Policy
344 * 1 = 0ms
345 * 2 = 500ms
346 * 3 = 1s
347 * 4 = 4s (default)
348 */
349 uint8_t PchPmSlpSusMinAssert;
350
351 /*
352 * SLP_A Minimum Assertion Width Policy
353 * 1 = 0ms
354 * 2 = 4s
355 * 3 = 98ms
356 * 4 = 2s (default)
357 */
358 uint8_t PchPmSlpAMinAssert;
359
360 /*
361 * PCH PM Reset Power Cycle Duration
362 * 0 = 4s (default)
363 * 1 = 1s
364 * 2 = 2s
365 * 3 = 3s
366 * 4 = 4s
367 *
368 * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the
369 * stretch duration programmed in the following registers:
370 * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert)
371 * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert)
372 * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert)
373 * - PM_CFG.SLP_LAN_MIN_ASST_WDTH
374 */
375 uint8_t PchPmPwrCycDur;
Maulik V Vaghela58ce4472020-11-06 10:56:57 +0530376
377 /*
378 * FIVR RFI Frequency
379 * PCODE MMIO Mailbox: Set the desired RFI frequency, in increments of 100KHz.
380 * 0: Auto.
381 * Range varies based on XTAL clock:
382 * 0-1918 (Up to 191.8HMz) for 24MHz clock;
383 * 0-1535 (Up to 153.5MHz) for 19MHz clock.
384 */
385 uint16_t FivrRfiFrequency;
386
387 /*
388 * FIVR RFI Spread Spectrum
389 * Set the Spread Spectrum Range. <b>0: 0%</b>;
390 * FIVR RFI Spread Spectrum, in 0.1% increments.
391 * Range: 0.0% to 10.0% (0-100)
392 */
393 uint8_t FivrSpreadSpectrum;
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530394
395 /*
Maulik V Vaghela2e424ff2021-01-06 22:04:37 +0530396 * Disable Fast Slew Rate for Deep Package C States for VCCIN VR domain
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530397 * Disable Fast Slew Rate for Deep Package C States based on
398 * Acoustic Noise Mitigation feature enabled.
399 */
Michael Strosche89003232023-08-22 15:48:26 +0200400 bool FastPkgCRampDisable;
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530401
402 /*
Maulik V Vaghela2e424ff2021-01-06 22:04:37 +0530403 * Slew Rate configuration for Deep Package C States for VCCIN VR domain
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530404 * based on Acoustic Noise Mitigation feature enabled.
405 * 0: Fast/2 ; 1: Fast/4; 2: Fast/8; 3: Fast/16
406 */
Maulik V Vaghela2e424ff2021-01-06 22:04:37 +0530407 enum {
408 SlewRateFastBy2 = 0,
409 SlewRateFastBy4,
410 SlewRateFastBy8,
411 SlewRateFastBy16
412 } SlowSlewRate;
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530413
414 /*
415 * Enable or Disable Acoustic Noise Mitigation feature.
Michael Strosche89003232023-08-22 15:48:26 +0200416 *
417 * false: Disabled
418 * true: Enabled
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530419 */
Michael Strosche89003232023-08-22 15:48:26 +0200420 bool AcousticNoiseMitigation;
Maulik V Vaghelaa4bef792020-11-23 20:42:39 +0530421
422 /*
423 * Acoustic Noise Mitigation Range.Defines the maximum Pre-Wake
424 * randomization time in micro ticks.This can be programmed only
425 * if AcousticNoiseMitigation is enabled.
426 * Range 0-255
427 */
428 uint8_t PreWake;
429
430 /*
431 * Acoustic Noise Mitigation Range.Defines the maximum Ramp Up
432 * randomization time in micro ticks.This can be programmed only
433 * if AcousticNoiseMitigation is enabled.
434 * Range 0-255
435 */
436 uint8_t RampUp;
437
438 /*
439 * Acoustic Noise Mitigation Range.Defines the maximum Ramp Down
440 * randomization time in micro ticks.This can be programmed only
441 * if AcousticNoiseMitigation is enabled.
442 * Range 0-255
443 */
444 uint8_t RampDown;
445
Simon Yangdf520852021-06-22 10:15:20 +0800446 /*
447 * It controls below soc variables
448 *
449 * PchFivrExtV1p05RailEnabledStates
450 * PchFivrExtVnnRailSxEnabledStates
451 * PchFivrExtVnnRailEnabledStates
452 *
453 * If your platform does not support external vnn power rail please set to 1
454 * 1: Disabled ; 0: Enabled
455 */
456 bool disable_external_bypass_vr;
457
Simon Yang355fb2f2021-12-09 19:42:24 +0800458 /*
459 * Core Display Clock Frequency selection, FSP UPD CdClock values + 1
460 *
461 * FSP will use the value to program clock frequency for core display if GOP
462 * is not run. Ex: the Chromebook normal mode.
463 * For the cases GOP is run, GOP will be in charge of the related register
464 * settings.
465 */
466 enum {
467 CD_CLOCK_172_8_MHZ = 1,
468 CD_CLOCK_180_MHZ = 2,
469 CD_CLOCK_192_MHZ = 3,
470 CD_CLOCK_307_MHZ = 4,
471 CD_CLOCK_312_MHZ = 5,
472 CD_CLOCK_552_MHZ = 6,
473 CD_CLOCK_556_8_MHZ = 7,
Simon Yang355fb2f2021-12-09 19:42:24 +0800474 } cd_clock;
475
Chia-Ling Hou141d0df2023-05-15 17:31:57 +0800476 /* Platform Power Pmax */
477 uint16_t PsysPmax;
478
Jamie Chen5b589022022-03-15 16:16:30 +0800479 /*
480 * This is a workaround to mitigate higher SoC power consumption in S0ix
481 * when the CNVI has background activity.
482 *
483 * Setting this on a system that supports S0i3 (set xtalsdqdis [Bit 22] in
484 * cppmvric1 register to 0) will break CNVI timing.
485 * Affected Intel wireless chipsets: AC9560 (JfP2), AC9461/AC9462 (JfP1) and
486 * AX201 (HrP2)
487 *
488 * true: Enabled (fewer wakes, lower power)
489 * false: Disabled (more wakes, higher power)
490 */
491 bool cnvi_reduce_s0ix_pwr_usage;
Matt DeVilliere30d2042023-01-23 10:23:55 -0600492
493 /* i915 struct for GMA backlight control */
494 struct i915_gpu_controller_info gfx;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530495};
496
Aamir Bohra512b77a2020-03-25 13:20:34 +0530497typedef struct soc_intel_jasperlake_config config_t;
Aamir Bohradd7acaa2020-03-25 11:36:22 +0530498
499#endif