| 1 |
|
| 2 |
|
| 3 |
#ifndef _SOC_CHIP_H_ |
| 4 |
#define _SOC_CHIP_H_ |
| 5 |
|
| 6 |
#include <device/pci_ids.h> |
| 7 |
#include <drivers/i2c/designware/dw_i2c.h> |
| 8 |
#include <gpio.h> |
| 9 |
#include <drivers/intel/gma/gma.h> |
| 10 |
#include <intelblocks/cfg.h> |
| 11 |
#include <intelblocks/gspi.h> |
| 12 |
#include <intelblocks/pcie_rp.h> |
| 13 |
#include <intelblocks/power_limit.h> |
| 14 |
#include <intelblocks/xhci.h> |
| 15 |
#include <soc/gpe.h> |
| 16 |
#include <soc/pch.h> |
| 17 |
#include <soc/pci_devs.h> |
| 18 |
#include <soc/pcie_modphy.h> |
| 19 |
#include <soc/pmc.h> |
| 20 |
#include <soc/serialio.h> |
| 21 |
#include <soc/usb.h> |
| 22 |
#include <stdint.h> |
| 23 |
#include <stdbool.h> |
| 24 |
|
| 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 |
|
| 29 |
|
| 30 |
enum 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 |
|
| 41 |
enum soc_intel_jasperlake_cpu_tdps { |
| 42 |
TDP_6W = 6, |
| 43 |
TDP_10W = 10 |
| 44 |
}; |
| 45 |
|
| 46 |
|
| 47 |
static 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 |
|
| 60 |
|
| 61 |
enum igd_dvmt50_pre_alloc { |
| 62 |
IGD_SM_0MB = 0x00, |
| 63 |
IGD_SM_32MB = 0x01, |
| 64 |
IGD_SM_64MB = 0x02, |
| 65 |
IGD_SM_96MB = 0x03, |
| 66 |
IGD_SM_128MB = 0x04, |
| 67 |
IGD_SM_160MB = 0x05, |
| 68 |
IGD_SM_4MB = 0xF0, |
| 69 |
IGD_SM_8MB = 0xF1, |
| 70 |
IGD_SM_12MB = 0xF2, |
| 71 |
IGD_SM_16MB = 0xF3, |
| 72 |
IGD_SM_20MB = 0xF4, |
| 73 |
IGD_SM_24MB = 0xF5, |
| 74 |
IGD_SM_28MB = 0xF6, |
| 75 |
IGD_SM_36MB = 0xF8, |
| 76 |
IGD_SM_40MB = 0xF9, |
| 77 |
IGD_SM_44MB = 0xFA, |
| 78 |
IGD_SM_48MB = 0xFB, |
| 79 |
IGD_SM_52MB = 0xFC, |
| 80 |
IGD_SM_56MB = 0xFD, |
| 81 |
IGD_SM_60MB = 0xFE, |
| 82 |
}; |
| 83 |
|
| 84 |
enum igd_aperture_size { |
| 85 |
IGD_AP_SZ_128MB = 0x00, |
| 86 |
IGD_AP_SZ_256MB = 0x01, |
| 87 |
IGD_AP_SZ_512MB = 0x02, |
| 88 |
}; |
| 89 |
|
| 90 |
struct soc_intel_jasperlake_config { |
| 91 |
|
| 92 |
struct soc_intel_common_config common_soc_config; |
| 93 |
|
| 94 |
|
| 95 |
struct soc_power_limits_config power_limits_config[JSL_POWER_LIMITS_COUNT]; |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
uint8_t pmc_gpe0_dw0; |
| 100 |
uint8_t pmc_gpe0_dw1; |
| 101 |
uint8_t pmc_gpe0_dw2; |
| 102 |
|
| 103 |
|
| 104 |
uint32_t gen1_dec; |
| 105 |
uint32_t gen2_dec; |
| 106 |
uint32_t gen3_dec; |
| 107 |
uint32_t gen4_dec; |
| 108 |
|
| 109 |
|
| 110 |
bool s0ix_enable; |
| 111 |
|
| 112 |
bool dptf_enable; |
| 113 |
|
| 114 |
|
| 115 |
bool deep_s3_enable_ac; |
| 116 |
bool deep_s3_enable_dc; |
| 117 |
bool deep_s5_enable_ac; |
| 118 |
bool deep_s5_enable_dc; |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
uint32_t deep_sx_config; |
| 125 |
|
| 126 |
|
| 127 |
uint32_t tcc_offset; |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
enum { |
| 134 |
SaGv_Disabled, |
| 135 |
SaGv_FixedPoint0, |
| 136 |
SaGv_FixedPoint1, |
| 137 |
SaGv_FixedPoint2, |
| 138 |
SaGv_Enabled, |
| 139 |
} SaGv; |
| 140 |
|
| 141 |
|
| 142 |
bool RMT; |
| 143 |
|
| 144 |
|
| 145 |
struct usb2_port_config usb2_ports[16]; |
| 146 |
struct usb3_port_config usb3_ports[10]; |
| 147 |
|
| 148 |
uint16_t usb2_wake_enable_bitmap; |
| 149 |
|
| 150 |
uint16_t usb3_wake_enable_bitmap; |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
uint8_t xhci_lfps_sampling_offtime_ms; |
| 156 |
|
| 157 |
|
| 158 |
uint8_t SataMode; |
| 159 |
bool SataSalpSupport; |
| 160 |
bool SataPortsEnable[8]; |
| 161 |
bool SataPortsDevSlp[8]; |
| 162 |
|
| 163 |
|
| 164 |
bool PchHdaDspEnable; |
| 165 |
bool PchHdaAudioLinkHdaEnable; |
| 166 |
bool PchHdaAudioLinkDmicEnable[MAX_HD_AUDIO_DMIC_LINKS]; |
| 167 |
bool PchHdaAudioLinkSspEnable[MAX_HD_AUDIO_SSP_LINKS]; |
| 168 |
bool PchHdaAudioLinkSndwEnable[MAX_HD_AUDIO_SNDW_LINKS]; |
| 169 |
uint8_t PchHdaIDispLinkTmode; |
| 170 |
uint8_t PchHdaIDispLinkFrequency; |
| 171 |
bool PchHdaIDispCodecDisconnect; |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
uint8_t PcieClkSrcUsage[CONFIG_MAX_PCIE_CLOCK_SRC]; |
| 178 |
|
| 179 |
|
| 180 |
uint8_t PcieClkSrcClkReq[CONFIG_MAX_PCIE_CLOCK_SRC]; |
| 181 |
|
| 182 |
|
| 183 |
bool PcieRpClkReqDetect[CONFIG_MAX_ROOT_PORTS]; |
| 184 |
|
| 185 |
|
| 186 |
bool PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS]; |
| 187 |
|
| 188 |
|
| 189 |
enum L1_substates_control PcieRpL1Substates[CONFIG_MAX_ROOT_PORTS]; |
| 190 |
|
| 191 |
|
| 192 |
struct pcie_modphy_config pcie_mp_cfg[CONFIG_MAX_ROOT_PORTS]; |
| 193 |
|
| 194 |
|
| 195 |
bool SmbusEnable; |
| 196 |
|
| 197 |
|
| 198 |
bool ScsEmmcHs400Enabled; |
| 199 |
|
| 200 |
|
| 201 |
bool SdCardPowerEnableActiveHigh; |
| 202 |
|
| 203 |
|
| 204 |
uint16_t ImonSlope; |
| 205 |
uint16_t ImonOffset; |
| 206 |
|
| 207 |
|
| 208 |
bool SkipExtGfxScan; |
| 209 |
|
| 210 |
bool eist_enable; |
| 211 |
|
| 212 |
|
| 213 |
bool enable_c6dram; |
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
uint8_t SerialIoI2cMode[CONFIG_SOC_INTEL_I2C_DEV_MAX]; |
| 224 |
uint8_t SerialIoGSpiMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 225 |
uint8_t SerialIoUartMode[CONFIG_SOC_INTEL_UART_DEV_MAX]; |
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
uint8_t SerialIoGSpiCsMode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
uint8_t SerialIoGSpiCsState[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
uint8_t TraceHubMode; |
| 244 |
|
| 245 |
|
| 246 |
enum { |
| 247 |
DEBUG_INTERFACE_RAM = (1 << 0), |
| 248 |
DEBUG_INTERFACE_UART_8250IO = (1 << 1), |
| 249 |
DEBUG_INTERFACE_USB3 = (1 << 3), |
| 250 |
DEBUG_INTERFACE_LPSS_SERIAL_IO = (1 << 4), |
| 251 |
DEBUG_INTERFACE_TRACEHUB = (1 << 5), |
| 252 |
} debug_interface_flag; |
| 253 |
|
| 254 |
|
| 255 |
unsigned int sdcard_cd_gpio; |
| 256 |
|
| 257 |
|
| 258 |
bool pch_isclk; |
| 259 |
|
| 260 |
|
| 261 |
bool TcssXhciEn; |
| 262 |
bool TcssXdciEn; |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
bool gpio_override_pm; |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
uint8_t gpio_pm[TOTAL_GPIO_COMM]; |
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
uint8_t DdiPortAConfig; |
| 289 |
uint8_t DdiPortBConfig; |
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
bool DdiPortAHpd; |
| 295 |
bool DdiPortBHpd; |
| 296 |
bool DdiPortCHpd; |
| 297 |
bool DdiPort1Hpd; |
| 298 |
bool DdiPort2Hpd; |
| 299 |
bool DdiPort3Hpd; |
| 300 |
bool DdiPort4Hpd; |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
bool DdiPortADdc; |
| 306 |
bool DdiPortBDdc; |
| 307 |
bool DdiPortCDdc; |
| 308 |
bool DdiPort1Ddc; |
| 309 |
bool DdiPort2Ddc; |
| 310 |
bool DdiPort3Ddc; |
| 311 |
bool DdiPort4Ddc; |
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
bool HybridStorageMode; |
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
uint8_t cpu_ratio_override; |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
bool SkipCpuReplacementCheck; |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
uint8_t PchPmSlpS3MinAssert; |
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
uint8_t PchPmSlpS4MinAssert; |
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
uint8_t PchPmSlpSusMinAssert; |
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
uint8_t PchPmSlpAMinAssert; |
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
uint8_t PchPmPwrCycDur; |
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
uint16_t FivrRfiFrequency; |
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
uint8_t FivrSpreadSpectrum; |
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
bool FastPkgCRampDisable; |
| 420 |
|
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
enum { |
| 427 |
SlewRateFastBy2 = 0, |
| 428 |
SlewRateFastBy4, |
| 429 |
SlewRateFastBy8, |
| 430 |
SlewRateFastBy16 |
| 431 |
} SlowSlewRate; |
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
bool AcousticNoiseMitigation; |
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
uint8_t PreWake; |
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
uint8_t RampUp; |
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
uint8_t RampDown; |
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
bool disable_external_bypass_vr; |
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
enum { |
| 483 |
CD_CLOCK_172_8_MHZ = 1, |
| 484 |
CD_CLOCK_180_MHZ = 2, |
| 485 |
CD_CLOCK_192_MHZ = 3, |
| 486 |
CD_CLOCK_307_MHZ = 4, |
| 487 |
CD_CLOCK_312_MHZ = 5, |
| 488 |
CD_CLOCK_552_MHZ = 6, |
| 489 |
CD_CLOCK_556_8_MHZ = 7, |
| 490 |
} cd_clock; |
| 491 |
|
| 492 |
|
| 493 |
uint16_t PsysPmax; |
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
bool cnvi_reduce_s0ix_pwr_usage; |
| 508 |
|
| 509 |
|
| 510 |
struct i915_gpu_controller_info gfx; |
| 511 |
}; |
| 512 |
|
| 513 |
typedef struct soc_intel_jasperlake_config config_t; |
| 514 |
|
| 515 |
#endif |