0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef TONGA_PPTABLE_H
0025 #define TONGA_PPTABLE_H
0026
0027
0028
0029
0030 #pragma pack(push, 1)
0031
0032 #include "hwmgr.h"
0033
0034 #define ATOM_TONGA_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f
0035 #define ATOM_TONGA_PP_FANPARAMETERS_NOFAN 0x80
0036
0037 #define ATOM_TONGA_PP_THERMALCONTROLLER_NONE 0
0038 #define ATOM_TONGA_PP_THERMALCONTROLLER_LM96163 17
0039 #define ATOM_TONGA_PP_THERMALCONTROLLER_TONGA 21
0040 #define ATOM_TONGA_PP_THERMALCONTROLLER_FIJI 22
0041
0042
0043
0044
0045
0046
0047
0048
0049 #define ATOM_TONGA_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89
0050 #define ATOM_TONGA_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D
0051
0052
0053 #define ATOM_TONGA_PP_PLATFORM_CAP_VDDGFX_CONTROL 0x1
0054 #define ATOM_TONGA_PP_PLATFORM_CAP_POWERPLAY 0x2
0055 #define ATOM_TONGA_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 0x4
0056 #define ATOM_TONGA_PP_PLATFORM_CAP_DISABLE_VOLTAGE_ISLAND 0x8
0057 #define ____RETIRE16____ 0x10
0058 #define ATOM_TONGA_PP_PLATFORM_CAP_HARDWAREDC 0x20
0059 #define ____RETIRE64____ 0x40
0060 #define ____RETIRE128____ 0x80
0061 #define ____RETIRE256____ 0x100
0062 #define ____RETIRE512____ 0x200
0063 #define ____RETIRE1024____ 0x400
0064 #define ____RETIRE2048____ 0x800
0065 #define ATOM_TONGA_PP_PLATFORM_CAP_MVDD_CONTROL 0x1000
0066 #define ____RETIRE2000____ 0x2000
0067 #define ____RETIRE4000____ 0x4000
0068 #define ATOM_TONGA_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000
0069 #define ____RETIRE10000____ 0x10000
0070 #define ATOM_TONGA_PP_PLATFORM_CAP_BACO 0x20000
0071
0072 #define ATOM_TONGA_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17 0x100000
0073 #define ATOM_TONGA_PP_PLATFORM_COMBINE_PCC_WITH_THERMAL_SIGNAL 0x1000000
0074 #define ATOM_TONGA_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x2000000
0075
0076
0077 #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007
0078 #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0
0079 #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0
0080 #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1
0081 #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3
0082 #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5
0083
0084
0085 #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008
0086 #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010
0087 #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020
0088 #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040
0089 #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080
0090 #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000
0091
0092
0093 #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001
0094
0095 #define ATOM_Tonga_DISALLOW_ON_DC 0x00004000
0096 #define ATOM_Tonga_ENABLE_VARIBRIGHT 0x00008000
0097
0098 #define ATOM_Tonga_TABLE_REVISION_TONGA 7
0099
0100 typedef struct _ATOM_Tonga_POWERPLAYTABLE {
0101 ATOM_COMMON_TABLE_HEADER sHeader;
0102
0103 UCHAR ucTableRevision;
0104 USHORT usTableSize;
0105
0106 ULONG ulGoldenPPID;
0107 ULONG ulGoldenRevision;
0108 USHORT usFormatID;
0109
0110 USHORT usVoltageTime;
0111 ULONG ulPlatformCaps;
0112
0113 ULONG ulMaxODEngineClock;
0114 ULONG ulMaxODMemoryClock;
0115
0116 USHORT usPowerControlLimit;
0117 USHORT usUlvVoltageOffset;
0118
0119 USHORT usStateArrayOffset;
0120 USHORT usFanTableOffset;
0121 USHORT usThermalControllerOffset;
0122 USHORT usReserv;
0123
0124 USHORT usMclkDependencyTableOffset;
0125 USHORT usSclkDependencyTableOffset;
0126 USHORT usVddcLookupTableOffset;
0127 USHORT usVddgfxLookupTableOffset;
0128
0129 USHORT usMMDependencyTableOffset;
0130
0131 USHORT usVCEStateTableOffset;
0132
0133 USHORT usPPMTableOffset;
0134 USHORT usPowerTuneTableOffset;
0135
0136 USHORT usHardLimitTableOffset;
0137
0138 USHORT usPCIETableOffset;
0139
0140 USHORT usGPIOTableOffset;
0141
0142 USHORT usReserved[6];
0143 } ATOM_Tonga_POWERPLAYTABLE;
0144
0145 typedef struct _ATOM_Tonga_State {
0146 UCHAR ucEngineClockIndexHigh;
0147 UCHAR ucEngineClockIndexLow;
0148
0149 UCHAR ucMemoryClockIndexHigh;
0150 UCHAR ucMemoryClockIndexLow;
0151
0152 UCHAR ucPCIEGenLow;
0153 UCHAR ucPCIEGenHigh;
0154
0155 UCHAR ucPCIELaneLow;
0156 UCHAR ucPCIELaneHigh;
0157
0158 USHORT usClassification;
0159 ULONG ulCapsAndSettings;
0160 USHORT usClassification2;
0161 UCHAR ucUnused[4];
0162 } ATOM_Tonga_State;
0163
0164 typedef struct _ATOM_Tonga_State_Array {
0165 UCHAR ucRevId;
0166 UCHAR ucNumEntries;
0167 ATOM_Tonga_State entries[1];
0168 } ATOM_Tonga_State_Array;
0169
0170 typedef struct _ATOM_Tonga_MCLK_Dependency_Record {
0171 UCHAR ucVddcInd;
0172 USHORT usVddci;
0173 USHORT usVddgfxOffset;
0174 USHORT usMvdd;
0175 ULONG ulMclk;
0176 USHORT usReserved;
0177 } ATOM_Tonga_MCLK_Dependency_Record;
0178
0179 typedef struct _ATOM_Tonga_MCLK_Dependency_Table {
0180 UCHAR ucRevId;
0181 UCHAR ucNumEntries;
0182 ATOM_Tonga_MCLK_Dependency_Record entries[1];
0183 } ATOM_Tonga_MCLK_Dependency_Table;
0184
0185 typedef struct _ATOM_Tonga_SCLK_Dependency_Record {
0186 UCHAR ucVddInd;
0187 USHORT usVddcOffset;
0188 ULONG ulSclk;
0189 USHORT usEdcCurrent;
0190 UCHAR ucReliabilityTemperature;
0191 UCHAR ucCKSVOffsetandDisable;
0192 } ATOM_Tonga_SCLK_Dependency_Record;
0193
0194 typedef struct _ATOM_Tonga_SCLK_Dependency_Table {
0195 UCHAR ucRevId;
0196 UCHAR ucNumEntries;
0197 ATOM_Tonga_SCLK_Dependency_Record entries[1];
0198 } ATOM_Tonga_SCLK_Dependency_Table;
0199
0200 typedef struct _ATOM_Polaris_SCLK_Dependency_Record {
0201 UCHAR ucVddInd;
0202 USHORT usVddcOffset;
0203 ULONG ulSclk;
0204 USHORT usEdcCurrent;
0205 UCHAR ucReliabilityTemperature;
0206 UCHAR ucCKSVOffsetandDisable;
0207 ULONG ulSclkOffset;
0208 } ATOM_Polaris_SCLK_Dependency_Record;
0209
0210 typedef struct _ATOM_Polaris_SCLK_Dependency_Table {
0211 UCHAR ucRevId;
0212 UCHAR ucNumEntries;
0213 ATOM_Polaris_SCLK_Dependency_Record entries[1];
0214 } ATOM_Polaris_SCLK_Dependency_Table;
0215
0216 typedef struct _ATOM_Tonga_PCIE_Record {
0217 UCHAR ucPCIEGenSpeed;
0218 UCHAR usPCIELaneWidth;
0219 UCHAR ucReserved[2];
0220 } ATOM_Tonga_PCIE_Record;
0221
0222 typedef struct _ATOM_Tonga_PCIE_Table {
0223 UCHAR ucRevId;
0224 UCHAR ucNumEntries;
0225 ATOM_Tonga_PCIE_Record entries[1];
0226 } ATOM_Tonga_PCIE_Table;
0227
0228 typedef struct _ATOM_Polaris10_PCIE_Record {
0229 UCHAR ucPCIEGenSpeed;
0230 UCHAR usPCIELaneWidth;
0231 UCHAR ucReserved[2];
0232 ULONG ulPCIE_Sclk;
0233 } ATOM_Polaris10_PCIE_Record;
0234
0235 typedef struct _ATOM_Polaris10_PCIE_Table {
0236 UCHAR ucRevId;
0237 UCHAR ucNumEntries;
0238 ATOM_Polaris10_PCIE_Record entries[1];
0239 } ATOM_Polaris10_PCIE_Table;
0240
0241
0242 typedef struct _ATOM_Tonga_MM_Dependency_Record {
0243 UCHAR ucVddcInd;
0244 USHORT usVddgfxOffset;
0245 ULONG ulDClk;
0246 ULONG ulVClk;
0247 ULONG ulEClk;
0248 ULONG ulAClk;
0249 ULONG ulSAMUClk;
0250 } ATOM_Tonga_MM_Dependency_Record;
0251
0252 typedef struct _ATOM_Tonga_MM_Dependency_Table {
0253 UCHAR ucRevId;
0254 UCHAR ucNumEntries;
0255 ATOM_Tonga_MM_Dependency_Record entries[1];
0256 } ATOM_Tonga_MM_Dependency_Table;
0257
0258 typedef struct _ATOM_Tonga_Voltage_Lookup_Record {
0259 USHORT usVdd;
0260 USHORT usCACLow;
0261 USHORT usCACMid;
0262 USHORT usCACHigh;
0263 } ATOM_Tonga_Voltage_Lookup_Record;
0264
0265 typedef struct _ATOM_Tonga_Voltage_Lookup_Table {
0266 UCHAR ucRevId;
0267 UCHAR ucNumEntries;
0268 ATOM_Tonga_Voltage_Lookup_Record entries[1];
0269 } ATOM_Tonga_Voltage_Lookup_Table;
0270
0271 typedef struct _ATOM_Tonga_Fan_Table {
0272 UCHAR ucRevId;
0273 UCHAR ucTHyst;
0274 USHORT usTMin;
0275 USHORT usTMed;
0276 USHORT usTHigh;
0277 USHORT usPWMMin;
0278 USHORT usPWMMed;
0279 USHORT usPWMHigh;
0280 USHORT usTMax;
0281 UCHAR ucFanControlMode;
0282 USHORT usFanPWMMax;
0283 USHORT usFanOutputSensitivity;
0284 USHORT usFanRPMMax;
0285 ULONG ulMinFanSCLKAcousticLimit;
0286 UCHAR ucTargetTemperature;
0287 UCHAR ucMinimumPWMLimit;
0288 USHORT usReserved;
0289 } ATOM_Tonga_Fan_Table;
0290
0291 typedef struct _ATOM_Fiji_Fan_Table {
0292 UCHAR ucRevId;
0293 UCHAR ucTHyst;
0294 USHORT usTMin;
0295 USHORT usTMed;
0296 USHORT usTHigh;
0297 USHORT usPWMMin;
0298 USHORT usPWMMed;
0299 USHORT usPWMHigh;
0300 USHORT usTMax;
0301 UCHAR ucFanControlMode;
0302 USHORT usFanPWMMax;
0303 USHORT usFanOutputSensitivity;
0304 USHORT usFanRPMMax;
0305 ULONG ulMinFanSCLKAcousticLimit;
0306 UCHAR ucTargetTemperature;
0307 UCHAR ucMinimumPWMLimit;
0308 USHORT usFanGainEdge;
0309 USHORT usFanGainHotspot;
0310 USHORT usFanGainLiquid;
0311 USHORT usFanGainVrVddc;
0312 USHORT usFanGainVrMvdd;
0313 USHORT usFanGainPlx;
0314 USHORT usFanGainHbm;
0315 USHORT usReserved;
0316 } ATOM_Fiji_Fan_Table;
0317
0318 typedef struct _ATOM_Polaris_Fan_Table {
0319 UCHAR ucRevId;
0320 UCHAR ucTHyst;
0321 USHORT usTMin;
0322 USHORT usTMed;
0323 USHORT usTHigh;
0324 USHORT usPWMMin;
0325 USHORT usPWMMed;
0326 USHORT usPWMHigh;
0327 USHORT usTMax;
0328 UCHAR ucFanControlMode;
0329 USHORT usFanPWMMax;
0330 USHORT usFanOutputSensitivity;
0331 USHORT usFanRPMMax;
0332 ULONG ulMinFanSCLKAcousticLimit;
0333 UCHAR ucTargetTemperature;
0334 UCHAR ucMinimumPWMLimit;
0335 USHORT usFanGainEdge;
0336 USHORT usFanGainHotspot;
0337 USHORT usFanGainLiquid;
0338 USHORT usFanGainVrVddc;
0339 USHORT usFanGainVrMvdd;
0340 USHORT usFanGainPlx;
0341 USHORT usFanGainHbm;
0342 UCHAR ucEnableZeroRPM;
0343 UCHAR ucFanStopTemperature;
0344 UCHAR ucFanStartTemperature;
0345 USHORT usReserved;
0346 } ATOM_Polaris_Fan_Table;
0347
0348 typedef struct _ATOM_Tonga_Thermal_Controller {
0349 UCHAR ucRevId;
0350 UCHAR ucType;
0351 UCHAR ucI2cLine;
0352 UCHAR ucI2cAddress;
0353 UCHAR ucFanParameters;
0354 UCHAR ucFanMinRPM;
0355 UCHAR ucFanMaxRPM;
0356 UCHAR ucReserved;
0357 UCHAR ucFlags;
0358 } ATOM_Tonga_Thermal_Controller;
0359
0360 typedef struct _ATOM_Tonga_VCE_State_Record {
0361 UCHAR ucVCEClockIndex;
0362 UCHAR ucFlag;
0363 UCHAR ucSCLKIndex;
0364 UCHAR ucMCLKIndex;
0365 } ATOM_Tonga_VCE_State_Record;
0366
0367 typedef struct _ATOM_Tonga_VCE_State_Table {
0368 UCHAR ucRevId;
0369 UCHAR ucNumEntries;
0370 ATOM_Tonga_VCE_State_Record entries[1];
0371 } ATOM_Tonga_VCE_State_Table;
0372
0373 typedef struct _ATOM_Tonga_PowerTune_Table {
0374 UCHAR ucRevId;
0375 USHORT usTDP;
0376 USHORT usConfigurableTDP;
0377 USHORT usTDC;
0378 USHORT usBatteryPowerLimit;
0379 USHORT usSmallPowerLimit;
0380 USHORT usLowCACLeakage;
0381 USHORT usHighCACLeakage;
0382 USHORT usMaximumPowerDeliveryLimit;
0383 USHORT usTjMax;
0384 USHORT usPowerTuneDataSetID;
0385 USHORT usEDCLimit;
0386 USHORT usSoftwareShutdownTemp;
0387 USHORT usClockStretchAmount;
0388 USHORT usReserve[2];
0389 } ATOM_Tonga_PowerTune_Table;
0390
0391 typedef struct _ATOM_Fiji_PowerTune_Table {
0392 UCHAR ucRevId;
0393 USHORT usTDP;
0394 USHORT usConfigurableTDP;
0395 USHORT usTDC;
0396 USHORT usBatteryPowerLimit;
0397 USHORT usSmallPowerLimit;
0398 USHORT usLowCACLeakage;
0399 USHORT usHighCACLeakage;
0400 USHORT usMaximumPowerDeliveryLimit;
0401 USHORT usTjMax;
0402 USHORT usPowerTuneDataSetID;
0403 USHORT usEDCLimit;
0404 USHORT usSoftwareShutdownTemp;
0405 USHORT usClockStretchAmount;
0406 USHORT usTemperatureLimitHotspot;
0407 USHORT usTemperatureLimitLiquid1;
0408 USHORT usTemperatureLimitLiquid2;
0409 USHORT usTemperatureLimitVrVddc;
0410 USHORT usTemperatureLimitVrMvdd;
0411 USHORT usTemperatureLimitPlx;
0412 UCHAR ucLiquid1_I2C_address;
0413 UCHAR ucLiquid2_I2C_address;
0414 UCHAR ucLiquid_I2C_Line;
0415 UCHAR ucVr_I2C_address;
0416 UCHAR ucVr_I2C_Line;
0417 UCHAR ucPlx_I2C_address;
0418 UCHAR ucPlx_I2C_Line;
0419 USHORT usReserved;
0420 } ATOM_Fiji_PowerTune_Table;
0421
0422 typedef struct _ATOM_Polaris_PowerTune_Table
0423 {
0424 UCHAR ucRevId;
0425 USHORT usTDP;
0426 USHORT usConfigurableTDP;
0427 USHORT usTDC;
0428 USHORT usBatteryPowerLimit;
0429 USHORT usSmallPowerLimit;
0430 USHORT usLowCACLeakage;
0431 USHORT usHighCACLeakage;
0432 USHORT usMaximumPowerDeliveryLimit;
0433 USHORT usTjMax;
0434 USHORT usPowerTuneDataSetID;
0435 USHORT usEDCLimit;
0436 USHORT usSoftwareShutdownTemp;
0437 USHORT usClockStretchAmount;
0438 USHORT usTemperatureLimitHotspot;
0439 USHORT usTemperatureLimitLiquid1;
0440 USHORT usTemperatureLimitLiquid2;
0441 USHORT usTemperatureLimitVrVddc;
0442 USHORT usTemperatureLimitVrMvdd;
0443 USHORT usTemperatureLimitPlx;
0444 UCHAR ucLiquid1_I2C_address;
0445 UCHAR ucLiquid2_I2C_address;
0446 UCHAR ucLiquid_I2C_Line;
0447 UCHAR ucVr_I2C_address;
0448 UCHAR ucVr_I2C_Line;
0449 UCHAR ucPlx_I2C_address;
0450 UCHAR ucPlx_I2C_Line;
0451 USHORT usBoostPowerLimit;
0452 UCHAR ucCKS_LDO_REFSEL;
0453 UCHAR ucHotSpotOnly;
0454 UCHAR ucReserve;
0455 USHORT usReserve;
0456 } ATOM_Polaris_PowerTune_Table;
0457
0458 #define ATOM_PPM_A_A 1
0459 #define ATOM_PPM_A_I 2
0460 typedef struct _ATOM_Tonga_PPM_Table {
0461 UCHAR ucRevId;
0462 UCHAR ucPpmDesign;
0463 USHORT usCpuCoreNumber;
0464 ULONG ulPlatformTDP;
0465 ULONG ulSmallACPlatformTDP;
0466 ULONG ulPlatformTDC;
0467 ULONG ulSmallACPlatformTDC;
0468 ULONG ulApuTDP;
0469 ULONG ulDGpuTDP;
0470 ULONG ulDGpuUlvPower;
0471 ULONG ulTjmax;
0472 } ATOM_Tonga_PPM_Table;
0473
0474 typedef struct _ATOM_Tonga_Hard_Limit_Record {
0475 ULONG ulSCLKLimit;
0476 ULONG ulMCLKLimit;
0477 USHORT usVddcLimit;
0478 USHORT usVddciLimit;
0479 USHORT usVddgfxLimit;
0480 } ATOM_Tonga_Hard_Limit_Record;
0481
0482 typedef struct _ATOM_Tonga_Hard_Limit_Table {
0483 UCHAR ucRevId;
0484 UCHAR ucNumEntries;
0485 ATOM_Tonga_Hard_Limit_Record entries[1];
0486 } ATOM_Tonga_Hard_Limit_Table;
0487
0488 typedef struct _ATOM_Tonga_GPIO_Table {
0489 UCHAR ucRevId;
0490 UCHAR ucVRHotTriggeredSclkDpmIndex;
0491 UCHAR ucReserve[5];
0492 } ATOM_Tonga_GPIO_Table;
0493
0494 typedef struct _PPTable_Generic_SubTable_Header {
0495 UCHAR ucRevId;
0496 } PPTable_Generic_SubTable_Header;
0497
0498
0499 #pragma pack(pop)
0500
0501
0502 #endif