coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _SOC_CHIP_H_
4 #define _SOC_CHIP_H_
5 
6 #include <acpi/acpi_device.h>
7 #include <device/i2c_simple.h>
10 #include <intelblocks/cfg.h>
11 #include <intelblocks/gspi.h>
12 #include <intelblocks/lpc_lib.h>
14 #include <stdint.h>
15 #include <soc/gpe.h>
16 #include <soc/gpio.h>
17 #include <soc/irq.h>
18 #include <soc/pci_devs.h>
19 #include <soc/pmc.h>
20 #include <soc/serialio.h>
21 #include <soc/usb.h>
22 #include <soc/vr_config.h>
23 
24 #define MAX_PEG_PORTS 3
25 
29 };
30 
32 
33  /* Common struct containing soc config data required by common code */
35 
36  /* Common struct containing power limits configuration information */
38 
39  /* IGD panel configuration */
41 
42  /* Gpio group routed to each dword of the GPE0 block. Values are
43  * of the form GPP_[A:G] or GPD. */
44  uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
45  uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
46  uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
47 
48  /* LPC fixed enables and ranges */
51 
52  /* Generic IO decode ranges */
57 
58  /* Enable S0iX support */
60 
61  /* Enable DPTF support */
63 
64  /* Deep SX enables */
69 
70  /*
71  * Deep Sx Configuration
72  * DSX_EN_WAKE_PIN - Enable WAKE# pin
73  * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
74  * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin
75  */
77 
78  /* TCC activation offset */
80 
81  /*
82  * System Agent dynamic frequency configuration
83  * When enabled memory will be trained at two different frequencies.
84  * 0 = Disabled
85  * 1 = FixedLow
86  * 2 = FixedHigh
87  * 3 = Enabled
88  */
89  enum {
94  } SaGv;
95 
96  /* Enable/disable Rank Margin Tool */
98 
99  /* Disable Command TriState */
101 
102  /* Lan */
107 
108  /* SATA related */
109  enum {
119 
120  /* Audio related */
122 
123  /* HDA Virtual Channel Type Select */
124  enum {
128 
129  /*
130  * I/O Buffer Ownership:
131  * 0: HD-A Link
132  * 1 Shared, HD-A Link and I2S Port
133  * 3: I2S Ports
134  */
136 
137  /* Trace Hub function */
140 
141  /* DCI Enable/Disable */
143 
144  /*
145  * PCIe Root Port configuration:
146  * each element of array corresponds to
147  * respective PCIe root port.
148  */
149 
150  /* PEG Max Link Width */
151  enum {
158 
159  enum {
165 
166  enum {
171 
172  /*
173  * Enable/Disable Root Port
174  * 0: Disable Root Port
175  * 1: Enable Root Port
176  */
177  u8 PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
178 
179  /*
180  * Enable/Disable Clk-req support for Root Port
181  * 0: Disable Clk-Req
182  * 1: Enable Clk-req
183  */
184  u8 PcieRpClkReqSupport[CONFIG_MAX_ROOT_PORTS];
185 
186  /*
187  * Clk-req source for Root Port
188  */
189  u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS];
190 
191  /*
192  * Clk source number for Root Port
193  */
194  u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS];
195 
196  /*
197  * Enable/Disable AER (Advanced Error Reporting) for Root Port
198  * 0: Disable AER
199  * 1: Enable AER
200  */
201  u8 PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
202 
203  /*
204  * Enable/Disable Latency Tolerance Reporting for Root Port
205  * 0: Disable LTR
206  * 1: Enable LTR
207  */
208  u8 PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
209 
210  /* Enable/Disable HotPlug support for Root Port */
211  u8 PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
212 
213  /* PCIE RP Max Payload, Max Payload Size supported */
214  enum {
217  } PcieRpMaxPayload[CONFIG_MAX_ROOT_PORTS];
218 
219  /* PCIE RP ASPM, ASPM support for the root port */
220  enum {
227  } pcie_rp_aspm[CONFIG_MAX_ROOT_PORTS];
228 
229  /* PCIe RP L1 substate */
230  enum {
235  } pcie_rp_l1substates[CONFIG_MAX_ROOT_PORTS];
236 
237  /* USB related */
238  struct usb2_port_config usb2_ports[16];
239  struct usb3_port_config usb3_ports[10];
241 
242  /*
243  * SerialIO device mode selection:
244  *
245  * Device index:
246  * PchSerialIoIndexI2C0
247  * PchSerialIoIndexI2C1
248  * PchSerialIoIndexI2C2
249  * PchSerialIoIndexI2C3
250  * PchSerialIoIndexI2C4
251  * PchSerialIoIndexI2C5
252  * PchSerialIoIndexI2C6
253  * PchSerialIoIndexSpi0
254  * PchSerialIoIndexSpi1
255  * PchSerialIoIndexUart0
256  * PchSerialIoIndexUart1
257  * PchSerialIoIndexUart2
258  *
259  * Mode select:
260  * PchSerialIoDisabled
261  * PchSerialIoAcpi
262  * PchSerialIoPci
263  * PchSerialIoAcpiHidden
264  * PchSerialIoLegacyUart
265  */
267 
268  /* I2C */
269  /* Bus voltage level, default is 3.3V */
270  enum skylake_i2c_voltage i2c_voltage[CONFIG_SOC_INTEL_I2C_DEV_MAX];
271 
272  /* eMMC and SD */
277 
278  enum {
286 
287  /* GPIO IRQ Route The valid values is 14 or 15*/
289  /* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23*/
291  /* TCO IRQ Select The valid values is 9, 10, 11, 20 21, 22, 23*/
294  /* Enable SMI_LOCK bit to prevent writes to the Global SMI Enable bit.*/
296  /*
297  * Enable RTC lower and upper 128 byte Lock bits to lock Bytes 38h-3Fh
298  * in the upper and lower 128-byte bank of RTC RAM.
299  */
301 
302  /*
303  * Determine if WLAN wake from Sx, corresponds to the
304  * HOST_WLAN_PP_EN bit in the PWRM_CFG3 register.
305  */
307 
308  /*
309  * Determine if WLAN wake from DeepSx, corresponds to
310  * the DSX_WLAN_PP_EN bit in the PWRM_CFG3 register.
311  */
313 
314  /*
315  * Corresponds to the "WOL Enable Override" bit in the General PM
316  * Configuration B (GEN_PMCON_B) register
317  */
319  /* Determine if enable PCIe to wake from deep Sx*/
321  /* Deep Sx Policy. Values 0: PchDeepSxPolDisable,
322  * 1: PchDpS5BatteryEn, 2: PchDpS5AlwaysEn, 3: PchDpS4S5BatteryEn,
323  * 4: PchDpS4S5AlwaysEn, 5: PchDpS3S4S5BatteryEn, 6: PchDpS3S4S5AlwaysEn
324  */
326 
327  enum {
333 
334  enum {
341 
342  /* When deep Sx enabled: Must be greater than or equal to
343  all other minimum assertion widths. */
344  enum {
350 
351  enum {
357 
358  /*
359  * SLP_X Stretching After SUS Well Power Up. Values 0: Disabled,
360  * 1: Enabled
361  */
363  /*
364  * PCH power button override period.
365  * Values: 0x0 - 4s, 0x1 - 6s, 0x2 - 8s, 0x3 - 10s, 0x4 - 12s, 0x5 - 14s
366  */
368 
369  /*
370  * PCH Pm Slp S0 Voltage Margining Enable
371  * Indicates platform supports VCCPrim_Core Voltage Margining
372  * in SLP_S0# asserted state.
373  */
375 
376  enum {
383 
385 
386  enum {
391 
392  /*
393  * VrConfig Settings for 5 domains
394  * 0 = System Agent, 1 = IA Core, 2 = Ring,
395  * 3 = GT unsliced, 4 = GT sliced
396  */
398 
399  /*
400  * Enable VR specific mailbox command
401  * 000b - Don't Send any VR command
402  * 001b - VR command specifically for the MPS IMPV8 VR will be sent
403  * 010b - VR specific command sent for PS4 exit issue
404  * 011b - VR specific command sent for both MPS IMPV8 & PS4 exit issue
405  */
407 
408  /* Enable/Disable host reads to PMC XRAM registers */
410 
411  /*
412  * Use SD card detect GPIO with default config:
413  * - Edge triggered
414  * - No internal pull
415  * - Active both (high + low)
416  * - Can wake device from D3
417  * - 100ms debounce timeout
418  *
419  * GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
420  * "\\_SB.PCI0.GPIO", 0, ResourceConsumer)
421  * { sdcard_cd_gpio }
422  */
423  unsigned int sdcard_cd_gpio;
424 
425  /* Wake Enable Bitmap for USB2 ports */
427 
428  /* Wake Enable Bitmap for USB3 ports */
430 
431  /*
432  * Acoustic Noise Mitigation
433  * 0b - Disable
434  * 1b - Enable noise mitigation
435  */
437 
438  /*
439  * Disable Fast Package C-state ramping
440  * Need to set AcousticNoiseMitigation = '1' first
441  * 0b - Enabled
442  * 1b - Disabled
443  */
447 
448  /*
449  * Adjust the VR slew rates
450  * Need to set AcousticNoiseMitigation = '1' first
451  * 000b - Fast/2
452  * 001b - Fast/4
453  * 010b - Fast/8
454  * 011b - Fast/16
455  */
459 
460  /* Enable/Disable EIST
461  * 1b - Enabled
462  * 0b - Disabled
463  */
465 
466  /*
467  * Activates VR mailbox command for Intersil VR C-state issues.
468  * 0 - no mailbox command sent.
469  * 1 - VR mailbox command sent for IA/GT rails only.
470  * 2 - VR mailbox command sent for IA/GT/SA rails.
471  */
473 
474  /* i915 struct for GMA backlight control */
476 };
477 
478 typedef struct soc_intel_skylake_config config_t;
479 
480 #endif
@ NUM_VR_DOMAINS
Definition: vr_config.h:43
serirq_mode
Definition: lpc_lib.h:34
@ PchSerialIoIndexMax
Definition: serialio.h:27
skylake_i2c_voltage
Definition: chip.h:26
@ I2C_VOLTAGE_1V8
Definition: chip.h:28
@ I2C_VOLTAGE_3V3
Definition: chip.h:27
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
uint32_t u32
Definition: stdint.h:51
uint16_t u16
Definition: stdint.h:48
uint8_t u8
Definition: stdint.h:45
unsigned char uint8_t
Definition: stdint.h:8
struct usb3_port_config usb3_ports[10]
Definition: chip.h:239
enum soc_intel_skylake_config::@622 SataMode
enum soc_intel_skylake_config::@636 SerialIrqConfigStartFramePulse
enum soc_intel_skylake_config::@628 pcie_rp_aspm[CONFIG_MAX_ROOT_PORTS]
u8 PcieRpEnable[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:177
enum soc_intel_skylake_config::@624 Peg0MaxLinkWidth
uint32_t gen1_dec
Definition: chip.h:53
struct soc_intel_common_config common_soc_config
Definition: chip.h:34
u8 PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:208
uint16_t lpc_ioe
Definition: chip.h:50
unsigned int sdcard_cd_gpio
Definition: chip.h:423
enum soc_intel_skylake_config::@630 PrimaryDisplay
uint16_t lpc_iod
Definition: chip.h:49
struct usb2_port_config usb2_ports[16]
Definition: chip.h:238
u8 PcieRpClkReqSupport[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:184
enum soc_intel_skylake_config::@623 PchHdaVcType
enum soc_intel_skylake_config::@632 PmConfigSlpS4MinAssert
u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:194
u8 WakeConfigPcieWakeFromDeepSx
Definition: chip.h:320
uint32_t gen3_dec
Definition: chip.h:55
enum soc_intel_skylake_config::@631 PmConfigSlpS3MinAssert
enum serirq_mode serirq_mode
Definition: chip.h:384
u8 PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:211
u8 WakeConfigWolEnableOverride
Definition: chip.h:318
enum soc_intel_skylake_config::@635 PmConfigPwrCycDur
enum soc_intel_skylake_config::@625 Peg1MaxLinkWidth
uint32_t gen2_dec
Definition: chip.h:54
struct i915_gpu_panel_config panel_cfg
Definition: chip.h:40
struct soc_power_limits_config power_limits_config
Definition: chip.h:37
enum soc_intel_skylake_config::@634 PmConfigSlpAMinAssert
enum soc_intel_skylake_config::@627 PcieRpMaxPayload[CONFIG_MAX_ROOT_PORTS]
u8 PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:201
uint32_t deep_sx_config
Definition: chip.h:76
struct i915_gpu_controller_info gfx
Definition: chip.h:475
struct vr_config domain_vr_config[NUM_VR_DOMAINS]
Definition: chip.h:397
enum soc_intel_skylake_config::@629 pcie_rp_l1substates[CONFIG_MAX_ROOT_PORTS]
enum soc_intel_skylake_config::@633 PmConfigSlpSusMinAssert
u8 SerialIoDevMode[PchSerialIoIndexMax]
Definition: chip.h:266
u8 PmConfigPwrBtnOverridePeriod
Definition: chip.h:367
uint32_t gen4_dec
Definition: chip.h:56
enum soc_intel_skylake_config::@621 SaGv
uint32_t tcc_offset
Definition: chip.h:79
u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:189
enum skylake_i2c_voltage i2c_voltage[CONFIG_SOC_INTEL_I2C_DEV_MAX]
Definition: chip.h:270
enum soc_intel_skylake_config::@626 Peg2MaxLinkWidth