1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef TONGA_PPTABLE_H
25 #define TONGA_PPTABLE_H
26
27
28
29
30 #pragma pack(push, 1)
31
32 #include "hwmgr.h"
33
34 #define ATOM_TONGA_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f
35 #define ATOM_TONGA_PP_FANPARAMETERS_NOFAN 0x80
36
37 #define ATOM_TONGA_PP_THERMALCONTROLLER_NONE 0
38 #define ATOM_TONGA_PP_THERMALCONTROLLER_LM96163 17
39 #define ATOM_TONGA_PP_THERMALCONTROLLER_TONGA 21
40 #define ATOM_TONGA_PP_THERMALCONTROLLER_FIJI 22
41
42
43
44
45
46
47
48
49 #define ATOM_TONGA_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89
50 #define ATOM_TONGA_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D
51
52
53 #define ATOM_TONGA_PP_PLATFORM_CAP_VDDGFX_CONTROL 0x1
54 #define ATOM_TONGA_PP_PLATFORM_CAP_POWERPLAY 0x2
55 #define ATOM_TONGA_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 0x4
56 #define ATOM_TONGA_PP_PLATFORM_CAP_DISABLE_VOLTAGE_ISLAND 0x8
57 #define ____RETIRE16____ 0x10
58 #define ATOM_TONGA_PP_PLATFORM_CAP_HARDWAREDC 0x20
59 #define ____RETIRE64____ 0x40
60 #define ____RETIRE128____ 0x80
61 #define ____RETIRE256____ 0x100
62 #define ____RETIRE512____ 0x200
63 #define ____RETIRE1024____ 0x400
64 #define ____RETIRE2048____ 0x800
65 #define ATOM_TONGA_PP_PLATFORM_CAP_MVDD_CONTROL 0x1000
66 #define ____RETIRE2000____ 0x2000
67 #define ____RETIRE4000____ 0x4000
68 #define ATOM_TONGA_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000
69 #define ____RETIRE10000____ 0x10000
70 #define ATOM_TONGA_PP_PLATFORM_CAP_BACO 0x20000
71
72 #define ATOM_TONGA_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17 0x100000
73 #define ATOM_TONGA_PP_PLATFORM_COMBINE_PCC_WITH_THERMAL_SIGNAL 0x1000000
74 #define ATOM_TONGA_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x2000000
75
76
77 #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007
78 #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0
79 #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0
80 #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1
81 #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3
82 #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5
83
84
85 #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008
86 #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010
87 #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020
88 #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040
89 #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080
90 #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000
91
92
93 #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001
94
95 #define ATOM_Tonga_DISALLOW_ON_DC 0x00004000
96 #define ATOM_Tonga_ENABLE_VARIBRIGHT 0x00008000
97
98 #define ATOM_Tonga_TABLE_REVISION_TONGA 7
99
100 typedef struct _ATOM_Tonga_POWERPLAYTABLE {
101 ATOM_COMMON_TABLE_HEADER sHeader;
102
103 UCHAR ucTableRevision;
104 USHORT usTableSize;
105
106 ULONG ulGoldenPPID;
107 ULONG ulGoldenRevision;
108 USHORT usFormatID;
109
110 USHORT usVoltageTime;
111 ULONG ulPlatformCaps;
112
113 ULONG ulMaxODEngineClock;
114 ULONG ulMaxODMemoryClock;
115
116 USHORT usPowerControlLimit;
117 USHORT usUlvVoltageOffset;
118
119 USHORT usStateArrayOffset;
120 USHORT usFanTableOffset;
121 USHORT usThermalControllerOffset;
122 USHORT usReserv;
123
124 USHORT usMclkDependencyTableOffset;
125 USHORT usSclkDependencyTableOffset;
126 USHORT usVddcLookupTableOffset;
127 USHORT usVddgfxLookupTableOffset;
128
129 USHORT usMMDependencyTableOffset;
130
131 USHORT usVCEStateTableOffset;
132
133 USHORT usPPMTableOffset;
134 USHORT usPowerTuneTableOffset;
135
136 USHORT usHardLimitTableOffset;
137
138 USHORT usPCIETableOffset;
139
140 USHORT usGPIOTableOffset;
141
142 USHORT usReserved[6];
143 } ATOM_Tonga_POWERPLAYTABLE;
144
145 typedef struct _ATOM_Tonga_State {
146 UCHAR ucEngineClockIndexHigh;
147 UCHAR ucEngineClockIndexLow;
148
149 UCHAR ucMemoryClockIndexHigh;
150 UCHAR ucMemoryClockIndexLow;
151
152 UCHAR ucPCIEGenLow;
153 UCHAR ucPCIEGenHigh;
154
155 UCHAR ucPCIELaneLow;
156 UCHAR ucPCIELaneHigh;
157
158 USHORT usClassification;
159 ULONG ulCapsAndSettings;
160 USHORT usClassification2;
161 UCHAR ucUnused[4];
162 } ATOM_Tonga_State;
163
164 typedef struct _ATOM_Tonga_State_Array {
165 UCHAR ucRevId;
166 UCHAR ucNumEntries;
167 ATOM_Tonga_State entries[1];
168 } ATOM_Tonga_State_Array;
169
170 typedef struct _ATOM_Tonga_MCLK_Dependency_Record {
171 UCHAR ucVddcInd;
172 USHORT usVddci;
173 USHORT usVddgfxOffset;
174 USHORT usMvdd;
175 ULONG ulMclk;
176 USHORT usReserved;
177 } ATOM_Tonga_MCLK_Dependency_Record;
178
179 typedef struct _ATOM_Tonga_MCLK_Dependency_Table {
180 UCHAR ucRevId;
181 UCHAR ucNumEntries;
182 ATOM_Tonga_MCLK_Dependency_Record entries[1];
183 } ATOM_Tonga_MCLK_Dependency_Table;
184
185 typedef struct _ATOM_Tonga_SCLK_Dependency_Record {
186 UCHAR ucVddInd;
187 USHORT usVddcOffset;
188 ULONG ulSclk;
189 USHORT usEdcCurrent;
190 UCHAR ucReliabilityTemperature;
191 UCHAR ucCKSVOffsetandDisable;
192 } ATOM_Tonga_SCLK_Dependency_Record;
193
194 typedef struct _ATOM_Tonga_SCLK_Dependency_Table {
195 UCHAR ucRevId;
196 UCHAR ucNumEntries;
197 ATOM_Tonga_SCLK_Dependency_Record entries[1];
198 } ATOM_Tonga_SCLK_Dependency_Table;
199
200 typedef struct _ATOM_Polaris_SCLK_Dependency_Record {
201 UCHAR ucVddInd;
202 USHORT usVddcOffset;
203 ULONG ulSclk;
204 USHORT usEdcCurrent;
205 UCHAR ucReliabilityTemperature;
206 UCHAR ucCKSVOffsetandDisable;
207 ULONG ulSclkOffset;
208 } ATOM_Polaris_SCLK_Dependency_Record;
209
210 typedef struct _ATOM_Polaris_SCLK_Dependency_Table {
211 UCHAR ucRevId;
212 UCHAR ucNumEntries;
213 ATOM_Polaris_SCLK_Dependency_Record entries[1];
214 } ATOM_Polaris_SCLK_Dependency_Table;
215
216 typedef struct _ATOM_Tonga_PCIE_Record {
217 UCHAR ucPCIEGenSpeed;
218 UCHAR usPCIELaneWidth;
219 UCHAR ucReserved[2];
220 } ATOM_Tonga_PCIE_Record;
221
222 typedef struct _ATOM_Tonga_PCIE_Table {
223 UCHAR ucRevId;
224 UCHAR ucNumEntries;
225 ATOM_Tonga_PCIE_Record entries[1];
226 } ATOM_Tonga_PCIE_Table;
227
228 typedef struct _ATOM_Polaris10_PCIE_Record {
229 UCHAR ucPCIEGenSpeed;
230 UCHAR usPCIELaneWidth;
231 UCHAR ucReserved[2];
232 ULONG ulPCIE_Sclk;
233 } ATOM_Polaris10_PCIE_Record;
234
235 typedef struct _ATOM_Polaris10_PCIE_Table {
236 UCHAR ucRevId;
237 UCHAR ucNumEntries;
238 ATOM_Polaris10_PCIE_Record entries[1];
239 } ATOM_Polaris10_PCIE_Table;
240
241
242 typedef struct _ATOM_Tonga_MM_Dependency_Record {
243 UCHAR ucVddcInd;
244 USHORT usVddgfxOffset;
245 ULONG ulDClk;
246 ULONG ulVClk;
247 ULONG ulEClk;
248 ULONG ulAClk;
249 ULONG ulSAMUClk;
250 } ATOM_Tonga_MM_Dependency_Record;
251
252 typedef struct _ATOM_Tonga_MM_Dependency_Table {
253 UCHAR ucRevId;
254 UCHAR ucNumEntries;
255 ATOM_Tonga_MM_Dependency_Record entries[1];
256 } ATOM_Tonga_MM_Dependency_Table;
257
258 typedef struct _ATOM_Tonga_Voltage_Lookup_Record {
259 USHORT usVdd;
260 USHORT usCACLow;
261 USHORT usCACMid;
262 USHORT usCACHigh;
263 } ATOM_Tonga_Voltage_Lookup_Record;
264
265 typedef struct _ATOM_Tonga_Voltage_Lookup_Table {
266 UCHAR ucRevId;
267 UCHAR ucNumEntries;
268 ATOM_Tonga_Voltage_Lookup_Record entries[1];
269 } ATOM_Tonga_Voltage_Lookup_Table;
270
271 typedef struct _ATOM_Tonga_Fan_Table {
272 UCHAR ucRevId;
273 UCHAR ucTHyst;
274 USHORT usTMin;
275 USHORT usTMed;
276 USHORT usTHigh;
277 USHORT usPWMMin;
278 USHORT usPWMMed;
279 USHORT usPWMHigh;
280 USHORT usTMax;
281 UCHAR ucFanControlMode;
282 USHORT usFanPWMMax;
283 USHORT usFanOutputSensitivity;
284 USHORT usFanRPMMax;
285 ULONG ulMinFanSCLKAcousticLimit;
286 UCHAR ucTargetTemperature;
287 UCHAR ucMinimumPWMLimit;
288 USHORT usReserved;
289 } ATOM_Tonga_Fan_Table;
290
291 typedef struct _ATOM_Fiji_Fan_Table {
292 UCHAR ucRevId;
293 UCHAR ucTHyst;
294 USHORT usTMin;
295 USHORT usTMed;
296 USHORT usTHigh;
297 USHORT usPWMMin;
298 USHORT usPWMMed;
299 USHORT usPWMHigh;
300 USHORT usTMax;
301 UCHAR ucFanControlMode;
302 USHORT usFanPWMMax;
303 USHORT usFanOutputSensitivity;
304 USHORT usFanRPMMax;
305 ULONG ulMinFanSCLKAcousticLimit;
306 UCHAR ucTargetTemperature;
307 UCHAR ucMinimumPWMLimit;
308 USHORT usFanGainEdge;
309 USHORT usFanGainHotspot;
310 USHORT usFanGainLiquid;
311 USHORT usFanGainVrVddc;
312 USHORT usFanGainVrMvdd;
313 USHORT usFanGainPlx;
314 USHORT usFanGainHbm;
315 USHORT usReserved;
316 } ATOM_Fiji_Fan_Table;
317
318 typedef struct _ATOM_Tonga_Thermal_Controller {
319 UCHAR ucRevId;
320 UCHAR ucType;
321 UCHAR ucI2cLine;
322 UCHAR ucI2cAddress;
323 UCHAR ucFanParameters;
324 UCHAR ucFanMinRPM;
325 UCHAR ucFanMaxRPM;
326 UCHAR ucReserved;
327 UCHAR ucFlags;
328 } ATOM_Tonga_Thermal_Controller;
329
330 typedef struct _ATOM_Tonga_VCE_State_Record {
331 UCHAR ucVCEClockIndex;
332 UCHAR ucFlag;
333 UCHAR ucSCLKIndex;
334 UCHAR ucMCLKIndex;
335 } ATOM_Tonga_VCE_State_Record;
336
337 typedef struct _ATOM_Tonga_VCE_State_Table {
338 UCHAR ucRevId;
339 UCHAR ucNumEntries;
340 ATOM_Tonga_VCE_State_Record entries[1];
341 } ATOM_Tonga_VCE_State_Table;
342
343 typedef struct _ATOM_Tonga_PowerTune_Table {
344 UCHAR ucRevId;
345 USHORT usTDP;
346 USHORT usConfigurableTDP;
347 USHORT usTDC;
348 USHORT usBatteryPowerLimit;
349 USHORT usSmallPowerLimit;
350 USHORT usLowCACLeakage;
351 USHORT usHighCACLeakage;
352 USHORT usMaximumPowerDeliveryLimit;
353 USHORT usTjMax;
354 USHORT usPowerTuneDataSetID;
355 USHORT usEDCLimit;
356 USHORT usSoftwareShutdownTemp;
357 USHORT usClockStretchAmount;
358 USHORT usReserve[2];
359 } ATOM_Tonga_PowerTune_Table;
360
361 typedef struct _ATOM_Fiji_PowerTune_Table {
362 UCHAR ucRevId;
363 USHORT usTDP;
364 USHORT usConfigurableTDP;
365 USHORT usTDC;
366 USHORT usBatteryPowerLimit;
367 USHORT usSmallPowerLimit;
368 USHORT usLowCACLeakage;
369 USHORT usHighCACLeakage;
370 USHORT usMaximumPowerDeliveryLimit;
371 USHORT usTjMax;
372 USHORT usPowerTuneDataSetID;
373 USHORT usEDCLimit;
374 USHORT usSoftwareShutdownTemp;
375 USHORT usClockStretchAmount;
376 USHORT usTemperatureLimitHotspot;
377 USHORT usTemperatureLimitLiquid1;
378 USHORT usTemperatureLimitLiquid2;
379 USHORT usTemperatureLimitVrVddc;
380 USHORT usTemperatureLimitVrMvdd;
381 USHORT usTemperatureLimitPlx;
382 UCHAR ucLiquid1_I2C_address;
383 UCHAR ucLiquid2_I2C_address;
384 UCHAR ucLiquid_I2C_Line;
385 UCHAR ucVr_I2C_address;
386 UCHAR ucVr_I2C_Line;
387 UCHAR ucPlx_I2C_address;
388 UCHAR ucPlx_I2C_Line;
389 USHORT usReserved;
390 } ATOM_Fiji_PowerTune_Table;
391
392 #define ATOM_PPM_A_A 1
393 #define ATOM_PPM_A_I 2
394 typedef struct _ATOM_Tonga_PPM_Table {
395 UCHAR ucRevId;
396 UCHAR ucPpmDesign;
397 USHORT usCpuCoreNumber;
398 ULONG ulPlatformTDP;
399 ULONG ulSmallACPlatformTDP;
400 ULONG ulPlatformTDC;
401 ULONG ulSmallACPlatformTDC;
402 ULONG ulApuTDP;
403 ULONG ulDGpuTDP;
404 ULONG ulDGpuUlvPower;
405 ULONG ulTjmax;
406 } ATOM_Tonga_PPM_Table;
407
408 typedef struct _ATOM_Tonga_Hard_Limit_Record {
409 ULONG ulSCLKLimit;
410 ULONG ulMCLKLimit;
411 USHORT usVddcLimit;
412 USHORT usVddciLimit;
413 USHORT usVddgfxLimit;
414 } ATOM_Tonga_Hard_Limit_Record;
415
416 typedef struct _ATOM_Tonga_Hard_Limit_Table {
417 UCHAR ucRevId;
418 UCHAR ucNumEntries;
419 ATOM_Tonga_Hard_Limit_Record entries[1];
420 } ATOM_Tonga_Hard_Limit_Table;
421
422 typedef struct _ATOM_Tonga_GPIO_Table {
423 UCHAR ucRevId;
424 UCHAR ucVRHotTriggeredSclkDpmIndex;
425 UCHAR ucReserve[5];
426 } ATOM_Tonga_GPIO_Table;
427
428 typedef struct _PPTable_Generic_SubTable_Header {
429 UCHAR ucRevId;
430 } PPTable_Generic_SubTable_Header;
431
432
433 #pragma pack(pop)
434
435
436 #endif