| 1 |
|
| 2 |
|
| 3 |
#ifndef _SOC_CHIP_H_ |
| 4 |
#define _SOC_CHIP_H_ |
| 5 |
|
| 6 |
#include <drivers/i2c/designware/dw_i2c.h> |
| 7 |
#include <drivers/intel/gma/gma.h> |
| 8 |
#include <device/pci_ids.h> |
| 9 |
#include <gpio.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> |
| 16 |
#include <soc/gpe.h> |
| 17 |
#include <soc/pci_devs.h> |
| 18 |
#include <soc/pmc.h> |
| 19 |
#include <soc/serialio.h> |
| 20 |
#include <soc/usb.h> |
| 21 |
#include <soc/vr_config.h> |
| 22 |
#include <stdint.h> |
| 23 |
|
| 24 |
|
| 25 |
#define MAX_IBECC_REGIONS 8 |
| 26 |
|
| 27 |
#define MAX_HD_AUDIO_SDI_LINKS 2 |
| 28 |
|
| 29 |
|
| 30 |
enum ibecc_mode { |
| 31 |
IBECC_MODE_PER_REGION, |
| 32 |
IBECC_MODE_NONE, |
| 33 |
IBECC_MODE_ALL |
| 34 |
}; |
| 35 |
|
| 36 |
struct ibecc_config { |
| 37 |
bool enable; |
| 38 |
enum ibecc_mode mode; |
| 39 |
bool range_enable[MAX_IBECC_REGIONS]; |
| 40 |
uint16_t range_base[MAX_IBECC_REGIONS]; |
| 41 |
uint16_t range_mask[MAX_IBECC_REGIONS]; |
| 42 |
|
| 43 |
}; |
| 44 |
|
| 45 |
|
| 46 |
enum fspm_boot_freq { |
| 47 |
MAX_BATTERY_PERFORMANCE, |
| 48 |
MAX_NONTURBO_PERFORMANCE, |
| 49 |
TURBO_PERFORMANCE |
| 50 |
}; |
| 51 |
|
| 52 |
|
| 53 |
enum soc_intel_alderlake_power_limits { |
| 54 |
ADL_P_142_242_282_15W_CORE, |
| 55 |
ADL_P_282_442_482_28W_CORE, |
| 56 |
ADL_P_682_28W_CORE, |
| 57 |
ADL_P_442_482_45W_CORE, |
| 58 |
ADL_P_642_682_45W_CORE, |
| 59 |
ADL_M_282_12W_CORE, |
| 60 |
ADL_M_282_15W_CORE, |
| 61 |
ADL_M_242_CORE, |
| 62 |
ADL_P_442_45W_CORE, |
| 63 |
ADL_N_081_7W_CORE, |
| 64 |
ADL_N_081_9W_CORE, |
| 65 |
ADL_N_081_15W_CORE, |
| 66 |
ADL_N_041_6W_CORE, |
| 67 |
ADL_N_041_12W_CORE, |
| 68 |
ADL_N_041_15W_CORE, |
| 69 |
ADL_N_021_6W_CORE, |
| 70 |
ADL_N_021_10W_CORE, |
| 71 |
ADL_S_882_35W_CORE, |
| 72 |
ADL_S_882_65W_CORE, |
| 73 |
ADL_S_882_125W_CORE, |
| 74 |
ADL_S_882_150W_CORE, |
| 75 |
ADL_S_842_35W_CORE, |
| 76 |
ADL_S_842_65W_CORE, |
| 77 |
ADL_S_842_125W_CORE, |
| 78 |
ADL_S_642_125W_CORE, |
| 79 |
ADL_S_602_35W_CORE, |
| 80 |
ADL_S_602_65W_CORE, |
| 81 |
ADL_S_402_60W_CORE, |
| 82 |
ADL_S_402_58W_CORE, |
| 83 |
ADL_S_402_35W_CORE, |
| 84 |
ADL_S_202_46W_CORE, |
| 85 |
ADL_S_202_35W_CORE, |
| 86 |
ASL_041_9W_CORE, |
| 87 |
RPL_P_682_642_482_45W_CORE, |
| 88 |
RPL_P_682_482_282_28W_CORE, |
| 89 |
RPL_P_282_242_142_15W_CORE, |
| 90 |
RPL_S_8161_35W_CORE, |
| 91 |
RPL_S_8161_65W_CORE, |
| 92 |
RPL_S_8161_95W_CORE, |
| 93 |
RPL_S_8161_125W_CORE, |
| 94 |
RPL_S_8161_150W_CORE, |
| 95 |
RPL_S_881_35W_CORE, |
| 96 |
RPL_S_881_65W_CORE, |
| 97 |
RPL_S_881_125W_CORE, |
| 98 |
RPL_S_681_35W_CORE, |
| 99 |
RPL_S_681_65W_CORE, |
| 100 |
RPL_S_681_125W_CORE, |
| 101 |
RPL_S_641_35W_CORE, |
| 102 |
RPL_S_641_65W_CORE, |
| 103 |
RPL_S_641_125W_CORE, |
| 104 |
RPL_S_801_80W_CORE, |
| 105 |
RPL_S_801_95W_CORE, |
| 106 |
RPL_S_401_35W_CORE, |
| 107 |
RPL_S_401_58W_CORE, |
| 108 |
RPL_S_401_60W_CORE, |
| 109 |
RPL_S_401_65W_CORE, |
| 110 |
RPL_S_201_35W_CORE, |
| 111 |
RPL_S_201_46W_CORE, |
| 112 |
RPL_S_201_65W_CORE, |
| 113 |
RPL_HX_8_16_55W_CORE, |
| 114 |
RPL_HX_8_12_55W_CORE, |
| 115 |
RPL_HX_8_8_55W_CORE, |
| 116 |
RPL_HX_6_8_55W_CORE, |
| 117 |
RPL_HX_6_4_55W_CORE, |
| 118 |
ADL_POWER_LIMITS_COUNT |
| 119 |
}; |
| 120 |
|
| 121 |
|
| 122 |
enum soc_intel_alderlake_cpu_tdps { |
| 123 |
TDP_6W = 6, |
| 124 |
TDP_7W = 7, |
| 125 |
TDP_9W = 9, |
| 126 |
TDP_10W = 10, |
| 127 |
TDP_12W = 12, |
| 128 |
TDP_15W = 15, |
| 129 |
TDP_28W = 28, |
| 130 |
TDP_35W = 35, |
| 131 |
TDP_45W = 45, |
| 132 |
TDP_46W = 46, |
| 133 |
TDP_55W = 55, |
| 134 |
TDP_58W = 58, |
| 135 |
TDP_60W = 60, |
| 136 |
TDP_65W = 65, |
| 137 |
TDP_80W = 80, |
| 138 |
TDP_90W = 90, |
| 139 |
TDP_95W = 95, |
| 140 |
TDP_125W = 125, |
| 141 |
TDP_150W = 150 |
| 142 |
}; |
| 143 |
|
| 144 |
|
| 145 |
static const struct { |
| 146 |
unsigned int cpu_id; |
| 147 |
enum soc_intel_alderlake_power_limits limits; |
| 148 |
enum soc_intel_alderlake_cpu_tdps cpu_tdp; |
| 149 |
} cpuid_to_adl[] = { |
| 150 |
{ PCI_DID_INTEL_ADL_P_ID_10, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 151 |
{ PCI_DID_INTEL_ADL_P_ID_7, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 152 |
{ PCI_DID_INTEL_ADL_P_ID_6, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 153 |
{ PCI_DID_INTEL_ADL_P_ID_7, ADL_P_282_442_482_28W_CORE, TDP_28W }, |
| 154 |
{ PCI_DID_INTEL_ADL_P_ID_5, ADL_P_282_442_482_28W_CORE, TDP_28W }, |
| 155 |
{ PCI_DID_INTEL_ADL_P_ID_3, ADL_P_682_28W_CORE, TDP_28W }, |
| 156 |
{ PCI_DID_INTEL_ADL_P_ID_5, ADL_P_442_482_45W_CORE, TDP_45W }, |
| 157 |
{ PCI_DID_INTEL_ADL_P_ID_4, ADL_P_642_682_45W_CORE, TDP_45W }, |
| 158 |
{ PCI_DID_INTEL_ADL_P_ID_3, ADL_P_642_682_45W_CORE, TDP_45W }, |
| 159 |
{ PCI_DID_INTEL_ADL_P_ID_1, ADL_P_442_482_45W_CORE, TDP_45W }, |
| 160 |
{ PCI_DID_INTEL_ADL_P_ID_1, ADL_P_282_442_482_28W_CORE, TDP_28W }, |
| 161 |
{ PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_12W_CORE, TDP_12W }, |
| 162 |
{ PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_15W_CORE, TDP_15W }, |
| 163 |
{ PCI_DID_INTEL_ADL_M_ID_2, ADL_M_242_CORE, TDP_9W }, |
| 164 |
{ PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_15W_CORE, TDP_15W }, |
| 165 |
{ PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_7W_CORE, TDP_7W }, |
| 166 |
{ PCI_DID_INTEL_ADL_N_ID_2, ADL_N_041_6W_CORE, TDP_6W }, |
| 167 |
{ PCI_DID_INTEL_ADL_N_ID_3, ADL_N_041_6W_CORE, TDP_6W }, |
| 168 |
{ PCI_DID_INTEL_ADL_N_ID_4, ADL_N_021_6W_CORE, TDP_6W }, |
| 169 |
{ PCI_DID_INTEL_ADL_N_ID_5, ADL_N_041_6W_CORE, TDP_6W }, |
| 170 |
{ PCI_DID_INTEL_ADL_N_ID_5, ADL_N_041_15W_CORE, TDP_15W }, |
| 171 |
{ PCI_DID_INTEL_ADL_N_ID_6, ADL_N_041_12W_CORE, TDP_12W }, |
| 172 |
{ PCI_DID_INTEL_ADL_N_ID_7, ADL_N_041_12W_CORE, TDP_12W }, |
| 173 |
{ PCI_DID_INTEL_ADL_N_ID_8, ADL_N_021_6W_CORE, TDP_6W }, |
| 174 |
{ PCI_DID_INTEL_ADL_N_ID_9, ADL_N_021_10W_CORE, TDP_10W }, |
| 175 |
{ PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_35W_CORE, TDP_35W }, |
| 176 |
{ PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_65W_CORE, TDP_65W }, |
| 177 |
{ PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_125W_CORE, TDP_125W }, |
| 178 |
{ PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_150W_CORE, TDP_150W }, |
| 179 |
{ PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_35W_CORE, TDP_35W }, |
| 180 |
{ PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_65W_CORE, TDP_65W }, |
| 181 |
{ PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_125W_CORE, TDP_125W }, |
| 182 |
{ PCI_DID_INTEL_ADL_S_ID_8, ADL_S_642_125W_CORE, TDP_125W }, |
| 183 |
{ PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_35W_CORE, TDP_35W }, |
| 184 |
{ PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_65W_CORE, TDP_65W }, |
| 185 |
{ PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_35W_CORE, TDP_35W }, |
| 186 |
{ PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_58W_CORE, TDP_58W }, |
| 187 |
{ PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_60W_CORE, TDP_60W }, |
| 188 |
{ PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_35W_CORE, TDP_35W }, |
| 189 |
{ PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_46W_CORE, TDP_46W }, |
| 190 |
{ PCI_DID_INTEL_ASL_ID_2, ASL_041_9W_CORE, TDP_9W }, |
| 191 |
{ PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 192 |
{ PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_482_282_28W_CORE, TDP_28W }, |
| 193 |
{ PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_482_282_28W_CORE, TDP_28W }, |
| 194 |
{ PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 195 |
{ PCI_DID_INTEL_RPL_P_ID_3, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
| 196 |
{ PCI_DID_INTEL_RPL_P_ID_4, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
| 197 |
{ PCI_DID_INTEL_RPL_P_ID_5, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
| 198 |
{ PCI_DID_INTEL_RPL_P_ID_6, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 199 |
{ PCI_DID_INTEL_RPL_P_ID_7, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 200 |
{ PCI_DID_INTEL_RPL_P_ID_8, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 201 |
{ PCI_DID_INTEL_RPL_P_ID_8, RPL_P_682_482_282_28W_CORE, TDP_28W }, |
| 202 |
{ PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_35W_CORE, TDP_35W }, |
| 203 |
{ PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_65W_CORE, TDP_65W }, |
| 204 |
{ PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_95W_CORE, TDP_95W }, |
| 205 |
{ PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_125W_CORE, TDP_125W }, |
| 206 |
{ PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_150W_CORE, TDP_150W }, |
| 207 |
{ PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_35W_CORE, TDP_35W }, |
| 208 |
{ PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_65W_CORE, TDP_65W }, |
| 209 |
{ PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_125W_CORE, TDP_125W }, |
| 210 |
{ PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_35W_CORE, TDP_35W }, |
| 211 |
{ PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_65W_CORE, TDP_65W }, |
| 212 |
{ PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_125W_CORE, TDP_125W }, |
| 213 |
{ PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_35W_CORE, TDP_35W }, |
| 214 |
{ PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_65W_CORE, TDP_65W }, |
| 215 |
{ PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_125W_CORE, TDP_125W }, |
| 216 |
{ PCI_DID_INTEL_RPL_S_ID_2, RPL_S_801_80W_CORE, TDP_80W }, |
| 217 |
{ PCI_DID_INTEL_RPL_S_ID_2, RPL_S_801_95W_CORE, TDP_90W }, |
| 218 |
{ PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_35W_CORE, TDP_35W }, |
| 219 |
{ PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_58W_CORE, TDP_58W }, |
| 220 |
{ PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_60W_CORE, TDP_60W }, |
| 221 |
{ PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_65W_CORE, TDP_65W }, |
| 222 |
{ PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_35W_CORE, TDP_35W }, |
| 223 |
{ PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_46W_CORE, TDP_46W }, |
| 224 |
{ PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_65W_CORE, TDP_65W }, |
| 225 |
{ PCI_DID_INTEL_RPL_HX_ID_1, RPL_HX_8_16_55W_CORE, TDP_55W }, |
| 226 |
{ PCI_DID_INTEL_RPL_HX_ID_2, RPL_HX_8_12_55W_CORE, TDP_55W }, |
| 227 |
{ PCI_DID_INTEL_RPL_HX_ID_3, RPL_HX_8_8_55W_CORE, TDP_55W }, |
| 228 |
{ PCI_DID_INTEL_RPL_HX_ID_4, RPL_HX_6_8_55W_CORE, TDP_55W }, |
| 229 |
{ PCI_DID_INTEL_RPL_HX_ID_5, RPL_HX_6_4_55W_CORE, TDP_55W }, |
| 230 |
{ PCI_DID_INTEL_RPL_HX_ID_6, RPL_HX_8_8_55W_CORE, TDP_55W }, |
| 231 |
{ PCI_DID_INTEL_RPL_HX_ID_7, RPL_HX_6_8_55W_CORE, TDP_55W }, |
| 232 |
{ PCI_DID_INTEL_RPL_HX_ID_8, RPL_HX_6_4_55W_CORE, TDP_55W }, |
| 233 |
}; |
| 234 |
|
| 235 |
|
| 236 |
enum ddi_ports { |
| 237 |
DDI_PORT_A, |
| 238 |
DDI_PORT_B, |
| 239 |
DDI_PORT_C, |
| 240 |
DDI_PORT_1, |
| 241 |
DDI_PORT_2, |
| 242 |
DDI_PORT_3, |
| 243 |
DDI_PORT_4, |
| 244 |
DDI_PORT_COUNT, |
| 245 |
}; |
| 246 |
|
| 247 |
enum ddi_port_flags { |
| 248 |
DDI_ENABLE_DDC = 1 << 0, |
| 249 |
DDI_ENABLE_HPD = 1 << 1, |
| 250 |
}; |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
enum fivr_enable_states { |
| 257 |
FIVR_ENABLE_S0i1_S0i2 = BIT(0), |
| 258 |
FIVR_ENABLE_S0i3 = BIT(1), |
| 259 |
FIVR_ENABLE_S3 = BIT(2), |
| 260 |
FIVR_ENABLE_S4 = BIT(3), |
| 261 |
FIVR_ENABLE_S5 = BIT(4), |
| 262 |
FIVR_ENABLE_S0 = BIT(5), |
| 263 |
}; |
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
enum fivr_voltage_supported { |
| 273 |
FIVR_RET_ACTIVE_SWITCH_SUPPORT = BIT(0), |
| 274 |
FIVR_VOLTAGE_NORMAL = BIT(1), |
| 275 |
FIVR_VOLTAGE_MIN_ACTIVE = BIT(2), |
| 276 |
FIVR_VOLTAGE_MIN_RETENTION = BIT(3), |
| 277 |
}; |
| 278 |
|
| 279 |
#define FIVR_ENABLE_ALL_SX (FIVR_ENABLE_S0i1_S0i2 | FIVR_ENABLE_S0i3 | \ |
| 280 |
FIVR_ENABLE_S3 | FIVR_ENABLE_S4 | FIVR_ENABLE_S5 | FIVR_ENABLE_S0) |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
enum pkgcstate_limit { |
| 287 |
LIMIT_C0_C1 = 0, |
| 288 |
LIMIT_C2 = 1, |
| 289 |
LIMIT_C3 = 2, |
| 290 |
LIMIT_C6 = 3, |
| 291 |
LIMIT_C7 = 4, |
| 292 |
LIMIT_C7S = 5, |
| 293 |
LIMIT_C8 = 6, |
| 294 |
LIMIT_C9 = 7, |
| 295 |
LIMIT_C10 = 8, |
| 296 |
LIMIT_CPUDEFAULT = 254, |
| 297 |
LIMIT_AUTO = 255, |
| 298 |
}; |
| 299 |
|
| 300 |
|
| 301 |
enum lpm_state_mask { |
| 302 |
LPM_S0i2_0 = BIT(0), |
| 303 |
LPM_S0i2_1 = BIT(1), |
| 304 |
LPM_S0i2_2 = BIT(2), |
| 305 |
LPM_S0i3_0 = BIT(3), |
| 306 |
LPM_S0i3_1 = BIT(4), |
| 307 |
LPM_S0i3_2 = BIT(5), |
| 308 |
LPM_S0i3_3 = BIT(6), |
| 309 |
LPM_S0i3_4 = BIT(7), |
| 310 |
LPM_S0iX_ALL = LPM_S0i2_0 | LPM_S0i2_1 | LPM_S0i2_2 |
| 311 |
| LPM_S0i3_0 | LPM_S0i3_1 | LPM_S0i3_2 | LPM_S0i3_3 | LPM_S0i3_4, |
| 312 |
}; |
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
enum fivr_spread_spectrum_ratio { |
| 320 |
FIVR_SS_0_5 = 0, |
| 321 |
FIVR_SS_1 = 3, |
| 322 |
FIVR_SS_1_5 = 8, |
| 323 |
FIVR_SS_2 = 18, |
| 324 |
FIVR_SS_3 = 28, |
| 325 |
FIVR_SS_4 = 34, |
| 326 |
FIVR_SS_5 = 39, |
| 327 |
FIVR_SS_6 = 44, |
| 328 |
}; |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
enum slew_rate { |
| 339 |
SLEW_FAST_2, |
| 340 |
SLEW_FAST_4, |
| 341 |
SLEW_FAST_8, |
| 342 |
SLEW_FAST_16 |
| 343 |
}; |
| 344 |
|
| 345 |
enum sata_speed_limit { |
| 346 |
SATA_DEFAULT, |
| 347 |
SATA_GEN1, |
| 348 |
SATA_GEN2 |
| 349 |
}; |
| 350 |
|
| 351 |
struct soc_intel_alderlake_config { |
| 352 |
|
| 353 |
struct soc_intel_common_config common_soc_config; |
| 354 |
|
| 355 |
|
| 356 |
struct soc_power_limits_config power_limits_config[ADL_POWER_LIMITS_COUNT]; |
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
uint8_t pmc_gpe0_dw0; |
| 361 |
uint8_t pmc_gpe0_dw1; |
| 362 |
uint8_t pmc_gpe0_dw2; |
| 363 |
|
| 364 |
|
| 365 |
uint32_t gen1_dec; |
| 366 |
uint32_t gen2_dec; |
| 367 |
uint32_t gen3_dec; |
| 368 |
uint32_t gen4_dec; |
| 369 |
|
| 370 |
|
| 371 |
bool s0ix_enable; |
| 372 |
|
| 373 |
bool tcss_d3_hot_disable; |
| 374 |
|
| 375 |
bool dptf_enable; |
| 376 |
|
| 377 |
|
| 378 |
bool deep_s3_enable_ac; |
| 379 |
bool deep_s3_enable_dc; |
| 380 |
bool deep_s5_enable_ac; |
| 381 |
bool deep_s5_enable_dc; |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
uint32_t deep_sx_config; |
| 388 |
|
| 389 |
|
| 390 |
uint32_t tcc_offset; |
| 391 |
|
| 392 |
|
| 393 |
struct ibecc_config ibecc; |
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
enum { |
| 400 |
SaGv_Disabled, |
| 401 |
SaGv_FixedPoint0, |
| 402 |
SaGv_FixedPoint1, |
| 403 |
SaGv_FixedPoint2, |
| 404 |
SaGv_FixedPoint3, |
| 405 |
SaGv_Enabled, |
| 406 |
} sagv; |
| 407 |
|
| 408 |
|
| 409 |
bool RMT; |
| 410 |
|
| 411 |
|
| 412 |
struct usb2_port_config usb2_ports[16]; |
| 413 |
struct usb3_port_config usb3_ports[10]; |
| 414 |
|
| 415 |
uint16_t usb2_wake_enable_bitmap; |
| 416 |
|
| 417 |
uint16_t usb3_wake_enable_bitmap; |
| 418 |
|
| 419 |
struct tcss_port_config tcss_ports[MAX_TYPE_C_PORTS]; |
| 420 |
|
| 421 |
|
| 422 |
uint8_t sata_mode; |
| 423 |
bool sata_salp_support; |
| 424 |
bool sata_ports_enable[8]; |
| 425 |
bool sata_ports_dev_slp[8]; |
| 426 |
enum sata_speed_limit sata_speed; |
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
bool sata_pwr_optimize_disable; |
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
bool sata_ports_enable_dito_config[8]; |
| 439 |
|
| 440 |
|
| 441 |
uint8_t sata_ports_dm_val[8]; |
| 442 |
|
| 443 |
|
| 444 |
uint16_t sata_ports_dito_val[8]; |
| 445 |
|
| 446 |
|
| 447 |
bool pch_hda_audio_link_hda_enable; |
| 448 |
bool pch_hda_dsp_enable; |
| 449 |
bool pch_hda_sdi_enable[MAX_HD_AUDIO_SDI_LINKS]; |
| 450 |
|
| 451 |
|
| 452 |
enum { |
| 453 |
HDA_TMODE_2T = 0, |
| 454 |
HDA_TMODE_4T = 2, |
| 455 |
HDA_TMODE_8T = 3, |
| 456 |
HDA_TMODE_16T = 4, |
| 457 |
} pch_hda_idisp_link_tmode; |
| 458 |
|
| 459 |
|
| 460 |
enum { |
| 461 |
HDA_LINKFREQ_48MHZ = 3, |
| 462 |
HDA_LINKFREQ_96MHZ = 4, |
| 463 |
} pch_hda_idisp_link_frequency; |
| 464 |
|
| 465 |
bool pch_hda_idisp_codec_enable; |
| 466 |
|
| 467 |
struct pcie_rp_config pch_pcie_rp[CONFIG_MAX_PCH_ROOT_PORTS]; |
| 468 |
struct pcie_rp_config cpu_pcie_rp[CONFIG_MAX_CPU_ROOT_PORTS]; |
| 469 |
uint8_t pcie_clk_config_flag[CONFIG_MAX_PCIE_CLOCK_SRC]; |
| 470 |
|
| 471 |
|
| 472 |
enum { |
| 473 |
IGD_SM_0MB = 0x00, |
| 474 |
IGD_SM_32MB = 0x01, |
| 475 |
IGD_SM_64MB = 0x02, |
| 476 |
IGD_SM_96MB = 0x03, |
| 477 |
IGD_SM_128MB = 0x04, |
| 478 |
IGD_SM_160MB = 0x05, |
| 479 |
IGD_SM_4MB = 0xF0, |
| 480 |
IGD_SM_8MB = 0xF1, |
| 481 |
IGD_SM_12MB = 0xF2, |
| 482 |
IGD_SM_16MB = 0xF3, |
| 483 |
IGD_SM_20MB = 0xF4, |
| 484 |
IGD_SM_24MB = 0xF5, |
| 485 |
IGD_SM_28MB = 0xF6, |
| 486 |
IGD_SM_36MB = 0xF8, |
| 487 |
IGD_SM_40MB = 0xF9, |
| 488 |
IGD_SM_44MB = 0xFA, |
| 489 |
IGD_SM_48MB = 0xFB, |
| 490 |
IGD_SM_52MB = 0xFC, |
| 491 |
IGD_SM_56MB = 0xFD, |
| 492 |
IGD_SM_60MB = 0xFE, |
| 493 |
} igd_dvmt50_pre_alloc; |
| 494 |
|
| 495 |
enum { |
| 496 |
IGD_AP_SZ_128MB = 0x00, |
| 497 |
IGD_AP_SZ_256MB = 0x01, |
| 498 |
IGD_AP_SZ_512MB = 0x02, |
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
IGD_AP_SZ_4G_512MB = 0x03, |
| 504 |
IGD_AP_SZ_4G_1024MB = 0x07, |
| 505 |
IGD_AP_SZ_4G_2048MB = 0x15, |
| 506 |
} igd_aperture_size; |
| 507 |
|
| 508 |
bool skip_ext_gfx_scan; |
| 509 |
bool eist_enable; |
| 510 |
bool enable_c6dram; |
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
uint8_t serial_io_i2c_mode[CONFIG_SOC_INTEL_I2C_DEV_MAX]; |
| 521 |
uint8_t serial_io_gspi_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 522 |
uint8_t serial_io_uart_mode[CONFIG_SOC_INTEL_UART_DEV_MAX]; |
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
uint8_t serial_io_gspi_cs_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
uint8_t serial_io_gspi_cs_state[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 535 |
|
| 536 |
|
| 537 |
bool pch_isclk; |
| 538 |
|
| 539 |
|
| 540 |
bool cnvi_bt_core; |
| 541 |
|
| 542 |
|
| 543 |
bool cnvi_bt_audio_offload; |
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
struct typec_aux_bias_pads typec_aux_bias_pads[MAX_TYPE_C_PORTS]; |
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
uint16_t tcss_aux_ori; |
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
bool gpio_override_pm; |
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
uint8_t gpio_pm[TOTAL_GPIO_COMM]; |
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
uint8_t ddi_portA_config; |
| 589 |
uint8_t ddi_portB_config; |
| 590 |
|
| 591 |
|
| 592 |
uint8_t ddi_ports_config[DDI_PORT_COUNT]; |
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
bool hybrid_storage_mode; |
| 598 |
|
| 599 |
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_N) |
| 600 |
|
| 601 |
bool emmc_enable_hs400_mode; |
| 602 |
#endif |
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
uint8_t cpu_ratio_override; |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
bool dmi_power_optimize_disable; |
| 622 |
|
| 623 |
|
| 624 |
bool energy_efficient_turbo; |
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
uint8_t vr_power_delivery_design; |
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
bool cpu_replacement_check; |
| 638 |
|
| 639 |
|
| 640 |
enum { |
| 641 |
ISA_SERIAL_BASE_ADDR_3F8, |
| 642 |
ISA_SERIAL_BASE_ADDR_2F8, |
| 643 |
} isa_serial_uart_base; |
| 644 |
|
| 645 |
|
| 646 |
struct { |
| 647 |
bool configure_ext_fivr; |
| 648 |
enum fivr_enable_states v1p05_enable_bitmap; |
| 649 |
enum fivr_enable_states vnn_enable_bitmap; |
| 650 |
enum fivr_enable_states vnn_sx_enable_bitmap; |
| 651 |
enum fivr_voltage_supported v1p05_supported_voltage_bitmap; |
| 652 |
enum fivr_voltage_supported vnn_supported_voltage_bitmap; |
| 653 |
|
| 654 |
int v1p05_voltage_mv; |
| 655 |
|
| 656 |
int vnn_voltage_mv; |
| 657 |
|
| 658 |
int vnn_sx_voltage_mv; |
| 659 |
|
| 660 |
int v1p05_icc_max_ma; |
| 661 |
|
| 662 |
int vnn_icc_max_ma; |
| 663 |
} ext_fivr_settings; |
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
struct vr_config domain_vr_config[NUM_VR_DOMAINS]; |
| 669 |
|
| 670 |
uint16_t max_dram_speed_mts; |
| 671 |
|
| 672 |
enum { |
| 673 |
SLP_S3_ASSERTION_DEFAULT, |
| 674 |
SLP_S3_ASSERTION_60_US, |
| 675 |
SLP_S3_ASSERTION_1_MS, |
| 676 |
SLP_S3_ASSERTION_50_MS, |
| 677 |
SLP_S3_ASSERTION_2_S, |
| 678 |
} pch_slp_s3_min_assertion_width; |
| 679 |
|
| 680 |
enum { |
| 681 |
SLP_S4_ASSERTION_DEFAULT, |
| 682 |
SLP_S4_ASSERTION_1S, |
| 683 |
SLP_S4_ASSERTION_2S, |
| 684 |
SLP_S4_ASSERTION_3S, |
| 685 |
SLP_S4_ASSERTION_4S, |
| 686 |
} pch_slp_s4_min_assertion_width; |
| 687 |
|
| 688 |
enum { |
| 689 |
SLP_SUS_ASSERTION_DEFAULT, |
| 690 |
SLP_SUS_ASSERTION_0_MS, |
| 691 |
SLP_SUS_ASSERTION_500_MS, |
| 692 |
SLP_SUS_ASSERTION_1_S, |
| 693 |
SLP_SUS_ASSERTION_4_S, |
| 694 |
} pch_slp_sus_min_assertion_width; |
| 695 |
|
| 696 |
enum { |
| 697 |
SLP_A_ASSERTION_DEFAULT, |
| 698 |
SLP_A_ASSERTION_0_MS, |
| 699 |
SLP_A_ASSERTION_4_S, |
| 700 |
SLP_A_ASSERTION_98_MS, |
| 701 |
SLP_A_ASSERTION_2_S, |
| 702 |
} pch_slp_a_min_assertion_width; |
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
enum { |
| 714 |
POWER_CYCLE_DURATION_DEFAULT, |
| 715 |
POWER_CYCLE_DURATION_1S, |
| 716 |
POWER_CYCLE_DURATION_2S, |
| 717 |
POWER_CYCLE_DURATION_3S, |
| 718 |
POWER_CYCLE_DURATION_4S, |
| 719 |
} pch_reset_power_cycle_duration; |
| 720 |
|
| 721 |
|
| 722 |
uint16_t platform_pmax; |
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
uint32_t fivr_rfi_frequency; |
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
uint8_t fivr_spread_spectrum; |
| 740 |
|
| 741 |
bool acoustic_noise_mitigation; |
| 742 |
|
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
uint8_t PreWake; |
| 749 |
|
| 750 |
bool fast_pkg_c_ramp_disable[NUM_VR_DOMAINS]; |
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
|
| 755 |
uint8_t slow_slew_rate[NUM_VR_DOMAINS]; |
| 756 |
|
| 757 |
|
| 758 |
bool enable_energy_perf_pref; |
| 759 |
uint8_t energy_perf_pref_value; |
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
bool disable_c1_state_auto_demotion; |
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
bool usb2_phy_sus_pg_disable; |
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
|
| 777 |
|
| 778 |
|
| 779 |
bool disable_package_c_state_demotion; |
| 780 |
|
| 781 |
|
| 782 |
bool enable_c1e; |
| 783 |
|
| 784 |
|
| 785 |
struct i915_gpu_controller_info gfx; |
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
struct i915_gpu_panel_config panel_cfg; |
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
|
| 796 |
|
| 797 |
bool disable_dynamic_tccold_handshake; |
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
|
| 802 |
|
| 803 |
|
| 804 |
bool lower_basic_mem_test_size; |
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
|
| 810 |
|
| 811 |
bool disable_sagv_reorder; |
| 812 |
|
| 813 |
|
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
bool enable_hwp_scalability_tracking; |
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
enum { |
| 826 |
PD_TIER_PREMIUM = 25000, |
| 827 |
PD_TIER_VOLUME = 27000 |
| 828 |
} vccin_aux_imon_iccmax; |
| 829 |
|
| 830 |
|
| 831 |
bool enabletcsscovtypea[4]; |
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
uint8_t mappingpchxhciusba[4]; |
| 838 |
}; |
| 839 |
|
| 840 |
typedef struct soc_intel_alderlake_config config_t; |
| 841 |
|
| 842 |
#endif |