2015-05-13 03:19:47 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007-2008 coresystems GmbH
|
|
|
|
* Copyright (C) 2014 Google Inc.
|
2018-05-09 11:25:09 +02:00
|
|
|
* Copyright (C) 2015-2018 Intel Corporation.
|
2015-05-13 03:19:47 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2015-08-08 05:29:42 +02:00
|
|
|
|
|
|
|
#ifndef _SOC_CHIP_H_
|
|
|
|
#define _SOC_CHIP_H_
|
|
|
|
|
skylake: Add SD card device to configure card detect GPIO
Add a PCI driver for the skylake SD card device and have it generate
an entry in the SSDT for the card detect GPIO if it is provided by the
mainboard in devicetree.
This sets up a card detect GPIO configuration that will trigger an
interrupt on both edges with a 100ms debounce timeout and can wake the
SD controller from D3 state.
The GpioInt() entry is bound to the "cd-gpio" device property which will
be consumed by the kernel driver.
The resulting ACPI output in the SSDT will be combined with the SDXC
device declaration in the DSDT.
Example:
Scope (\_SB.PCI0.SDXC)
{
Name (_CRS, ResourceTemplate () {
GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
"\\_SB.PCI0.GPIO", 0, ResourceConsumer) { 35 }
})
Name (_DSD, Package () {
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package () { "cd-gpio", Package () { \_SB.PCI0.SDXC, 0, 0, 1 } }
}
})
}
Change-Id: Ie4c1bfadd962cf55a987edb9ef86e92174205770
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14995
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-11 00:56:16 +02:00
|
|
|
#include <arch/acpi_device.h>
|
2017-08-01 14:02:40 +02:00
|
|
|
#include <device/i2c_simple.h>
|
2017-12-06 22:26:15 +01:00
|
|
|
#include <drivers/i2c/designware/dw_i2c.h>
|
2018-05-09 11:25:09 +02:00
|
|
|
#include <intelblocks/chip.h>
|
2017-03-31 23:02:47 +02:00
|
|
|
#include <intelblocks/gspi.h>
|
2019-02-23 19:24:51 +01:00
|
|
|
#include <intelblocks/lpc_lib.h>
|
2015-05-13 03:23:27 +02:00
|
|
|
#include <stdint.h>
|
2016-05-12 00:08:50 +02:00
|
|
|
#include <soc/gpe.h>
|
2017-04-07 05:54:11 +02:00
|
|
|
#include <soc/gpio.h>
|
2016-08-03 08:45:22 +02:00
|
|
|
#include <soc/irq.h>
|
2015-05-13 03:23:27 +02:00
|
|
|
#include <soc/pci_devs.h>
|
2015-07-25 00:37:13 +02:00
|
|
|
#include <soc/pmc.h>
|
2015-05-13 03:23:27 +02:00
|
|
|
#include <soc/serialio.h>
|
2015-10-16 22:58:11 +02:00
|
|
|
#include <soc/usb.h>
|
2015-11-20 07:16:54 +01:00
|
|
|
#include <soc/vr_config.h>
|
2019-05-23 16:14:59 +02:00
|
|
|
#include <smbios.h>
|
2015-05-13 03:19:47 +02:00
|
|
|
|
2019-03-18 15:38:44 +01:00
|
|
|
#define MAX_PEG_PORTS 3
|
|
|
|
|
2016-06-07 02:21:00 +02:00
|
|
|
enum skylake_i2c_voltage {
|
|
|
|
I2C_VOLTAGE_3V3,
|
|
|
|
I2C_VOLTAGE_1V8
|
|
|
|
};
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
struct soc_intel_skylake_config {
|
2018-05-09 11:25:09 +02:00
|
|
|
|
|
|
|
/* Common struct containing soc config data required by common code */
|
|
|
|
struct soc_intel_common_config common_soc_config;
|
|
|
|
|
2018-12-16 02:39:28 +01:00
|
|
|
/* IGD panel configuration */
|
|
|
|
unsigned int gpu_pp_up_delay_ms;
|
|
|
|
unsigned int gpu_pp_down_delay_ms;
|
|
|
|
unsigned int gpu_pp_cycle_delay_ms;
|
|
|
|
unsigned int gpu_pp_backlight_on_delay_ms;
|
|
|
|
unsigned int gpu_pp_backlight_off_delay_ms;
|
|
|
|
unsigned int gpu_pch_backlight_pwm_hz;
|
|
|
|
enum {
|
|
|
|
GPU_BACKLIGHT_POLARITY_HIGH = 0,
|
|
|
|
GPU_BACKLIGHT_POLARITY_LOW,
|
|
|
|
} gpu_pch_backlight_polarity;
|
|
|
|
|
2015-05-13 03:19:47 +02:00
|
|
|
/*
|
|
|
|
* Interrupt Routing configuration
|
|
|
|
* If bit7 is 1, the interrupt is disabled.
|
|
|
|
*/
|
|
|
|
uint8_t pirqa_routing;
|
|
|
|
uint8_t pirqb_routing;
|
|
|
|
uint8_t pirqc_routing;
|
|
|
|
uint8_t pirqd_routing;
|
|
|
|
uint8_t pirqe_routing;
|
|
|
|
uint8_t pirqf_routing;
|
|
|
|
uint8_t pirqg_routing;
|
|
|
|
uint8_t pirqh_routing;
|
|
|
|
|
|
|
|
/* GPE configuration */
|
2015-08-08 05:29:42 +02:00
|
|
|
uint32_t gpe0_en_1; /* GPE0_EN_31_0 */
|
|
|
|
uint32_t gpe0_en_2; /* GPE0_EN_63_32 */
|
|
|
|
uint32_t gpe0_en_3; /* GPE0_EN_95_64 */
|
|
|
|
uint32_t gpe0_en_4; /* GPE0_EN_127_96 / GPE_STD */
|
|
|
|
/* Gpio group routed to each dword of the GPE0 block. Values are
|
|
|
|
* of the form GPP_[A:G] or GPD. */
|
|
|
|
uint8_t gpe0_dw0; /* GPE0_31_0 STS/EN */
|
|
|
|
uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
|
|
|
|
uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
|
2015-05-13 03:19:47 +02:00
|
|
|
|
|
|
|
/* Generic IO decode ranges */
|
|
|
|
uint32_t gen1_dec;
|
|
|
|
uint32_t gen2_dec;
|
|
|
|
uint32_t gen3_dec;
|
|
|
|
uint32_t gen4_dec;
|
|
|
|
|
|
|
|
/* Enable S0iX support */
|
|
|
|
int s0ix_enable;
|
|
|
|
|
2015-09-04 22:53:14 +02:00
|
|
|
/* Enable DPTF support */
|
|
|
|
int dptf_enable;
|
|
|
|
|
2017-04-11 06:02:13 +02:00
|
|
|
/* Deep SX enables */
|
|
|
|
int deep_s3_enable_ac;
|
|
|
|
int deep_s3_enable_dc;
|
|
|
|
int deep_s5_enable_ac;
|
|
|
|
int deep_s5_enable_dc;
|
2015-05-13 03:23:27 +02:00
|
|
|
|
2015-07-25 00:37:13 +02:00
|
|
|
/*
|
|
|
|
* Deep Sx Configuration
|
|
|
|
* DSX_EN_WAKE_PIN - Enable WAKE# pin
|
|
|
|
* DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
|
2017-12-04 06:43:58 +01:00
|
|
|
* DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin
|
2015-07-25 00:37:13 +02:00
|
|
|
*/
|
|
|
|
uint32_t deep_sx_config;
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* TCC activation offset */
|
|
|
|
int tcc_offset;
|
|
|
|
|
2018-11-23 10:41:46 +01:00
|
|
|
/* Package PL4 power limit in Watts */
|
|
|
|
u32 PowerLimit4;
|
|
|
|
|
2017-05-09 16:14:36 +02:00
|
|
|
/* PL2 Override value in Watts */
|
|
|
|
u32 tdp_pl2_override;
|
2018-04-09 05:46:43 +02:00
|
|
|
/* PL1 Override value in Watts */
|
|
|
|
u32 tdp_pl1_override;
|
2017-05-09 16:14:36 +02:00
|
|
|
|
2017-06-29 20:31:16 +02:00
|
|
|
/* SysPL2 Value in Watts */
|
|
|
|
u32 tdp_psyspl2;
|
|
|
|
|
2018-02-01 00:55:50 +01:00
|
|
|
/* SysPL3 Value in Watts */
|
|
|
|
u32 tdp_psyspl3;
|
|
|
|
/* SysPL3 window size */
|
|
|
|
u32 tdp_psyspl3_time;
|
|
|
|
/* SysPL3 duty cycle */
|
|
|
|
u32 tdp_psyspl3_dutycycle;
|
|
|
|
|
|
|
|
/* PL4 Value in Watts */
|
|
|
|
u32 tdp_pl4;
|
|
|
|
|
2018-01-15 08:03:01 +01:00
|
|
|
/* Estimated maximum platform power in Watts */
|
|
|
|
u16 psys_pmax;
|
|
|
|
|
2018-08-07 12:14:33 +02:00
|
|
|
/* Whether to ignore VT-d support of the SKU */
|
2017-09-19 09:36:03 +02:00
|
|
|
int ignore_vtd;
|
|
|
|
|
2015-05-13 03:19:47 +02:00
|
|
|
/*
|
2015-07-21 16:51:50 +02:00
|
|
|
* The following fields come from FspUpdVpd.h.
|
2015-05-13 03:23:27 +02:00
|
|
|
* These are configuration values that are passed to FSP during
|
|
|
|
* MemoryInit.
|
2015-05-13 03:19:47 +02:00
|
|
|
*/
|
2015-05-13 03:23:27 +02:00
|
|
|
u64 PlatformMemorySize;
|
|
|
|
u8 SmramMask;
|
|
|
|
u8 MrcFastBoot;
|
|
|
|
u32 TsegSize;
|
|
|
|
u16 MmioSize;
|
|
|
|
|
2015-12-10 10:01:59 +01:00
|
|
|
/*
|
|
|
|
* DDR Frequency Limit
|
|
|
|
* 0(Auto), 1067, 1333, 1600, 1867, 2133, 2400
|
|
|
|
*/
|
|
|
|
u16 DdrFreqLimit;
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* Probeless Trace function */
|
|
|
|
u8 ProbelessTrace;
|
|
|
|
|
2015-07-21 16:51:50 +02:00
|
|
|
/*
|
|
|
|
* System Agent dynamic frequency configuration
|
|
|
|
* When enabled memory will be trained at two different frequencies.
|
|
|
|
* 0 = Disabled
|
|
|
|
* 1 = FixedLow
|
|
|
|
* 2 = FixedHigh
|
|
|
|
* 3 = Enabled
|
|
|
|
*/
|
2018-12-19 12:19:24 +01:00
|
|
|
enum {
|
|
|
|
SaGv_Disabled,
|
|
|
|
SaGv_FixedLow,
|
|
|
|
SaGv_FixedHigh,
|
|
|
|
SaGv_Enabled,
|
|
|
|
} SaGv;
|
2015-07-21 16:51:50 +02:00
|
|
|
|
|
|
|
/* Enable/disable Rank Margin Tool */
|
|
|
|
u8 Rmt;
|
|
|
|
|
2018-08-31 21:49:08 +02:00
|
|
|
/* Disable Command TriState */
|
|
|
|
u8 CmdTriStateDis;
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* Lan */
|
|
|
|
u8 EnableLan;
|
2017-12-13 22:58:35 +01:00
|
|
|
u8 EnableLanLtr;
|
|
|
|
u8 EnableLanK1Off;
|
|
|
|
u8 LanClkReqSupported;
|
|
|
|
u8 LanClkReqNumber;
|
2015-05-13 03:23:27 +02:00
|
|
|
|
|
|
|
/* SATA related */
|
|
|
|
u8 EnableSata;
|
2017-07-25 12:12:29 +02:00
|
|
|
enum {
|
|
|
|
/* Documentation and header files of Skylake FSP disagree on
|
|
|
|
the values, Kaby Lake FSP (KabylakeFsp0001 on github) uses
|
|
|
|
these: */
|
|
|
|
KBLFSP_SATA_MODE_AHCI = 0,
|
|
|
|
KBLFSP_SATA_MODE_RAID = 1,
|
|
|
|
} SataMode;
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 SataSalpSupport;
|
|
|
|
u8 SataPortsEnable[8];
|
|
|
|
u8 SataPortsDevSlp[8];
|
2017-10-10 21:03:36 +02:00
|
|
|
u8 SataSpeedLimit;
|
2015-05-13 03:23:27 +02:00
|
|
|
|
|
|
|
/* Audio related */
|
|
|
|
u8 EnableAzalia;
|
|
|
|
u8 DspEnable;
|
2015-09-04 01:05:59 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* I/O Buffer Ownership:
|
|
|
|
* 0: HD-A Link
|
|
|
|
* 1 Shared, HD-A Link and I2S Port
|
|
|
|
* 3: I2S Ports
|
|
|
|
*/
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 IoBufferOwnership;
|
|
|
|
|
|
|
|
/* Trace Hub function */
|
|
|
|
u8 EnableTraceHub;
|
2017-02-06 17:18:48 +01:00
|
|
|
u32 TraceHubMemReg0Size;
|
|
|
|
u32 TraceHubMemReg1Size;
|
|
|
|
|
|
|
|
/* DCI Enable/Disable */
|
|
|
|
u8 PchDciEn;
|
2015-05-13 03:23:27 +02:00
|
|
|
|
2017-09-15 22:24:20 +02:00
|
|
|
/*
|
|
|
|
* Pcie Root Port configuration:
|
|
|
|
* each element of array corresponds to
|
|
|
|
* respective PCIe root port.
|
|
|
|
*/
|
|
|
|
|
2019-03-18 15:38:44 +01:00
|
|
|
/* PEG Max Link Width */
|
|
|
|
enum {
|
|
|
|
Peg0_x16,
|
|
|
|
Peg0_x1,
|
|
|
|
Peg0_x2,
|
|
|
|
Peg0_x4,
|
|
|
|
Peg0_x8,
|
|
|
|
} Peg0MaxLinkWidth;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
Peg1_x8,
|
|
|
|
Peg1_x1,
|
|
|
|
Peg1_x2,
|
|
|
|
Peg1_x4,
|
|
|
|
} Peg1MaxLinkWidth;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
Peg2_x4,
|
|
|
|
Peg2_x1,
|
|
|
|
Peg2_x2,
|
|
|
|
} Peg2MaxLinkWidth;
|
|
|
|
|
2017-09-15 22:24:20 +02:00
|
|
|
/*
|
|
|
|
* Enable/Disable Root Port
|
|
|
|
* 0: Disable Root Port
|
|
|
|
* 1: Enable Root Port
|
|
|
|
*/
|
2016-11-08 16:31:09 +01:00
|
|
|
u8 PcieRpEnable[CONFIG_MAX_ROOT_PORTS];
|
2017-09-15 22:24:20 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Enable/Disable Clk-req support for Root Port
|
|
|
|
* 0: Disable Clk-Req
|
|
|
|
* 1: Enable Clk-req
|
|
|
|
*/
|
2016-11-08 16:31:09 +01:00
|
|
|
u8 PcieRpClkReqSupport[CONFIG_MAX_ROOT_PORTS];
|
2017-09-15 22:24:20 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Clk-req source for Root Port
|
|
|
|
*/
|
2016-11-08 16:31:09 +01:00
|
|
|
u8 PcieRpClkReqNumber[CONFIG_MAX_ROOT_PORTS];
|
2017-09-15 22:24:20 +02:00
|
|
|
|
2017-12-19 15:46:50 +01:00
|
|
|
/*
|
|
|
|
* Clk source number for Root Port
|
|
|
|
*/
|
|
|
|
u8 PcieRpClkSrcNumber[CONFIG_MAX_ROOT_PORTS];
|
|
|
|
|
2017-09-15 22:24:20 +02:00
|
|
|
/*
|
|
|
|
* Enable/Disable AER (Advanced Error Reporting) for Root Port
|
|
|
|
* 0: Disable AER
|
|
|
|
* 1: Enable AER
|
|
|
|
*/
|
2017-09-05 10:48:25 +02:00
|
|
|
u8 PcieRpAdvancedErrorReporting[CONFIG_MAX_ROOT_PORTS];
|
2015-05-13 03:23:27 +02:00
|
|
|
|
2017-09-15 22:24:20 +02:00
|
|
|
/*
|
|
|
|
* Enable/Disable Latency Tolerance Reporting for Root Port
|
|
|
|
* 0: Disable LTR
|
|
|
|
* 1: Enable LTR
|
|
|
|
*/
|
|
|
|
u8 PcieRpLtrEnable[CONFIG_MAX_ROOT_PORTS];
|
|
|
|
|
2018-01-29 21:00:47 +01:00
|
|
|
/* Enable/Disable HotPlug support for Root Port */
|
|
|
|
u8 PcieRpHotPlug[CONFIG_MAX_ROOT_PORTS];
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* USB related */
|
2015-10-16 22:58:11 +02:00
|
|
|
struct usb2_port_config usb2_ports[16];
|
|
|
|
struct usb3_port_config usb3_ports[10];
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 SsicPortEnable;
|
|
|
|
|
|
|
|
/* SMBus */
|
|
|
|
u8 SmbusEnable;
|
2015-05-13 03:19:47 +02:00
|
|
|
|
|
|
|
/*
|
2015-05-13 03:23:27 +02:00
|
|
|
* SerialIO device mode selection:
|
|
|
|
*
|
|
|
|
* Device index:
|
|
|
|
* PchSerialIoIndexI2C0
|
|
|
|
* PchSerialIoIndexI2C1
|
|
|
|
* PchSerialIoIndexI2C2
|
|
|
|
* PchSerialIoIndexI2C3
|
|
|
|
* PchSerialIoIndexI2C4
|
|
|
|
* PchSerialIoIndexI2C5
|
|
|
|
* PchSerialIoIndexI2C6
|
|
|
|
* PchSerialIoIndexSpi0
|
|
|
|
* PchSerialIoIndexSpi1
|
|
|
|
* PchSerialIoIndexUart0
|
|
|
|
* PchSerialIoIndexUart1
|
|
|
|
* PchSerialIoIndexUart2
|
|
|
|
*
|
|
|
|
* Mode select:
|
|
|
|
* PchSerialIoDisabled
|
|
|
|
* PchSerialIoAcpi
|
|
|
|
* PchSerialIoPci
|
|
|
|
* PchSerialIoAcpiHidden
|
|
|
|
* PchSerialIoLegacyUart
|
2015-05-13 03:19:47 +02:00
|
|
|
*/
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 SerialIoDevMode[PchSerialIoIndexMax];
|
2015-05-13 03:19:47 +02:00
|
|
|
|
2016-06-07 02:21:00 +02:00
|
|
|
/* I2C */
|
2016-11-10 00:04:15 +01:00
|
|
|
/* Bus voltage level, default is 3.3V */
|
2018-05-09 11:25:09 +02:00
|
|
|
enum skylake_i2c_voltage i2c_voltage[CONFIG_SOC_INTEL_I2C_DEV_MAX];
|
2017-03-31 23:02:47 +02:00
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* Camera */
|
|
|
|
u8 Cio2Enable;
|
2017-01-13 17:34:11 +01:00
|
|
|
u8 SaImguEnable;
|
2015-05-13 03:19:47 +02:00
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
/* eMMC and SD */
|
|
|
|
u8 ScsEmmcEnabled;
|
|
|
|
u8 ScsEmmcHs400Enabled;
|
|
|
|
u8 ScsSdCardEnabled;
|
2018-08-23 03:58:38 +02:00
|
|
|
u8 EmmcHs400DllNeed;
|
|
|
|
u8 ScsEmmcHs400RxStrobeDll1;
|
|
|
|
u8 ScsEmmcHs400TxDataDll;
|
2015-05-13 03:19:47 +02:00
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 PttSwitch;
|
|
|
|
u8 HeciTimeouts;
|
|
|
|
u8 HsioMessaging;
|
|
|
|
u8 Heci3Enabled;
|
|
|
|
|
|
|
|
/* Gfx related */
|
|
|
|
u8 IgdDvmt50PreAlloc;
|
2019-03-21 16:50:42 +01:00
|
|
|
enum {
|
|
|
|
Display_iGFX,
|
|
|
|
Display_PEG,
|
|
|
|
Display_PCH_PCIe,
|
|
|
|
Display_Auto,
|
|
|
|
Display_Switchable,
|
|
|
|
} PrimaryDisplay;
|
2015-05-13 03:23:27 +02:00
|
|
|
u8 ApertureSize;
|
|
|
|
u8 SkipExtGfxScan;
|
|
|
|
u8 ScanExtGfxForLegacyOpRom;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following fields come from fsp_vpd.h
|
|
|
|
* These are configuration values that are passed to FSP during
|
|
|
|
* SiliconInit.
|
|
|
|
*/
|
|
|
|
u32 LogoPtr;
|
|
|
|
u32 LogoSize;
|
|
|
|
u32 GraphicsConfigPtr;
|
|
|
|
u8 Device4Enable;
|
2015-09-08 12:30:46 +02:00
|
|
|
u8 RtcLock;
|
2015-07-22 08:49:28 +02:00
|
|
|
/* GPIO IRQ Route The valid values is 14 or 15*/
|
|
|
|
u8 GpioIrqSelect;
|
|
|
|
/* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23*/
|
|
|
|
u8 SciIrqSelect;
|
|
|
|
/* TCO IRQ Select The valid values is 9, 10, 11, 20 21, 22, 23*/
|
|
|
|
u8 TcoIrqSelect;
|
|
|
|
u8 TcoIrqEnable;
|
2015-11-19 11:31:54 +01:00
|
|
|
/* Enable SMI_LOCK bit to prevent writes to the Global SMI Enable bit.*/
|
|
|
|
u8 LockDownConfigGlobalSmi;
|
|
|
|
/*
|
|
|
|
* Enable RTC lower and upper 128 byte Lock bits to lock Bytes 38h-3Fh
|
|
|
|
* in the upper and and lower 128-byte bank of RTC RAM.
|
|
|
|
*/
|
|
|
|
u8 LockDownConfigRtcLock;
|
2016-08-30 17:17:13 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Determine if WLAN wake from Sx, corresponds to the
|
|
|
|
* HOST_WLAN_PP_EN bit in the PWRM_CFG3 register.
|
|
|
|
*/
|
|
|
|
u8 PchPmWoWlanEnable;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Determine if WLAN wake from DeepSx, corresponds to
|
|
|
|
* the DSX_WLAN_PP_EN bit in the PWRM_CFG3 register.
|
|
|
|
*/
|
|
|
|
u8 PchPmWoWlanDeepSxEnable;
|
|
|
|
|
2015-11-19 11:31:54 +01:00
|
|
|
/*
|
|
|
|
* Corresponds to the "WOL Enable Override" bit in the General PM
|
|
|
|
* Configuration B (GEN_PMCON_B) register
|
|
|
|
*/
|
|
|
|
u8 WakeConfigWolEnableOverride;
|
|
|
|
/* Determine if enable PCIe to wake from deep Sx*/
|
|
|
|
u8 WakeConfigPcieWakeFromDeepSx;
|
|
|
|
/* Deep Sx Policy. Values 0: PchDeepSxPolDisable,
|
|
|
|
* 1: PchDpS5BatteryEn, 2: PchDpS5AlwaysEn, 3: PchDpS4S5BatteryEn,
|
|
|
|
* 4: PchDpS4S5AlwaysEn, 5: PchDpS3S4S5BatteryEn, 6: PchDpS3S4S5AlwaysEn
|
|
|
|
*/
|
|
|
|
u8 PmConfigDeepSxPol;
|
2017-05-09 16:11:27 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
SLP_S3_MIN_ASSERT_60US = 0,
|
|
|
|
SLP_S3_MIN_ASSERT_1MS = 1,
|
|
|
|
SLP_S3_MIN_ASSERT_50MS = 2,
|
|
|
|
SLP_S3_MIN_ASSERT_2S = 3,
|
|
|
|
} PmConfigSlpS3MinAssert;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SLP_S4_MIN_ASSERT_PCH = 0,
|
|
|
|
SLP_S4_MIN_ASSERT_1S = 1,
|
|
|
|
SLP_S4_MIN_ASSERT_2S = 2,
|
|
|
|
SLP_S4_MIN_ASSERT_3S = 3,
|
|
|
|
SLP_S4_MIN_ASSERT_4S = 4,
|
|
|
|
} PmConfigSlpS4MinAssert;
|
|
|
|
|
|
|
|
/* When deep Sx enabled: Must be greater than or equal to
|
|
|
|
all other minimum assertion widths. */
|
|
|
|
enum {
|
|
|
|
SLP_SUS_MIN_ASSERT_0MS = 0,
|
|
|
|
SLP_SUS_MIN_ASSERT_500MS = 1,
|
|
|
|
SLP_SUS_MIN_ASSERT_1S = 2,
|
|
|
|
SLP_SUS_MIN_ASSERT_4S = 3,
|
|
|
|
} PmConfigSlpSusMinAssert;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SLP_A_MIN_ASSERT_0MS = 0,
|
|
|
|
SLP_A_MIN_ASSERT_4S = 1,
|
|
|
|
SLP_A_MIN_ASSERT_98MS = 2,
|
|
|
|
SLP_A_MIN_ASSERT_2S = 3,
|
|
|
|
} PmConfigSlpAMinAssert;
|
|
|
|
|
2015-11-19 11:31:54 +01:00
|
|
|
/*
|
|
|
|
* This member describes whether or not the PCI ClockRun feature of PCH
|
|
|
|
* should be enabled. Values 0: Disabled, 1: Enabled
|
|
|
|
*/
|
|
|
|
u8 PmConfigPciClockRun;
|
|
|
|
/*
|
2017-03-17 00:44:36 +01:00
|
|
|
* SLP_X Stretching After SUS Well Power Up. Values 0: Disabled,
|
|
|
|
* 1: Enabled
|
2015-11-19 11:31:54 +01:00
|
|
|
*/
|
|
|
|
u8 PmConfigSlpStrchSusUp;
|
|
|
|
/*
|
|
|
|
* PCH power button override period.
|
|
|
|
* Values: 0x0 - 4s, 0x1 - 6s, 0x2 - 8s, 0x3 - 10s, 0x4 - 12s, 0x5 - 14s
|
|
|
|
*/
|
|
|
|
u8 PmConfigPwrBtnOverridePeriod;
|
2017-02-23 10:13:39 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* PCH Pm Slp S0 Voltage Margining Enable
|
|
|
|
* Indicates platform supports VCCPrim_Core Voltage Margining
|
|
|
|
* in SLP_S0# asserted state.
|
|
|
|
*/
|
|
|
|
u8 PchPmSlpS0VmEnable;
|
|
|
|
|
2017-05-09 16:11:27 +02:00
|
|
|
enum {
|
|
|
|
RESET_POWER_CYCLE_DEFAULT = 0,
|
|
|
|
RESET_POWER_CYCLE_1S = 1,
|
|
|
|
RESET_POWER_CYCLE_2S = 2,
|
|
|
|
RESET_POWER_CYCLE_3S = 3,
|
|
|
|
RESET_POWER_CYCLE_4S = 4,
|
|
|
|
} PmConfigPwrCycDur;
|
|
|
|
|
2019-02-23 19:24:51 +01:00
|
|
|
enum serirq_mode serirq_mode;
|
2017-05-09 16:11:27 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
SERIAL_IRQ_FRAME_PULSE_4CLK = 0,
|
|
|
|
SERIAL_IRQ_FRAME_PULSE_6CLK = 1,
|
|
|
|
SERIAL_IRQ_FRAME_PULSE_8CLK = 2,
|
|
|
|
} SerialIrqConfigStartFramePulse;
|
|
|
|
|
2016-02-24 10:01:40 +01:00
|
|
|
/*
|
|
|
|
* VrConfig Settings for 5 domains
|
2015-11-20 07:16:54 +01:00
|
|
|
* 0 = System Agent, 1 = IA Core, 2 = Ring,
|
|
|
|
* 3 = GT unsliced, 4 = GT sliced
|
|
|
|
*/
|
|
|
|
struct vr_config domain_vr_config[NUM_VR_DOMAINS];
|
2015-11-10 20:59:23 +01:00
|
|
|
/*
|
|
|
|
* HeciEnabled decides the state of Heci1 at end of boot
|
|
|
|
* Setting to 0 (default) disables Heci1 and hides the device from OS
|
|
|
|
*/
|
|
|
|
u8 HeciEnabled;
|
2015-12-18 19:08:21 +01:00
|
|
|
u8 PmTimerDisabled;
|
2016-02-08 12:45:29 +01:00
|
|
|
/* Intel Speed Shift Technology */
|
|
|
|
u8 speed_shift_enable;
|
2016-02-24 10:01:40 +01:00
|
|
|
/*
|
|
|
|
* Enable VR specific mailbox command
|
2016-04-20 10:49:53 +02:00
|
|
|
* 000b - Don't Send any VR command
|
|
|
|
* 001b - VR command specifically for the MPS IMPV8 VR will be sent
|
|
|
|
* 010b - VR specific command sent for PS4 exit issue
|
|
|
|
* 011b - VR specific command sent for both MPS IMPV8 & PS4 exit issue
|
2016-02-24 10:01:40 +01:00
|
|
|
*/
|
|
|
|
u8 SendVrMbxCmd;
|
2016-08-24 17:18:46 +02:00
|
|
|
|
2017-02-13 21:07:53 +01:00
|
|
|
/*
|
|
|
|
* PRMRR size setting with three options
|
|
|
|
* 0x02000000 - 32MiB
|
|
|
|
* 0x04000000 - 64MiB
|
|
|
|
* 0x08000000 - 128MiB
|
|
|
|
*/
|
|
|
|
u32 PrmrrSize;
|
|
|
|
|
2017-02-10 11:28:24 +01:00
|
|
|
/* Enable/Disable host reads to PMC XRAM registers */
|
|
|
|
u8 PchPmPmcReadDisable;
|
|
|
|
|
skylake: Add SD card device to configure card detect GPIO
Add a PCI driver for the skylake SD card device and have it generate
an entry in the SSDT for the card detect GPIO if it is provided by the
mainboard in devicetree.
This sets up a card detect GPIO configuration that will trigger an
interrupt on both edges with a 100ms debounce timeout and can wake the
SD controller from D3 state.
The GpioInt() entry is bound to the "cd-gpio" device property which will
be consumed by the kernel driver.
The resulting ACPI output in the SSDT will be combined with the SDXC
device declaration in the DSDT.
Example:
Scope (\_SB.PCI0.SDXC)
{
Name (_CRS, ResourceTemplate () {
GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
"\\_SB.PCI0.GPIO", 0, ResourceConsumer) { 35 }
})
Name (_DSD, Package () {
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package () { "cd-gpio", Package () { \_SB.PCI0.SDXC, 0, 0, 1 } }
}
})
}
Change-Id: Ie4c1bfadd962cf55a987edb9ef86e92174205770
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14995
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-11 00:56:16 +02:00
|
|
|
/*
|
|
|
|
* Use SD card detect GPIO with default config:
|
|
|
|
* - Edge triggered
|
|
|
|
* - No internal pull
|
|
|
|
* - Active both (high + low)
|
|
|
|
* - Can wake device from D3
|
|
|
|
* - 100ms debounce timeout
|
|
|
|
*
|
|
|
|
* GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
|
|
|
|
* "\\_SB.PCI0.GPIO", 0, ResourceConsumer)
|
|
|
|
* { sdcard_cd_gpio_default }
|
|
|
|
*/
|
2017-03-17 00:38:26 +01:00
|
|
|
unsigned int sdcard_cd_gpio_default;
|
skylake: Add SD card device to configure card detect GPIO
Add a PCI driver for the skylake SD card device and have it generate
an entry in the SSDT for the card detect GPIO if it is provided by the
mainboard in devicetree.
This sets up a card detect GPIO configuration that will trigger an
interrupt on both edges with a 100ms debounce timeout and can wake the
SD controller from D3 state.
The GpioInt() entry is bound to the "cd-gpio" device property which will
be consumed by the kernel driver.
The resulting ACPI output in the SSDT will be combined with the SDXC
device declaration in the DSDT.
Example:
Scope (\_SB.PCI0.SDXC)
{
Name (_CRS, ResourceTemplate () {
GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 10000,
"\\_SB.PCI0.GPIO", 0, ResourceConsumer) { 35 }
})
Name (_DSD, Package () {
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package () { "cd-gpio", Package () { \_SB.PCI0.SDXC, 0, 0, 1 } }
}
})
}
Change-Id: Ie4c1bfadd962cf55a987edb9ef86e92174205770
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/14995
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-11 00:56:16 +02:00
|
|
|
|
|
|
|
/* Use custom SD card detect GPIO configuration */
|
|
|
|
struct acpi_gpio sdcard_cd_gpio;
|
2016-10-18 23:25:25 +02:00
|
|
|
|
|
|
|
/* Wake Enable Bitmap for USB2 ports */
|
|
|
|
u16 usb2_wake_enable_bitmap;
|
|
|
|
|
|
|
|
/* Wake Enable Bitmap for USB3 ports */
|
|
|
|
u8 usb3_wake_enable_bitmap;
|
2017-03-08 04:12:02 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Acoustic Noise Mitigation
|
|
|
|
* 0b - Disable
|
|
|
|
* 1b - Enable noise mitigation
|
|
|
|
*/
|
|
|
|
u8 AcousticNoiseMitigation;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Disable Fast Package C-state ramping
|
|
|
|
* Need to set AcousticNoiseMitigation = '1' first
|
|
|
|
* 0b - Enabled
|
|
|
|
* 1b - Disabled
|
|
|
|
*/
|
2017-09-22 07:05:28 +02:00
|
|
|
/* FSP 1.1 */
|
|
|
|
u8 FastPkgCRampDisable;
|
|
|
|
/* FSP 2.0 */
|
2017-03-08 04:12:02 +01:00
|
|
|
u8 FastPkgCRampDisableIa;
|
|
|
|
u8 FastPkgCRampDisableGt;
|
|
|
|
u8 FastPkgCRampDisableSa;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Adjust the VR slew rates
|
|
|
|
* Need to set AcousticNoiseMitigation = '1' first
|
|
|
|
* 000b - Fast/2
|
|
|
|
* 001b - Fast/4
|
|
|
|
* 010b - Fast/8
|
|
|
|
* 011b - Fast/16
|
|
|
|
*/
|
|
|
|
u8 SlowSlewRateForIa;
|
|
|
|
u8 SlowSlewRateForGt;
|
|
|
|
u8 SlowSlewRateForSa;
|
2017-02-21 23:00:31 +01:00
|
|
|
|
|
|
|
/* Enable SGX feature */
|
|
|
|
u8 sgx_enable;
|
2017-05-12 08:13:57 +02:00
|
|
|
|
|
|
|
/* Enable/Disable EIST
|
|
|
|
* 1b - Enabled
|
|
|
|
* 0b - Disabled
|
|
|
|
*/
|
|
|
|
u8 eist_enable;
|
2017-09-25 14:05:15 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Activates VR mailbox command for Intersil VR C-state issues.
|
|
|
|
* 0 - no mailbox command sent.
|
|
|
|
* 1 - VR mailbox command sent for IA/GT rails only.
|
|
|
|
* 2 - VR mailbox command sent for IA/GT/SA rails.
|
|
|
|
*/
|
|
|
|
u8 IslVrCmd;
|
2017-11-29 11:47:13 +01:00
|
|
|
|
2017-12-27 05:11:23 +01:00
|
|
|
/* Enable/Disable Sata power optimization */
|
|
|
|
u8 SataPwrOptEnable;
|
2015-05-13 03:19:47 +02:00
|
|
|
};
|
|
|
|
|
2015-05-13 03:23:27 +02:00
|
|
|
typedef struct soc_intel_skylake_config config_t;
|
2015-05-13 03:19:47 +02:00
|
|
|
|
|
|
|
#endif
|