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 <intelblocks/cfg.h>
8 #include <intelblocks/gpio.h>
9 #include <intelblocks/gspi.h>
10 #include <stdint.h>
11 #include <soc/gpe.h>
12 #include <soc/gpio.h>
13 #include <soc/pch.h>
14 #include <soc/gpio_defs.h>
15 #include <soc/pci_devs.h>
16 #include <soc/pmc.h>
17 #include <soc/serialio.h>
18 #include <soc/usb.h>
19 
21 
22  /* Common struct containing soc config data required by common code */
24 
25  /* Gpio group routed to each dword of the GPE0 block. Values are
26  * of the form GPP_[A:G] or GPD. */
27  uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
28  uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
29  uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
30 
31  /* Generic IO decode ranges */
36 
37  /* Enable S0iX support */
39  /* Enable DPTF support */
41 
42  /* Deep SX enable for both AC and DC */
47 
48  /* Deep Sx Configuration
49  * DSX_EN_WAKE_PIN - Enable WAKE# pin
50  * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
51  * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
53 
54  /* TCC activation offset */
56 
57  /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs.
58  * When enabled memory will be training at two different frequencies.
59  * 0:Disabled, 1:FixedLow, 2:FixedMid, 3:FixedHigh, 4:Enabled */
60  enum {
66  } SaGv;
67 
68  /* Rank Margin Tool. 1:Enable, 0:Disable */
70 
71  /* USB related */
72  struct usb2_port_config usb2_ports[16];
73  struct usb3_port_config usb3_ports[10];
74  /* Wake Enable Bitmap for USB2 ports */
76  /* Wake Enable Bitmap for USB3 ports */
78 
79  /* SATA related */
85 
86  /* Audio related */
89 
90  /* Enable/Disable HD Audio Link. Muxed with SSP0/SSP1/SNDW1 */
101 
102  /* PCIe Root Ports */
103  uint8_t PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
104  /* PCIe output clocks type to PCIe devices.
105  * 0-23: PCH rootport, 0x70: LAN, 0x80: unspecified but in use,
106  * 0xFF: not used */
107  uint8_t PcieClkSrcUsage[CONFIG_MAX_ROOT_PORTS];
108  /* PCIe ClkReq-to-ClkSrc mapping, number of clkreq signal assigned to
109  * clksrc. */
110  uint8_t PcieClkSrcClkReq[CONFIG_MAX_ROOT_PORTS];
111 
112  /* SMBus */
114 
115  /* eMMC and SD */
117  /* Need to update DLL setting to get Emmc running at HS400 speed */
125 
126  /* Enable if SD Card Power Enable Signal is Active High */
128 
129  /* Heci related */
131 
132  /* Gfx related */
134 
136 
137  /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */
139 
140  /* Enable C6 DRAM */
142 
143  /*
144  * SerialIO device mode selection:
145  * PchSerialIoDisabled,
146  * PchSerialIoPci,
147  * PchSerialIoHidden,
148  * PchSerialIoLegacyUart,
149  * PchSerialIoSkipInit
150  */
151  uint8_t SerialIoI2cMode[CONFIG_SOC_INTEL_I2C_DEV_MAX];
152  uint8_t SerialIoGSpiMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
153  uint8_t SerialIoUartMode[CONFIG_SOC_INTEL_UART_DEV_MAX];
154  /*
155  * GSPIn Default Chip Select Mode:
156  * 0:Hardware Mode,
157  * 1:Software Mode
158  */
159  uint8_t SerialIoGSpiCsMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
160  /*
161  * GSPIn Default Chip Select State:
162  * 0: Low,
163  * 1: High
164  */
165  uint8_t SerialIoGSpiCsState[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
166 
167  /* GPIO SD card detect pin */
168  unsigned int sdcard_cd_gpio;
169 
170  /* Enable Pch iSCLK */
172 
173  /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */
175 
176  /*
177  * Override GPIO PM configuration:
178  * 0: Use FSP default GPIO PM program,
179  * 1: coreboot to override GPIO PM program
180  */
182 
183  /*
184  * GPIO PM configuration: 0 to disable, 1 to enable power gating
185  * Bit 6-7: Reserved
186  * Bit 5: MISCCFG_GPSIDEDPCGEN
187  * Bit 4: MISCCFG_GPRCOMPCDLCGEN
188  * Bit 3: MISCCFG_GPRTCDLCGEN
189  * Bit 2: MISCCFG_GSXLCGEN
190  * Bit 1: MISCCFG_GPDPCGEN
191  * Bit 0: MISCCFG_GPDLCGEN
192  */
194 };
195 
196 typedef struct soc_intel_icelake_config config_t;
197 
198 #endif
#define TOTAL_GPIO_COMM
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint8_t Heci3Enabled
Definition: chip.h:130
uint8_t PchHdaAudioLinkSsp0
Definition: chip.h:94
uint8_t SataSalpSupport
Definition: chip.h:82
uint8_t PcieClkSrcClkReq[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:110
uint8_t SataPortsDevSlp[8]
Definition: chip.h:84
uint8_t SerialIoGSpiCsState[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]
Definition: chip.h:165
uint8_t PcieClkSrcUsage[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:107
enum soc_intel_icelake_config::@577 SaGv
uint32_t tcc_offset
Definition: chip.h:55
uint8_t PchHdaAudioLinkHda
Definition: chip.h:91
uint32_t EmmcTxCmdDelayRegValue
Definition: chip.h:119
uint8_t PchHdaAudioLinkSndw2
Definition: chip.h:98
uint8_t PchHdaDspEnable
Definition: chip.h:88
uint32_t gen2_dec
Definition: chip.h:33
uint8_t PchHdaAudioLinkSsp1
Definition: chip.h:95
uint8_t PchHdaAudioLinkSndw4
Definition: chip.h:100
uint8_t PcieRpEnable[CONFIG_MAX_ROOT_PORTS]
Definition: chip.h:103
uint8_t SerialIoUartMode[CONFIG_SOC_INTEL_UART_DEV_MAX]
Definition: chip.h:153
uint8_t SerialIoI2cMode[CONFIG_SOC_INTEL_I2C_DEV_MAX]
Definition: chip.h:151
uint8_t enable_c6dram
Definition: chip.h:141
uint8_t gpio_override_pm
Definition: chip.h:181
uint8_t SataPortsEnable[8]
Definition: chip.h:83
uint8_t EmmcUseCustomDlls
Definition: chip.h:118
uint32_t EmmcTxDataDelay2RegValue
Definition: chip.h:121
uint8_t SdCardPowerEnableActiveHigh
Definition: chip.h:127
uint32_t EmmcTxDataDelay1RegValue
Definition: chip.h:120
uint8_t SataEnable
Definition: chip.h:80
uint32_t gen1_dec
Definition: chip.h:32
struct usb2_port_config usb2_ports[16]
Definition: chip.h:72
uint16_t usb2_wake_enable_bitmap
Definition: chip.h:75
uint8_t SkipExtGfxScan
Definition: chip.h:133
uint32_t EmmcRxCmdDataDelay2RegValue
Definition: chip.h:123
struct soc_intel_common_config common_soc_config
Definition: chip.h:23
uint8_t PchHdaAudioLinkSndw3
Definition: chip.h:99
uint8_t PchHdaAudioLinkDmic0
Definition: chip.h:92
uint32_t gen4_dec
Definition: chip.h:35
uint8_t SerialIoGSpiCsMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]
Definition: chip.h:159
uint8_t SerialIoGSpiMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]
Definition: chip.h:152
uint32_t gen3_dec
Definition: chip.h:34
uint8_t PchHdaAudioLinkDmic1
Definition: chip.h:93
uint16_t usb3_wake_enable_bitmap
Definition: chip.h:77
uint8_t ScsEmmcHs400Enabled
Definition: chip.h:116
uint32_t deep_sx_config
Definition: chip.h:52
uint32_t EmmcRxCmdDataDelay1RegValue
Definition: chip.h:122
uint8_t Device4Enable
Definition: chip.h:135
uint32_t EmmcRxStrobeDelayRegValue
Definition: chip.h:124
uint8_t PchHdaAudioLinkSndw1
Definition: chip.h:97
uint8_t PchHdaEnable
Definition: chip.h:87
uint8_t PchHdaAudioLinkSsp2
Definition: chip.h:96
unsigned int sdcard_cd_gpio
Definition: chip.h:168
struct usb3_port_config usb3_ports[10]
Definition: chip.h:73
uint8_t gpio_pm[TOTAL_GPIO_COMM]
Definition: chip.h:193