1*c59a5c48SFrançois Tigeot /* 2*c59a5c48SFrançois Tigeot * Copyright 2013 Advanced Micro Devices, Inc. 3*c59a5c48SFrançois Tigeot * 4*c59a5c48SFrançois Tigeot * Permission is hereby granted, free of charge, to any person obtaining a 5*c59a5c48SFrançois Tigeot * copy of this software and associated documentation files (the "Software"), 6*c59a5c48SFrançois Tigeot * to deal in the Software without restriction, including without limitation 7*c59a5c48SFrançois Tigeot * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*c59a5c48SFrançois Tigeot * and/or sell copies of the Software, and to permit persons to whom the 9*c59a5c48SFrançois Tigeot * Software is furnished to do so, subject to the following conditions: 10*c59a5c48SFrançois Tigeot * 11*c59a5c48SFrançois Tigeot * The above copyright notice and this permission notice shall be included in 12*c59a5c48SFrançois Tigeot * all copies or substantial portions of the Software. 13*c59a5c48SFrançois Tigeot * 14*c59a5c48SFrançois Tigeot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*c59a5c48SFrançois Tigeot * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*c59a5c48SFrançois Tigeot * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*c59a5c48SFrançois Tigeot * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*c59a5c48SFrançois Tigeot * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*c59a5c48SFrançois Tigeot * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*c59a5c48SFrançois Tigeot * OTHER DEALINGS IN THE SOFTWARE. 21*c59a5c48SFrançois Tigeot */ 22*c59a5c48SFrançois Tigeot 23*c59a5c48SFrançois Tigeot #ifndef _PPTABLE_H 24*c59a5c48SFrançois Tigeot #define _PPTABLE_H 25*c59a5c48SFrançois Tigeot 26*c59a5c48SFrançois Tigeot #pragma pack(1) 27*c59a5c48SFrançois Tigeot 28*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_THERMALCONTROLLER 29*c59a5c48SFrançois Tigeot 30*c59a5c48SFrançois Tigeot { 31*c59a5c48SFrançois Tigeot UCHAR ucType; // one of ATOM_PP_THERMALCONTROLLER_* 32*c59a5c48SFrançois Tigeot UCHAR ucI2cLine; // as interpreted by DAL I2C 33*c59a5c48SFrançois Tigeot UCHAR ucI2cAddress; 34*c59a5c48SFrançois Tigeot UCHAR ucFanParameters; // Fan Control Parameters. 35*c59a5c48SFrançois Tigeot UCHAR ucFanMinRPM; // Fan Minimum RPM (hundreds) -- for display purposes only. 36*c59a5c48SFrançois Tigeot UCHAR ucFanMaxRPM; // Fan Maximum RPM (hundreds) -- for display purposes only. 37*c59a5c48SFrançois Tigeot UCHAR ucReserved; // ---- 38*c59a5c48SFrançois Tigeot UCHAR ucFlags; // to be defined 39*c59a5c48SFrançois Tigeot } ATOM_PPLIB_THERMALCONTROLLER; 40*c59a5c48SFrançois Tigeot 41*c59a5c48SFrançois Tigeot #define ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f 42*c59a5c48SFrançois Tigeot #define ATOM_PP_FANPARAMETERS_NOFAN 0x80 // No fan is connected to this controller. 43*c59a5c48SFrançois Tigeot 44*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_NONE 0 45*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_LM63 1 // Not used by PPLib 46*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_ADM1032 2 // Not used by PPLib 47*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_ADM1030 3 // Not used by PPLib 48*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_MUA6649 4 // Not used by PPLib 49*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_LM64 5 50*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_F75375 6 // Not used by PPLib 51*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_RV6xx 7 52*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_RV770 8 53*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 54*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_KONG 10 55*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 56*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 57*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_EMC2103 13 /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen. 58*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_SUMO 14 /* 0x0E */ // Sumo type, used internally 59*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_NISLANDS 15 60*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_SISLANDS 16 61*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_LM96163 17 62*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_CISLANDS 18 63*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_KAVERI 19 64*c59a5c48SFrançois Tigeot 65*c59a5c48SFrançois Tigeot 66*c59a5c48SFrançois Tigeot // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal. 67*c59a5c48SFrançois Tigeot // We probably should reserve the bit 0x80 for this use. 68*c59a5c48SFrançois Tigeot // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here). 69*c59a5c48SFrançois Tigeot // The driver can pick the correct internal controller based on the ASIC. 70*c59a5c48SFrançois Tigeot 71*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller 72*c59a5c48SFrançois Tigeot #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller 73*c59a5c48SFrançois Tigeot 74*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_STATE 75*c59a5c48SFrançois Tigeot { 76*c59a5c48SFrançois Tigeot UCHAR ucNonClockStateIndex; 77*c59a5c48SFrançois Tigeot UCHAR ucClockStateIndices[1]; // variable-sized 78*c59a5c48SFrançois Tigeot } ATOM_PPLIB_STATE; 79*c59a5c48SFrançois Tigeot 80*c59a5c48SFrançois Tigeot 81*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_FANTABLE 82*c59a5c48SFrançois Tigeot { 83*c59a5c48SFrançois Tigeot UCHAR ucFanTableFormat; // Change this if the table format changes or version changes so that the other fields are not the same. 84*c59a5c48SFrançois Tigeot UCHAR ucTHyst; // Temperature hysteresis. Integer. 85*c59a5c48SFrançois Tigeot USHORT usTMin; // The temperature, in 0.01 centigrades, below which we just run at a minimal PWM. 86*c59a5c48SFrançois Tigeot USHORT usTMed; // The middle temperature where we change slopes. 87*c59a5c48SFrançois Tigeot USHORT usTHigh; // The high point above TMed for adjusting the second slope. 88*c59a5c48SFrançois Tigeot USHORT usPWMMin; // The minimum PWM value in percent (0.01% increments). 89*c59a5c48SFrançois Tigeot USHORT usPWMMed; // The PWM value (in percent) at TMed. 90*c59a5c48SFrançois Tigeot USHORT usPWMHigh; // The PWM value at THigh. 91*c59a5c48SFrançois Tigeot } ATOM_PPLIB_FANTABLE; 92*c59a5c48SFrançois Tigeot 93*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_FANTABLE2 94*c59a5c48SFrançois Tigeot { 95*c59a5c48SFrançois Tigeot ATOM_PPLIB_FANTABLE basicTable; 96*c59a5c48SFrançois Tigeot USHORT usTMax; // The max temperature 97*c59a5c48SFrançois Tigeot } ATOM_PPLIB_FANTABLE2; 98*c59a5c48SFrançois Tigeot 99*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_FANTABLE3 100*c59a5c48SFrançois Tigeot { 101*c59a5c48SFrançois Tigeot ATOM_PPLIB_FANTABLE2 basicTable2; 102*c59a5c48SFrançois Tigeot UCHAR ucFanControlMode; 103*c59a5c48SFrançois Tigeot USHORT usFanPWMMax; 104*c59a5c48SFrançois Tigeot USHORT usFanOutputSensitivity; 105*c59a5c48SFrançois Tigeot } ATOM_PPLIB_FANTABLE3; 106*c59a5c48SFrançois Tigeot 107*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_EXTENDEDHEADER 108*c59a5c48SFrançois Tigeot { 109*c59a5c48SFrançois Tigeot USHORT usSize; 110*c59a5c48SFrançois Tigeot ULONG ulMaxEngineClock; // For Overdrive. 111*c59a5c48SFrançois Tigeot ULONG ulMaxMemoryClock; // For Overdrive. 112*c59a5c48SFrançois Tigeot // Add extra system parameters here, always adjust size to include all fields. 113*c59a5c48SFrançois Tigeot USHORT usVCETableOffset; //points to ATOM_PPLIB_VCE_Table 114*c59a5c48SFrançois Tigeot USHORT usUVDTableOffset; //points to ATOM_PPLIB_UVD_Table 115*c59a5c48SFrançois Tigeot USHORT usSAMUTableOffset; //points to ATOM_PPLIB_SAMU_Table 116*c59a5c48SFrançois Tigeot USHORT usPPMTableOffset; //points to ATOM_PPLIB_PPM_Table 117*c59a5c48SFrançois Tigeot USHORT usACPTableOffset; //points to ATOM_PPLIB_ACP_Table 118*c59a5c48SFrançois Tigeot /* points to ATOM_PPLIB_POWERTUNE_Table */ 119*c59a5c48SFrançois Tigeot USHORT usPowerTuneTableOffset; 120*c59a5c48SFrançois Tigeot /* points to ATOM_PPLIB_CLOCK_Voltage_Dependency_Table for sclkVddgfxTable */ 121*c59a5c48SFrançois Tigeot USHORT usSclkVddgfxTableOffset; 122*c59a5c48SFrançois Tigeot } ATOM_PPLIB_EXTENDEDHEADER; 123*c59a5c48SFrançois Tigeot 124*c59a5c48SFrançois Tigeot //// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps 125*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_BACKBIAS 1 126*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_POWERPLAY 2 127*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 4 128*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_ASPM_L0s 8 129*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_ASPM_L1 16 130*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_HARDWAREDC 32 131*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_GEMINIPRIMARY 64 132*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_STEPVDDC 128 133*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_VOLTAGECONTROL 256 134*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_SIDEPORTCONTROL 512 135*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1 1024 136*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_HTLINKCONTROL 2048 137*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_MVDDCONTROL 4096 138*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_GOTO_BOOT_ON_ALERT 0x2000 // Go to boot state on alerts, e.g. on an AC->DC transition. 139*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_DONT_WAIT_FOR_VBLANK_ON_ALERT 0x4000 // Do NOT wait for VBLANK during an alert (e.g. AC->DC transition). 140*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000 // Does the driver control VDDCI independently from VDDC. 141*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_REGULATOR_HOT 0x00010000 // Enable the 'regulator hot' feature. 142*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_BACO 0x00020000 // Does the driver supports BACO state. 143*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_NEW_CAC_VOLTAGE 0x00040000 // Does the driver supports new CAC voltage table. 144*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_REVERT_GPIO5_POLARITY 0x00080000 // Does the driver supports revert GPIO5 polarity. 145*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17 0x00100000 // Does the driver supports thermal2GPIO17. 146*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_VRHOT_GPIO_CONFIGURABLE 0x00200000 // Does the driver supports VR HOT GPIO Configurable. 147*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_TEMP_INVERSION 0x00400000 // Does the driver supports Temp Inversion feature. 148*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_EVV 0x00800000 149*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_COMBINE_PCC_WITH_THERMAL_SIGNAL 0x01000000 150*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x02000000 151*c59a5c48SFrançois Tigeot #define ATOM_PP_PLATFORM_CAP_DISABLE_USING_ACTUAL_TEMPERATURE_FOR_POWER_CALC 0x04000000 152*c59a5c48SFrançois Tigeot 153*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERPLAYTABLE 154*c59a5c48SFrançois Tigeot { 155*c59a5c48SFrançois Tigeot ATOM_COMMON_TABLE_HEADER sHeader; 156*c59a5c48SFrançois Tigeot 157*c59a5c48SFrançois Tigeot UCHAR ucDataRevision; 158*c59a5c48SFrançois Tigeot 159*c59a5c48SFrançois Tigeot UCHAR ucNumStates; 160*c59a5c48SFrançois Tigeot UCHAR ucStateEntrySize; 161*c59a5c48SFrançois Tigeot UCHAR ucClockInfoSize; 162*c59a5c48SFrançois Tigeot UCHAR ucNonClockSize; 163*c59a5c48SFrançois Tigeot 164*c59a5c48SFrançois Tigeot // offset from start of this table to array of ucNumStates ATOM_PPLIB_STATE structures 165*c59a5c48SFrançois Tigeot USHORT usStateArrayOffset; 166*c59a5c48SFrançois Tigeot 167*c59a5c48SFrançois Tigeot // offset from start of this table to array of ASIC-specific structures, 168*c59a5c48SFrançois Tigeot // currently ATOM_PPLIB_CLOCK_INFO. 169*c59a5c48SFrançois Tigeot USHORT usClockInfoArrayOffset; 170*c59a5c48SFrançois Tigeot 171*c59a5c48SFrançois Tigeot // offset from start of this table to array of ATOM_PPLIB_NONCLOCK_INFO 172*c59a5c48SFrançois Tigeot USHORT usNonClockInfoArrayOffset; 173*c59a5c48SFrançois Tigeot 174*c59a5c48SFrançois Tigeot USHORT usBackbiasTime; // in microseconds 175*c59a5c48SFrançois Tigeot USHORT usVoltageTime; // in microseconds 176*c59a5c48SFrançois Tigeot USHORT usTableSize; //the size of this structure, or the extended structure 177*c59a5c48SFrançois Tigeot 178*c59a5c48SFrançois Tigeot ULONG ulPlatformCaps; // See ATOM_PPLIB_CAPS_* 179*c59a5c48SFrançois Tigeot 180*c59a5c48SFrançois Tigeot ATOM_PPLIB_THERMALCONTROLLER sThermalController; 181*c59a5c48SFrançois Tigeot 182*c59a5c48SFrançois Tigeot USHORT usBootClockInfoOffset; 183*c59a5c48SFrançois Tigeot USHORT usBootNonClockInfoOffset; 184*c59a5c48SFrançois Tigeot 185*c59a5c48SFrançois Tigeot } ATOM_PPLIB_POWERPLAYTABLE; 186*c59a5c48SFrançois Tigeot 187*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERPLAYTABLE2 188*c59a5c48SFrançois Tigeot { 189*c59a5c48SFrançois Tigeot ATOM_PPLIB_POWERPLAYTABLE basicTable; 190*c59a5c48SFrançois Tigeot UCHAR ucNumCustomThermalPolicy; 191*c59a5c48SFrançois Tigeot USHORT usCustomThermalPolicyArrayOffset; 192*c59a5c48SFrançois Tigeot }ATOM_PPLIB_POWERPLAYTABLE2, *LPATOM_PPLIB_POWERPLAYTABLE2; 193*c59a5c48SFrançois Tigeot 194*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 195*c59a5c48SFrançois Tigeot { 196*c59a5c48SFrançois Tigeot ATOM_PPLIB_POWERPLAYTABLE2 basicTable2; 197*c59a5c48SFrançois Tigeot USHORT usFormatID; // To be used ONLY by PPGen. 198*c59a5c48SFrançois Tigeot USHORT usFanTableOffset; 199*c59a5c48SFrançois Tigeot USHORT usExtendendedHeaderOffset; 200*c59a5c48SFrançois Tigeot } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; 201*c59a5c48SFrançois Tigeot 202*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERPLAYTABLE4 203*c59a5c48SFrançois Tigeot { 204*c59a5c48SFrançois Tigeot ATOM_PPLIB_POWERPLAYTABLE3 basicTable3; 205*c59a5c48SFrançois Tigeot ULONG ulGoldenPPID; // PPGen use only 206*c59a5c48SFrançois Tigeot ULONG ulGoldenRevision; // PPGen use only 207*c59a5c48SFrançois Tigeot USHORT usVddcDependencyOnSCLKOffset; 208*c59a5c48SFrançois Tigeot USHORT usVddciDependencyOnMCLKOffset; 209*c59a5c48SFrançois Tigeot USHORT usVddcDependencyOnMCLKOffset; 210*c59a5c48SFrançois Tigeot USHORT usMaxClockVoltageOnDCOffset; 211*c59a5c48SFrançois Tigeot USHORT usVddcPhaseShedLimitsTableOffset; // Points to ATOM_PPLIB_PhaseSheddingLimits_Table 212*c59a5c48SFrançois Tigeot USHORT usMvddDependencyOnMCLKOffset; 213*c59a5c48SFrançois Tigeot } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4; 214*c59a5c48SFrançois Tigeot 215*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERPLAYTABLE5 216*c59a5c48SFrançois Tigeot { 217*c59a5c48SFrançois Tigeot ATOM_PPLIB_POWERPLAYTABLE4 basicTable4; 218*c59a5c48SFrançois Tigeot ULONG ulTDPLimit; 219*c59a5c48SFrançois Tigeot ULONG ulNearTDPLimit; 220*c59a5c48SFrançois Tigeot ULONG ulSQRampingThreshold; 221*c59a5c48SFrançois Tigeot USHORT usCACLeakageTableOffset; // Points to ATOM_PPLIB_CAC_Leakage_Table 222*c59a5c48SFrançois Tigeot ULONG ulCACLeakage; // The iLeakage for driver calculated CAC leakage table 223*c59a5c48SFrançois Tigeot USHORT usTDPODLimit; 224*c59a5c48SFrançois Tigeot USHORT usLoadLineSlope; // in milliOhms * 100 225*c59a5c48SFrançois Tigeot } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5; 226*c59a5c48SFrançois Tigeot 227*c59a5c48SFrançois Tigeot //// ATOM_PPLIB_NONCLOCK_INFO::usClassification 228*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 229*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 230*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0 231*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1 232*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3 233*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5 234*c59a5c48SFrançois Tigeot // 2, 4, 6, 7 are reserved 235*c59a5c48SFrançois Tigeot 236*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008 237*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010 238*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020 239*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040 240*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080 241*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_3DPERFORMANCE 0x0100 242*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_OVERDRIVETEMPLATE 0x0200 243*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_UVDSTATE 0x0400 244*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_3DLOW 0x0800 245*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000 246*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_HD2STATE 0x2000 247*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 248*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 249*c59a5c48SFrançois Tigeot 250*c59a5c48SFrançois Tigeot //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2 251*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001 252*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION2_ULV 0x0002 253*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_CLASSIFICATION2_MVC 0x0004 //Multi-View Codec (BD-3D) 254*c59a5c48SFrançois Tigeot 255*c59a5c48SFrançois Tigeot //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings 256*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 257*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 258*c59a5c48SFrançois Tigeot 259*c59a5c48SFrançois Tigeot // 0 is 2.5Gb/s, 1 is 5Gb/s 260*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_PCIE_LINK_SPEED_MASK 0x00000004 261*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_PCIE_LINK_SPEED_SHIFT 2 262*c59a5c48SFrançois Tigeot 263*c59a5c48SFrançois Tigeot // lanes - 1: 1, 2, 4, 8, 12, 16 permitted by PCIE spec 264*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_PCIE_LINK_WIDTH_MASK 0x000000F8 265*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT 3 266*c59a5c48SFrançois Tigeot 267*c59a5c48SFrançois Tigeot // lookup into reduced refresh-rate table 268*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_MASK 0x00000F00 269*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_SHIFT 8 270*c59a5c48SFrançois Tigeot 271*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_LIMITED_REFRESHRATE_UNLIMITED 0 272*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_LIMITED_REFRESHRATE_50HZ 1 273*c59a5c48SFrançois Tigeot // 2-15 TBD as needed. 274*c59a5c48SFrançois Tigeot 275*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_SOFTWARE_DISABLE_LOADBALANCING 0x00001000 276*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_SOFTWARE_ENABLE_SLEEP_FOR_TIMESTAMPS 0x00002000 277*c59a5c48SFrançois Tigeot 278*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_DISALLOW_ON_DC 0x00004000 279*c59a5c48SFrançois Tigeot 280*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_ENABLE_VARIBRIGHT 0x00008000 281*c59a5c48SFrançois Tigeot 282*c59a5c48SFrançois Tigeot //memory related flags 283*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_SWSTATE_MEMORY_DLL_OFF 0x000010000 284*c59a5c48SFrançois Tigeot 285*c59a5c48SFrançois Tigeot //M3 Arb //2bits, current 3 sets of parameters in total 286*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_M3ARB_MASK 0x00060000 287*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_M3ARB_SHIFT 17 288*c59a5c48SFrançois Tigeot 289*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_ENABLE_DRR 0x00080000 290*c59a5c48SFrançois Tigeot 291*c59a5c48SFrançois Tigeot // remaining 16 bits are reserved 292*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_THERMAL_STATE 293*c59a5c48SFrançois Tigeot { 294*c59a5c48SFrançois Tigeot UCHAR ucMinTemperature; 295*c59a5c48SFrançois Tigeot UCHAR ucMaxTemperature; 296*c59a5c48SFrançois Tigeot UCHAR ucThermalAction; 297*c59a5c48SFrançois Tigeot }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE; 298*c59a5c48SFrançois Tigeot 299*c59a5c48SFrançois Tigeot // Contained in an array starting at the offset 300*c59a5c48SFrançois Tigeot // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. 301*c59a5c48SFrançois Tigeot // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex 302*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 303*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 304*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_NONCLOCK_INFO 305*c59a5c48SFrançois Tigeot { 306*c59a5c48SFrançois Tigeot USHORT usClassification; 307*c59a5c48SFrançois Tigeot UCHAR ucMinTemperature; 308*c59a5c48SFrançois Tigeot UCHAR ucMaxTemperature; 309*c59a5c48SFrançois Tigeot ULONG ulCapsAndSettings; 310*c59a5c48SFrançois Tigeot UCHAR ucRequiredPower; 311*c59a5c48SFrançois Tigeot USHORT usClassification2; 312*c59a5c48SFrançois Tigeot ULONG ulVCLK; 313*c59a5c48SFrançois Tigeot ULONG ulDCLK; 314*c59a5c48SFrançois Tigeot UCHAR ucUnused[5]; 315*c59a5c48SFrançois Tigeot } ATOM_PPLIB_NONCLOCK_INFO; 316*c59a5c48SFrançois Tigeot 317*c59a5c48SFrançois Tigeot // Contained in an array starting at the offset 318*c59a5c48SFrançois Tigeot // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. 319*c59a5c48SFrançois Tigeot // referenced from ATOM_PPLIB_STATE::ucClockStateIndices 320*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_R600_CLOCK_INFO 321*c59a5c48SFrançois Tigeot { 322*c59a5c48SFrançois Tigeot USHORT usEngineClockLow; 323*c59a5c48SFrançois Tigeot UCHAR ucEngineClockHigh; 324*c59a5c48SFrançois Tigeot 325*c59a5c48SFrançois Tigeot USHORT usMemoryClockLow; 326*c59a5c48SFrançois Tigeot UCHAR ucMemoryClockHigh; 327*c59a5c48SFrançois Tigeot 328*c59a5c48SFrançois Tigeot USHORT usVDDC; 329*c59a5c48SFrançois Tigeot USHORT usUnused1; 330*c59a5c48SFrançois Tigeot USHORT usUnused2; 331*c59a5c48SFrançois Tigeot 332*c59a5c48SFrançois Tigeot ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_* 333*c59a5c48SFrançois Tigeot 334*c59a5c48SFrançois Tigeot } ATOM_PPLIB_R600_CLOCK_INFO; 335*c59a5c48SFrançois Tigeot 336*c59a5c48SFrançois Tigeot // ulFlags in ATOM_PPLIB_R600_CLOCK_INFO 337*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_PCIEGEN2 1 338*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_UVDSAFE 2 339*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE 4 340*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_MEMORY_ODT_OFF 8 341*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_MEMORY_DLL_OFF 16 342*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_R600_FLAGS_LOWPOWER 32 // On the RV770 use 'low power' setting (sequencer S0). 343*c59a5c48SFrançois Tigeot 344*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO 345*c59a5c48SFrançois Tigeot 346*c59a5c48SFrançois Tigeot { 347*c59a5c48SFrançois Tigeot USHORT usLowEngineClockLow; // Low Engine clock in MHz (the same way as on the R600). 348*c59a5c48SFrançois Tigeot UCHAR ucLowEngineClockHigh; 349*c59a5c48SFrançois Tigeot USHORT usHighEngineClockLow; // High Engine clock in MHz. 350*c59a5c48SFrançois Tigeot UCHAR ucHighEngineClockHigh; 351*c59a5c48SFrançois Tigeot USHORT usMemoryClockLow; // For now one of the ATOM_PPLIB_RS780_SPMCLK_XXXX constants. 352*c59a5c48SFrançois Tigeot UCHAR ucMemoryClockHigh; // Currentyl unused. 353*c59a5c48SFrançois Tigeot UCHAR ucPadding; // For proper alignment and size. 354*c59a5c48SFrançois Tigeot USHORT usVDDC; // For the 780, use: None, Low, High, Variable 355*c59a5c48SFrançois Tigeot UCHAR ucMaxHTLinkWidth; // From SBIOS - {2, 4, 8, 16} 356*c59a5c48SFrançois Tigeot UCHAR ucMinHTLinkWidth; // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could 357*c59a5c48SFrançois Tigeot USHORT usHTLinkFreq; // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200). 358*c59a5c48SFrançois Tigeot ULONG ulFlags; 359*c59a5c48SFrançois Tigeot } ATOM_PPLIB_RS780_CLOCK_INFO; 360*c59a5c48SFrançois Tigeot 361*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_VOLTAGE_NONE 0 362*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_VOLTAGE_LOW 1 363*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2 364*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3 365*c59a5c48SFrançois Tigeot 366*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_SPMCLK_NONE 0 // We cannot change the side port memory clock, leave it as it is. 367*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_SPMCLK_LOW 1 368*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_SPMCLK_HIGH 2 369*c59a5c48SFrançois Tigeot 370*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0 371*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 372*c59a5c48SFrançois Tigeot #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 373*c59a5c48SFrançois Tigeot 374*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO 375*c59a5c48SFrançois Tigeot { 376*c59a5c48SFrançois Tigeot USHORT usEngineClockLow; 377*c59a5c48SFrançois Tigeot UCHAR ucEngineClockHigh; 378*c59a5c48SFrançois Tigeot 379*c59a5c48SFrançois Tigeot USHORT usMemoryClockLow; 380*c59a5c48SFrançois Tigeot UCHAR ucMemoryClockHigh; 381*c59a5c48SFrançois Tigeot 382*c59a5c48SFrançois Tigeot USHORT usVDDC; 383*c59a5c48SFrançois Tigeot USHORT usVDDCI; 384*c59a5c48SFrançois Tigeot USHORT usUnused; 385*c59a5c48SFrançois Tigeot 386*c59a5c48SFrançois Tigeot ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_* 387*c59a5c48SFrançois Tigeot 388*c59a5c48SFrançois Tigeot } ATOM_PPLIB_EVERGREEN_CLOCK_INFO; 389*c59a5c48SFrançois Tigeot 390*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_SI_CLOCK_INFO 391*c59a5c48SFrançois Tigeot { 392*c59a5c48SFrançois Tigeot USHORT usEngineClockLow; 393*c59a5c48SFrançois Tigeot UCHAR ucEngineClockHigh; 394*c59a5c48SFrançois Tigeot 395*c59a5c48SFrançois Tigeot USHORT usMemoryClockLow; 396*c59a5c48SFrançois Tigeot UCHAR ucMemoryClockHigh; 397*c59a5c48SFrançois Tigeot 398*c59a5c48SFrançois Tigeot USHORT usVDDC; 399*c59a5c48SFrançois Tigeot USHORT usVDDCI; 400*c59a5c48SFrançois Tigeot UCHAR ucPCIEGen; 401*c59a5c48SFrançois Tigeot UCHAR ucUnused1; 402*c59a5c48SFrançois Tigeot 403*c59a5c48SFrançois Tigeot ULONG ulFlags; // ATOM_PPLIB_SI_FLAGS_*, no flag is necessary for now 404*c59a5c48SFrançois Tigeot 405*c59a5c48SFrançois Tigeot } ATOM_PPLIB_SI_CLOCK_INFO; 406*c59a5c48SFrançois Tigeot 407*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_CI_CLOCK_INFO 408*c59a5c48SFrançois Tigeot { 409*c59a5c48SFrançois Tigeot USHORT usEngineClockLow; 410*c59a5c48SFrançois Tigeot UCHAR ucEngineClockHigh; 411*c59a5c48SFrançois Tigeot 412*c59a5c48SFrançois Tigeot USHORT usMemoryClockLow; 413*c59a5c48SFrançois Tigeot UCHAR ucMemoryClockHigh; 414*c59a5c48SFrançois Tigeot 415*c59a5c48SFrançois Tigeot UCHAR ucPCIEGen; 416*c59a5c48SFrançois Tigeot USHORT usPCIELane; 417*c59a5c48SFrançois Tigeot } ATOM_PPLIB_CI_CLOCK_INFO; 418*c59a5c48SFrançois Tigeot 419*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{ 420*c59a5c48SFrançois Tigeot USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz 421*c59a5c48SFrançois Tigeot UCHAR ucEngineClockHigh; //clockfrequency >> 16. 422*c59a5c48SFrançois Tigeot UCHAR vddcIndex; //2-bit vddc index; 423*c59a5c48SFrançois Tigeot USHORT tdpLimit; 424*c59a5c48SFrançois Tigeot //please initalize to 0 425*c59a5c48SFrançois Tigeot USHORT rsv1; 426*c59a5c48SFrançois Tigeot //please initialize to 0s 427*c59a5c48SFrançois Tigeot ULONG rsv2[2]; 428*c59a5c48SFrançois Tigeot }ATOM_PPLIB_SUMO_CLOCK_INFO; 429*c59a5c48SFrançois Tigeot 430*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_CZ_CLOCK_INFO { 431*c59a5c48SFrançois Tigeot UCHAR index; 432*c59a5c48SFrançois Tigeot UCHAR rsv[3]; 433*c59a5c48SFrançois Tigeot } ATOM_PPLIB_CZ_CLOCK_INFO; 434*c59a5c48SFrançois Tigeot 435*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_STATE_V2 436*c59a5c48SFrançois Tigeot { 437*c59a5c48SFrançois Tigeot //number of valid dpm levels in this state; Driver uses it to calculate the whole 438*c59a5c48SFrançois Tigeot //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR) 439*c59a5c48SFrançois Tigeot UCHAR ucNumDPMLevels; 440*c59a5c48SFrançois Tigeot 441*c59a5c48SFrançois Tigeot //a index to the array of nonClockInfos 442*c59a5c48SFrançois Tigeot UCHAR nonClockInfoIndex; 443*c59a5c48SFrançois Tigeot /** 444*c59a5c48SFrançois Tigeot * Driver will read the first ucNumDPMLevels in this array 445*c59a5c48SFrançois Tigeot */ 446*c59a5c48SFrançois Tigeot UCHAR clockInfoIndex[1]; 447*c59a5c48SFrançois Tigeot } ATOM_PPLIB_STATE_V2; 448*c59a5c48SFrançois Tigeot 449*c59a5c48SFrançois Tigeot typedef struct _StateArray{ 450*c59a5c48SFrançois Tigeot //how many states we have 451*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; 452*c59a5c48SFrançois Tigeot 453*c59a5c48SFrançois Tigeot ATOM_PPLIB_STATE_V2 states[1]; 454*c59a5c48SFrançois Tigeot }StateArray; 455*c59a5c48SFrançois Tigeot 456*c59a5c48SFrançois Tigeot 457*c59a5c48SFrançois Tigeot typedef struct _ClockInfoArray{ 458*c59a5c48SFrançois Tigeot //how many clock levels we have 459*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; 460*c59a5c48SFrançois Tigeot 461*c59a5c48SFrançois Tigeot //sizeof(ATOM_PPLIB_CLOCK_INFO) 462*c59a5c48SFrançois Tigeot UCHAR ucEntrySize; 463*c59a5c48SFrançois Tigeot 464*c59a5c48SFrançois Tigeot UCHAR clockInfo[1]; 465*c59a5c48SFrançois Tigeot }ClockInfoArray; 466*c59a5c48SFrançois Tigeot 467*c59a5c48SFrançois Tigeot typedef struct _NonClockInfoArray{ 468*c59a5c48SFrançois Tigeot 469*c59a5c48SFrançois Tigeot //how many non-clock levels we have. normally should be same as number of states 470*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; 471*c59a5c48SFrançois Tigeot //sizeof(ATOM_PPLIB_NONCLOCK_INFO) 472*c59a5c48SFrançois Tigeot UCHAR ucEntrySize; 473*c59a5c48SFrançois Tigeot 474*c59a5c48SFrançois Tigeot ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1]; 475*c59a5c48SFrançois Tigeot }NonClockInfoArray; 476*c59a5c48SFrançois Tigeot 477*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record 478*c59a5c48SFrançois Tigeot { 479*c59a5c48SFrançois Tigeot USHORT usClockLow; 480*c59a5c48SFrançois Tigeot UCHAR ucClockHigh; 481*c59a5c48SFrançois Tigeot USHORT usVoltage; 482*c59a5c48SFrançois Tigeot }ATOM_PPLIB_Clock_Voltage_Dependency_Record; 483*c59a5c48SFrançois Tigeot 484*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table 485*c59a5c48SFrançois Tigeot { 486*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; // Number of entries. 487*c59a5c48SFrançois Tigeot ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1]; // Dynamically allocate entries. 488*c59a5c48SFrançois Tigeot }ATOM_PPLIB_Clock_Voltage_Dependency_Table; 489*c59a5c48SFrançois Tigeot 490*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record 491*c59a5c48SFrançois Tigeot { 492*c59a5c48SFrançois Tigeot USHORT usSclkLow; 493*c59a5c48SFrançois Tigeot UCHAR ucSclkHigh; 494*c59a5c48SFrançois Tigeot USHORT usMclkLow; 495*c59a5c48SFrançois Tigeot UCHAR ucMclkHigh; 496*c59a5c48SFrançois Tigeot USHORT usVddc; 497*c59a5c48SFrançois Tigeot USHORT usVddci; 498*c59a5c48SFrançois Tigeot }ATOM_PPLIB_Clock_Voltage_Limit_Record; 499*c59a5c48SFrançois Tigeot 500*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table 501*c59a5c48SFrançois Tigeot { 502*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; // Number of entries. 503*c59a5c48SFrançois Tigeot ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1]; // Dynamically allocate entries. 504*c59a5c48SFrançois Tigeot }ATOM_PPLIB_Clock_Voltage_Limit_Table; 505*c59a5c48SFrançois Tigeot 506*c59a5c48SFrançois Tigeot union _ATOM_PPLIB_CAC_Leakage_Record 507*c59a5c48SFrançois Tigeot { 508*c59a5c48SFrançois Tigeot struct 509*c59a5c48SFrançois Tigeot { 510*c59a5c48SFrançois Tigeot USHORT usVddc; // We use this field for the "fake" standardized VDDC for power calculations; For CI and newer, we use this as the real VDDC value. in CI we read it as StdVoltageHiSidd 511*c59a5c48SFrançois Tigeot ULONG ulLeakageValue; // For CI and newer we use this as the "fake" standar VDDC value. in CI we read it as StdVoltageLoSidd 512*c59a5c48SFrançois Tigeot 513*c59a5c48SFrançois Tigeot }; 514*c59a5c48SFrançois Tigeot struct 515*c59a5c48SFrançois Tigeot { 516*c59a5c48SFrançois Tigeot USHORT usVddc1; 517*c59a5c48SFrançois Tigeot USHORT usVddc2; 518*c59a5c48SFrançois Tigeot USHORT usVddc3; 519*c59a5c48SFrançois Tigeot }; 520*c59a5c48SFrançois Tigeot }; 521*c59a5c48SFrançois Tigeot 522*c59a5c48SFrançois Tigeot typedef union _ATOM_PPLIB_CAC_Leakage_Record ATOM_PPLIB_CAC_Leakage_Record; 523*c59a5c48SFrançois Tigeot 524*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_CAC_Leakage_Table 525*c59a5c48SFrançois Tigeot { 526*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; // Number of entries. 527*c59a5c48SFrançois Tigeot ATOM_PPLIB_CAC_Leakage_Record entries[1]; // Dynamically allocate entries. 528*c59a5c48SFrançois Tigeot }ATOM_PPLIB_CAC_Leakage_Table; 529*c59a5c48SFrançois Tigeot 530*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record 531*c59a5c48SFrançois Tigeot { 532*c59a5c48SFrançois Tigeot USHORT usVoltage; 533*c59a5c48SFrançois Tigeot USHORT usSclkLow; 534*c59a5c48SFrançois Tigeot UCHAR ucSclkHigh; 535*c59a5c48SFrançois Tigeot USHORT usMclkLow; 536*c59a5c48SFrançois Tigeot UCHAR ucMclkHigh; 537*c59a5c48SFrançois Tigeot }ATOM_PPLIB_PhaseSheddingLimits_Record; 538*c59a5c48SFrançois Tigeot 539*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Table 540*c59a5c48SFrançois Tigeot { 541*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; // Number of entries. 542*c59a5c48SFrançois Tigeot ATOM_PPLIB_PhaseSheddingLimits_Record entries[1]; // Dynamically allocate entries. 543*c59a5c48SFrançois Tigeot }ATOM_PPLIB_PhaseSheddingLimits_Table; 544*c59a5c48SFrançois Tigeot 545*c59a5c48SFrançois Tigeot typedef struct _VCEClockInfo{ 546*c59a5c48SFrançois Tigeot USHORT usEVClkLow; 547*c59a5c48SFrançois Tigeot UCHAR ucEVClkHigh; 548*c59a5c48SFrançois Tigeot USHORT usECClkLow; 549*c59a5c48SFrançois Tigeot UCHAR ucECClkHigh; 550*c59a5c48SFrançois Tigeot }VCEClockInfo; 551*c59a5c48SFrançois Tigeot 552*c59a5c48SFrançois Tigeot typedef struct _VCEClockInfoArray{ 553*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; 554*c59a5c48SFrançois Tigeot VCEClockInfo entries[1]; 555*c59a5c48SFrançois Tigeot }VCEClockInfoArray; 556*c59a5c48SFrançois Tigeot 557*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record 558*c59a5c48SFrançois Tigeot { 559*c59a5c48SFrançois Tigeot USHORT usVoltage; 560*c59a5c48SFrançois Tigeot UCHAR ucVCEClockInfoIndex; 561*c59a5c48SFrançois Tigeot }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record; 562*c59a5c48SFrançois Tigeot 563*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table 564*c59a5c48SFrançois Tigeot { 565*c59a5c48SFrançois Tigeot UCHAR numEntries; 566*c59a5c48SFrançois Tigeot ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries[1]; 567*c59a5c48SFrançois Tigeot }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table; 568*c59a5c48SFrançois Tigeot 569*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_VCE_State_Record 570*c59a5c48SFrançois Tigeot { 571*c59a5c48SFrançois Tigeot UCHAR ucVCEClockInfoIndex; 572*c59a5c48SFrançois Tigeot UCHAR ucClockInfoIndex; //highest 2 bits indicates memory p-states, lower 6bits indicates index to ClockInfoArrary 573*c59a5c48SFrançois Tigeot }ATOM_PPLIB_VCE_State_Record; 574*c59a5c48SFrançois Tigeot 575*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_VCE_State_Table 576*c59a5c48SFrançois Tigeot { 577*c59a5c48SFrançois Tigeot UCHAR numEntries; 578*c59a5c48SFrançois Tigeot ATOM_PPLIB_VCE_State_Record entries[1]; 579*c59a5c48SFrançois Tigeot }ATOM_PPLIB_VCE_State_Table; 580*c59a5c48SFrançois Tigeot 581*c59a5c48SFrançois Tigeot 582*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_VCE_Table 583*c59a5c48SFrançois Tigeot { 584*c59a5c48SFrançois Tigeot UCHAR revid; 585*c59a5c48SFrançois Tigeot // VCEClockInfoArray array; 586*c59a5c48SFrançois Tigeot // ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table limits; 587*c59a5c48SFrançois Tigeot // ATOM_PPLIB_VCE_State_Table states; 588*c59a5c48SFrançois Tigeot }ATOM_PPLIB_VCE_Table; 589*c59a5c48SFrançois Tigeot 590*c59a5c48SFrançois Tigeot 591*c59a5c48SFrançois Tigeot typedef struct _UVDClockInfo{ 592*c59a5c48SFrançois Tigeot USHORT usVClkLow; 593*c59a5c48SFrançois Tigeot UCHAR ucVClkHigh; 594*c59a5c48SFrançois Tigeot USHORT usDClkLow; 595*c59a5c48SFrançois Tigeot UCHAR ucDClkHigh; 596*c59a5c48SFrançois Tigeot }UVDClockInfo; 597*c59a5c48SFrançois Tigeot 598*c59a5c48SFrançois Tigeot typedef struct _UVDClockInfoArray{ 599*c59a5c48SFrançois Tigeot UCHAR ucNumEntries; 600*c59a5c48SFrançois Tigeot UVDClockInfo entries[1]; 601*c59a5c48SFrançois Tigeot }UVDClockInfoArray; 602*c59a5c48SFrançois Tigeot 603*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record 604*c59a5c48SFrançois Tigeot { 605*c59a5c48SFrançois Tigeot USHORT usVoltage; 606*c59a5c48SFrançois Tigeot UCHAR ucUVDClockInfoIndex; 607*c59a5c48SFrançois Tigeot }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record; 608*c59a5c48SFrançois Tigeot 609*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table 610*c59a5c48SFrançois Tigeot { 611*c59a5c48SFrançois Tigeot UCHAR numEntries; 612*c59a5c48SFrançois Tigeot ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries[1]; 613*c59a5c48SFrançois Tigeot }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table; 614*c59a5c48SFrançois Tigeot 615*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_UVD_Table 616*c59a5c48SFrançois Tigeot { 617*c59a5c48SFrançois Tigeot UCHAR revid; 618*c59a5c48SFrançois Tigeot // UVDClockInfoArray array; 619*c59a5c48SFrançois Tigeot // ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table limits; 620*c59a5c48SFrançois Tigeot }ATOM_PPLIB_UVD_Table; 621*c59a5c48SFrançois Tigeot 622*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record 623*c59a5c48SFrançois Tigeot { 624*c59a5c48SFrançois Tigeot USHORT usVoltage; 625*c59a5c48SFrançois Tigeot USHORT usSAMClockLow; 626*c59a5c48SFrançois Tigeot UCHAR ucSAMClockHigh; 627*c59a5c48SFrançois Tigeot }ATOM_PPLIB_SAMClk_Voltage_Limit_Record; 628*c59a5c48SFrançois Tigeot 629*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table{ 630*c59a5c48SFrançois Tigeot UCHAR numEntries; 631*c59a5c48SFrançois Tigeot ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[1]; 632*c59a5c48SFrançois Tigeot }ATOM_PPLIB_SAMClk_Voltage_Limit_Table; 633*c59a5c48SFrançois Tigeot 634*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_SAMU_Table 635*c59a5c48SFrançois Tigeot { 636*c59a5c48SFrançois Tigeot UCHAR revid; 637*c59a5c48SFrançois Tigeot ATOM_PPLIB_SAMClk_Voltage_Limit_Table limits; 638*c59a5c48SFrançois Tigeot }ATOM_PPLIB_SAMU_Table; 639*c59a5c48SFrançois Tigeot 640*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Record 641*c59a5c48SFrançois Tigeot { 642*c59a5c48SFrançois Tigeot USHORT usVoltage; 643*c59a5c48SFrançois Tigeot USHORT usACPClockLow; 644*c59a5c48SFrançois Tigeot UCHAR ucACPClockHigh; 645*c59a5c48SFrançois Tigeot }ATOM_PPLIB_ACPClk_Voltage_Limit_Record; 646*c59a5c48SFrançois Tigeot 647*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Table{ 648*c59a5c48SFrançois Tigeot UCHAR numEntries; 649*c59a5c48SFrançois Tigeot ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries[1]; 650*c59a5c48SFrançois Tigeot }ATOM_PPLIB_ACPClk_Voltage_Limit_Table; 651*c59a5c48SFrançois Tigeot 652*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_ACP_Table 653*c59a5c48SFrançois Tigeot { 654*c59a5c48SFrançois Tigeot UCHAR revid; 655*c59a5c48SFrançois Tigeot ATOM_PPLIB_ACPClk_Voltage_Limit_Table limits; 656*c59a5c48SFrançois Tigeot }ATOM_PPLIB_ACP_Table; 657*c59a5c48SFrançois Tigeot 658*c59a5c48SFrançois Tigeot typedef struct _ATOM_PowerTune_Table{ 659*c59a5c48SFrançois Tigeot USHORT usTDP; 660*c59a5c48SFrançois Tigeot USHORT usConfigurableTDP; 661*c59a5c48SFrançois Tigeot USHORT usTDC; 662*c59a5c48SFrançois Tigeot USHORT usBatteryPowerLimit; 663*c59a5c48SFrançois Tigeot USHORT usSmallPowerLimit; 664*c59a5c48SFrançois Tigeot USHORT usLowCACLeakage; 665*c59a5c48SFrançois Tigeot USHORT usHighCACLeakage; 666*c59a5c48SFrançois Tigeot }ATOM_PowerTune_Table; 667*c59a5c48SFrançois Tigeot 668*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERTUNE_Table 669*c59a5c48SFrançois Tigeot { 670*c59a5c48SFrançois Tigeot UCHAR revid; 671*c59a5c48SFrançois Tigeot ATOM_PowerTune_Table power_tune_table; 672*c59a5c48SFrançois Tigeot }ATOM_PPLIB_POWERTUNE_Table; 673*c59a5c48SFrançois Tigeot 674*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_POWERTUNE_Table_V1 675*c59a5c48SFrançois Tigeot { 676*c59a5c48SFrançois Tigeot UCHAR revid; 677*c59a5c48SFrançois Tigeot ATOM_PowerTune_Table power_tune_table; 678*c59a5c48SFrançois Tigeot USHORT usMaximumPowerDeliveryLimit; 679*c59a5c48SFrançois Tigeot USHORT usTjMax; 680*c59a5c48SFrançois Tigeot USHORT usReserve[6]; 681*c59a5c48SFrançois Tigeot } ATOM_PPLIB_POWERTUNE_Table_V1; 682*c59a5c48SFrançois Tigeot 683*c59a5c48SFrançois Tigeot #define ATOM_PPM_A_A 1 684*c59a5c48SFrançois Tigeot #define ATOM_PPM_A_I 2 685*c59a5c48SFrançois Tigeot typedef struct _ATOM_PPLIB_PPM_Table 686*c59a5c48SFrançois Tigeot { 687*c59a5c48SFrançois Tigeot UCHAR ucRevId; 688*c59a5c48SFrançois Tigeot UCHAR ucPpmDesign; //A+I or A+A 689*c59a5c48SFrançois Tigeot USHORT usCpuCoreNumber; 690*c59a5c48SFrançois Tigeot ULONG ulPlatformTDP; 691*c59a5c48SFrançois Tigeot ULONG ulSmallACPlatformTDP; 692*c59a5c48SFrançois Tigeot ULONG ulPlatformTDC; 693*c59a5c48SFrançois Tigeot ULONG ulSmallACPlatformTDC; 694*c59a5c48SFrançois Tigeot ULONG ulApuTDP; 695*c59a5c48SFrançois Tigeot ULONG ulDGpuTDP; 696*c59a5c48SFrançois Tigeot ULONG ulDGpuUlvPower; 697*c59a5c48SFrançois Tigeot ULONG ulTjmax; 698*c59a5c48SFrançois Tigeot } ATOM_PPLIB_PPM_Table; 699*c59a5c48SFrançois Tigeot 700*c59a5c48SFrançois Tigeot #pragma pack() 701*c59a5c48SFrançois Tigeot 702*c59a5c48SFrançois Tigeot #endif 703