blob: 65d6e85cb05a086b16eb320411f1d47e9b9f2c14 [file] [log] [blame]
Subrata Banik292afef2020-09-09 13:34:18 +05301/* 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 Crawfordc6529c72022-11-01 11:42:28 -06007#include <drivers/intel/gma/gma.h>
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +05308#include <device/pci_ids.h>
Dinesh Gehlotd910fec2022-12-25 13:00:04 +00009#include <gpio.h>
Subrata Banik292afef2020-09-09 13:34:18 +053010#include <intelblocks/cfg.h>
Subrata Banik292afef2020-09-09 13:34:18 +053011#include <intelblocks/gspi.h>
Sumeet R Pawnikar77298c62021-03-10 21:09:37 +053012#include <intelblocks/power_limit.h>
Eric Laide2ab412021-01-11 16:14:14 +080013#include <intelblocks/pcie_rp.h>
Maulik V Vaghela69353502021-04-14 14:01:02 +053014#include <intelblocks/tcss.h>
Subrata Banik292afef2020-09-09 13:34:18 +053015#include <soc/gpe.h>
Subrata Banik292afef2020-09-09 13:34:18 +053016#include <soc/pci_devs.h>
17#include <soc/pmc.h>
Subrata Banik2871e0e2020-09-27 11:30:58 +053018#include <soc/serialio.h>
19#include <soc/usb.h>
V Sowmyac6d71662021-07-15 08:11:08 +053020#include <soc/vr_config.h>
Subrata Banik292afef2020-09-09 13:34:18 +053021#include <stdint.h>
22
Maximilian Brune2c984882022-10-24 20:31:18 +020023/* Define config parameters for In-Band ECC (IBECC). */
24#define MAX_IBECC_REGIONS 8
25
Bora Guvendik4a58d142023-07-13 14:01:40 -070026#define MAX_HD_AUDIO_SDI_LINKS 2
27
Maximilian Brune2c984882022-10-24 20:31:18 +020028/* In-Band ECC Operation Mode */
29enum ibecc_mode {
30 IBECC_MODE_PER_REGION,
31 IBECC_MODE_NONE,
32 IBECC_MODE_ALL
33};
34
35struct ibecc_config {
36 bool enable;
37 enum ibecc_mode mode;
38 bool range_enable[MAX_IBECC_REGIONS];
39 uint16_t range_base[MAX_IBECC_REGIONS];
40 uint16_t range_mask[MAX_IBECC_REGIONS];
41 /* add ECC error injection if needed by a mainboard */
42};
43
Sumeet Pawnikaraa496082021-05-07 20:11:53 +053044/* Types of different SKUs */
45enum soc_intel_alderlake_power_limits {
Curtis Chen150fee62021-12-21 11:51:33 +080046 ADL_P_142_242_282_15W_CORE,
Patrick Rudolphf7f7b3b2023-03-29 15:34:07 +020047 ADL_P_282_442_482_28W_CORE,
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +053048 ADL_P_682_28W_CORE,
Curtis Chen150fee62021-12-21 11:51:33 +080049 ADL_P_442_482_45W_CORE,
50 ADL_P_642_682_45W_CORE,
Sumeet Pawnikar21c431b2021-09-30 10:04:41 +053051 ADL_M_282_12W_CORE,
52 ADL_M_282_15W_CORE,
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +053053 ADL_M_242_CORE,
Curtis Chen0c544612021-11-19 11:38:12 +080054 ADL_P_442_45W_CORE,
Simon Yanga16ed342022-09-06 18:30:51 +080055 ADL_N_081_7W_CORE,
Vidya Gopalakrishnan596d5bc2022-05-18 20:17:40 +053056 ADL_N_081_15W_CORE,
57 ADL_N_041_6W_CORE,
58 ADL_N_021_6W_CORE,
Michał Kopeć75a49fe2022-04-08 11:28:45 +020059 ADL_S_882_35W_CORE,
60 ADL_S_882_65W_CORE,
61 ADL_S_882_125W_CORE,
Michał Żygowski82043f52022-07-21 18:11:14 +020062 ADL_S_882_150W_CORE,
Michał Kopeć75a49fe2022-04-08 11:28:45 +020063 ADL_S_842_35W_CORE,
64 ADL_S_842_65W_CORE,
65 ADL_S_842_125W_CORE,
66 ADL_S_642_125W_CORE,
67 ADL_S_602_35W_CORE,
68 ADL_S_602_65W_CORE,
Michał Żygowski82043f52022-07-21 18:11:14 +020069 ADL_S_402_60W_CORE,
70 ADL_S_402_58W_CORE,
71 ADL_S_402_35W_CORE,
72 ADL_S_202_46W_CORE,
73 ADL_S_202_35W_CORE,
Jeremy Compostella1b44c812022-06-17 15:18:02 -070074 RPL_P_682_642_482_45W_CORE,
75 RPL_P_682_482_282_28W_CORE,
76 RPL_P_282_242_142_15W_CORE,
Max Fritz573e6de2022-11-19 01:54:44 +010077 RPL_S_8161_35W_CORE,
78 RPL_S_8161_65W_CORE,
79 RPL_S_8161_95W_CORE,
80 RPL_S_8161_125W_CORE,
81 RPL_S_8161_150W_CORE,
82 RPL_S_881_35W_CORE,
83 RPL_S_881_65W_CORE,
84 RPL_S_881_125W_CORE,
85 RPL_S_681_35W_CORE,
86 RPL_S_681_65W_CORE,
87 RPL_S_681_125W_CORE,
88 RPL_S_641_35W_CORE,
89 RPL_S_641_65W_CORE,
90 RPL_S_641_125W_CORE,
91 RPL_S_801_80W_CORE,
92 RPL_S_801_95W_CORE,
93 RPL_S_401_35W_CORE,
94 RPL_S_401_58W_CORE,
95 RPL_S_401_60W_CORE,
96 RPL_S_401_65W_CORE,
97 RPL_S_201_35W_CORE,
98 RPL_S_201_46W_CORE,
99 RPL_S_201_65W_CORE,
Tim Crawford53c6eea2023-07-07 09:59:56 -0600100 RPL_HX_8_16_55W_CORE,
101 RPL_HX_8_12_55W_CORE,
102 RPL_HX_8_8_55W_CORE,
103 RPL_HX_6_8_55W_CORE,
104 RPL_HX_6_4_55W_CORE,
Sumeet Pawnikaraa496082021-05-07 20:11:53 +0530105 ADL_POWER_LIMITS_COUNT
106};
107
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +0530108/* TDP values for different SKUs */
109enum soc_intel_alderlake_cpu_tdps {
Vidya Gopalakrishnan596d5bc2022-05-18 20:17:40 +0530110 TDP_6W = 6,
Simon Yanga16ed342022-09-06 18:30:51 +0800111 TDP_7W = 7,
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +0530112 TDP_9W = 9,
Sumeet Pawnikar21c431b2021-09-30 10:04:41 +0530113 TDP_12W = 12,
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +0530114 TDP_15W = 15,
115 TDP_28W = 28,
Michał Kopeć75a49fe2022-04-08 11:28:45 +0200116 TDP_35W = 35,
117 TDP_45W = 45,
Michał Żygowski82043f52022-07-21 18:11:14 +0200118 TDP_46W = 46,
Tim Crawford53c6eea2023-07-07 09:59:56 -0600119 TDP_55W = 55,
Michał Żygowski82043f52022-07-21 18:11:14 +0200120 TDP_58W = 58,
121 TDP_60W = 60,
Michał Kopeć75a49fe2022-04-08 11:28:45 +0200122 TDP_65W = 65,
Max Fritz573e6de2022-11-19 01:54:44 +0100123 TDP_80W = 80,
124 TDP_90W = 90,
125 TDP_95W = 95,
Michał Żygowski82043f52022-07-21 18:11:14 +0200126 TDP_125W = 125,
127 TDP_150W = 150
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +0530128};
129
130/* Mapping of different SKUs based on CPU ID and TDP values */
131static const struct {
132 unsigned int cpu_id;
133 enum soc_intel_alderlake_power_limits limits;
134 enum soc_intel_alderlake_cpu_tdps cpu_tdp;
135} cpuid_to_adl[] = {
Felix Singer43b7f412022-03-07 04:34:52 +0100136 { PCI_DID_INTEL_ADL_P_ID_10, ADL_P_142_242_282_15W_CORE, TDP_15W },
137 { PCI_DID_INTEL_ADL_P_ID_7, ADL_P_142_242_282_15W_CORE, TDP_15W },
138 { PCI_DID_INTEL_ADL_P_ID_6, ADL_P_142_242_282_15W_CORE, TDP_15W },
Patrick Rudolphf7f7b3b2023-03-29 15:34:07 +0200139 { PCI_DID_INTEL_ADL_P_ID_7, ADL_P_282_442_482_28W_CORE, TDP_28W },
140 { PCI_DID_INTEL_ADL_P_ID_5, ADL_P_282_442_482_28W_CORE, TDP_28W },
Felix Singer43b7f412022-03-07 04:34:52 +0100141 { PCI_DID_INTEL_ADL_P_ID_3, ADL_P_682_28W_CORE, TDP_28W },
142 { PCI_DID_INTEL_ADL_P_ID_5, ADL_P_442_482_45W_CORE, TDP_45W },
143 { PCI_DID_INTEL_ADL_P_ID_4, ADL_P_642_682_45W_CORE, TDP_45W },
144 { PCI_DID_INTEL_ADL_P_ID_3, ADL_P_642_682_45W_CORE, TDP_45W },
145 { PCI_DID_INTEL_ADL_P_ID_1, ADL_P_442_482_45W_CORE, TDP_45W },
Patrick Rudolphf7f7b3b2023-03-29 15:34:07 +0200146 { PCI_DID_INTEL_ADL_P_ID_1, ADL_P_282_442_482_28W_CORE, TDP_28W },
Felix Singer43b7f412022-03-07 04:34:52 +0100147 { PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_12W_CORE, TDP_12W },
148 { PCI_DID_INTEL_ADL_M_ID_1, ADL_M_282_15W_CORE, TDP_15W },
149 { PCI_DID_INTEL_ADL_M_ID_2, ADL_M_242_CORE, TDP_9W },
Simon Yanga16ed342022-09-06 18:30:51 +0800150 { PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_7W_CORE, TDP_7W },
Vidya Gopalakrishnan596d5bc2022-05-18 20:17:40 +0530151 { PCI_DID_INTEL_ADL_N_ID_1, ADL_N_081_15W_CORE, TDP_15W },
152 { PCI_DID_INTEL_ADL_N_ID_2, ADL_N_041_6W_CORE, TDP_6W },
153 { PCI_DID_INTEL_ADL_N_ID_3, ADL_N_041_6W_CORE, TDP_6W },
154 { PCI_DID_INTEL_ADL_N_ID_4, ADL_N_021_6W_CORE, TDP_6W },
Michał Kopeć75a49fe2022-04-08 11:28:45 +0200155 { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_35W_CORE, TDP_35W },
156 { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_65W_CORE, TDP_65W },
157 { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_125W_CORE, TDP_125W },
Michał Żygowski82043f52022-07-21 18:11:14 +0200158 { PCI_DID_INTEL_ADL_S_ID_1, ADL_S_882_150W_CORE, TDP_150W },
Michał Kopeć75a49fe2022-04-08 11:28:45 +0200159 { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_35W_CORE, TDP_35W },
160 { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_65W_CORE, TDP_65W },
161 { PCI_DID_INTEL_ADL_S_ID_3, ADL_S_842_125W_CORE, TDP_125W },
162 { PCI_DID_INTEL_ADL_S_ID_8, ADL_S_642_125W_CORE, TDP_125W },
163 { PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_35W_CORE, TDP_35W },
164 { PCI_DID_INTEL_ADL_S_ID_10, ADL_S_602_65W_CORE, TDP_65W },
Michał Żygowski82043f52022-07-21 18:11:14 +0200165 { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_35W_CORE, TDP_35W },
166 { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_58W_CORE, TDP_58W },
167 { PCI_DID_INTEL_ADL_S_ID_11, ADL_S_402_60W_CORE, TDP_60W },
168 { PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_35W_CORE, TDP_35W },
169 { PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_46W_CORE, TDP_46W },
Jeremy Compostella1b44c812022-06-17 15:18:02 -0700170 { PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_642_482_45W_CORE, TDP_45W },
Jeremy Compostella8c127ec2023-02-02 16:53:50 -0700171 { PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_482_282_28W_CORE, TDP_28W },
Jeremy Compostella1b44c812022-06-17 15:18:02 -0700172 { PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_482_282_28W_CORE, TDP_28W },
Tim Crawford198c6292023-06-23 15:08:18 -0600173 { PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_642_482_45W_CORE, TDP_45W },
Jeremy Compostella1b44c812022-06-17 15:18:02 -0700174 { PCI_DID_INTEL_RPL_P_ID_3, RPL_P_282_242_142_15W_CORE, TDP_15W },
Lawrence Chang0a5da512022-10-19 14:38:41 +0800175 { PCI_DID_INTEL_RPL_P_ID_4, RPL_P_282_242_142_15W_CORE, TDP_15W },
Marx Wang39ede0a2022-12-20 10:48:33 +0800176 { PCI_DID_INTEL_RPL_P_ID_5, RPL_P_282_242_142_15W_CORE, TDP_15W },
Max Fritz573e6de2022-11-19 01:54:44 +0100177 { PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_35W_CORE, TDP_35W },
178 { PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_65W_CORE, TDP_65W },
179 { PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_95W_CORE, TDP_95W },
180 { PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_125W_CORE, TDP_125W },
181 { PCI_DID_INTEL_RPL_S_ID_1, RPL_S_8161_150W_CORE, TDP_150W },
182 { PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_35W_CORE, TDP_35W },
183 { PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_65W_CORE, TDP_65W },
184 { PCI_DID_INTEL_RPL_S_ID_3, RPL_S_881_125W_CORE, TDP_125W },
185 { PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_35W_CORE, TDP_35W },
186 { PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_65W_CORE, TDP_65W },
187 { PCI_DID_INTEL_RPL_S_ID_4, RPL_S_681_125W_CORE, TDP_125W },
188 { PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_35W_CORE, TDP_35W },
189 { PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_65W_CORE, TDP_65W },
190 { PCI_DID_INTEL_RPL_S_ID_5, RPL_S_641_125W_CORE, TDP_125W },
191 { PCI_DID_INTEL_RPL_S_ID_2, RPL_S_801_80W_CORE, TDP_80W },
192 { PCI_DID_INTEL_RPL_S_ID_2, RPL_S_801_95W_CORE, TDP_90W },
193 { PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_35W_CORE, TDP_35W },
194 { PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_58W_CORE, TDP_58W },
195 { PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_60W_CORE, TDP_60W },
196 { PCI_DID_INTEL_ADL_S_ID_11, RPL_S_401_65W_CORE, TDP_65W },
197 { PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_35W_CORE, TDP_35W },
198 { PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_46W_CORE, TDP_46W },
199 { PCI_DID_INTEL_ADL_S_ID_12, RPL_S_201_65W_CORE, TDP_65W },
Tim Crawford53c6eea2023-07-07 09:59:56 -0600200 { PCI_DID_INTEL_RPL_HX_ID_1, RPL_HX_8_16_55W_CORE, TDP_55W },
201 { PCI_DID_INTEL_RPL_HX_ID_2, RPL_HX_8_12_55W_CORE, TDP_55W },
202 { PCI_DID_INTEL_RPL_HX_ID_3, RPL_HX_8_8_55W_CORE, TDP_55W },
203 { PCI_DID_INTEL_RPL_HX_ID_4, RPL_HX_6_8_55W_CORE, TDP_55W },
204 { PCI_DID_INTEL_RPL_HX_ID_5, RPL_HX_6_4_55W_CORE, TDP_55W },
205 { PCI_DID_INTEL_RPL_HX_ID_6, RPL_HX_8_8_55W_CORE, TDP_55W },
206 { PCI_DID_INTEL_RPL_HX_ID_7, RPL_HX_6_8_55W_CORE, TDP_55W },
207 { PCI_DID_INTEL_RPL_HX_ID_8, RPL_HX_6_4_55W_CORE, TDP_55W },
Sumeet Pawnikareaf87a92021-08-31 17:01:02 +0530208};
209
Subrata Banik8a18bd82021-06-09 21:57:49 +0530210/* Types of display ports */
211enum ddi_ports {
212 DDI_PORT_A,
213 DDI_PORT_B,
214 DDI_PORT_C,
215 DDI_PORT_1,
216 DDI_PORT_2,
217 DDI_PORT_3,
218 DDI_PORT_4,
219 DDI_PORT_COUNT,
220};
221
222enum ddi_port_flags {
Maximilian Brune27900ea2023-01-04 19:22:35 +0100223 DDI_ENABLE_DDC = 1 << 0, // Display Data Channel
224 DDI_ENABLE_HPD = 1 << 1, // Hot Plug Detect
Subrata Banik8a18bd82021-06-09 21:57:49 +0530225};
226
V Sowmya418d37e2021-06-21 08:47:17 +0530227/*
228 * Enable External V1P05/Vnn/VnnSx Rail in: BIT0:S0i1/S0i2,
V Sowmyaee449452022-04-08 14:36:13 +0530229 * BIT1:S0i3, BIT2:S3, BIT3:S4, BIT4:S5, BIT5:S0.
V Sowmya418d37e2021-06-21 08:47:17 +0530230 */
231enum fivr_enable_states {
232 FIVR_ENABLE_S0i1_S0i2 = BIT(0),
233 FIVR_ENABLE_S0i3 = BIT(1),
234 FIVR_ENABLE_S3 = BIT(2),
235 FIVR_ENABLE_S4 = BIT(3),
236 FIVR_ENABLE_S5 = BIT(4),
V Sowmyaee449452022-04-08 14:36:13 +0530237 FIVR_ENABLE_S0 = BIT(5),
V Sowmya418d37e2021-06-21 08:47:17 +0530238};
239
240/*
241 * Enable the following for External V1p05 rail
242 * BIT0: Retention active switch support
243 * BIT1: Normal Active voltage supported
244 * BIT2: Minimum active voltage supported
245 * BIT3: Minimum Retention voltage supported
246 */
247enum fivr_voltage_supported {
248 FIVR_RET_ACTIVE_SWITCH_SUPPORT = BIT(0),
249 FIVR_VOLTAGE_NORMAL = BIT(1),
250 FIVR_VOLTAGE_MIN_ACTIVE = BIT(2),
251 FIVR_VOLTAGE_MIN_RETENTION = BIT(3),
252};
253
254#define FIVR_ENABLE_ALL_SX (FIVR_ENABLE_S0i1_S0i2 | FIVR_ENABLE_S0i3 | \
V Sowmyaee449452022-04-08 14:36:13 +0530255 FIVR_ENABLE_S3 | FIVR_ENABLE_S4 | FIVR_ENABLE_S5 | FIVR_ENABLE_S0)
V Sowmyaaf429062021-06-21 10:23:33 +0530256/*
257 * The Max Pkg Cstate
258 * Values 0 - C0/C1, 1 - C2, 2 - C3, 3 - C6, 4 - C7, 5 - C7S, 6 - C8, 7 - C9, 8 - C10,
259 * 254 - CPU Default , 255 - Auto.
260 */
261enum pkgcstate_limit {
262 LIMIT_C0_C1 = 0,
263 LIMIT_C2 = 1,
264 LIMIT_C3 = 2,
265 LIMIT_C6 = 3,
266 LIMIT_C7 = 4,
267 LIMIT_C7S = 5,
268 LIMIT_C8 = 6,
269 LIMIT_C9 = 7,
270 LIMIT_C10 = 8,
271 LIMIT_CPUDEFAULT = 254,
272 LIMIT_AUTO = 255,
273};
V Sowmya418d37e2021-06-21 08:47:17 +0530274
Tim Wawrzynczake2b8f302021-07-19 15:35:47 -0600275/* Bit values for use in LpmStateEnableMask. */
276enum lpm_state_mask {
277 LPM_S0i2_0 = BIT(0),
278 LPM_S0i2_1 = BIT(1),
279 LPM_S0i2_2 = BIT(2),
280 LPM_S0i3_0 = BIT(3),
281 LPM_S0i3_1 = BIT(4),
282 LPM_S0i3_2 = BIT(5),
283 LPM_S0i3_3 = BIT(6),
284 LPM_S0i3_4 = BIT(7),
285 LPM_S0iX_ALL = LPM_S0i2_0 | LPM_S0i2_1 | LPM_S0i2_2
286 | LPM_S0i3_0 | LPM_S0i3_1 | LPM_S0i3_2 | LPM_S0i3_3 | LPM_S0i3_4,
287};
288
Wisley Chend0cef2a2021-11-01 16:13:55 +0600289/*
290 * FivrSpreadSpectrum:
291 * Values
292 * 0 - 0.5%, 3 - 1%, 8 - 1.5%, 18 - 2%, 28 - 3%, 34 - 4%, 39 - 5%, 44 - 6%
293 */
294enum fivr_spread_spectrum_ratio {
295 FIVR_SS_0_5 = 0,
296 FIVR_SS_1 = 3,
297 FIVR_SS_1_5 = 8,
298 FIVR_SS_2 = 18,
299 FIVR_SS_3 = 28,
300 FIVR_SS_4 = 34,
301 FIVR_SS_5 = 39,
302 FIVR_SS_6 = 44,
303};
304
Wisley Chenc5103462021-11-04 18:12:58 +0600305/*
306 * Slew Rate configuration for Deep Package C States for VR domain.
307 * They are fast time divided by 2.
308 * 0 - Fast/2
309 * 1 - Fast/4
310 * 2 - Fast/8
311 * 3 - Fast/16
312 */
313enum slew_rate {
314 SLEW_FAST_2,
315 SLEW_FAST_4,
316 SLEW_FAST_8,
317 SLEW_FAST_16
318};
319
Subrata Banik292afef2020-09-09 13:34:18 +0530320struct soc_intel_alderlake_config {
321
322 /* Common struct containing soc config data required by common code */
323 struct soc_intel_common_config common_soc_config;
324
Sumeet R Pawnikar77298c62021-03-10 21:09:37 +0530325 /* Common struct containing power limits configuration information */
Sumeet Pawnikaraa496082021-05-07 20:11:53 +0530326 struct soc_power_limits_config power_limits_config[ADL_POWER_LIMITS_COUNT];
Sumeet R Pawnikar77298c62021-03-10 21:09:37 +0530327
Subrata Banik292afef2020-09-09 13:34:18 +0530328 /* Gpio group routed to each dword of the GPE0 block. Values are
329 * of the form PMC_GPP_[A:U] or GPD. */
330 uint8_t pmc_gpe0_dw0; /* GPE0_31_0 STS/EN */
331 uint8_t pmc_gpe0_dw1; /* GPE0_63_32 STS/EN */
332 uint8_t pmc_gpe0_dw2; /* GPE0_95_64 STS/EN */
333
334 /* Generic IO decode ranges */
335 uint32_t gen1_dec;
336 uint32_t gen2_dec;
337 uint32_t gen3_dec;
338 uint32_t gen4_dec;
339
340 /* Enable S0iX support */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200341 bool s0ix_enable;
Subrata Banik292afef2020-09-09 13:34:18 +0530342 /* Support for TCSS xhci, xdci, TBT PCIe root ports and DMA controllers */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200343 bool tcss_d3_hot_disable;
Subrata Banik292afef2020-09-09 13:34:18 +0530344 /* Enable DPTF support */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200345 bool dptf_enable;
Subrata Banik292afef2020-09-09 13:34:18 +0530346
347 /* Deep SX enable for both AC and DC */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200348 bool deep_s3_enable_ac;
349 bool deep_s3_enable_dc;
350 bool deep_s5_enable_ac;
351 bool deep_s5_enable_dc;
Subrata Banik292afef2020-09-09 13:34:18 +0530352
353 /* Deep Sx Configuration
354 * DSX_EN_WAKE_PIN - Enable WAKE# pin
355 * DSX_EN_LAN_WAKE_PIN - Enable LAN_WAKE# pin
356 * DSX_DIS_AC_PRESENT_PD - Disable pull-down on AC_PRESENT pin */
357 uint32_t deep_sx_config;
358
359 /* TCC activation offset */
360 uint32_t tcc_offset;
361
Maximilian Brune2c984882022-10-24 20:31:18 +0200362 /* In-Band ECC (IBECC) configuration */
363 struct ibecc_config ibecc;
364
Subrata Banik292afef2020-09-09 13:34:18 +0530365 /* System Agent dynamic frequency support. Only effects ULX/ULT CPUs.
366 * When enabled memory will be training at two different frequencies.
367 * 0:Disabled, 1:FixedPoint0, 2:FixedPoint1, 3:FixedPoint2,
368 * 4:FixedPoint3, 5:Enabled */
369 enum {
370 SaGv_Disabled,
371 SaGv_FixedPoint0,
372 SaGv_FixedPoint1,
373 SaGv_FixedPoint2,
374 SaGv_FixedPoint3,
375 SaGv_Enabled,
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530376 } sagv;
Subrata Banik292afef2020-09-09 13:34:18 +0530377
378 /* Rank Margin Tool. 1:Enable, 0:Disable */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200379 bool RMT;
Subrata Banik292afef2020-09-09 13:34:18 +0530380
381 /* USB related */
382 struct usb2_port_config usb2_ports[16];
383 struct usb3_port_config usb3_ports[10];
384 /* Wake Enable Bitmap for USB2 ports */
385 uint16_t usb2_wake_enable_bitmap;
386 /* Wake Enable Bitmap for USB3 ports */
387 uint16_t usb3_wake_enable_bitmap;
Maulik V Vaghela69353502021-04-14 14:01:02 +0530388 /* Program OC pins for TCSS */
389 struct tcss_port_config tcss_ports[MAX_TYPE_C_PORTS];
Subrata Banik292afef2020-09-09 13:34:18 +0530390
391 /* SATA related */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530392 uint8_t sata_mode;
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200393 bool sata_salp_support;
394 bool sata_ports_enable[8];
395 bool sata_ports_dev_slp[8];
Subrata Banik292afef2020-09-09 13:34:18 +0530396
397 /*
398 * Enable(0)/Disable(1) SATA Power Optimizer on PCH side.
399 * Default 0. Setting this to 1 disables the SATA Power Optimizer.
400 */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200401 bool sata_pwr_optimize_disable;
Subrata Banik292afef2020-09-09 13:34:18 +0530402
403 /*
404 * SATA Port Enable Dito Config.
405 * Enable DEVSLP Idle Timeout settings (DmVal, DitoVal).
406 */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200407 bool sata_ports_enable_dito_config[8];
Subrata Banik292afef2020-09-09 13:34:18 +0530408
409 /* SataPortsDmVal is the DITO multiplier. Default is 15. */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530410 uint8_t sata_ports_dm_val[8];
411
Subrata Banik292afef2020-09-09 13:34:18 +0530412 /* SataPortsDitoVal is the DEVSLP Idle Timeout, default is 625ms */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530413 uint16_t sata_ports_dito_val[8];
Subrata Banik292afef2020-09-09 13:34:18 +0530414
415 /* Audio related */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200416 bool pch_hda_audio_link_hda_enable;
417 bool pch_hda_dsp_enable;
Bora Guvendik4a58d142023-07-13 14:01:40 -0700418 bool pch_hda_sdi_enable[MAX_HD_AUDIO_SDI_LINKS];
Sugnan Prabhu S50f8b4e2021-03-18 22:08:22 +0530419
420 /* iDisp-Link T-Mode 0: 2T, 2: 4T, 3: 8T, 4: 16T */
421 enum {
422 HDA_TMODE_2T = 0,
423 HDA_TMODE_4T = 2,
424 HDA_TMODE_8T = 3,
425 HDA_TMODE_16T = 4,
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530426 } pch_hda_idisp_link_tmode;
Sugnan Prabhu S50f8b4e2021-03-18 22:08:22 +0530427
428 /* iDisp-Link Freq 4: 96MHz, 3: 48MHz. */
429 enum {
430 HDA_LINKFREQ_48MHZ = 3,
431 HDA_LINKFREQ_96MHZ = 4,
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530432 } pch_hda_idisp_link_frequency;
Sugnan Prabhu S50f8b4e2021-03-18 22:08:22 +0530433
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530434 bool pch_hda_idisp_codec_enable;
Subrata Banik292afef2020-09-09 13:34:18 +0530435
Eric Lai5b302b22020-12-05 16:49:43 +0800436 struct pcie_rp_config pch_pcie_rp[CONFIG_MAX_PCH_ROOT_PORTS];
437 struct pcie_rp_config cpu_pcie_rp[CONFIG_MAX_CPU_ROOT_PORTS];
438 uint8_t pcie_clk_config_flag[CONFIG_MAX_PCIE_CLOCK_SRC];
Subrata Banik292afef2020-09-09 13:34:18 +0530439
Subrata Banik292afef2020-09-09 13:34:18 +0530440 /* Gfx related */
441 enum {
442 IGD_SM_0MB = 0x00,
443 IGD_SM_32MB = 0x01,
444 IGD_SM_64MB = 0x02,
445 IGD_SM_96MB = 0x03,
446 IGD_SM_128MB = 0x04,
447 IGD_SM_160MB = 0x05,
448 IGD_SM_4MB = 0xF0,
449 IGD_SM_8MB = 0xF1,
450 IGD_SM_12MB = 0xF2,
451 IGD_SM_16MB = 0xF3,
452 IGD_SM_20MB = 0xF4,
453 IGD_SM_24MB = 0xF5,
454 IGD_SM_28MB = 0xF6,
455 IGD_SM_36MB = 0xF8,
456 IGD_SM_40MB = 0xF9,
457 IGD_SM_44MB = 0xFA,
458 IGD_SM_48MB = 0xFB,
459 IGD_SM_52MB = 0xFC,
460 IGD_SM_56MB = 0xFD,
461 IGD_SM_60MB = 0xFE,
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530462 } igd_dvmt50_pre_alloc;
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200463
464 bool skip_ext_gfx_scan;
Subrata Banik292afef2020-09-09 13:34:18 +0530465
Subrata Banik292afef2020-09-09 13:34:18 +0530466 /* Enable/Disable EIST. 1b:Enabled, 0b:Disabled */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200467 bool eist_enable;
Subrata Banik292afef2020-09-09 13:34:18 +0530468
469 /* Enable C6 DRAM */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200470 bool enable_c6dram;
Michael Niewöhnerd2fadda2021-09-27 19:26:20 +0200471
Subrata Banik292afef2020-09-09 13:34:18 +0530472 /*
473 * SerialIO device mode selection:
474 * PchSerialIoDisabled,
475 * PchSerialIoPci,
476 * PchSerialIoHidden,
477 * PchSerialIoLegacyUart,
478 * PchSerialIoSkipInit
479 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530480 uint8_t serial_io_i2c_mode[CONFIG_SOC_INTEL_I2C_DEV_MAX];
481 uint8_t serial_io_gspi_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
482 uint8_t serial_io_uart_mode[CONFIG_SOC_INTEL_UART_DEV_MAX];
Subrata Banik292afef2020-09-09 13:34:18 +0530483 /*
484 * GSPIn Default Chip Select Mode:
485 * 0:Hardware Mode,
486 * 1:Software Mode
487 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530488 uint8_t serial_io_gspi_cs_mode[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
Subrata Banik292afef2020-09-09 13:34:18 +0530489 /*
490 * GSPIn Default Chip Select State:
491 * 0: Low,
492 * 1: High
493 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530494 uint8_t serial_io_gspi_cs_state[CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX];
Subrata Banik292afef2020-09-09 13:34:18 +0530495
Subrata Banik292afef2020-09-09 13:34:18 +0530496 /* Enable Pch iSCLK */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200497 bool pch_isclk;
Subrata Banik292afef2020-09-09 13:34:18 +0530498
Cliff Huangbc1941f2021-02-10 17:41:41 -0800499 /* CNVi BT Core Enable/Disable */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530500 bool cnvi_bt_core;
Cliff Huangbc1941f2021-02-10 17:41:41 -0800501
Subrata Banik292afef2020-09-09 13:34:18 +0530502 /* CNVi BT Audio Offload: Enable/Disable BT Audio Offload. */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530503 bool cnvi_bt_audio_offload;
Subrata Banik292afef2020-09-09 13:34:18 +0530504
505 /*
Deepti Deshatty8e7facf2021-05-12 17:45:37 +0530506 * These GPIOs will be programmed by the IOM to handle biasing of the
507 * Type-C aux (SBU) signals when certain alternate modes are used.
508 * `pad_auxn_dc` should be assigned to the GPIO pad providing negative
509 * bias (name usually contains `AUXN_DC` or `AUX_N`); similarly,
510 * `pad_auxp_dc` should be assigned to the GPIO providing positive bias
511 * (name often contains `AUXP_DC` or `_AUX_P`).
Subrata Banik2871e0e2020-09-27 11:30:58 +0530512 */
Deepti Deshatty8e7facf2021-05-12 17:45:37 +0530513 struct typec_aux_bias_pads typec_aux_bias_pads[MAX_TYPE_C_PORTS];
Subrata Banik2871e0e2020-09-27 11:30:58 +0530514
515 /*
Subrata Banik292afef2020-09-09 13:34:18 +0530516 * SOC Aux orientation override:
517 * This is a bitfield that corresponds to up to 4 TCSS ports on ADL.
518 * Even numbered bits (0, 2, 4, 6) control the retimer being handled by SOC.
519 * Odd numbered bits (1, 3, 5, 7) control the orientation of the physical aux lines
520 * on the motherboard.
521 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530522 uint16_t tcss_aux_ori;
Subrata Banik292afef2020-09-09 13:34:18 +0530523
524 /*
525 * Override GPIO PM configuration:
526 * 0: Use FSP default GPIO PM program,
527 * 1: coreboot to override GPIO PM program
528 */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200529 bool gpio_override_pm;
Subrata Banik292afef2020-09-09 13:34:18 +0530530
531 /*
532 * GPIO PM configuration: 0 to disable, 1 to enable power gating
533 * Bit 6-7: Reserved
534 * Bit 5: MISCCFG_GPSIDEDPCGEN
535 * Bit 4: MISCCFG_GPRCOMPCDLCGEN
536 * Bit 3: MISCCFG_GPRTCDLCGEN
537 * Bit 2: MISCCFG_GSXLCGEN
538 * Bit 1: MISCCFG_GPDPCGEN
539 * Bit 0: MISCCFG_GPDLCGEN
540 */
541 uint8_t gpio_pm[TOTAL_GPIO_COMM];
542
543 /* DP config */
544 /*
545 * Port config
546 * 0:Disabled, 1:eDP, 2:MIPI DSI
547 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530548 uint8_t ddi_portA_config;
549 uint8_t ddi_portB_config;
Subrata Banik292afef2020-09-09 13:34:18 +0530550
Subrata Banik8a18bd82021-06-09 21:57:49 +0530551 /* Enable(1)/Disable(0) HPD/DDC */
552 uint8_t ddi_ports_config[DDI_PORT_COUNT];
Subrata Banik292afef2020-09-09 13:34:18 +0530553
554 /* Hybrid storage mode enable (1) / disable (0)
555 * This mode makes FSP detect Optane and NVME and set PCIe lane mode
556 * accordingly */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200557 bool hybrid_storage_mode;
Subrata Banik292afef2020-09-09 13:34:18 +0530558
Krishna Prasad Bhata6d642f2022-01-16 23:16:24 +0530559#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_N)
560 /* eMMC HS400 mode */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200561 bool emmc_enable_hs400_mode;
Krishna Prasad Bhata6d642f2022-01-16 23:16:24 +0530562#endif
563
Subrata Banik292afef2020-09-09 13:34:18 +0530564 /*
565 * Override CPU flex ratio value:
566 * CPU ratio value controls the maximum processor non-turbo ratio.
567 * Valid Range 0 to 63.
568 *
569 * In general descriptor provides option to set default cpu flex ratio.
570 * Default cpu flex ratio is 0 ensures booting with non-turbo max frequency.
571 * That's the reason FSP skips cpu_ratio override if cpu_ratio is 0.
572 *
573 * Only override CPU flex ratio if don't want to boot with non-turbo max.
574 */
575 uint8_t cpu_ratio_override;
576
577 /*
578 * Enable(0)/Disable(1) DMI Power Optimizer on PCH side.
579 * Default 0. Setting this to 1 disables the DMI Power Optimizer.
580 */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200581 bool dmi_power_optimize_disable;
Subrata Banik292afef2020-09-09 13:34:18 +0530582
583 /*
Lean Sheng Tan4b45d4c2022-04-01 19:01:59 +0200584 * Used to communicate the power delivery design capability of the board. This
585 * value is an enum of the available power delivery segments that are defined in
586 * the Platform Design Guide.
587 */
588 uint8_t vr_power_delivery_design;
589
590 /*
Subrata Banik292afef2020-09-09 13:34:18 +0530591 * Enable(1)/Disable(0) CPU Replacement check.
592 * Default 0. Setting this to 1 to check CPU replacement.
593 */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200594 bool cpu_replacement_check;
Subrata Banik292afef2020-09-09 13:34:18 +0530595
596 /* ISA Serial Base selection. */
597 enum {
598 ISA_SERIAL_BASE_ADDR_3F8,
599 ISA_SERIAL_BASE_ADDR_2F8,
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530600 } isa_serial_uart_base;
V Sowmya418d37e2021-06-21 08:47:17 +0530601
602 /* structure containing various settings for PCH FIVRs */
603 struct {
604 bool configure_ext_fivr;
605 enum fivr_enable_states v1p05_enable_bitmap;
606 enum fivr_enable_states vnn_enable_bitmap;
607 enum fivr_enable_states vnn_sx_enable_bitmap;
608 enum fivr_voltage_supported v1p05_supported_voltage_bitmap;
609 enum fivr_voltage_supported vnn_supported_voltage_bitmap;
610 /* V1p05 Rail Voltage in mv */
611 int v1p05_voltage_mv;
612 /* Vnn Rail Voltage in mv */
613 int vnn_voltage_mv;
614 /* VnnSx Rail Voltage in mv */
615 int vnn_sx_voltage_mv;
616 /* External Icc Max for V1p05 rail in mA */
617 int v1p05_icc_max_ma;
618 /* External Icc Max for VnnSx rail in mA */
619 int vnn_icc_max_ma;
620 } ext_fivr_settings;
V Sowmyac6d71662021-07-15 08:11:08 +0530621
622 /* VrConfig Settings.
623 * 0 = VR_DOMAIN_IA Core 1 = VR_DOMAIN_GT.
624 */
625 struct vr_config domain_vr_config[NUM_VR_DOMAINS];
Casper Chang8fcefd32021-09-22 22:35:54 -0400626
Scott Chaoab638c12022-04-20 15:16:06 +0800627 uint16_t max_dram_speed_mts;
Tim Wawrzynczakab0e0812021-09-21 10:28:16 -0600628
629 enum {
630 SLP_S3_ASSERTION_DEFAULT,
631 SLP_S3_ASSERTION_60_US,
632 SLP_S3_ASSERTION_1_MS,
633 SLP_S3_ASSERTION_50_MS,
634 SLP_S3_ASSERTION_2_S,
635 } pch_slp_s3_min_assertion_width;
636
637 enum {
638 SLP_S4_ASSERTION_DEFAULT,
639 SLP_S4_ASSERTION_1S,
640 SLP_S4_ASSERTION_2S,
641 SLP_S4_ASSERTION_3S,
642 SLP_S4_ASSERTION_4S,
643 } pch_slp_s4_min_assertion_width;
644
645 enum {
646 SLP_SUS_ASSERTION_DEFAULT,
647 SLP_SUS_ASSERTION_0_MS,
648 SLP_SUS_ASSERTION_500_MS,
649 SLP_SUS_ASSERTION_1_S,
650 SLP_SUS_ASSERTION_4_S,
651 } pch_slp_sus_min_assertion_width;
652
653 enum {
654 SLP_A_ASSERTION_DEFAULT,
655 SLP_A_ASSERTION_0_MS,
656 SLP_A_ASSERTION_4_S,
657 SLP_A_ASSERTION_98_MS,
658 SLP_A_ASSERTION_2_S,
659 } pch_slp_a_min_assertion_width;
660
661 /*
662 * PCH PM Reset Power Cycle Duration
663 * NOTE: Duration programmed in the PchPmPwrCycDur should never be smaller than the
664 * stretch duration programmed in the following registers:
665 * - GEN_PMCON_A.SLP_S3_MIN_ASST_WDTH (PchPmSlpS3MinAssert)
666 * - GEN_PMCON_A.S4MAW (PchPmSlpS4MinAssert)
667 * - PM_CFG.SLP_A_MIN_ASST_WDTH (PchPmSlpAMinAssert)
668 * - PM_CFG.SLP_LAN_MIN_ASST_WDTH
669 */
670 enum {
671 POWER_CYCLE_DURATION_DEFAULT,
672 POWER_CYCLE_DURATION_1S,
673 POWER_CYCLE_DURATION_2S,
674 POWER_CYCLE_DURATION_3S,
675 POWER_CYCLE_DURATION_4S,
676 } pch_reset_power_cycle_duration;
Ryan Lin4a48dbe2021-09-28 15:59:34 +0800677
678 /* Platform Power Pmax */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530679 uint16_t platform_pmax;
Wisley Chend0cef2a2021-11-01 16:13:55 +0600680 /*
681 * FivrRfiFrequency
682 * PCODE MMIO Mailbox: Set the desired RFI frequency, in increments of 100KHz.
683 * 0: Auto
684 * Range varies based on XTAL clock:
685 * 0-1918*100 KHz (Up to 191.8MHz) for 24MHz clock
686 * 0-1535*100 KHz (Up to 153.5MHz) for 19MHz clock
687 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530688 uint32_t fivr_rfi_frequency;
Wisley Chend0cef2a2021-11-01 16:13:55 +0600689 /*
690 * FivrSpreadSpectrum
691 * Set the Spread Spectrum Range.
692 * Range: 0.5%, 1%, 1.5%, 2%, 3%, 4%, 5%, 6%.
693 * Each Range is translated to an encoded value for FIVR register.
694 * 0.5% = 0, 1% = 3, 1.5% = 8, 2% = 18, 3% = 28, 4% = 34, 5% = 39, 6% = 44.
695 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530696 uint8_t fivr_spread_spectrum;
Wisley Chenc5103462021-11-04 18:12:58 +0600697 /* Enable or Disable Acoustic Noise Mitigation feature */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200698 bool acoustic_noise_mitigation;
leo.chouaef916a2022-05-13 10:41:03 +0800699 /*
700 * Acoustic Noise Mitigation Range. Defines the maximum Pre-Wake
701 * randomization time in micro ticks. This can be programmed only
702 * if AcousticNoiseMitigation is enabled.
703 * Range 0-255
704 */
705 uint8_t PreWake;
Wisley Chenc5103462021-11-04 18:12:58 +0600706 /* Disable Fast Slew Rate for Deep Package C States for VR domains */
Michael Strosche9c0c8b02023-07-31 08:20:17 +0200707 bool fast_pkg_c_ramp_disable[NUM_VR_DOMAINS];
Wisley Chenc5103462021-11-04 18:12:58 +0600708 /*
709 * Slew Rate configuration for Deep Package C States for VR domains
710 * 0: Fast/2, 1: Fast/4, 2: Fast/8, 3: Fast/16; see enum slew_rate for values
711 */
MAULIK V VAGHELA215a97e2022-03-07 18:39:17 +0530712 uint8_t slow_slew_rate[NUM_VR_DOMAINS];
Cliff Huang0bb22252022-03-07 18:42:13 -0800713
714 /* Energy-Performance Preference (HWP feature) */
715 bool enable_energy_perf_pref;
716 uint8_t energy_perf_pref_value;
MAULIK V VAGHELA99356382022-03-03 13:07:57 +0530717
718 /*
719 * Enable or Disable C1 Cstate Demotion.
720 * Default 0. Set this to 1 in order to disable C state demotion.
721 */
722 bool disable_c1_state_auto_demotion;
Sridhar Siricilla37c33052022-04-02 10:33:00 +0530723
724 /*
725 * Enable or Disable PCH USB2 Phy power gating.
726 * Default 0. Set this to 1 in order to disable PCH USB2 Phy Power gating.
727 * Workaround for Intel TA# 723158 to prevent possible display flicker.
728 */
729 bool usb2_phy_sus_pg_disable;
V Sowmya4be8d9e2022-07-05 20:49:57 +0530730
731 /*
732 * Enable or Disable Package C-state Demotion.
733 * Default is set to 0.
734 * Set this to 1 in order to disable Package C-state demotion.
735 */
736 bool disable_package_c_state_demotion;
V Sowmya2bc54e72022-08-04 22:50:51 +0530737
Tim Crawfordc6529c72022-11-01 11:42:28 -0600738 /* i915 struct for GMA backlight control */
739 struct i915_gpu_controller_info gfx;
Jeremy Compostella9df11972022-12-02 10:59:49 -0700740
741 /*
742 * IGD panel configuration
743 */
744 struct i915_gpu_panel_config panel_cfg;
Kane Chen8327a7e2022-09-27 09:54:30 +0800745
746 /*
747 * Enable or Disable Tccold Handshake
748 * Default is set to 0.
749 * Set this to 1 in order to disable Tccold Handshake
750 */
751 bool disable_dynamic_tccold_handshake;
Bora Guvendik433343e2023-04-24 15:50:15 -0700752
753 /*
754 * Enable or Disable Reduced BasicMemoryTest size.
755 * Default is set to 0.
756 * Set this to 1 in order to reduce BasicMemoryTest size
757 */
758 bool lower_basic_mem_test_size;
Bora Guvendik7d1a0372023-04-24 17:29:36 -0700759
760 /*
761 * Enable or Disable SaGV reordering operation.
762 * Default is set to 0, SaGV reordering enabled.
763 * Set this to 1 in order to disable SaGV reordering.
764 */
765 bool disable_sagv_reorder;
Bora Guvendik6e64c012023-04-24 18:12:19 -0700766
767 /*
768 * Enable or Disable hwp scalability tracking.
769 * Default is set to 1.
770 * Set this to 0 in order to disable hwp scalability tracking.
771 */
772 bool enable_hwp_scalability_tracking;
Subrata Banik292afef2020-09-09 13:34:18 +0530773};
774
775typedef struct soc_intel_alderlake_config config_t;
776
777#endif