Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef _SOC_CHIP_H_ |
| 4 | #define _SOC_CHIP_H_ |
| 5 | |
| 6 | #include <drivers/i2c/designware/dw_i2c.h> |
Tim Crawford | c6529c7 | 2022-11-01 11:42:28 -0600 | [diff] [blame] | 7 | #include <drivers/intel/gma/gma.h> |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 8 | #include <device/pci_ids.h> |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 9 | #include <intelblocks/cfg.h> |
| 10 | #include <intelblocks/gpio.h> |
| 11 | #include <intelblocks/gspi.h> |
Sumeet R Pawnikar | 77298c6 | 2021-03-10 21:09:37 +0530 | [diff] [blame] | 12 | #include <intelblocks/power_limit.h> |
Eric Lai | de2ab41 | 2021-01-11 16:14:14 +0800 | [diff] [blame] | 13 | #include <intelblocks/pcie_rp.h> |
Maulik V Vaghela | 6935350 | 2021-04-14 14:01:02 +0530 | [diff] [blame] | 14 | #include <intelblocks/tcss.h> |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 15 | #include <soc/gpe.h> |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 16 | #include <soc/pci_devs.h> |
| 17 | #include <soc/pmc.h> |
Subrata Banik | 2871e0e | 2020-09-27 11:30:58 +0530 | [diff] [blame] | 18 | #include <soc/serialio.h> |
| 19 | #include <soc/usb.h> |
V Sowmya | c6d7166 | 2021-07-15 08:11:08 +0530 | [diff] [blame] | 20 | #include <soc/vr_config.h> |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 21 | #include <stdint.h> |
| 22 | |
Maximilian Brune | 2c98488 | 2022-10-24 20:31:18 +0200 | [diff] [blame] | 23 | /* Define config parameters for In-Band ECC (IBECC). */ |
| 24 | #define MAX_IBECC_REGIONS 8 |
| 25 | |
| 26 | /* In-Band ECC Operation Mode */ |
| 27 | enum ibecc_mode { |
| 28 | IBECC_MODE_PER_REGION, |
| 29 | IBECC_MODE_NONE, |
| 30 | IBECC_MODE_ALL |
| 31 | }; |
| 32 | |
| 33 | struct ibecc_config { |
| 34 | bool enable; |
| 35 | enum ibecc_mode mode; |
| 36 | bool range_enable[MAX_IBECC_REGIONS]; |
| 37 | uint16_t range_base[MAX_IBECC_REGIONS]; |
| 38 | uint16_t range_mask[MAX_IBECC_REGIONS]; |
| 39 | /* add ECC error injection if needed by a mainboard */ |
| 40 | }; |
| 41 | |
Sumeet Pawnikar | aa49608 | 2021-05-07 20:11:53 +0530 | [diff] [blame] | 42 | /* Types of different SKUs */ |
| 43 | enum soc_intel_alderlake_power_limits { |
Curtis Chen | 150fee6 | 2021-12-21 11:51:33 +0800 | [diff] [blame] | 44 | ADL_P_142_242_282_15W_CORE, |
Curtis Chen | 38fcf40 | 2022-01-19 16:36:31 +0800 | [diff] [blame] | 45 | ADL_P_282_482_28W_CORE, |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 46 | ADL_P_682_28W_CORE, |
Curtis Chen | 150fee6 | 2021-12-21 11:51:33 +0800 | [diff] [blame] | 47 | ADL_P_442_482_45W_CORE, |
| 48 | ADL_P_642_682_45W_CORE, |
Sumeet Pawnikar | 21c431b | 2021-09-30 10:04:41 +0530 | [diff] [blame] | 49 | ADL_M_282_12W_CORE, |
| 50 | ADL_M_282_15W_CORE, |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 51 | ADL_M_242_CORE, |
Curtis Chen | 0c54461 | 2021-11-19 11:38:12 +0800 | [diff] [blame] | 52 | ADL_P_442_45W_CORE, |
Simon Yang | a16ed34 | 2022-09-06 18:30:51 +0800 | [diff] [blame] | 53 | ADL_N_081_7W_CORE, |
Vidya Gopalakrishnan | 596d5bc | 2022-05-18 20:17:40 +0530 | [diff] [blame] | 54 | ADL_N_081_15W_CORE, |
| 55 | ADL_N_041_6W_CORE, |
| 56 | ADL_N_021_6W_CORE, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 57 | ADL_S_882_35W_CORE, |
| 58 | ADL_S_882_65W_CORE, |
| 59 | ADL_S_882_125W_CORE, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 60 | ADL_S_882_150W_CORE, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 61 | ADL_S_842_35W_CORE, |
| 62 | ADL_S_842_65W_CORE, |
| 63 | ADL_S_842_125W_CORE, |
| 64 | ADL_S_642_125W_CORE, |
| 65 | ADL_S_602_35W_CORE, |
| 66 | ADL_S_602_65W_CORE, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 67 | ADL_S_402_60W_CORE, |
| 68 | ADL_S_402_58W_CORE, |
| 69 | ADL_S_402_35W_CORE, |
| 70 | ADL_S_202_46W_CORE, |
| 71 | ADL_S_202_35W_CORE, |
Jeremy Compostella | 1b44c81 | 2022-06-17 15:18:02 -0700 | [diff] [blame] | 72 | RPL_P_682_642_482_45W_CORE, |
| 73 | RPL_P_682_482_282_28W_CORE, |
| 74 | RPL_P_282_242_142_15W_CORE, |
Sumeet Pawnikar | aa49608 | 2021-05-07 20:11:53 +0530 | [diff] [blame] | 75 | ADL_POWER_LIMITS_COUNT |
| 76 | }; |
| 77 | |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 78 | /* TDP values for different SKUs */ |
| 79 | enum soc_intel_alderlake_cpu_tdps { |
Vidya Gopalakrishnan | 596d5bc | 2022-05-18 20:17:40 +0530 | [diff] [blame] | 80 | TDP_6W = 6, |
Simon Yang | a16ed34 | 2022-09-06 18:30:51 +0800 | [diff] [blame] | 81 | TDP_7W = 7, |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 82 | TDP_9W = 9, |
Sumeet Pawnikar | 21c431b | 2021-09-30 10:04:41 +0530 | [diff] [blame] | 83 | TDP_12W = 12, |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 84 | TDP_15W = 15, |
| 85 | TDP_28W = 28, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 86 | TDP_35W = 35, |
| 87 | TDP_45W = 45, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 88 | TDP_46W = 46, |
| 89 | TDP_58W = 58, |
| 90 | TDP_60W = 60, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 91 | TDP_65W = 65, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 92 | TDP_125W = 125, |
| 93 | TDP_150W = 150 |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 94 | }; |
| 95 | |
| 96 | /* Mapping of different SKUs based on CPU ID and TDP values */ |
| 97 | static const struct { |
| 98 | unsigned int cpu_id; |
| 99 | enum soc_intel_alderlake_power_limits limits; |
| 100 | enum soc_intel_alderlake_cpu_tdps cpu_tdp; |
| 101 | } cpuid_to_adl[] = { |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 102 | { PCI_DID_INTEL_ADL_P_ID_10, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 103 | { PCI_DID_INTEL_ADL_P_ID_7, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 104 | { PCI_DID_INTEL_ADL_P_ID_6, ADL_P_142_242_282_15W_CORE, TDP_15W }, |
| 105 | { PCI_DID_INTEL_ADL_P_ID_7, ADL_P_282_482_28W_CORE, TDP_28W }, |
| 106 | { PCI_DID_INTEL_ADL_P_ID_5, ADL_P_282_482_28W_CORE, TDP_28W }, |
| 107 | { PCI_DID_INTEL_ADL_P_ID_3, ADL_P_682_28W_CORE, TDP_28W }, |
| 108 | { PCI_DID_INTEL_ADL_P_ID_5, ADL_P_442_482_45W_CORE, TDP_45W }, |
| 109 | { PCI_DID_INTEL_ADL_P_ID_4, ADL_P_642_682_45W_CORE, TDP_45W }, |
| 110 | { PCI_DID_INTEL_ADL_P_ID_3, ADL_P_642_682_45W_CORE, TDP_45W }, |
| 111 | { PCI_DID_INTEL_ADL_P_ID_1, ADL_P_442_482_45W_CORE, TDP_45W }, |
| 112 | { PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_12W_CORE, TDP_12W }, |
| 113 | { PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_15W_CORE, TDP_15W }, |
| 114 | { PCI_DID_INTEL_ADL_M_ID_2, ADL_M_242_CORE, TDP_9W }, |
Simon Yang | a16ed34 | 2022-09-06 18:30:51 +0800 | [diff] [blame] | 115 | { PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_7W_CORE, TDP_7W }, |
Vidya Gopalakrishnan | 596d5bc | 2022-05-18 20:17:40 +0530 | [diff] [blame] | 116 | { PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_15W_CORE, TDP_15W }, |
| 117 | { PCI_DID_INTEL_ADL_N_ID_2, ADL_N_041_6W_CORE, TDP_6W }, |
| 118 | { PCI_DID_INTEL_ADL_N_ID_3, ADL_N_041_6W_CORE, TDP_6W }, |
| 119 | { PCI_DID_INTEL_ADL_N_ID_4, ADL_N_021_6W_CORE, TDP_6W }, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 120 | { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_35W_CORE, TDP_35W }, |
| 121 | { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_65W_CORE, TDP_65W }, |
| 122 | { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_125W_CORE, TDP_125W }, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 123 | { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_150W_CORE, TDP_150W }, |
Michał Kopeć | 75a49fe | 2022-04-08 11:28:45 +0200 | [diff] [blame] | 124 | { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_35W_CORE, TDP_35W }, |
| 125 | { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_65W_CORE, TDP_65W }, |
| 126 | { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_125W_CORE, TDP_125W }, |
| 127 | { PCI_DID_INTEL_ADL_S_ID_8, ADL_S_642_125W_CORE, TDP_125W }, |
| 128 | { PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_35W_CORE, TDP_35W }, |
| 129 | { PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_65W_CORE, TDP_65W }, |
Michał Żygowski | 82043f5 | 2022-07-21 18:11:14 +0200 | [diff] [blame] | 130 | { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_35W_CORE, TDP_35W }, |
| 131 | { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_58W_CORE, TDP_58W }, |
| 132 | { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_60W_CORE, TDP_60W }, |
| 133 | { PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_35W_CORE, TDP_35W }, |
| 134 | { PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_46W_CORE, TDP_46W }, |
Jeremy Compostella | 1b44c81 | 2022-06-17 15:18:02 -0700 | [diff] [blame] | 135 | { PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_642_482_45W_CORE, TDP_45W }, |
| 136 | { PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_482_282_28W_CORE, TDP_28W }, |
| 137 | { PCI_DID_INTEL_RPL_P_ID_3, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
Lawrence Chang | 0a5da51 | 2022-10-19 14:38:41 +0800 | [diff] [blame] | 138 | { PCI_DID_INTEL_RPL_P_ID_4, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
Marx Wang | 39ede0a | 2022-12-20 10:48:33 +0800 | [diff] [blame^] | 139 | { PCI_DID_INTEL_RPL_P_ID_5, RPL_P_282_242_142_15W_CORE, TDP_15W }, |
Sumeet Pawnikar | eaf87a9 | 2021-08-31 17:01:02 +0530 | [diff] [blame] | 140 | }; |
| 141 | |
Subrata Banik | 8a18bd8 | 2021-06-09 21:57:49 +0530 | [diff] [blame] | 142 | /* Types of display ports */ |
| 143 | enum ddi_ports { |
| 144 | DDI_PORT_A, |
| 145 | DDI_PORT_B, |
| 146 | DDI_PORT_C, |
| 147 | DDI_PORT_1, |
| 148 | DDI_PORT_2, |
| 149 | DDI_PORT_3, |
| 150 | DDI_PORT_4, |
| 151 | DDI_PORT_COUNT, |
| 152 | }; |
| 153 | |
| 154 | enum ddi_port_flags { |
| 155 | DDI_ENABLE_DDC = 1 << 0, |
| 156 | DDI_ENABLE_HPD = 1 << 1, |
| 157 | }; |
| 158 | |
V Sowmya | 418d37e | 2021-06-21 08:47:17 +0530 | [diff] [blame] | 159 | /* |
| 160 | * Enable External V1P05/Vnn/VnnSx Rail in: BIT0:S0i1/S0i2, |
V Sowmya | ee44945 | 2022-04-08 14:36:13 +0530 | [diff] [blame] | 161 | * BIT1:S0i3, BIT2:S3, BIT3:S4, BIT4:S5, BIT5:S0. |
V Sowmya | 418d37e | 2021-06-21 08:47:17 +0530 | [diff] [blame] | 162 | */ |
| 163 | enum fivr_enable_states { |
| 164 | FIVR_ENABLE_S0i1_S0i2 = BIT(0), |
| 165 | FIVR_ENABLE_S0i3 = BIT(1), |
| 166 | FIVR_ENABLE_S3 = BIT(2), |
| 167 | FIVR_ENABLE_S4 = BIT(3), |
| 168 | FIVR_ENABLE_S5 = BIT(4), |
V Sowmya | ee44945 | 2022-04-08 14:36:13 +0530 | [diff] [blame] | 169 | FIVR_ENABLE_S0 = BIT(5), |
V Sowmya | 418d37e | 2021-06-21 08:47:17 +0530 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | /* |
| 173 | * Enable the following for External V1p05 rail |
| 174 | * BIT0: Retention active switch support |
| 175 | * BIT1: Normal Active voltage supported |
| 176 | * BIT2: Minimum active voltage supported |
| 177 | * BIT3: Minimum Retention voltage supported |
| 178 | */ |
| 179 | enum fivr_voltage_supported { |
| 180 | FIVR_RET_ACTIVE_SWITCH_SUPPORT = BIT(0), |
| 181 | FIVR_VOLTAGE_NORMAL = BIT(1), |
| 182 | FIVR_VOLTAGE_MIN_ACTIVE = BIT(2), |
| 183 | FIVR_VOLTAGE_MIN_RETENTION = BIT(3), |
| 184 | }; |
| 185 | |
| 186 | #define FIVR_ENABLE_ALL_SX (FIVR_ENABLE_S0i1_S0i2 | FIVR_ENABLE_S0i3 | \ |
V Sowmya | ee44945 | 2022-04-08 14:36:13 +0530 | [diff] [blame] | 187 | FIVR_ENABLE_S3 | FIVR_ENABLE_S4 | FIVR_ENABLE_S5 | FIVR_ENABLE_S0) |
V Sowmya | af42906 | 2021-06-21 10:23:33 +0530 | [diff] [blame] | 188 | /* |
| 189 | * The Max Pkg Cstate |
| 190 | * Values 0 - C0/C1, 1 - C2, 2 - C3, 3 - C6, 4 - C7, 5 - C7S, 6 - C8, 7 - C9, 8 - C10, |
| 191 | * 254 - CPU Default , 255 - Auto. |
| 192 | */ |
| 193 | enum pkgcstate_limit { |
| 194 | LIMIT_C0_C1 = 0, |
| 195 | LIMIT_C2 = 1, |
| 196 | LIMIT_C3 = 2, |
| 197 | LIMIT_C6 = 3, |
| 198 | LIMIT_C7 = 4, |
| 199 | LIMIT_C7S = 5, |
| 200 | LIMIT_C8 = 6, |
| 201 | LIMIT_C9 = 7, |
| 202 | LIMIT_C10 = 8, |
| 203 | LIMIT_CPUDEFAULT = 254, |
| 204 | LIMIT_AUTO = 255, |
| 205 | }; |
V Sowmya | 418d37e | 2021-06-21 08:47:17 +0530 | [diff] [blame] | 206 | |
Tim Wawrzynczak | e2b8f30 | 2021-07-19 15:35:47 -0600 | [diff] [blame] | 207 | /* Bit values for use in LpmStateEnableMask. */ |
| 208 | enum lpm_state_mask { |
| 209 | LPM_S0i2_0 = BIT(0), |
| 210 | LPM_S0i2_1 = BIT(1), |
| 211 | LPM_S0i2_2 = BIT(2), |
| 212 | LPM_S0i3_0 = BIT(3), |
| 213 | LPM_S0i3_1 = BIT(4), |
| 214 | LPM_S0i3_2 = BIT(5), |
| 215 | LPM_S0i3_3 = BIT(6), |
| 216 | LPM_S0i3_4 = BIT(7), |
| 217 | LPM_S0iX_ALL = LPM_S0i2_0 | LPM_S0i2_1 | LPM_S0i2_2 |
| 218 | | LPM_S0i3_0 | LPM_S0i3_1 | LPM_S0i3_2 | LPM_S0i3_3 | LPM_S0i3_4, |
| 219 | }; |
| 220 | |
Wisley Chen | d0cef2a | 2021-11-01 16:13:55 +0600 | [diff] [blame] | 221 | /* |
| 222 | * FivrSpreadSpectrum: |
| 223 | * Values |
| 224 | * 0 - 0.5%, 3 - 1%, 8 - 1.5%, 18 - 2%, 28 - 3%, 34 - 4%, 39 - 5%, 44 - 6% |
| 225 | */ |
| 226 | enum fivr_spread_spectrum_ratio { |
| 227 | FIVR_SS_0_5 = 0, |
| 228 | FIVR_SS_1 = 3, |
| 229 | FIVR_SS_1_5 = 8, |
| 230 | FIVR_SS_2 = 18, |
| 231 | FIVR_SS_3 = 28, |
| 232 | FIVR_SS_4 = 34, |
| 233 | FIVR_SS_5 = 39, |
| 234 | FIVR_SS_6 = 44, |
| 235 | }; |
| 236 | |
Wisley Chen | c510346 | 2021-11-04 18:12:58 +0600 | [diff] [blame] | 237 | /* |
| 238 | * Slew Rate configuration for Deep Package C States for VR domain. |
| 239 | * They are fast time divided by 2. |
| 240 | * 0 - Fast/2 |
| 241 | * 1 - Fast/4 |
| 242 | * 2 - Fast/8 |
| 243 | * 3 - Fast/16 |
| 244 | */ |
| 245 | enum slew_rate { |
| 246 | SLEW_FAST_2, |
| 247 | SLEW_FAST_4, |
| 248 | SLEW_FAST_8, |
| 249 | SLEW_FAST_16 |
| 250 | }; |
| 251 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 252 | struct soc_intel_alderlake_config { |
| 253 | |
| 254 | /* Common struct containing soc config data required by common code */ |
| 255 | struct soc_intel_common_config common_soc_config; |
| 256 | |
Sumeet R Pawnikar | 77298c6 | 2021-03-10 21:09:37 +0530 | [diff] [blame] | 257 | /* Common struct containing power limits configuration information */ |
Sumeet Pawnikar | aa49608 | 2021-05-07 20:11:53 +0530 | [diff] [blame] | 258 | struct soc_power_limits_config power_limits_config[ADL_POWER_LIMITS_COUNT]; |
Sumeet R Pawnikar | 77298c6 | 2021-03-10 21:09:37 +0530 | [diff] [blame] | 259 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 260 | /* Gpio group routed to each dword of the GPE0 block. Values are |
| 261 | * of the form PMC_GPP_[A:U] or GPD. */ |
| 262 | uint8_t pmc_gpe0_dw0; /* GPE0_31_0 STS/EN */ |
| 263 | uint8_t pmc_gpe0_dw1; /* GPE0_63_32 STS/EN */ |
| 264 | uint8_t pmc_gpe0_dw2; /* GPE0_95_64 STS/EN */ |
| 265 | |
| 266 | /* Generic IO decode ranges */ |
| 267 | uint32_t gen1_dec; |
| 268 | uint32_t gen2_dec; |
| 269 | uint32_t gen3_dec; |
| 270 | uint32_t gen4_dec; |
| 271 | |
| 272 | /* Enable S0iX support */ |
| 273 | int s0ix_enable; |
| 274 | /* Support for TCSS xhci, xdci, TBT PCIe root ports and DMA controllers */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 275 | uint8_t tcss_d3_hot_disable; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 276 | /* Support for TBT PCIe root ports and DMA controllers with D3Hot->D3Cold */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 277 | uint8_t tcss_d3_cold_disable; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 278 | /* Enable DPTF support */ |
| 279 | int dptf_enable; |
| 280 | |
| 281 | /* Deep SX enable for both AC and DC */ |
| 282 | int deep_s3_enable_ac; |
| 283 | int deep_s3_enable_dc; |
| 284 | int deep_s5_enable_ac; |
| 285 | int deep_s5_enable_dc; |
| 286 | |
| 287 | /* Deep Sx Configuration |
| 288 | * DSX_EN_WAKE_PIN - Enable WAKE# pin |
| 289 | * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin |
| 290 | * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */ |
| 291 | uint32_t deep_sx_config; |
| 292 | |
| 293 | /* TCC activation offset */ |
| 294 | uint32_t tcc_offset; |
| 295 | |
Maximilian Brune | 2c98488 | 2022-10-24 20:31:18 +0200 | [diff] [blame] | 296 | /* In-Band ECC (IBECC) configuration */ |
| 297 | struct ibecc_config ibecc; |
| 298 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 299 | /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs. |
| 300 | * When enabled memory will be training at two different frequencies. |
| 301 | * 0:Disabled, 1:FixedPoint0, 2:FixedPoint1, 3:FixedPoint2, |
| 302 | * 4:FixedPoint3, 5:Enabled */ |
| 303 | enum { |
| 304 | SaGv_Disabled, |
| 305 | SaGv_FixedPoint0, |
| 306 | SaGv_FixedPoint1, |
| 307 | SaGv_FixedPoint2, |
| 308 | SaGv_FixedPoint3, |
| 309 | SaGv_Enabled, |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 310 | } sagv; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 311 | |
| 312 | /* Rank Margin Tool. 1:Enable, 0:Disable */ |
| 313 | uint8_t RMT; |
| 314 | |
| 315 | /* USB related */ |
| 316 | struct usb2_port_config usb2_ports[16]; |
| 317 | struct usb3_port_config usb3_ports[10]; |
| 318 | /* Wake Enable Bitmap for USB2 ports */ |
| 319 | uint16_t usb2_wake_enable_bitmap; |
| 320 | /* Wake Enable Bitmap for USB3 ports */ |
| 321 | uint16_t usb3_wake_enable_bitmap; |
Maulik V Vaghela | 6935350 | 2021-04-14 14:01:02 +0530 | [diff] [blame] | 322 | /* Program OC pins for TCSS */ |
| 323 | struct tcss_port_config tcss_ports[MAX_TYPE_C_PORTS]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 324 | |
| 325 | /* SATA related */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 326 | uint8_t sata_mode; |
| 327 | uint8_t sata_salp_support; |
| 328 | uint8_t sata_ports_enable[8]; |
| 329 | uint8_t sata_ports_dev_slp[8]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 330 | |
| 331 | /* |
| 332 | * Enable(0)/Disable(1) SATA Power Optimizer on PCH side. |
| 333 | * Default 0. Setting this to 1 disables the SATA Power Optimizer. |
| 334 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 335 | uint8_t sata_pwr_optimize_disable; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 336 | |
| 337 | /* |
| 338 | * SATA Port Enable Dito Config. |
| 339 | * Enable DEVSLP Idle Timeout settings (DmVal, DitoVal). |
| 340 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 341 | uint8_t sata_ports_enable_dito_config[8]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 342 | |
| 343 | /* SataPortsDmVal is the DITO multiplier. Default is 15. */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 344 | uint8_t sata_ports_dm_val[8]; |
| 345 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 346 | /* SataPortsDitoVal is the DEVSLP Idle Timeout, default is 625ms */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 347 | uint16_t sata_ports_dito_val[8]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 348 | |
| 349 | /* Audio related */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 350 | uint8_t pch_hda_dsp_enable; |
Sugnan Prabhu S | 50f8b4e | 2021-03-18 22:08:22 +0530 | [diff] [blame] | 351 | |
| 352 | /* iDisp-Link T-Mode 0: 2T, 2: 4T, 3: 8T, 4: 16T */ |
| 353 | enum { |
| 354 | HDA_TMODE_2T = 0, |
| 355 | HDA_TMODE_4T = 2, |
| 356 | HDA_TMODE_8T = 3, |
| 357 | HDA_TMODE_16T = 4, |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 358 | } pch_hda_idisp_link_tmode; |
Sugnan Prabhu S | 50f8b4e | 2021-03-18 22:08:22 +0530 | [diff] [blame] | 359 | |
| 360 | /* iDisp-Link Freq 4: 96MHz, 3: 48MHz. */ |
| 361 | enum { |
| 362 | HDA_LINKFREQ_48MHZ = 3, |
| 363 | HDA_LINKFREQ_96MHZ = 4, |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 364 | } pch_hda_idisp_link_frequency; |
Sugnan Prabhu S | 50f8b4e | 2021-03-18 22:08:22 +0530 | [diff] [blame] | 365 | |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 366 | bool pch_hda_idisp_codec_enable; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 367 | |
Eric Lai | 5b302b2 | 2020-12-05 16:49:43 +0800 | [diff] [blame] | 368 | struct pcie_rp_config pch_pcie_rp[CONFIG_MAX_PCH_ROOT_PORTS]; |
| 369 | struct pcie_rp_config cpu_pcie_rp[CONFIG_MAX_CPU_ROOT_PORTS]; |
| 370 | uint8_t pcie_clk_config_flag[CONFIG_MAX_PCIE_CLOCK_SRC]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 371 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 372 | /* Gfx related */ |
| 373 | enum { |
| 374 | IGD_SM_0MB = 0x00, |
| 375 | IGD_SM_32MB = 0x01, |
| 376 | IGD_SM_64MB = 0x02, |
| 377 | IGD_SM_96MB = 0x03, |
| 378 | IGD_SM_128MB = 0x04, |
| 379 | IGD_SM_160MB = 0x05, |
| 380 | IGD_SM_4MB = 0xF0, |
| 381 | IGD_SM_8MB = 0xF1, |
| 382 | IGD_SM_12MB = 0xF2, |
| 383 | IGD_SM_16MB = 0xF3, |
| 384 | IGD_SM_20MB = 0xF4, |
| 385 | IGD_SM_24MB = 0xF5, |
| 386 | IGD_SM_28MB = 0xF6, |
| 387 | IGD_SM_36MB = 0xF8, |
| 388 | IGD_SM_40MB = 0xF9, |
| 389 | IGD_SM_44MB = 0xFA, |
| 390 | IGD_SM_48MB = 0xFB, |
| 391 | IGD_SM_52MB = 0xFC, |
| 392 | IGD_SM_56MB = 0xFD, |
| 393 | IGD_SM_60MB = 0xFE, |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 394 | } igd_dvmt50_pre_alloc; |
| 395 | uint8_t skip_ext_gfx_scan; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 396 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 397 | /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */ |
| 398 | uint8_t eist_enable; |
| 399 | |
| 400 | /* Enable C6 DRAM */ |
| 401 | uint8_t enable_c6dram; |
Michael Niewöhner | d2fadda | 2021-09-27 19:26:20 +0200 | [diff] [blame] | 402 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 403 | /* |
| 404 | * SerialIO device mode selection: |
| 405 | * PchSerialIoDisabled, |
| 406 | * PchSerialIoPci, |
| 407 | * PchSerialIoHidden, |
| 408 | * PchSerialIoLegacyUart, |
| 409 | * PchSerialIoSkipInit |
| 410 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 411 | uint8_t serial_io_i2c_mode[CONFIG_SOC_INTEL_I2C_DEV_MAX]; |
| 412 | uint8_t serial_io_gspi_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
| 413 | uint8_t serial_io_uart_mode[CONFIG_SOC_INTEL_UART_DEV_MAX]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 414 | /* |
| 415 | * GSPIn Default Chip Select Mode: |
| 416 | * 0:Hardware Mode, |
| 417 | * 1:Software Mode |
| 418 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 419 | uint8_t serial_io_gspi_cs_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 420 | /* |
| 421 | * GSPIn Default Chip Select State: |
| 422 | * 0: Low, |
| 423 | * 1: High |
| 424 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 425 | uint8_t serial_io_gspi_cs_state[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 426 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 427 | /* Enable Pch iSCLK */ |
| 428 | uint8_t pch_isclk; |
| 429 | |
Cliff Huang | bc1941f | 2021-02-10 17:41:41 -0800 | [diff] [blame] | 430 | /* CNVi BT Core Enable/Disable */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 431 | bool cnvi_bt_core; |
Cliff Huang | bc1941f | 2021-02-10 17:41:41 -0800 | [diff] [blame] | 432 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 433 | /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 434 | bool cnvi_bt_audio_offload; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 435 | |
| 436 | /* |
Deepti Deshatty | 8e7facf | 2021-05-12 17:45:37 +0530 | [diff] [blame] | 437 | * These GPIOs will be programmed by the IOM to handle biasing of the |
| 438 | * Type-C aux (SBU) signals when certain alternate modes are used. |
| 439 | * `pad_auxn_dc` should be assigned to the GPIO pad providing negative |
| 440 | * bias (name usually contains `AUXN_DC` or `AUX_N`); similarly, |
| 441 | * `pad_auxp_dc` should be assigned to the GPIO providing positive bias |
| 442 | * (name often contains `AUXP_DC` or `_AUX_P`). |
Subrata Banik | 2871e0e | 2020-09-27 11:30:58 +0530 | [diff] [blame] | 443 | */ |
Deepti Deshatty | 8e7facf | 2021-05-12 17:45:37 +0530 | [diff] [blame] | 444 | struct typec_aux_bias_pads typec_aux_bias_pads[MAX_TYPE_C_PORTS]; |
Subrata Banik | 2871e0e | 2020-09-27 11:30:58 +0530 | [diff] [blame] | 445 | |
| 446 | /* |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 447 | * SOC Aux orientation override: |
| 448 | * This is a bitfield that corresponds to up to 4 TCSS ports on ADL. |
| 449 | * Even numbered bits (0, 2, 4, 6) control the retimer being handled by SOC. |
| 450 | * Odd numbered bits (1, 3, 5, 7) control the orientation of the physical aux lines |
| 451 | * on the motherboard. |
| 452 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 453 | uint16_t tcss_aux_ori; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 454 | |
| 455 | /* |
| 456 | * Override GPIO PM configuration: |
| 457 | * 0: Use FSP default GPIO PM program, |
| 458 | * 1: coreboot to override GPIO PM program |
| 459 | */ |
| 460 | uint8_t gpio_override_pm; |
| 461 | |
| 462 | /* |
| 463 | * GPIO PM configuration: 0 to disable, 1 to enable power gating |
| 464 | * Bit 6-7: Reserved |
| 465 | * Bit 5: MISCCFG_GPSIDEDPCGEN |
| 466 | * Bit 4: MISCCFG_GPRCOMPCDLCGEN |
| 467 | * Bit 3: MISCCFG_GPRTCDLCGEN |
| 468 | * Bit 2: MISCCFG_GSXLCGEN |
| 469 | * Bit 1: MISCCFG_GPDPCGEN |
| 470 | * Bit 0: MISCCFG_GPDLCGEN |
| 471 | */ |
| 472 | uint8_t gpio_pm[TOTAL_GPIO_COMM]; |
| 473 | |
| 474 | /* DP config */ |
| 475 | /* |
| 476 | * Port config |
| 477 | * 0:Disabled, 1:eDP, 2:MIPI DSI |
| 478 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 479 | uint8_t ddi_portA_config; |
| 480 | uint8_t ddi_portB_config; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 481 | |
Subrata Banik | 8a18bd8 | 2021-06-09 21:57:49 +0530 | [diff] [blame] | 482 | /* Enable(1)/Disable(0) HPD/DDC */ |
| 483 | uint8_t ddi_ports_config[DDI_PORT_COUNT]; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 484 | |
| 485 | /* Hybrid storage mode enable (1) / disable (0) |
| 486 | * This mode makes FSP detect Optane and NVME and set PCIe lane mode |
| 487 | * accordingly */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 488 | uint8_t hybrid_storage_mode; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 489 | |
Krishna Prasad Bhat | a6d642f | 2022-01-16 23:16:24 +0530 | [diff] [blame] | 490 | #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_N) |
| 491 | /* eMMC HS400 mode */ |
| 492 | uint8_t emmc_enable_hs400_mode; |
| 493 | #endif |
| 494 | |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 495 | /* |
| 496 | * Override CPU flex ratio value: |
| 497 | * CPU ratio value controls the maximum processor non-turbo ratio. |
| 498 | * Valid Range 0 to 63. |
| 499 | * |
| 500 | * In general descriptor provides option to set default cpu flex ratio. |
| 501 | * Default cpu flex ratio is 0 ensures booting with non-turbo max frequency. |
| 502 | * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0. |
| 503 | * |
| 504 | * Only override CPU flex ratio if don't want to boot with non-turbo max. |
| 505 | */ |
| 506 | uint8_t cpu_ratio_override; |
| 507 | |
| 508 | /* |
| 509 | * Enable(0)/Disable(1) DMI Power Optimizer on PCH side. |
| 510 | * Default 0. Setting this to 1 disables the DMI Power Optimizer. |
| 511 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 512 | uint8_t dmi_power_optimize_disable; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 513 | |
| 514 | /* |
Lean Sheng Tan | 4b45d4c | 2022-04-01 19:01:59 +0200 | [diff] [blame] | 515 | * Used to communicate the power delivery design capability of the board. This |
| 516 | * value is an enum of the available power delivery segments that are defined in |
| 517 | * the Platform Design Guide. |
| 518 | */ |
| 519 | uint8_t vr_power_delivery_design; |
| 520 | |
| 521 | /* |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 522 | * Enable(1)/Disable(0) CPU Replacement check. |
| 523 | * Default 0. Setting this to 1 to check CPU replacement. |
| 524 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 525 | uint8_t cpu_replacement_check; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 526 | |
| 527 | /* ISA Serial Base selection. */ |
| 528 | enum { |
| 529 | ISA_SERIAL_BASE_ADDR_3F8, |
| 530 | ISA_SERIAL_BASE_ADDR_2F8, |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 531 | } isa_serial_uart_base; |
V Sowmya | 418d37e | 2021-06-21 08:47:17 +0530 | [diff] [blame] | 532 | |
| 533 | /* structure containing various settings for PCH FIVRs */ |
| 534 | struct { |
| 535 | bool configure_ext_fivr; |
| 536 | enum fivr_enable_states v1p05_enable_bitmap; |
| 537 | enum fivr_enable_states vnn_enable_bitmap; |
| 538 | enum fivr_enable_states vnn_sx_enable_bitmap; |
| 539 | enum fivr_voltage_supported v1p05_supported_voltage_bitmap; |
| 540 | enum fivr_voltage_supported vnn_supported_voltage_bitmap; |
| 541 | /* V1p05 Rail Voltage in mv */ |
| 542 | int v1p05_voltage_mv; |
| 543 | /* Vnn Rail Voltage in mv */ |
| 544 | int vnn_voltage_mv; |
| 545 | /* VnnSx Rail Voltage in mv */ |
| 546 | int vnn_sx_voltage_mv; |
| 547 | /* External Icc Max for V1p05 rail in mA */ |
| 548 | int v1p05_icc_max_ma; |
| 549 | /* External Icc Max for VnnSx rail in mA */ |
| 550 | int vnn_icc_max_ma; |
| 551 | } ext_fivr_settings; |
V Sowmya | c6d7166 | 2021-07-15 08:11:08 +0530 | [diff] [blame] | 552 | |
| 553 | /* VrConfig Settings. |
| 554 | * 0 = VR_DOMAIN_IA Core 1 = VR_DOMAIN_GT. |
| 555 | */ |
| 556 | struct vr_config domain_vr_config[NUM_VR_DOMAINS]; |
Casper Chang | 8fcefd3 | 2021-09-22 22:35:54 -0400 | [diff] [blame] | 557 | |
Scott Chao | ab638c1 | 2022-04-20 15:16:06 +0800 | [diff] [blame] | 558 | uint16_t max_dram_speed_mts; |
Tim Wawrzynczak | ab0e081 | 2021-09-21 10:28:16 -0600 | [diff] [blame] | 559 | |
| 560 | enum { |
| 561 | SLP_S3_ASSERTION_DEFAULT, |
| 562 | SLP_S3_ASSERTION_60_US, |
| 563 | SLP_S3_ASSERTION_1_MS, |
| 564 | SLP_S3_ASSERTION_50_MS, |
| 565 | SLP_S3_ASSERTION_2_S, |
| 566 | } pch_slp_s3_min_assertion_width; |
| 567 | |
| 568 | enum { |
| 569 | SLP_S4_ASSERTION_DEFAULT, |
| 570 | SLP_S4_ASSERTION_1S, |
| 571 | SLP_S4_ASSERTION_2S, |
| 572 | SLP_S4_ASSERTION_3S, |
| 573 | SLP_S4_ASSERTION_4S, |
| 574 | } pch_slp_s4_min_assertion_width; |
| 575 | |
| 576 | enum { |
| 577 | SLP_SUS_ASSERTION_DEFAULT, |
| 578 | SLP_SUS_ASSERTION_0_MS, |
| 579 | SLP_SUS_ASSERTION_500_MS, |
| 580 | SLP_SUS_ASSERTION_1_S, |
| 581 | SLP_SUS_ASSERTION_4_S, |
| 582 | } pch_slp_sus_min_assertion_width; |
| 583 | |
| 584 | enum { |
| 585 | SLP_A_ASSERTION_DEFAULT, |
| 586 | SLP_A_ASSERTION_0_MS, |
| 587 | SLP_A_ASSERTION_4_S, |
| 588 | SLP_A_ASSERTION_98_MS, |
| 589 | SLP_A_ASSERTION_2_S, |
| 590 | } pch_slp_a_min_assertion_width; |
| 591 | |
| 592 | /* |
| 593 | * PCH PM Reset Power Cycle Duration |
| 594 | * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the |
| 595 | * stretch duration programmed in the following registers: |
| 596 | * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert) |
| 597 | * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert) |
| 598 | * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert) |
| 599 | * - PM_CFG.SLP_LAN_MIN_ASST_WDTH |
| 600 | */ |
| 601 | enum { |
| 602 | POWER_CYCLE_DURATION_DEFAULT, |
| 603 | POWER_CYCLE_DURATION_1S, |
| 604 | POWER_CYCLE_DURATION_2S, |
| 605 | POWER_CYCLE_DURATION_3S, |
| 606 | POWER_CYCLE_DURATION_4S, |
| 607 | } pch_reset_power_cycle_duration; |
Ryan Lin | 4a48dbe | 2021-09-28 15:59:34 +0800 | [diff] [blame] | 608 | |
| 609 | /* Platform Power Pmax */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 610 | uint16_t platform_pmax; |
Wisley Chen | d0cef2a | 2021-11-01 16:13:55 +0600 | [diff] [blame] | 611 | /* |
| 612 | * FivrRfiFrequency |
| 613 | * PCODE MMIO Mailbox: Set the desired RFI frequency, in increments of 100KHz. |
| 614 | * 0: Auto |
| 615 | * Range varies based on XTAL clock: |
| 616 | * 0-1918*100 KHz (Up to 191.8MHz) for 24MHz clock |
| 617 | * 0-1535*100 KHz (Up to 153.5MHz) for 19MHz clock |
| 618 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 619 | uint32_t fivr_rfi_frequency; |
Wisley Chen | d0cef2a | 2021-11-01 16:13:55 +0600 | [diff] [blame] | 620 | /* |
| 621 | * FivrSpreadSpectrum |
| 622 | * Set the Spread Spectrum Range. |
| 623 | * Range: 0.5%, 1%, 1.5%, 2%, 3%, 4%, 5%, 6%. |
| 624 | * Each Range is translated to an encoded value for FIVR register. |
| 625 | * 0.5% = 0, 1% = 3, 1.5% = 8, 2% = 18, 3% = 28, 4% = 34, 5% = 39, 6% = 44. |
| 626 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 627 | uint8_t fivr_spread_spectrum; |
Wisley Chen | c510346 | 2021-11-04 18:12:58 +0600 | [diff] [blame] | 628 | /* Enable or Disable Acoustic Noise Mitigation feature */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 629 | uint8_t acoustic_noise_mitigation; |
leo.chou | aef916a | 2022-05-13 10:41:03 +0800 | [diff] [blame] | 630 | /* |
| 631 | * Acoustic Noise Mitigation Range. Defines the maximum Pre-Wake |
| 632 | * randomization time in micro ticks. This can be programmed only |
| 633 | * if AcousticNoiseMitigation is enabled. |
| 634 | * Range 0-255 |
| 635 | */ |
| 636 | uint8_t PreWake; |
Wisley Chen | c510346 | 2021-11-04 18:12:58 +0600 | [diff] [blame] | 637 | /* Disable Fast Slew Rate for Deep Package C States for VR domains */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 638 | uint8_t fast_pkg_c_ramp_disable[NUM_VR_DOMAINS]; |
Wisley Chen | c510346 | 2021-11-04 18:12:58 +0600 | [diff] [blame] | 639 | /* |
| 640 | * Slew Rate configuration for Deep Package C States for VR domains |
| 641 | * 0: Fast/2, 1: Fast/4, 2: Fast/8, 3: Fast/16; see enum slew_rate for values |
| 642 | */ |
MAULIK V VAGHELA | 215a97e | 2022-03-07 18:39:17 +0530 | [diff] [blame] | 643 | uint8_t slow_slew_rate[NUM_VR_DOMAINS]; |
Cliff Huang | 0bb2225 | 2022-03-07 18:42:13 -0800 | [diff] [blame] | 644 | |
| 645 | /* Energy-Performance Preference (HWP feature) */ |
| 646 | bool enable_energy_perf_pref; |
| 647 | uint8_t energy_perf_pref_value; |
MAULIK V VAGHELA | 9935638 | 2022-03-03 13:07:57 +0530 | [diff] [blame] | 648 | |
| 649 | /* |
| 650 | * Enable or Disable C1 Cstate Demotion. |
| 651 | * Default 0. Set this to 1 in order to disable C state demotion. |
| 652 | */ |
| 653 | bool disable_c1_state_auto_demotion; |
Sridhar Siricilla | 37c3305 | 2022-04-02 10:33:00 +0530 | [diff] [blame] | 654 | |
| 655 | /* |
| 656 | * Enable or Disable PCH USB2 Phy power gating. |
| 657 | * Default 0. Set this to 1 in order to disable PCH USB2 Phy Power gating. |
| 658 | * Workaround for Intel TA# 723158 to prevent possible display flicker. |
| 659 | */ |
| 660 | bool usb2_phy_sus_pg_disable; |
V Sowmya | 4be8d9e | 2022-07-05 20:49:57 +0530 | [diff] [blame] | 661 | |
| 662 | /* |
| 663 | * Enable or Disable Package C-state Demotion. |
| 664 | * Default is set to 0. |
| 665 | * Set this to 1 in order to disable Package C-state demotion. |
| 666 | */ |
| 667 | bool disable_package_c_state_demotion; |
V Sowmya | 2bc54e7 | 2022-08-04 22:50:51 +0530 | [diff] [blame] | 668 | |
| 669 | /* |
| 670 | * Enable or Disable Skipping MBP HOB. |
| 671 | * Default is set to 0 and set to 1 to skip the MBP HOB. |
| 672 | */ |
| 673 | bool skip_mbp_hob; |
Tim Crawford | c6529c7 | 2022-11-01 11:42:28 -0600 | [diff] [blame] | 674 | |
| 675 | /* i915 struct for GMA backlight control */ |
| 676 | struct i915_gpu_controller_info gfx; |
Subrata Banik | 292afef | 2020-09-09 13:34:18 +0530 | [diff] [blame] | 677 | }; |
| 678 | |
| 679 | typedef struct soc_intel_alderlake_config config_t; |
| 680 | |
| 681 | #endif |