1 /* SPDX-License-Identifier: GPL-2.0-only */
6 #include <drivers/i2c/designware/dw_i2c.h>
7 #include <drivers/intel/gma/gma.h>
8 #include <device/pci_ids.h>
10 #include <intelblocks/cfg.h>
11 #include <intelblocks/gspi.h>
12 #include <intelblocks/power_limit.h>
13 #include <intelblocks/pcie_rp.h>
14 #include <intelblocks/tcss.h>
15 #include <intelblocks/xhci.h>
17 #include <soc/pci_devs.h>
19 #include <soc/serialio.h>
21 #include <soc/vr_config.h>
24 /* Define config parameters for In-Band ECC (IBECC). */
25 #define MAX_IBECC_REGIONS 8
27 #define MAX_HD_AUDIO_SDI_LINKS 2
29 /* In-Band ECC Operation Mode */
31 IBECC_MODE_PER_REGION
,
39 bool range_enable
[MAX_IBECC_REGIONS
];
40 uint16_t range_base
[MAX_IBECC_REGIONS
];
41 uint16_t range_mask
[MAX_IBECC_REGIONS
];
42 /* add ECC error injection if needed by a mainboard */
45 /* FSPM UPD for setting the boot frequency */
47 MAX_BATTERY_PERFORMANCE
,
48 MAX_NONTURBO_PERFORMANCE
,
52 /* Types of different SKUs */
53 enum soc_intel_alderlake_power_limits
{
54 ADL_P_142_242_282_15W_CORE
,
55 ADL_P_282_442_482_28W_CORE
,
57 ADL_P_442_482_45W_CORE
,
58 ADL_P_642_682_45W_CORE
,
86 RPL_P_682_642_482_45W_CORE
,
87 RPL_P_682_482_282_28W_CORE
,
88 RPL_P_282_242_142_15W_CORE
,
112 RPL_HX_8_16_55W_CORE
,
113 RPL_HX_8_12_55W_CORE
,
117 ADL_POWER_LIMITS_COUNT
120 /* TDP values for different SKUs */
121 enum soc_intel_alderlake_cpu_tdps
{
143 /* Mapping of different SKUs based on CPU ID and TDP values */
144 static const struct {
146 enum soc_intel_alderlake_power_limits limits
;
147 enum soc_intel_alderlake_cpu_tdps cpu_tdp
;
149 { PCI_DID_INTEL_ADL_P_ID_10
, ADL_P_142_242_282_15W_CORE
, TDP_15W
},
150 { PCI_DID_INTEL_ADL_P_ID_7
, ADL_P_142_242_282_15W_CORE
, TDP_15W
},
151 { PCI_DID_INTEL_ADL_P_ID_6
, ADL_P_142_242_282_15W_CORE
, TDP_15W
},
152 { PCI_DID_INTEL_ADL_P_ID_7
, ADL_P_282_442_482_28W_CORE
, TDP_28W
},
153 { PCI_DID_INTEL_ADL_P_ID_5
, ADL_P_282_442_482_28W_CORE
, TDP_28W
},
154 { PCI_DID_INTEL_ADL_P_ID_3
, ADL_P_682_28W_CORE
, TDP_28W
},
155 { PCI_DID_INTEL_ADL_P_ID_5
, ADL_P_442_482_45W_CORE
, TDP_45W
},
156 { PCI_DID_INTEL_ADL_P_ID_4
, ADL_P_642_682_45W_CORE
, TDP_45W
},
157 { PCI_DID_INTEL_ADL_P_ID_3
, ADL_P_642_682_45W_CORE
, TDP_45W
},
158 { PCI_DID_INTEL_ADL_P_ID_1
, ADL_P_442_482_45W_CORE
, TDP_45W
},
159 { PCI_DID_INTEL_ADL_P_ID_1
, ADL_P_282_442_482_28W_CORE
, TDP_28W
},
160 { PCI_DID_INTEL_ADL_M_ID_1
, ADL_M_282_12W_CORE
, TDP_12W
},
161 { PCI_DID_INTEL_ADL_M_ID_1
, ADL_M_282_15W_CORE
, TDP_15W
},
162 { PCI_DID_INTEL_ADL_M_ID_2
, ADL_M_242_CORE
, TDP_9W
},
163 { PCI_DID_INTEL_ADL_N_ID_1
, ADL_N_081_15W_CORE
, TDP_15W
},
164 { PCI_DID_INTEL_ADL_N_ID_2
, ADL_N_041_6W_CORE
, TDP_6W
},
165 { PCI_DID_INTEL_ADL_N_ID_3
, ADL_N_041_6W_CORE
, TDP_6W
},
166 { PCI_DID_INTEL_ADL_N_ID_4
, ADL_N_021_6W_CORE
, TDP_6W
},
167 { PCI_DID_INTEL_ADL_N_ID_5
, ADL_N_041_6W_CORE
, TDP_6W
},
168 { PCI_DID_INTEL_ADL_N_ID_5
, ADL_N_041_15W_CORE
, TDP_15W
},
169 { PCI_DID_INTEL_ADL_N_ID_6
, ADL_N_041_12W_CORE
, TDP_12W
},
170 { PCI_DID_INTEL_ADL_N_ID_7
, ADL_N_041_12W_CORE
, TDP_12W
},
171 { PCI_DID_INTEL_ADL_N_ID_8
, ADL_N_021_6W_CORE
, TDP_6W
},
172 { PCI_DID_INTEL_ADL_N_ID_9
, ADL_N_021_10W_CORE
, TDP_10W
},
173 { PCI_DID_INTEL_ADL_S_ID_1
, ADL_S_882_35W_CORE
, TDP_35W
},
174 { PCI_DID_INTEL_ADL_S_ID_1
, ADL_S_882_65W_CORE
, TDP_65W
},
175 { PCI_DID_INTEL_ADL_S_ID_1
, ADL_S_882_125W_CORE
, TDP_125W
},
176 { PCI_DID_INTEL_ADL_S_ID_1
, ADL_S_882_150W_CORE
, TDP_150W
},
177 { PCI_DID_INTEL_ADL_S_ID_3
, ADL_S_842_35W_CORE
, TDP_35W
},
178 { PCI_DID_INTEL_ADL_S_ID_3
, ADL_S_842_65W_CORE
, TDP_65W
},
179 { PCI_DID_INTEL_ADL_S_ID_3
, ADL_S_842_125W_CORE
, TDP_125W
},
180 { PCI_DID_INTEL_ADL_S_ID_8
, ADL_S_642_125W_CORE
, TDP_125W
},
181 { PCI_DID_INTEL_ADL_S_ID_10
, ADL_S_602_35W_CORE
, TDP_35W
},
182 { PCI_DID_INTEL_ADL_S_ID_10
, ADL_S_602_65W_CORE
, TDP_65W
},
183 { PCI_DID_INTEL_ADL_S_ID_11
, ADL_S_402_35W_CORE
, TDP_35W
},
184 { PCI_DID_INTEL_ADL_S_ID_11
, ADL_S_402_58W_CORE
, TDP_58W
},
185 { PCI_DID_INTEL_ADL_S_ID_11
, ADL_S_402_60W_CORE
, TDP_60W
},
186 { PCI_DID_INTEL_ADL_S_ID_12
, ADL_S_202_35W_CORE
, TDP_35W
},
187 { PCI_DID_INTEL_ADL_S_ID_12
, ADL_S_202_46W_CORE
, TDP_46W
},
188 { PCI_DID_INTEL_RPL_P_ID_1
, RPL_P_682_642_482_45W_CORE
, TDP_45W
},
189 { PCI_DID_INTEL_RPL_P_ID_1
, RPL_P_682_482_282_28W_CORE
, TDP_28W
},
190 { PCI_DID_INTEL_RPL_P_ID_2
, RPL_P_682_482_282_28W_CORE
, TDP_28W
},
191 { PCI_DID_INTEL_RPL_P_ID_2
, RPL_P_682_642_482_45W_CORE
, TDP_45W
},
192 { PCI_DID_INTEL_RPL_P_ID_3
, RPL_P_282_242_142_15W_CORE
, TDP_15W
},
193 { PCI_DID_INTEL_RPL_P_ID_4
, RPL_P_282_242_142_15W_CORE
, TDP_15W
},
194 { PCI_DID_INTEL_RPL_P_ID_5
, RPL_P_282_242_142_15W_CORE
, TDP_15W
},
195 { PCI_DID_INTEL_RPL_P_ID_6
, RPL_P_682_642_482_45W_CORE
, TDP_45W
},
196 { PCI_DID_INTEL_RPL_P_ID_7
, RPL_P_682_642_482_45W_CORE
, TDP_45W
},
197 { PCI_DID_INTEL_RPL_P_ID_8
, RPL_P_682_642_482_45W_CORE
, TDP_45W
},
198 { PCI_DID_INTEL_RPL_S_ID_1
, RPL_S_8161_35W_CORE
, TDP_35W
},
199 { PCI_DID_INTEL_RPL_S_ID_1
, RPL_S_8161_65W_CORE
, TDP_65W
},
200 { PCI_DID_INTEL_RPL_S_ID_1
, RPL_S_8161_95W_CORE
, TDP_95W
},
201 { PCI_DID_INTEL_RPL_S_ID_1
, RPL_S_8161_125W_CORE
, TDP_125W
},
202 { PCI_DID_INTEL_RPL_S_ID_1
, RPL_S_8161_150W_CORE
, TDP_150W
},
203 { PCI_DID_INTEL_RPL_S_ID_3
, RPL_S_881_35W_CORE
, TDP_35W
},
204 { PCI_DID_INTEL_RPL_S_ID_3
, RPL_S_881_65W_CORE
, TDP_65W
},
205 { PCI_DID_INTEL_RPL_S_ID_3
, RPL_S_881_125W_CORE
, TDP_125W
},
206 { PCI_DID_INTEL_RPL_S_ID_4
, RPL_S_681_35W_CORE
, TDP_35W
},
207 { PCI_DID_INTEL_RPL_S_ID_4
, RPL_S_681_65W_CORE
, TDP_65W
},
208 { PCI_DID_INTEL_RPL_S_ID_4
, RPL_S_681_125W_CORE
, TDP_125W
},
209 { PCI_DID_INTEL_RPL_S_ID_5
, RPL_S_641_35W_CORE
, TDP_35W
},
210 { PCI_DID_INTEL_RPL_S_ID_5
, RPL_S_641_65W_CORE
, TDP_65W
},
211 { PCI_DID_INTEL_RPL_S_ID_5
, RPL_S_641_125W_CORE
, TDP_125W
},
212 { PCI_DID_INTEL_RPL_S_ID_2
, RPL_S_801_80W_CORE
, TDP_80W
},
213 { PCI_DID_INTEL_RPL_S_ID_2
, RPL_S_801_95W_CORE
, TDP_90W
},
214 { PCI_DID_INTEL_ADL_S_ID_11
, RPL_S_401_35W_CORE
, TDP_35W
},
215 { PCI_DID_INTEL_ADL_S_ID_11
, RPL_S_401_58W_CORE
, TDP_58W
},
216 { PCI_DID_INTEL_ADL_S_ID_11
, RPL_S_401_60W_CORE
, TDP_60W
},
217 { PCI_DID_INTEL_ADL_S_ID_11
, RPL_S_401_65W_CORE
, TDP_65W
},
218 { PCI_DID_INTEL_ADL_S_ID_12
, RPL_S_201_35W_CORE
, TDP_35W
},
219 { PCI_DID_INTEL_ADL_S_ID_12
, RPL_S_201_46W_CORE
, TDP_46W
},
220 { PCI_DID_INTEL_ADL_S_ID_12
, RPL_S_201_65W_CORE
, TDP_65W
},
221 { PCI_DID_INTEL_RPL_HX_ID_1
, RPL_HX_8_16_55W_CORE
, TDP_55W
},
222 { PCI_DID_INTEL_RPL_HX_ID_2
, RPL_HX_8_12_55W_CORE
, TDP_55W
},
223 { PCI_DID_INTEL_RPL_HX_ID_3
, RPL_HX_8_8_55W_CORE
, TDP_55W
},
224 { PCI_DID_INTEL_RPL_HX_ID_4
, RPL_HX_6_8_55W_CORE
, TDP_55W
},
225 { PCI_DID_INTEL_RPL_HX_ID_5
, RPL_HX_6_4_55W_CORE
, TDP_55W
},
226 { PCI_DID_INTEL_RPL_HX_ID_6
, RPL_HX_8_8_55W_CORE
, TDP_55W
},
227 { PCI_DID_INTEL_RPL_HX_ID_7
, RPL_HX_6_8_55W_CORE
, TDP_55W
},
228 { PCI_DID_INTEL_RPL_HX_ID_8
, RPL_HX_6_4_55W_CORE
, TDP_55W
},
231 /* Types of display ports */
243 enum ddi_port_flags
{
244 DDI_ENABLE_DDC
= 1 << 0, // Display Data Channel
245 DDI_ENABLE_HPD
= 1 << 1, // Hot Plug Detect
249 * Enable External V1P05/Vnn/VnnSx Rail in: BIT0:S0i1/S0i2,
250 * BIT1:S0i3, BIT2:S3, BIT3:S4, BIT4:S5, BIT5:S0.
252 enum fivr_enable_states
{
253 FIVR_ENABLE_S0i1_S0i2
= BIT(0),
254 FIVR_ENABLE_S0i3
= BIT(1),
255 FIVR_ENABLE_S3
= BIT(2),
256 FIVR_ENABLE_S4
= BIT(3),
257 FIVR_ENABLE_S5
= BIT(4),
258 FIVR_ENABLE_S0
= BIT(5),
262 * Enable the following for External V1p05 rail
263 * BIT0: Retention active switch support
264 * BIT1: Normal Active voltage supported
265 * BIT2: Minimum active voltage supported
266 * BIT3: Minimum Retention voltage supported
268 enum fivr_voltage_supported
{
269 FIVR_RET_ACTIVE_SWITCH_SUPPORT
= BIT(0),
270 FIVR_VOLTAGE_NORMAL
= BIT(1),
271 FIVR_VOLTAGE_MIN_ACTIVE
= BIT(2),
272 FIVR_VOLTAGE_MIN_RETENTION
= BIT(3),
275 #define FIVR_ENABLE_ALL_SX (FIVR_ENABLE_S0i1_S0i2 | FIVR_ENABLE_S0i3 | \
276 FIVR_ENABLE_S3 | FIVR_ENABLE_S4 | FIVR_ENABLE_S5 | FIVR_ENABLE_S0)
279 * Values 0 - C0/C1, 1 - C2, 2 - C3, 3 - C6, 4 - C7, 5 - C7S, 6 - C8, 7 - C9, 8 - C10,
280 * 254 - CPU Default , 255 - Auto.
282 enum pkgcstate_limit
{
292 LIMIT_CPUDEFAULT
= 254,
296 /* Bit values for use in LpmStateEnableMask. */
297 enum lpm_state_mask
{
306 LPM_S0iX_ALL
= LPM_S0i2_0
| LPM_S0i2_1
| LPM_S0i2_2
307 | LPM_S0i3_0
| LPM_S0i3_1
| LPM_S0i3_2
| LPM_S0i3_3
| LPM_S0i3_4
,
311 * FivrSpreadSpectrum:
313 * 0 - 0.5%, 3 - 1%, 8 - 1.5%, 18 - 2%, 28 - 3%, 34 - 4%, 39 - 5%, 44 - 6%
315 enum fivr_spread_spectrum_ratio
{
327 * Slew Rate configuration for Deep Package C States for VR domain.
328 * They are fast time divided by 2.
341 struct soc_intel_alderlake_config
{
342 /* Common struct containing soc config data required by common code */
343 struct soc_intel_common_config common_soc_config
;
345 /* Common struct containing power limits configuration information */
346 struct soc_power_limits_config power_limits_config
[ADL_POWER_LIMITS_COUNT
];
348 /* Gpio group routed to each dword of the GPE0 block. Values are
349 * of the form PMC_GPP_[A:U] or GPD. */
350 uint8_t pmc_gpe0_dw0
; /* GPE0_31_0 STS/EN */
351 uint8_t pmc_gpe0_dw1
; /* GPE0_63_32 STS/EN */
352 uint8_t pmc_gpe0_dw2
; /* GPE0_95_64 STS/EN */
354 /* Generic IO decode ranges */
360 /* Enable S0iX support */
362 /* Support for TCSS xhci, xdci, TBT PCIe root ports and DMA controllers */
363 bool tcss_d3_hot_disable
;
364 /* Enable DPTF support */
367 /* Deep SX enable for both AC and DC */
368 bool deep_s3_enable_ac
;
369 bool deep_s3_enable_dc
;
370 bool deep_s5_enable_ac
;
371 bool deep_s5_enable_dc
;
373 /* Deep Sx Configuration
374 * DSX_EN_WAKE_PIN - Enable WAKE# pin
375 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
376 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
377 uint32_t deep_sx_config
;
379 /* TCC activation offset */
382 /* In-Band ECC (IBECC) configuration */
383 struct ibecc_config ibecc
;
385 /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs.
386 * When enabled memory will be training at two different frequencies.
387 * 0:Disabled, 1:FixedPoint0, 2:FixedPoint1, 3:FixedPoint2,
388 * 4:FixedPoint3, 5:Enabled */
398 /* Rank Margin Tool. 1:Enable, 0:Disable */
402 struct usb2_port_config usb2_ports
[16];
403 struct usb3_port_config usb3_ports
[10];
404 /* Wake Enable Bitmap for USB2 ports */
405 uint16_t usb2_wake_enable_bitmap
;
406 /* Wake Enable Bitmap for USB3 ports */
407 uint16_t usb3_wake_enable_bitmap
;
408 /* Program OC pins for TCSS */
409 struct tcss_port_config tcss_ports
[MAX_TYPE_C_PORTS
];
413 bool sata_salp_support
;
414 bool sata_ports_enable
[8];
415 bool sata_ports_dev_slp
[8];
418 * Enable(0)/Disable(1) SATA Power Optimizer on PCH side.
419 * Default 0. Setting this to 1 disables the SATA Power Optimizer.
421 bool sata_pwr_optimize_disable
;
424 * SATA Port Enable Dito Config.
425 * Enable DEVSLP Idle Timeout settings (DmVal, DitoVal).
427 bool sata_ports_enable_dito_config
[8];
429 /* SataPortsDmVal is the DITO multiplier. Default is 15. */
430 uint8_t sata_ports_dm_val
[8];
432 /* SataPortsDitoVal is the DEVSLP Idle Timeout, default is 625ms */
433 uint16_t sata_ports_dito_val
[8];
436 bool pch_hda_audio_link_hda_enable
;
437 bool pch_hda_dsp_enable
;
438 bool pch_hda_sdi_enable
[MAX_HD_AUDIO_SDI_LINKS
];
440 /* iDisp-Link T-Mode 0: 2T, 2: 4T, 3: 8T, 4: 16T */
446 } pch_hda_idisp_link_tmode
;
448 /* iDisp-Link Freq 4: 96MHz, 3: 48MHz. */
450 HDA_LINKFREQ_48MHZ
= 3,
451 HDA_LINKFREQ_96MHZ
= 4,
452 } pch_hda_idisp_link_frequency
;
454 bool pch_hda_idisp_codec_enable
;
456 struct pcie_rp_config pch_pcie_rp
[CONFIG_MAX_PCH_ROOT_PORTS
];
457 struct pcie_rp_config cpu_pcie_rp
[CONFIG_MAX_CPU_ROOT_PORTS
];
458 uint8_t pcie_clk_config_flag
[CONFIG_MAX_PCIE_CLOCK_SRC
];
482 } igd_dvmt50_pre_alloc
;
484 bool skip_ext_gfx_scan
;
489 * SerialIO device mode selection:
490 * PchSerialIoDisabled,
493 * PchSerialIoLegacyUart,
494 * PchSerialIoSkipInit
496 uint8_t serial_io_i2c_mode
[CONFIG_SOC_INTEL_I2C_DEV_MAX
];
497 uint8_t serial_io_gspi_mode
[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX
];
498 uint8_t serial_io_uart_mode
[CONFIG_SOC_INTEL_UART_DEV_MAX
];
500 * GSPIn Default Chip Select Mode:
504 uint8_t serial_io_gspi_cs_mode
[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX
];
506 * GSPIn Default Chip Select State:
510 uint8_t serial_io_gspi_cs_state
[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX
];
512 /* Enable Pch iSCLK */
515 /* CNVi BT Core Enable/Disable */
518 /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */
519 bool cnvi_bt_audio_offload
;
522 * These GPIOs will be programmed by the IOM to handle biasing of the
523 * Type-C aux (SBU) signals when certain alternate modes are used.
524 * `pad_auxn_dc` should be assigned to the GPIO pad providing negative
525 * bias (name usually contains `AUXN_DC` or `AUX_N`); similarly,
526 * `pad_auxp_dc` should be assigned to the GPIO providing positive bias
527 * (name often contains `AUXP_DC` or `_AUX_P`).
529 struct typec_aux_bias_pads typec_aux_bias_pads
[MAX_TYPE_C_PORTS
];
532 * SOC Aux orientation override:
533 * This is a bitfield that corresponds to up to 4 TCSS ports on ADL.
534 * Even numbered bits (0, 2, 4, 6) control the retimer being handled by SOC.
535 * Odd numbered bits (1, 3, 5, 7) control the orientation of the physical aux lines
536 * on the motherboard.
538 uint16_t tcss_aux_ori
;
541 * Override GPIO PM configuration:
542 * 0: Use FSP default GPIO PM program,
543 * 1: coreboot to override GPIO PM program
545 bool gpio_override_pm
;
548 * GPIO PM configuration: 0 to disable, 1 to enable power gating
550 * Bit 5: MISCCFG_GPSIDEDPCGEN
551 * Bit 4: MISCCFG_GPRCOMPCDLCGEN
552 * Bit 3: MISCCFG_GPRTCDLCGEN
553 * Bit 2: MISCCFG_GSXLCGEN
554 * Bit 1: MISCCFG_GPDPCGEN
555 * Bit 0: MISCCFG_GPDLCGEN
557 uint8_t gpio_pm
[TOTAL_GPIO_COMM
];
562 * 0:Disabled, 1:eDP, 2:MIPI DSI
564 uint8_t ddi_portA_config
;
565 uint8_t ddi_portB_config
;
567 /* Enable(1)/Disable(0) HPD/DDC */
568 uint8_t ddi_ports_config
[DDI_PORT_COUNT
];
570 /* Hybrid storage mode enable (1) / disable (0)
571 * This mode makes FSP detect Optane and NVME and set PCIe lane mode
573 bool hybrid_storage_mode
;
575 #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_N)
576 /* eMMC HS400 mode */
577 bool emmc_enable_hs400_mode
;
581 * Override CPU flex ratio value:
582 * CPU ratio value controls the maximum processor non-turbo ratio.
583 * Valid Range 0 to 63.
585 * In general descriptor provides option to set default cpu flex ratio.
586 * Default cpu flex ratio is 0 ensures booting with non-turbo max frequency.
587 * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0.
589 * Only override CPU flex ratio if don't want to boot with non-turbo max.
591 uint8_t cpu_ratio_override
;
594 * Enable/Disable DMI Power Optimizer on PCH side.
595 * Default is "false".
597 bool dmi_power_optimize_disable
;
600 * Used to communicate the power delivery design capability of the board. This
601 * value is an enum of the available power delivery segments that are defined in
602 * the Platform Design Guide.
604 uint8_t vr_power_delivery_design
;
607 * Enable(1)/Disable(0) CPU Replacement check.
608 * Default 0. Setting this to 1 to check CPU replacement.
610 bool cpu_replacement_check
;
612 /* ISA Serial Base selection. */
614 ISA_SERIAL_BASE_ADDR_3F8
,
615 ISA_SERIAL_BASE_ADDR_2F8
,
616 } isa_serial_uart_base
;
618 /* structure containing various settings for PCH FIVRs */
620 bool configure_ext_fivr
;
621 enum fivr_enable_states v1p05_enable_bitmap
;
622 enum fivr_enable_states vnn_enable_bitmap
;
623 enum fivr_enable_states vnn_sx_enable_bitmap
;
624 enum fivr_voltage_supported v1p05_supported_voltage_bitmap
;
625 enum fivr_voltage_supported vnn_supported_voltage_bitmap
;
626 /* V1p05 Rail Voltage in mv */
627 int v1p05_voltage_mv
;
628 /* Vnn Rail Voltage in mv */
630 /* VnnSx Rail Voltage in mv */
631 int vnn_sx_voltage_mv
;
632 /* External Icc Max for V1p05 rail in mA */
633 int v1p05_icc_max_ma
;
634 /* External Icc Max for VnnSx rail in mA */
638 /* VrConfig Settings.
639 * 0 = VR_DOMAIN_IA Core 1 = VR_DOMAIN_GT.
641 struct vr_config domain_vr_config
[NUM_VR_DOMAINS
];
643 uint16_t max_dram_speed_mts
;
646 SLP_S3_ASSERTION_DEFAULT
,
647 SLP_S3_ASSERTION_60_US
,
648 SLP_S3_ASSERTION_1_MS
,
649 SLP_S3_ASSERTION_50_MS
,
650 SLP_S3_ASSERTION_2_S
,
651 } pch_slp_s3_min_assertion_width
;
654 SLP_S4_ASSERTION_DEFAULT
,
659 } pch_slp_s4_min_assertion_width
;
662 SLP_SUS_ASSERTION_DEFAULT
,
663 SLP_SUS_ASSERTION_0_MS
,
664 SLP_SUS_ASSERTION_500_MS
,
665 SLP_SUS_ASSERTION_1_S
,
666 SLP_SUS_ASSERTION_4_S
,
667 } pch_slp_sus_min_assertion_width
;
670 SLP_A_ASSERTION_DEFAULT
,
671 SLP_A_ASSERTION_0_MS
,
673 SLP_A_ASSERTION_98_MS
,
675 } pch_slp_a_min_assertion_width
;
678 * PCH PM Reset Power Cycle Duration
679 * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the
680 * stretch duration programmed in the following registers:
681 * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert)
682 * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert)
683 * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert)
684 * - PM_CFG.SLP_LAN_MIN_ASST_WDTH
687 POWER_CYCLE_DURATION_DEFAULT
,
688 POWER_CYCLE_DURATION_1S
,
689 POWER_CYCLE_DURATION_2S
,
690 POWER_CYCLE_DURATION_3S
,
691 POWER_CYCLE_DURATION_4S
,
692 } pch_reset_power_cycle_duration
;
694 /* Platform Power Pmax */
695 uint16_t platform_pmax
;
698 * PCODE MMIO Mailbox: Set the desired RFI frequency, in increments of 100KHz.
700 * Range varies based on XTAL clock:
701 * 0-1918*100 KHz (Up to 191.8MHz) for 24MHz clock
702 * 0-1535*100 KHz (Up to 153.5MHz) for 19MHz clock
704 uint32_t fivr_rfi_frequency
;
707 * Set the Spread Spectrum Range.
708 * Range: 0.5%, 1%, 1.5%, 2%, 3%, 4%, 5%, 6%.
709 * Each Range is translated to an encoded value for FIVR register.
710 * 0.5% = 0, 1% = 3, 1.5% = 8, 2% = 18, 3% = 28, 4% = 34, 5% = 39, 6% = 44.
712 uint8_t fivr_spread_spectrum
;
713 /* Enable or Disable Acoustic Noise Mitigation feature */
714 bool acoustic_noise_mitigation
;
716 * Acoustic Noise Mitigation Range. Defines the maximum Pre-Wake
717 * randomization time in micro ticks. This can be programmed only
718 * if AcousticNoiseMitigation is enabled.
722 /* Disable Fast Slew Rate for Deep Package C States for VR domains */
723 bool fast_pkg_c_ramp_disable
[NUM_VR_DOMAINS
];
725 * Slew Rate configuration for Deep Package C States for VR domains
726 * 0: Fast/2, 1: Fast/4, 2: Fast/8, 3: Fast/16; see enum slew_rate for values
728 uint8_t slow_slew_rate
[NUM_VR_DOMAINS
];
730 /* Energy-Performance Preference (HWP feature) */
731 bool enable_energy_perf_pref
;
732 uint8_t energy_perf_pref_value
;
735 * Enable or Disable C1 Cstate Demotion.
736 * Default 0. Set this to 1 in order to disable C state demotion.
738 bool disable_c1_state_auto_demotion
;
741 * Enable or Disable PCH USB2 Phy power gating.
742 * Default 0. Set this to 1 in order to disable PCH USB2 Phy Power gating.
743 * Workaround for Intel TA# 723158 to prevent possible display flicker.
745 bool usb2_phy_sus_pg_disable
;
748 * Enable or Disable Package C-state Demotion.
749 * Default is set to 0.
750 * Set this to 1 in order to disable Package C-state demotion.
752 bool disable_package_c_state_demotion
;
754 /* Enable Enhanced C States */
757 /* i915 struct for GMA backlight control */
758 struct i915_gpu_controller_info gfx
;
761 * IGD panel configuration
763 struct i915_gpu_panel_config panel_cfg
;
766 * Enable or Disable Tccold Handshake
767 * Default is set to 0.
768 * Set this to 1 in order to disable Tccold Handshake
770 bool disable_dynamic_tccold_handshake
;
773 * Enable or Disable Reduced BasicMemoryTest size.
774 * Default is set to 0.
775 * Set this to 1 in order to reduce BasicMemoryTest size
777 bool lower_basic_mem_test_size
;
780 * Enable or Disable SaGV reordering operation.
781 * Default is set to 0, SaGV reordering enabled.
782 * Set this to 1 in order to disable SaGV reordering.
784 bool disable_sagv_reorder
;
787 * Enable or Disable hwp scalability tracking.
788 * Default is set to 1.
789 * Set this to 0 in order to disable hwp scalability tracking.
791 bool enable_hwp_scalability_tracking
;
794 * (ADL-N/TWL only) Vccin Aux Imon Iccmax
795 * Defaults to 27000 (27A), the value has to align with HW design.
796 * Recommended value: 25000 (PD_TIER_PREMIUM) or 27000 (PD_TIER_VOLUME)
799 PD_TIER_PREMIUM
= 25000,
800 PD_TIER_VOLUME
= 27000
801 } vccin_aux_imon_iccmax
;
804 typedef struct soc_intel_alderlake_config config_t
;