1 1.5 riastrad /* $NetBSD: atombios.h,v 1.5 2021/12/18 23:45:42 riastradh Exp $ */ 2 1.3 riastrad 3 1.1 riastrad /* 4 1.1 riastrad * Copyright 2006-2007 Advanced Micro Devices, Inc. 5 1.1 riastrad * 6 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining a 7 1.1 riastrad * copy of this software and associated documentation files (the "Software"), 8 1.1 riastrad * to deal in the Software without restriction, including without limitation 9 1.1 riastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 1.1 riastrad * and/or sell copies of the Software, and to permit persons to whom the 11 1.1 riastrad * Software is furnished to do so, subject to the following conditions: 12 1.1 riastrad * 13 1.1 riastrad * The above copyright notice and this permission notice shall be included in 14 1.1 riastrad * all copies or substantial portions of the Software. 15 1.1 riastrad * 16 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 1.1 riastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 1.1 riastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 1.1 riastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 1.1 riastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 1.1 riastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 1.1 riastrad * OTHER DEALINGS IN THE SOFTWARE. 23 1.1 riastrad */ 24 1.1 riastrad 25 1.1 riastrad 26 1.1 riastrad /****************************************************************************/ 27 1.1 riastrad /*Portion I: Definitions shared between VBIOS and Driver */ 28 1.1 riastrad /****************************************************************************/ 29 1.1 riastrad 30 1.1 riastrad 31 1.1 riastrad #ifndef _ATOMBIOS_H 32 1.1 riastrad #define _ATOMBIOS_H 33 1.1 riastrad 34 1.1 riastrad #define ATOM_VERSION_MAJOR 0x00020000 35 1.1 riastrad #define ATOM_VERSION_MINOR 0x00000002 36 1.1 riastrad 37 1.1 riastrad #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR) 38 1.1 riastrad 39 1.1 riastrad /* Endianness should be specified before inclusion, 40 1.1 riastrad * default to little endian 41 1.1 riastrad */ 42 1.1 riastrad #ifndef ATOM_BIG_ENDIAN 43 1.1 riastrad #error Endian not specified 44 1.1 riastrad #endif 45 1.1 riastrad 46 1.1 riastrad #ifdef _H2INC 47 1.1 riastrad #ifndef ULONG 48 1.1 riastrad typedef unsigned long ULONG; 49 1.1 riastrad #endif 50 1.1 riastrad 51 1.1 riastrad #ifndef UCHAR 52 1.1 riastrad typedef unsigned char UCHAR; 53 1.1 riastrad #endif 54 1.1 riastrad 55 1.1 riastrad #ifndef USHORT 56 1.1 riastrad typedef unsigned short USHORT; 57 1.1 riastrad #endif 58 1.1 riastrad #endif 59 1.1 riastrad 60 1.1 riastrad #define ATOM_DAC_A 0 61 1.1 riastrad #define ATOM_DAC_B 1 62 1.1 riastrad #define ATOM_EXT_DAC 2 63 1.1 riastrad 64 1.1 riastrad #define ATOM_CRTC1 0 65 1.1 riastrad #define ATOM_CRTC2 1 66 1.1 riastrad #define ATOM_CRTC3 2 67 1.1 riastrad #define ATOM_CRTC4 3 68 1.1 riastrad #define ATOM_CRTC5 4 69 1.1 riastrad #define ATOM_CRTC6 5 70 1.1 riastrad #define ATOM_CRTC_INVALID 0xFF 71 1.1 riastrad 72 1.1 riastrad #define ATOM_DIGA 0 73 1.1 riastrad #define ATOM_DIGB 1 74 1.1 riastrad 75 1.1 riastrad #define ATOM_PPLL1 0 76 1.1 riastrad #define ATOM_PPLL2 1 77 1.1 riastrad #define ATOM_DCPLL 2 78 1.1 riastrad #define ATOM_PPLL0 2 79 1.1 riastrad #define ATOM_PPLL3 3 80 1.1 riastrad 81 1.1 riastrad #define ATOM_EXT_PLL1 8 82 1.1 riastrad #define ATOM_EXT_PLL2 9 83 1.1 riastrad #define ATOM_EXT_CLOCK 10 84 1.1 riastrad #define ATOM_PPLL_INVALID 0xFF 85 1.1 riastrad 86 1.1 riastrad #define ENCODER_REFCLK_SRC_P1PLL 0 87 1.1 riastrad #define ENCODER_REFCLK_SRC_P2PLL 1 88 1.1 riastrad #define ENCODER_REFCLK_SRC_DCPLL 2 89 1.1 riastrad #define ENCODER_REFCLK_SRC_EXTCLK 3 90 1.1 riastrad #define ENCODER_REFCLK_SRC_INVALID 0xFF 91 1.1 riastrad 92 1.1 riastrad #define ATOM_SCALER1 0 93 1.1 riastrad #define ATOM_SCALER2 1 94 1.1 riastrad 95 1.1 riastrad #define ATOM_SCALER_DISABLE 0 96 1.1 riastrad #define ATOM_SCALER_CENTER 1 97 1.1 riastrad #define ATOM_SCALER_EXPANSION 2 98 1.1 riastrad #define ATOM_SCALER_MULTI_EX 3 99 1.1 riastrad 100 1.1 riastrad #define ATOM_DISABLE 0 101 1.1 riastrad #define ATOM_ENABLE 1 102 1.1 riastrad #define ATOM_LCD_BLOFF (ATOM_DISABLE+2) 103 1.1 riastrad #define ATOM_LCD_BLON (ATOM_ENABLE+2) 104 1.1 riastrad #define ATOM_LCD_BL_BRIGHTNESS_CONTROL (ATOM_ENABLE+3) 105 1.1 riastrad #define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5) 106 1.1 riastrad #define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5) 107 1.1 riastrad #define ATOM_ENCODER_INIT (ATOM_DISABLE+7) 108 1.1 riastrad #define ATOM_INIT (ATOM_DISABLE+7) 109 1.1 riastrad #define ATOM_GET_STATUS (ATOM_DISABLE+8) 110 1.1 riastrad 111 1.1 riastrad #define ATOM_BLANKING 1 112 1.1 riastrad #define ATOM_BLANKING_OFF 0 113 1.1 riastrad 114 1.1 riastrad #define ATOM_CURSOR1 0 115 1.1 riastrad #define ATOM_CURSOR2 1 116 1.1 riastrad 117 1.1 riastrad #define ATOM_ICON1 0 118 1.1 riastrad #define ATOM_ICON2 1 119 1.1 riastrad 120 1.1 riastrad #define ATOM_CRT1 0 121 1.1 riastrad #define ATOM_CRT2 1 122 1.1 riastrad 123 1.1 riastrad #define ATOM_TV_NTSC 1 124 1.1 riastrad #define ATOM_TV_NTSCJ 2 125 1.1 riastrad #define ATOM_TV_PAL 3 126 1.1 riastrad #define ATOM_TV_PALM 4 127 1.1 riastrad #define ATOM_TV_PALCN 5 128 1.1 riastrad #define ATOM_TV_PALN 6 129 1.1 riastrad #define ATOM_TV_PAL60 7 130 1.1 riastrad #define ATOM_TV_SECAM 8 131 1.1 riastrad #define ATOM_TV_CV 16 132 1.1 riastrad 133 1.1 riastrad #define ATOM_DAC1_PS2 1 134 1.1 riastrad #define ATOM_DAC1_CV 2 135 1.1 riastrad #define ATOM_DAC1_NTSC 3 136 1.1 riastrad #define ATOM_DAC1_PAL 4 137 1.1 riastrad 138 1.1 riastrad #define ATOM_DAC2_PS2 ATOM_DAC1_PS2 139 1.1 riastrad #define ATOM_DAC2_CV ATOM_DAC1_CV 140 1.1 riastrad #define ATOM_DAC2_NTSC ATOM_DAC1_NTSC 141 1.1 riastrad #define ATOM_DAC2_PAL ATOM_DAC1_PAL 142 1.1 riastrad 143 1.1 riastrad #define ATOM_PM_ON 0 144 1.1 riastrad #define ATOM_PM_STANDBY 1 145 1.1 riastrad #define ATOM_PM_SUSPEND 2 146 1.1 riastrad #define ATOM_PM_OFF 3 147 1.1 riastrad 148 1.1 riastrad /* Bit0:{=0:single, =1:dual}, 149 1.1 riastrad Bit1 {=0:666RGB, =1:888RGB}, 150 1.1 riastrad Bit2:3:{Grey level} 151 1.1 riastrad Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}*/ 152 1.1 riastrad 153 1.1 riastrad #define ATOM_PANEL_MISC_DUAL 0x00000001 154 1.1 riastrad #define ATOM_PANEL_MISC_888RGB 0x00000002 155 1.1 riastrad #define ATOM_PANEL_MISC_GREY_LEVEL 0x0000000C 156 1.1 riastrad #define ATOM_PANEL_MISC_FPDI 0x00000010 157 1.1 riastrad #define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT 2 158 1.1 riastrad #define ATOM_PANEL_MISC_SPATIAL 0x00000020 159 1.1 riastrad #define ATOM_PANEL_MISC_TEMPORAL 0x00000040 160 1.1 riastrad #define ATOM_PANEL_MISC_API_ENABLED 0x00000080 161 1.1 riastrad 162 1.1 riastrad 163 1.1 riastrad #define MEMTYPE_DDR1 "DDR1" 164 1.1 riastrad #define MEMTYPE_DDR2 "DDR2" 165 1.1 riastrad #define MEMTYPE_DDR3 "DDR3" 166 1.1 riastrad #define MEMTYPE_DDR4 "DDR4" 167 1.1 riastrad 168 1.1 riastrad #define ASIC_BUS_TYPE_PCI "PCI" 169 1.1 riastrad #define ASIC_BUS_TYPE_AGP "AGP" 170 1.1 riastrad #define ASIC_BUS_TYPE_PCIE "PCI_EXPRESS" 171 1.1 riastrad 172 1.1 riastrad /* Maximum size of that FireGL flag string */ 173 1.1 riastrad 174 1.1 riastrad #define ATOM_FIREGL_FLAG_STRING "FGL" //Flag used to enable FireGL Support 175 1.1 riastrad #define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 3 //sizeof( ATOM_FIREGL_FLAG_STRING ) 176 1.1 riastrad 177 1.1 riastrad #define ATOM_FAKE_DESKTOP_STRING "DSK" //Flag used to enable mobile ASIC on Desktop 178 1.1 riastrad #define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 179 1.1 riastrad 180 1.1 riastrad #define ATOM_M54T_FLAG_STRING "M54T" //Flag used to enable M54T Support 181 1.1 riastrad #define ATOM_MAX_SIZE_OF_M54T_FLAG_STRING 4 //sizeof( ATOM_M54T_FLAG_STRING ) 182 1.1 riastrad 183 1.1 riastrad #define HW_ASSISTED_I2C_STATUS_FAILURE 2 184 1.1 riastrad #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 185 1.1 riastrad 186 1.5 riastrad #pragma pack(1) /* BIOS data must use byte alignment */ 187 1.1 riastrad 188 1.1 riastrad /* Define offset to location of ROM header. */ 189 1.1 riastrad 190 1.1 riastrad #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L 191 1.1 riastrad #define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L 192 1.1 riastrad 193 1.1 riastrad #define OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE 0x94 194 1.1 riastrad #define MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE 20 /* including the terminator 0x0! */ 195 1.1 riastrad #define OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f 196 1.1 riastrad #define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x006e 197 1.1 riastrad 198 1.1 riastrad /* Common header for all ROM Data tables. 199 1.1 riastrad Every table pointed _ATOM_MASTER_DATA_TABLE has this common header. 200 1.1 riastrad And the pointer actually points to this header. */ 201 1.1 riastrad 202 1.1 riastrad typedef struct _ATOM_COMMON_TABLE_HEADER 203 1.1 riastrad { 204 1.1 riastrad USHORT usStructureSize; 205 1.1 riastrad UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */ 206 1.1 riastrad UCHAR ucTableContentRevision; /*Change it only when the table needs to change but the firmware */ 207 1.1 riastrad /*Image can't be updated, while Driver needs to carry the new table! */ 208 1.1 riastrad }ATOM_COMMON_TABLE_HEADER; 209 1.1 riastrad 210 1.1 riastrad /****************************************************************************/ 211 1.1 riastrad // Structure stores the ROM header. 212 1.1 riastrad /****************************************************************************/ 213 1.1 riastrad typedef struct _ATOM_ROM_HEADER 214 1.1 riastrad { 215 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 216 1.1 riastrad UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios, 217 1.1 riastrad atombios should init it as "ATOM", don't change the position */ 218 1.1 riastrad USHORT usBiosRuntimeSegmentAddress; 219 1.1 riastrad USHORT usProtectedModeInfoOffset; 220 1.1 riastrad USHORT usConfigFilenameOffset; 221 1.1 riastrad USHORT usCRC_BlockOffset; 222 1.1 riastrad USHORT usBIOS_BootupMessageOffset; 223 1.1 riastrad USHORT usInt10Offset; 224 1.1 riastrad USHORT usPciBusDevInitCode; 225 1.1 riastrad USHORT usIoBaseAddress; 226 1.1 riastrad USHORT usSubsystemVendorID; 227 1.1 riastrad USHORT usSubsystemID; 228 1.1 riastrad USHORT usPCI_InfoOffset; 229 1.1 riastrad USHORT usMasterCommandTableOffset; /*Offset for SW to get all command table offsets, Don't change the position */ 230 1.1 riastrad USHORT usMasterDataTableOffset; /*Offset for SW to get all data table offsets, Don't change the position */ 231 1.1 riastrad UCHAR ucExtendedFunctionCode; 232 1.1 riastrad UCHAR ucReserved; 233 1.1 riastrad }ATOM_ROM_HEADER; 234 1.1 riastrad 235 1.1 riastrad /*==============================Command Table Portion==================================== */ 236 1.1 riastrad 237 1.1 riastrad #ifdef UEFI_BUILD 238 1.1 riastrad #define UTEMP USHORT 239 1.1 riastrad #define USHORT void* 240 1.1 riastrad #endif 241 1.1 riastrad 242 1.1 riastrad /****************************************************************************/ 243 1.1 riastrad // Structures used in Command.mtb 244 1.1 riastrad /****************************************************************************/ 245 1.1 riastrad typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{ 246 1.1 riastrad USHORT ASIC_Init; //Function Table, used by various SW components,latest version 1.1 247 1.1 riastrad USHORT GetDisplaySurfaceSize; //Atomic Table, Used by Bios when enabling HW ICON 248 1.1 riastrad USHORT ASIC_RegistersInit; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 249 1.1 riastrad USHORT VRAM_BlockVenderDetection; //Atomic Table, used only by Bios 250 1.1 riastrad USHORT DIGxEncoderControl; //Only used by Bios 251 1.1 riastrad USHORT MemoryControllerInit; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 252 1.1 riastrad USHORT EnableCRTCMemReq; //Function Table,directly used by various SW components,latest version 2.1 253 1.1 riastrad USHORT MemoryParamAdjust; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock if needed 254 1.1 riastrad USHORT DVOEncoderControl; //Function Table,directly used by various SW components,latest version 1.2 255 1.1 riastrad USHORT GPIOPinControl; //Atomic Table, only used by Bios 256 1.1 riastrad USHORT SetEngineClock; //Function Table,directly used by various SW components,latest version 1.1 257 1.1 riastrad USHORT SetMemoryClock; //Function Table,directly used by various SW components,latest version 1.1 258 1.1 riastrad USHORT SetPixelClock; //Function Table,directly used by various SW components,latest version 1.2 259 1.1 riastrad USHORT EnableDispPowerGating; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 260 1.1 riastrad USHORT ResetMemoryDLL; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 261 1.1 riastrad USHORT ResetMemoryDevice; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 262 1.1 riastrad USHORT MemoryPLLInit; //Atomic Table, used only by Bios 263 1.1 riastrad USHORT AdjustDisplayPll; //Atomic Table, used by various SW componentes. 264 1.1 riastrad USHORT AdjustMemoryController; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 265 1.1 riastrad USHORT EnableASIC_StaticPwrMgt; //Atomic Table, only used by Bios 266 1.1 riastrad USHORT SetUniphyInstance; //Atomic Table, only used by Bios 267 1.1 riastrad USHORT DAC_LoadDetection; //Atomic Table, directly used by various SW components,latest version 1.2 268 1.1 riastrad USHORT LVTMAEncoderControl; //Atomic Table,directly used by various SW components,latest version 1.3 269 1.1 riastrad USHORT HW_Misc_Operation; //Atomic Table, directly used by various SW components,latest version 1.1 270 1.1 riastrad USHORT DAC1EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 271 1.1 riastrad USHORT DAC2EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 272 1.1 riastrad USHORT DVOOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 273 1.1 riastrad USHORT CV1OutputControl; //Atomic Table, Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead 274 1.1 riastrad USHORT GetConditionalGoldenSetting; //Only used by Bios 275 1.1 riastrad USHORT TVEncoderControl; //Function Table,directly used by various SW components,latest version 1.1 276 1.1 riastrad USHORT PatchMCSetting; //only used by BIOS 277 1.1 riastrad USHORT MC_SEQ_Control; //only used by BIOS 278 1.1 riastrad USHORT Gfx_Harvesting; //Atomic Table, Obsolete from Ry6xx, Now only used by BIOS for GFX harvesting 279 1.1 riastrad USHORT EnableScaler; //Atomic Table, used only by Bios 280 1.1 riastrad USHORT BlankCRTC; //Atomic Table, directly used by various SW components,latest version 1.1 281 1.1 riastrad USHORT EnableCRTC; //Atomic Table, directly used by various SW components,latest version 1.1 282 1.1 riastrad USHORT GetPixelClock; //Atomic Table, directly used by various SW components,latest version 1.1 283 1.1 riastrad USHORT EnableVGA_Render; //Function Table,directly used by various SW components,latest version 1.1 284 1.1 riastrad USHORT GetSCLKOverMCLKRatio; //Atomic Table, only used by Bios 285 1.1 riastrad USHORT SetCRTC_Timing; //Atomic Table, directly used by various SW components,latest version 1.1 286 1.1 riastrad USHORT SetCRTC_OverScan; //Atomic Table, used by various SW components,latest version 1.1 287 1.1 riastrad USHORT SetCRTC_Replication; //Atomic Table, used only by Bios 288 1.1 riastrad USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1 289 1.1 riastrad USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios 290 1.1 riastrad USHORT UpdateCRTC_DoubleBufferRegisters; //Atomic Table, used only by Bios 291 1.1 riastrad USHORT LUT_AutoFill; //Atomic Table, only used by Bios 292 1.1 riastrad USHORT EnableHW_IconCursor; //Atomic Table, only used by Bios 293 1.1 riastrad USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1 294 1.1 riastrad USHORT GetEngineClock; //Atomic Table, directly used by various SW components,latest version 1.1 295 1.1 riastrad USHORT SetCRTC_UsingDTDTiming; //Atomic Table, directly used by various SW components,latest version 1.1 296 1.1 riastrad USHORT ExternalEncoderControl; //Atomic Table, directly used by various SW components,latest version 2.1 297 1.1 riastrad USHORT LVTMAOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 298 1.1 riastrad USHORT VRAM_BlockDetectionByStrap; //Atomic Table, used only by Bios 299 1.1 riastrad USHORT MemoryCleanUp; //Atomic Table, only used by Bios 300 1.1 riastrad USHORT ProcessI2cChannelTransaction; //Function Table,only used by Bios 301 1.1 riastrad USHORT WriteOneByteToHWAssistedI2C; //Function Table,indirectly used by various SW components 302 1.1 riastrad USHORT ReadHWAssistedI2CStatus; //Atomic Table, indirectly used by various SW components 303 1.1 riastrad USHORT SpeedFanControl; //Function Table,indirectly used by various SW components,called from ASIC_Init 304 1.1 riastrad USHORT PowerConnectorDetection; //Atomic Table, directly used by various SW components,latest version 1.1 305 1.1 riastrad USHORT MC_Synchronization; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 306 1.1 riastrad USHORT ComputeMemoryEnginePLL; //Atomic Table, indirectly used by various SW components,called from SetMemory/EngineClock 307 1.1 riastrad USHORT MemoryRefreshConversion; //Atomic Table, indirectly used by various SW components,called from SetMemory or SetEngineClock 308 1.1 riastrad USHORT VRAM_GetCurrentInfoBlock; //Atomic Table, used only by Bios 309 1.1 riastrad USHORT DynamicMemorySettings; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 310 1.1 riastrad USHORT MemoryTraining; //Atomic Table, used only by Bios 311 1.1 riastrad USHORT EnableSpreadSpectrumOnPPLL; //Atomic Table, directly used by various SW components,latest version 1.2 312 1.1 riastrad USHORT TMDSAOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 313 1.1 riastrad USHORT SetVoltage; //Function Table,directly and/or indirectly used by various SW components,latest version 1.1 314 1.1 riastrad USHORT DAC1OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 315 1.1 riastrad USHORT DAC2OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 316 1.1 riastrad USHORT ComputeMemoryClockParam; //Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C" 317 1.1 riastrad USHORT ClockSource; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 318 1.1 riastrad USHORT MemoryDeviceInit; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 319 1.1 riastrad USHORT GetDispObjectInfo; //Atomic Table, indirectly used by various SW components,called from EnableVGARender 320 1.1 riastrad USHORT DIG1EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 321 1.1 riastrad USHORT DIG2EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 322 1.1 riastrad USHORT DIG1TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 323 1.1 riastrad USHORT DIG2TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 324 1.1 riastrad USHORT ProcessAuxChannelTransaction; //Function Table,only used by Bios 325 1.1 riastrad USHORT DPEncoderService; //Function Table,only used by Bios 326 1.1 riastrad USHORT GetVoltageInfo; //Function Table,only used by Bios since SI 327 1.1 riastrad }ATOM_MASTER_LIST_OF_COMMAND_TABLES; 328 1.1 riastrad 329 1.1 riastrad // For backward compatible 330 1.1 riastrad #define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction 331 1.1 riastrad #define DPTranslatorControl DIG2EncoderControl 332 1.1 riastrad #define UNIPHYTransmitterControl DIG1TransmitterControl 333 1.1 riastrad #define LVTMATransmitterControl DIG2TransmitterControl 334 1.1 riastrad #define SetCRTC_DPM_State GetConditionalGoldenSetting 335 1.1 riastrad #define ASIC_StaticPwrMgtStatusChange SetUniphyInstance 336 1.1 riastrad #define HPDInterruptService ReadHWAssistedI2CStatus 337 1.1 riastrad #define EnableVGA_Access GetSCLKOverMCLKRatio 338 1.1 riastrad #define EnableYUV GetDispObjectInfo 339 1.1 riastrad #define DynamicClockGating EnableDispPowerGating 340 1.1 riastrad #define SetupHWAssistedI2CStatus ComputeMemoryClockParam 341 1.1 riastrad 342 1.1 riastrad #define TMDSAEncoderControl PatchMCSetting 343 1.1 riastrad #define LVDSEncoderControl MC_SEQ_Control 344 1.1 riastrad #define LCD1OutputControl HW_Misc_Operation 345 1.1 riastrad #define TV1OutputControl Gfx_Harvesting 346 1.1 riastrad 347 1.1 riastrad typedef struct _ATOM_MASTER_COMMAND_TABLE 348 1.1 riastrad { 349 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 350 1.1 riastrad ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables; 351 1.1 riastrad }ATOM_MASTER_COMMAND_TABLE; 352 1.1 riastrad 353 1.1 riastrad /****************************************************************************/ 354 1.1 riastrad // Structures used in every command table 355 1.1 riastrad /****************************************************************************/ 356 1.1 riastrad typedef struct _ATOM_TABLE_ATTRIBUTE 357 1.1 riastrad { 358 1.1 riastrad #if ATOM_BIG_ENDIAN 359 1.1 riastrad USHORT UpdatedByUtility:1; //[15]=Table updated by utility flag 360 1.1 riastrad USHORT PS_SizeInBytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword), 361 1.1 riastrad USHORT WS_SizeInBytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword), 362 1.1 riastrad #else 363 1.1 riastrad USHORT WS_SizeInBytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword), 364 1.1 riastrad USHORT PS_SizeInBytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword), 365 1.1 riastrad USHORT UpdatedByUtility:1; //[15]=Table updated by utility flag 366 1.1 riastrad #endif 367 1.1 riastrad }ATOM_TABLE_ATTRIBUTE; 368 1.1 riastrad 369 1.1 riastrad typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS 370 1.1 riastrad { 371 1.1 riastrad ATOM_TABLE_ATTRIBUTE sbfAccess; 372 1.1 riastrad USHORT susAccess; 373 1.1 riastrad }ATOM_TABLE_ATTRIBUTE_ACCESS; 374 1.1 riastrad 375 1.1 riastrad /****************************************************************************/ 376 1.1 riastrad // Common header for all command tables. 377 1.1 riastrad // Every table pointed by _ATOM_MASTER_COMMAND_TABLE has this common header. 378 1.1 riastrad // And the pointer actually points to this header. 379 1.1 riastrad /****************************************************************************/ 380 1.1 riastrad typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER 381 1.1 riastrad { 382 1.1 riastrad ATOM_COMMON_TABLE_HEADER CommonHeader; 383 1.1 riastrad ATOM_TABLE_ATTRIBUTE TableAttribute; 384 1.1 riastrad }ATOM_COMMON_ROM_COMMAND_TABLE_HEADER; 385 1.1 riastrad 386 1.1 riastrad /****************************************************************************/ 387 1.1 riastrad // Structures used by ComputeMemoryEnginePLLTable 388 1.1 riastrad /****************************************************************************/ 389 1.1 riastrad #define COMPUTE_MEMORY_PLL_PARAM 1 390 1.1 riastrad #define COMPUTE_ENGINE_PLL_PARAM 2 391 1.1 riastrad #define ADJUST_MC_SETTING_PARAM 3 392 1.1 riastrad 393 1.1 riastrad /****************************************************************************/ 394 1.1 riastrad // Structures used by AdjustMemoryControllerTable 395 1.1 riastrad /****************************************************************************/ 396 1.1 riastrad typedef struct _ATOM_ADJUST_MEMORY_CLOCK_FREQ 397 1.1 riastrad { 398 1.1 riastrad #if ATOM_BIG_ENDIAN 399 1.1 riastrad ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block 400 1.1 riastrad ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] 401 1.1 riastrad ULONG ulClockFreq:24; 402 1.1 riastrad #else 403 1.1 riastrad ULONG ulClockFreq:24; 404 1.1 riastrad ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] 405 1.1 riastrad ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block 406 1.1 riastrad #endif 407 1.1 riastrad }ATOM_ADJUST_MEMORY_CLOCK_FREQ; 408 1.1 riastrad #define POINTER_RETURN_FLAG 0x80 409 1.1 riastrad 410 1.1 riastrad typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS 411 1.1 riastrad { 412 1.1 riastrad ULONG ulClock; //When returen, it's the re-calculated clock based on given Fb_div Post_Div and ref_div 413 1.1 riastrad UCHAR ucAction; //0:reserved //1:Memory //2:Engine 414 1.1 riastrad UCHAR ucReserved; //may expand to return larger Fbdiv later 415 1.1 riastrad UCHAR ucFbDiv; //return value 416 1.1 riastrad UCHAR ucPostDiv; //return value 417 1.1 riastrad }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS; 418 1.1 riastrad 419 1.1 riastrad typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2 420 1.1 riastrad { 421 1.1 riastrad ULONG ulClock; //When return, [23:0] return real clock 422 1.1 riastrad UCHAR ucAction; //0:reserved;COMPUTE_MEMORY_PLL_PARAM:Memory;COMPUTE_ENGINE_PLL_PARAM:Engine. it return ref_div to be written to register 423 1.1 riastrad USHORT usFbDiv; //return Feedback value to be written to register 424 1.1 riastrad UCHAR ucPostDiv; //return post div to be written to register 425 1.1 riastrad }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2; 426 1.1 riastrad #define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS 427 1.1 riastrad 428 1.1 riastrad 429 1.1 riastrad #define SET_CLOCK_FREQ_MASK 0x00FFFFFF //Clock change tables only take bit [23:0] as the requested clock value 430 1.1 riastrad #define USE_NON_BUS_CLOCK_MASK 0x01000000 //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) 431 1.1 riastrad #define USE_MEMORY_SELF_REFRESH_MASK 0x02000000 //Only applicable to memory clock change, when set, using memory self refresh during clock transition 432 1.1 riastrad #define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04000000 //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change 433 1.1 riastrad #define FIRST_TIME_CHANGE_CLOCK 0x08000000 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup 434 1.1 riastrad #define SKIP_SW_PROGRAM_PLL 0x10000000 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL 435 1.1 riastrad #define USE_SS_ENABLED_PIXEL_CLOCK USE_NON_BUS_CLOCK_MASK 436 1.1 riastrad 437 1.1 riastrad #define b3USE_NON_BUS_CLOCK_MASK 0x01 //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) 438 1.1 riastrad #define b3USE_MEMORY_SELF_REFRESH 0x02 //Only applicable to memory clock change, when set, using memory self refresh during clock transition 439 1.1 riastrad #define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04 //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change 440 1.1 riastrad #define b3FIRST_TIME_CHANGE_CLOCK 0x08 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup 441 1.1 riastrad #define b3SKIP_SW_PROGRAM_PLL 0x10 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL 442 1.1 riastrad 443 1.1 riastrad typedef struct _ATOM_COMPUTE_CLOCK_FREQ 444 1.1 riastrad { 445 1.1 riastrad #if ATOM_BIG_ENDIAN 446 1.1 riastrad ULONG ulComputeClockFlag:8; // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM 447 1.1 riastrad ULONG ulClockFreq:24; // in unit of 10kHz 448 1.1 riastrad #else 449 1.1 riastrad ULONG ulClockFreq:24; // in unit of 10kHz 450 1.1 riastrad ULONG ulComputeClockFlag:8; // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM 451 1.1 riastrad #endif 452 1.1 riastrad }ATOM_COMPUTE_CLOCK_FREQ; 453 1.1 riastrad 454 1.1 riastrad typedef struct _ATOM_S_MPLL_FB_DIVIDER 455 1.1 riastrad { 456 1.1 riastrad USHORT usFbDivFrac; 457 1.1 riastrad USHORT usFbDiv; 458 1.1 riastrad }ATOM_S_MPLL_FB_DIVIDER; 459 1.1 riastrad 460 1.1 riastrad typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 461 1.1 riastrad { 462 1.1 riastrad union 463 1.1 riastrad { 464 1.1 riastrad ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter 465 1.1 riastrad ULONG ulClockParams; //ULONG access for BE 466 1.1 riastrad ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter 467 1.1 riastrad }; 468 1.1 riastrad UCHAR ucRefDiv; //Output Parameter 469 1.1 riastrad UCHAR ucPostDiv; //Output Parameter 470 1.1 riastrad UCHAR ucCntlFlag; //Output Parameter 471 1.1 riastrad UCHAR ucReserved; 472 1.1 riastrad }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3; 473 1.1 riastrad 474 1.1 riastrad // ucCntlFlag 475 1.1 riastrad #define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN 1 476 1.1 riastrad #define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE 2 477 1.1 riastrad #define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE 4 478 1.1 riastrad #define ATOM_PLL_CNTL_FLAG_SPLL_ISPARE_9 8 479 1.1 riastrad 480 1.1 riastrad 481 1.1 riastrad // V4 are only used for APU which PLL outside GPU 482 1.1 riastrad typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 483 1.1 riastrad { 484 1.1 riastrad #if ATOM_BIG_ENDIAN 485 1.1 riastrad ULONG ucPostDiv:8; //return parameter: post divider which is used to program to register directly 486 1.1 riastrad ULONG ulClock:24; //Input= target clock, output = actual clock 487 1.1 riastrad #else 488 1.1 riastrad ULONG ulClock:24; //Input= target clock, output = actual clock 489 1.1 riastrad ULONG ucPostDiv:8; //return parameter: post divider which is used to program to register directly 490 1.1 riastrad #endif 491 1.1 riastrad }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4; 492 1.1 riastrad 493 1.1 riastrad typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5 494 1.1 riastrad { 495 1.1 riastrad union 496 1.1 riastrad { 497 1.1 riastrad ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter 498 1.1 riastrad ULONG ulClockParams; //ULONG access for BE 499 1.1 riastrad ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter 500 1.1 riastrad }; 501 1.1 riastrad UCHAR ucRefDiv; //Output Parameter 502 1.1 riastrad UCHAR ucPostDiv; //Output Parameter 503 1.1 riastrad union 504 1.1 riastrad { 505 1.1 riastrad UCHAR ucCntlFlag; //Output Flags 506 1.1 riastrad UCHAR ucInputFlag; //Input Flags. ucInputFlag[0] - Strobe(1)/Performance(0) mode 507 1.1 riastrad }; 508 1.1 riastrad UCHAR ucReserved; 509 1.1 riastrad }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5; 510 1.1 riastrad 511 1.1 riastrad 512 1.1 riastrad typedef struct _COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6 513 1.1 riastrad { 514 1.1 riastrad ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter 515 1.1 riastrad ULONG ulReserved[2]; 516 1.1 riastrad }COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6; 517 1.1 riastrad 518 1.1 riastrad //ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag 519 1.1 riastrad #define COMPUTE_GPUCLK_INPUT_FLAG_CLK_TYPE_MASK 0x0f 520 1.1 riastrad #define COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK 0x00 521 1.1 riastrad #define COMPUTE_GPUCLK_INPUT_FLAG_SCLK 0x01 522 1.1 riastrad 523 1.1 riastrad typedef struct _COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6 524 1.1 riastrad { 525 1.1 riastrad COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 ulClock; //Output Parameter: ucPostDiv=DFS divider 526 1.1 riastrad ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter: PLL FB divider 527 1.1 riastrad UCHAR ucPllRefDiv; //Output Parameter: PLL ref divider 528 1.1 riastrad UCHAR ucPllPostDiv; //Output Parameter: PLL post divider 529 1.1 riastrad UCHAR ucPllCntlFlag; //Output Flags: control flag 530 1.1 riastrad UCHAR ucReserved; 531 1.1 riastrad }COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6; 532 1.1 riastrad 533 1.1 riastrad //ucPllCntlFlag 534 1.1 riastrad #define SPLL_CNTL_FLAG_VCO_MODE_MASK 0x03 535 1.1 riastrad 536 1.1 riastrad 537 1.1 riastrad // ucInputFlag 538 1.1 riastrad #define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode 539 1.1 riastrad 540 1.1 riastrad // use for ComputeMemoryClockParamTable 541 1.1 riastrad typedef struct _COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1 542 1.1 riastrad { 543 1.1 riastrad union 544 1.1 riastrad { 545 1.1 riastrad ULONG ulClock; 546 1.1 riastrad ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output:UPPER_WORD=FB_DIV_INTEGER, LOWER_WORD=FB_DIV_FRAC shl (16-FB_FRACTION_BITS) 547 1.1 riastrad }; 548 1.1 riastrad UCHAR ucDllSpeed; //Output 549 1.1 riastrad UCHAR ucPostDiv; //Output 550 1.1 riastrad union{ 551 1.1 riastrad UCHAR ucInputFlag; //Input : ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN: 1-StrobeMode, 0-PerformanceMode 552 1.1 riastrad UCHAR ucPllCntlFlag; //Output: 553 1.1 riastrad }; 554 1.1 riastrad UCHAR ucBWCntl; 555 1.1 riastrad }COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1; 556 1.1 riastrad 557 1.1 riastrad // definition of ucInputFlag 558 1.1 riastrad #define MPLL_INPUT_FLAG_STROBE_MODE_EN 0x01 559 1.1 riastrad // definition of ucPllCntlFlag 560 1.1 riastrad #define MPLL_CNTL_FLAG_VCO_MODE_MASK 0x03 561 1.1 riastrad #define MPLL_CNTL_FLAG_BYPASS_DQ_PLL 0x04 562 1.1 riastrad #define MPLL_CNTL_FLAG_QDR_ENABLE 0x08 563 1.1 riastrad #define MPLL_CNTL_FLAG_AD_HALF_RATE 0x10 564 1.1 riastrad 565 1.1 riastrad //MPLL_CNTL_FLAG_BYPASS_AD_PLL has a wrong name, should be BYPASS_DQ_PLL 566 1.1 riastrad #define MPLL_CNTL_FLAG_BYPASS_AD_PLL 0x04 567 1.1 riastrad 568 1.1 riastrad typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER 569 1.1 riastrad { 570 1.1 riastrad ATOM_COMPUTE_CLOCK_FREQ ulClock; 571 1.1 riastrad ULONG ulReserved[2]; 572 1.1 riastrad }DYNAMICE_MEMORY_SETTINGS_PARAMETER; 573 1.1 riastrad 574 1.1 riastrad typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER 575 1.1 riastrad { 576 1.1 riastrad ATOM_COMPUTE_CLOCK_FREQ ulClock; 577 1.1 riastrad ULONG ulMemoryClock; 578 1.1 riastrad ULONG ulReserved; 579 1.1 riastrad }DYNAMICE_ENGINE_SETTINGS_PARAMETER; 580 1.1 riastrad 581 1.1 riastrad /****************************************************************************/ 582 1.1 riastrad // Structures used by SetEngineClockTable 583 1.1 riastrad /****************************************************************************/ 584 1.1 riastrad typedef struct _SET_ENGINE_CLOCK_PARAMETERS 585 1.1 riastrad { 586 1.1 riastrad ULONG ulTargetEngineClock; //In 10Khz unit 587 1.1 riastrad }SET_ENGINE_CLOCK_PARAMETERS; 588 1.1 riastrad 589 1.1 riastrad typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION 590 1.1 riastrad { 591 1.1 riastrad ULONG ulTargetEngineClock; //In 10Khz unit 592 1.1 riastrad COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved; 593 1.1 riastrad }SET_ENGINE_CLOCK_PS_ALLOCATION; 594 1.1 riastrad 595 1.1 riastrad /****************************************************************************/ 596 1.1 riastrad // Structures used by SetMemoryClockTable 597 1.1 riastrad /****************************************************************************/ 598 1.1 riastrad typedef struct _SET_MEMORY_CLOCK_PARAMETERS 599 1.1 riastrad { 600 1.1 riastrad ULONG ulTargetMemoryClock; //In 10Khz unit 601 1.1 riastrad }SET_MEMORY_CLOCK_PARAMETERS; 602 1.1 riastrad 603 1.1 riastrad typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION 604 1.1 riastrad { 605 1.1 riastrad ULONG ulTargetMemoryClock; //In 10Khz unit 606 1.1 riastrad COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved; 607 1.1 riastrad }SET_MEMORY_CLOCK_PS_ALLOCATION; 608 1.1 riastrad 609 1.1 riastrad /****************************************************************************/ 610 1.1 riastrad // Structures used by ASIC_Init.ctb 611 1.1 riastrad /****************************************************************************/ 612 1.1 riastrad typedef struct _ASIC_INIT_PARAMETERS 613 1.1 riastrad { 614 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 615 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 616 1.1 riastrad }ASIC_INIT_PARAMETERS; 617 1.1 riastrad 618 1.1 riastrad typedef struct _ASIC_INIT_PS_ALLOCATION 619 1.1 riastrad { 620 1.1 riastrad ASIC_INIT_PARAMETERS sASICInitClocks; 621 1.1 riastrad SET_ENGINE_CLOCK_PS_ALLOCATION sReserved; //Caller doesn't need to init this structure 622 1.1 riastrad }ASIC_INIT_PS_ALLOCATION; 623 1.1 riastrad 624 1.1 riastrad /****************************************************************************/ 625 1.1 riastrad // Structure used by DynamicClockGatingTable.ctb 626 1.1 riastrad /****************************************************************************/ 627 1.1 riastrad typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS 628 1.1 riastrad { 629 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 630 1.1 riastrad UCHAR ucPadding[3]; 631 1.1 riastrad }DYNAMIC_CLOCK_GATING_PARAMETERS; 632 1.1 riastrad #define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS 633 1.1 riastrad 634 1.1 riastrad /****************************************************************************/ 635 1.1 riastrad // Structure used by EnableDispPowerGatingTable.ctb 636 1.1 riastrad /****************************************************************************/ 637 1.1 riastrad typedef struct _ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1 638 1.1 riastrad { 639 1.1 riastrad UCHAR ucDispPipeId; // ATOM_CRTC1, ATOM_CRTC2, ... 640 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 641 1.1 riastrad UCHAR ucPadding[2]; 642 1.1 riastrad }ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1; 643 1.1 riastrad 644 1.1 riastrad /****************************************************************************/ 645 1.1 riastrad // Structure used by EnableASIC_StaticPwrMgtTable.ctb 646 1.1 riastrad /****************************************************************************/ 647 1.1 riastrad typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS 648 1.1 riastrad { 649 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 650 1.1 riastrad UCHAR ucPadding[3]; 651 1.1 riastrad }ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS; 652 1.1 riastrad #define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS 653 1.1 riastrad 654 1.1 riastrad /****************************************************************************/ 655 1.1 riastrad // Structures used by DAC_LoadDetectionTable.ctb 656 1.1 riastrad /****************************************************************************/ 657 1.1 riastrad typedef struct _DAC_LOAD_DETECTION_PARAMETERS 658 1.1 riastrad { 659 1.1 riastrad USHORT usDeviceID; //{ATOM_DEVICE_CRTx_SUPPORT,ATOM_DEVICE_TVx_SUPPORT,ATOM_DEVICE_CVx_SUPPORT} 660 1.1 riastrad UCHAR ucDacType; //{ATOM_DAC_A,ATOM_DAC_B, ATOM_EXT_DAC} 661 1.1 riastrad UCHAR ucMisc; //Valid only when table revision =1.3 and above 662 1.1 riastrad }DAC_LOAD_DETECTION_PARAMETERS; 663 1.1 riastrad 664 1.1 riastrad // DAC_LOAD_DETECTION_PARAMETERS.ucMisc 665 1.1 riastrad #define DAC_LOAD_MISC_YPrPb 0x01 666 1.1 riastrad 667 1.1 riastrad typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION 668 1.1 riastrad { 669 1.1 riastrad DAC_LOAD_DETECTION_PARAMETERS sDacload; 670 1.1 riastrad ULONG Reserved[2];// Don't set this one, allocation for EXT DAC 671 1.1 riastrad }DAC_LOAD_DETECTION_PS_ALLOCATION; 672 1.1 riastrad 673 1.1 riastrad /****************************************************************************/ 674 1.1 riastrad // Structures used by DAC1EncoderControlTable.ctb and DAC2EncoderControlTable.ctb 675 1.1 riastrad /****************************************************************************/ 676 1.1 riastrad typedef struct _DAC_ENCODER_CONTROL_PARAMETERS 677 1.1 riastrad { 678 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 679 1.1 riastrad UCHAR ucDacStandard; // See definition of ATOM_DACx_xxx, For DEC3.0, bit 7 used as internal flag to indicate DAC2 (==1) or DAC1 (==0) 680 1.1 riastrad UCHAR ucAction; // 0: turn off encoder 681 1.1 riastrad // 1: setup and turn on encoder 682 1.1 riastrad // 7: ATOM_ENCODER_INIT Initialize DAC 683 1.1 riastrad }DAC_ENCODER_CONTROL_PARAMETERS; 684 1.1 riastrad 685 1.1 riastrad #define DAC_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PARAMETERS 686 1.1 riastrad 687 1.1 riastrad /****************************************************************************/ 688 1.1 riastrad // Structures used by DIG1EncoderControlTable 689 1.1 riastrad // DIG2EncoderControlTable 690 1.1 riastrad // ExternalEncoderControlTable 691 1.1 riastrad /****************************************************************************/ 692 1.1 riastrad typedef struct _DIG_ENCODER_CONTROL_PARAMETERS 693 1.1 riastrad { 694 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 695 1.1 riastrad UCHAR ucConfig; 696 1.1 riastrad // [2] Link Select: 697 1.1 riastrad // =0: PHY linkA if bfLane<3 698 1.1 riastrad // =1: PHY linkB if bfLanes<3 699 1.1 riastrad // =0: PHY linkA+B if bfLanes=3 700 1.1 riastrad // [3] Transmitter Sel 701 1.1 riastrad // =0: UNIPHY or PCIEPHY 702 1.1 riastrad // =1: LVTMA 703 1.1 riastrad UCHAR ucAction; // =0: turn off encoder 704 1.1 riastrad // =1: turn on encoder 705 1.1 riastrad UCHAR ucEncoderMode; 706 1.1 riastrad // =0: DP encoder 707 1.1 riastrad // =1: LVDS encoder 708 1.1 riastrad // =2: DVI encoder 709 1.1 riastrad // =3: HDMI encoder 710 1.1 riastrad // =4: SDVO encoder 711 1.1 riastrad UCHAR ucLaneNum; // how many lanes to enable 712 1.1 riastrad UCHAR ucReserved[2]; 713 1.1 riastrad }DIG_ENCODER_CONTROL_PARAMETERS; 714 1.1 riastrad #define DIG_ENCODER_CONTROL_PS_ALLOCATION DIG_ENCODER_CONTROL_PARAMETERS 715 1.1 riastrad #define EXTERNAL_ENCODER_CONTROL_PARAMETER DIG_ENCODER_CONTROL_PARAMETERS 716 1.1 riastrad 717 1.1 riastrad //ucConfig 718 1.1 riastrad #define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01 719 1.1 riastrad #define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00 720 1.1 riastrad #define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01 721 1.1 riastrad #define ATOM_ENCODER_CONFIG_DPLINKRATE_5_40GHZ 0x02 722 1.1 riastrad #define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04 723 1.1 riastrad #define ATOM_ENCODER_CONFIG_LINKA 0x00 724 1.1 riastrad #define ATOM_ENCODER_CONFIG_LINKB 0x04 725 1.1 riastrad #define ATOM_ENCODER_CONFIG_LINKA_B ATOM_TRANSMITTER_CONFIG_LINKA 726 1.1 riastrad #define ATOM_ENCODER_CONFIG_LINKB_A ATOM_ENCODER_CONFIG_LINKB 727 1.1 riastrad #define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK 0x08 728 1.1 riastrad #define ATOM_ENCODER_CONFIG_UNIPHY 0x00 729 1.1 riastrad #define ATOM_ENCODER_CONFIG_LVTMA 0x08 730 1.1 riastrad #define ATOM_ENCODER_CONFIG_TRANSMITTER1 0x00 731 1.1 riastrad #define ATOM_ENCODER_CONFIG_TRANSMITTER2 0x08 732 1.1 riastrad #define ATOM_ENCODER_CONFIG_DIGB 0x80 // VBIOS Internal use, outside SW should set this bit=0 733 1.1 riastrad // ucAction 734 1.1 riastrad // ATOM_ENABLE: Enable Encoder 735 1.1 riastrad // ATOM_DISABLE: Disable Encoder 736 1.1 riastrad 737 1.1 riastrad //ucEncoderMode 738 1.1 riastrad #define ATOM_ENCODER_MODE_DP 0 739 1.1 riastrad #define ATOM_ENCODER_MODE_LVDS 1 740 1.1 riastrad #define ATOM_ENCODER_MODE_DVI 2 741 1.1 riastrad #define ATOM_ENCODER_MODE_HDMI 3 742 1.1 riastrad #define ATOM_ENCODER_MODE_SDVO 4 743 1.1 riastrad #define ATOM_ENCODER_MODE_DP_AUDIO 5 744 1.1 riastrad #define ATOM_ENCODER_MODE_TV 13 745 1.1 riastrad #define ATOM_ENCODER_MODE_CV 14 746 1.1 riastrad #define ATOM_ENCODER_MODE_CRT 15 747 1.1 riastrad #define ATOM_ENCODER_MODE_DVO 16 748 1.1 riastrad #define ATOM_ENCODER_MODE_DP_SST ATOM_ENCODER_MODE_DP // For DP1.2 749 1.1 riastrad #define ATOM_ENCODER_MODE_DP_MST 5 // For DP1.2 750 1.1 riastrad 751 1.1 riastrad typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 752 1.1 riastrad { 753 1.1 riastrad #if ATOM_BIG_ENDIAN 754 1.1 riastrad UCHAR ucReserved1:2; 755 1.1 riastrad UCHAR ucTransmitterSel:2; // =0: UniphyAB, =1: UniphyCD =2: UniphyEF 756 1.1 riastrad UCHAR ucLinkSel:1; // =0: linkA/C/E =1: linkB/D/F 757 1.1 riastrad UCHAR ucReserved:1; 758 1.1 riastrad UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz 759 1.1 riastrad #else 760 1.1 riastrad UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz 761 1.1 riastrad UCHAR ucReserved:1; 762 1.1 riastrad UCHAR ucLinkSel:1; // =0: linkA/C/E =1: linkB/D/F 763 1.1 riastrad UCHAR ucTransmitterSel:2; // =0: UniphyAB, =1: UniphyCD =2: UniphyEF 764 1.1 riastrad UCHAR ucReserved1:2; 765 1.1 riastrad #endif 766 1.1 riastrad }ATOM_DIG_ENCODER_CONFIG_V2; 767 1.1 riastrad 768 1.1 riastrad 769 1.1 riastrad typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2 770 1.1 riastrad { 771 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 772 1.1 riastrad ATOM_DIG_ENCODER_CONFIG_V2 acConfig; 773 1.1 riastrad UCHAR ucAction; 774 1.1 riastrad UCHAR ucEncoderMode; 775 1.1 riastrad // =0: DP encoder 776 1.1 riastrad // =1: LVDS encoder 777 1.1 riastrad // =2: DVI encoder 778 1.1 riastrad // =3: HDMI encoder 779 1.1 riastrad // =4: SDVO encoder 780 1.1 riastrad UCHAR ucLaneNum; // how many lanes to enable 781 1.1 riastrad UCHAR ucStatus; // = DP_LINK_TRAINING_COMPLETE or DP_LINK_TRAINING_INCOMPLETE, only used by VBIOS with command ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 782 1.1 riastrad UCHAR ucReserved; 783 1.1 riastrad }DIG_ENCODER_CONTROL_PARAMETERS_V2; 784 1.1 riastrad 785 1.1 riastrad //ucConfig 786 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK 0x01 787 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_1_62GHZ 0x00 788 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_2_70GHZ 0x01 789 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_LINK_SEL_MASK 0x04 790 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_LINKA 0x00 791 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_LINKB 0x04 792 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK 0x18 793 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1 0x00 794 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2 0x08 795 1.1 riastrad #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3 0x10 796 1.1 riastrad 797 1.1 riastrad // ucAction: 798 1.1 riastrad // ATOM_DISABLE 799 1.1 riastrad // ATOM_ENABLE 800 1.1 riastrad #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START 0x08 801 1.1 riastrad #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 0x09 802 1.1 riastrad #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 0x0a 803 1.1 riastrad #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN3 0x13 804 1.1 riastrad #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE 0x0b 805 1.1 riastrad #define ATOM_ENCODER_CMD_DP_VIDEO_OFF 0x0c 806 1.1 riastrad #define ATOM_ENCODER_CMD_DP_VIDEO_ON 0x0d 807 1.1 riastrad #define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 0x0e 808 1.1 riastrad #define ATOM_ENCODER_CMD_SETUP 0x0f 809 1.1 riastrad #define ATOM_ENCODER_CMD_SETUP_PANEL_MODE 0x10 810 1.1 riastrad 811 1.1 riastrad // ucStatus 812 1.1 riastrad #define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE 0x10 813 1.1 riastrad #define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE 0x00 814 1.1 riastrad 815 1.1 riastrad //ucTableFormatRevision=1 816 1.1 riastrad //ucTableContentRevision=3 817 1.1 riastrad // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver 818 1.1 riastrad typedef struct _ATOM_DIG_ENCODER_CONFIG_V3 819 1.1 riastrad { 820 1.1 riastrad #if ATOM_BIG_ENDIAN 821 1.1 riastrad UCHAR ucReserved1:1; 822 1.1 riastrad UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) 823 1.1 riastrad UCHAR ucReserved:3; 824 1.1 riastrad UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz 825 1.1 riastrad #else 826 1.1 riastrad UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz 827 1.1 riastrad UCHAR ucReserved:3; 828 1.1 riastrad UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) 829 1.1 riastrad UCHAR ucReserved1:1; 830 1.1 riastrad #endif 831 1.1 riastrad }ATOM_DIG_ENCODER_CONFIG_V3; 832 1.1 riastrad 833 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 834 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 835 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 836 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL 0x70 837 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG0_ENCODER 0x00 838 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG1_ENCODER 0x10 839 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG2_ENCODER 0x20 840 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG3_ENCODER 0x30 841 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG4_ENCODER 0x40 842 1.1 riastrad #define ATOM_ENCODER_CONFIG_V3_DIG5_ENCODER 0x50 843 1.1 riastrad 844 1.1 riastrad typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3 845 1.1 riastrad { 846 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 847 1.1 riastrad ATOM_DIG_ENCODER_CONFIG_V3 acConfig; 848 1.1 riastrad UCHAR ucAction; 849 1.1 riastrad union { 850 1.1 riastrad UCHAR ucEncoderMode; 851 1.1 riastrad // =0: DP encoder 852 1.1 riastrad // =1: LVDS encoder 853 1.1 riastrad // =2: DVI encoder 854 1.1 riastrad // =3: HDMI encoder 855 1.1 riastrad // =4: SDVO encoder 856 1.1 riastrad // =5: DP audio 857 1.1 riastrad UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE 858 1.1 riastrad // =0: external DP 859 1.1 riastrad // =1: internal DP2 860 1.1 riastrad // =0x11: internal DP1 for NutMeg/Travis DP translator 861 1.1 riastrad }; 862 1.1 riastrad UCHAR ucLaneNum; // how many lanes to enable 863 1.1 riastrad UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP 864 1.1 riastrad UCHAR ucReserved; 865 1.1 riastrad }DIG_ENCODER_CONTROL_PARAMETERS_V3; 866 1.1 riastrad 867 1.1 riastrad //ucTableFormatRevision=1 868 1.1 riastrad //ucTableContentRevision=4 869 1.1 riastrad // start from NI 870 1.1 riastrad // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver 871 1.1 riastrad typedef struct _ATOM_DIG_ENCODER_CONFIG_V4 872 1.1 riastrad { 873 1.1 riastrad #if ATOM_BIG_ENDIAN 874 1.1 riastrad UCHAR ucReserved1:1; 875 1.1 riastrad UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) 876 1.1 riastrad UCHAR ucReserved:2; 877 1.1 riastrad UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version 878 1.1 riastrad #else 879 1.1 riastrad UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version 880 1.1 riastrad UCHAR ucReserved:2; 881 1.1 riastrad UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) 882 1.1 riastrad UCHAR ucReserved1:1; 883 1.1 riastrad #endif 884 1.1 riastrad }ATOM_DIG_ENCODER_CONFIG_V4; 885 1.1 riastrad 886 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_MASK 0x03 887 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00 888 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01 889 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02 890 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_3_24GHZ 0x03 891 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70 892 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00 893 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10 894 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG2_ENCODER 0x20 895 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30 896 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40 897 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50 898 1.1 riastrad #define ATOM_ENCODER_CONFIG_V4_DIG6_ENCODER 0x60 899 1.1 riastrad 900 1.1 riastrad typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4 901 1.1 riastrad { 902 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 903 1.1 riastrad union{ 904 1.1 riastrad ATOM_DIG_ENCODER_CONFIG_V4 acConfig; 905 1.1 riastrad UCHAR ucConfig; 906 1.1 riastrad }; 907 1.1 riastrad UCHAR ucAction; 908 1.1 riastrad union { 909 1.1 riastrad UCHAR ucEncoderMode; 910 1.1 riastrad // =0: DP encoder 911 1.1 riastrad // =1: LVDS encoder 912 1.1 riastrad // =2: DVI encoder 913 1.1 riastrad // =3: HDMI encoder 914 1.1 riastrad // =4: SDVO encoder 915 1.1 riastrad // =5: DP audio 916 1.1 riastrad UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE 917 1.1 riastrad // =0: external DP 918 1.1 riastrad // =1: internal DP2 919 1.1 riastrad // =0x11: internal DP1 for NutMeg/Travis DP translator 920 1.1 riastrad }; 921 1.1 riastrad UCHAR ucLaneNum; // how many lanes to enable 922 1.1 riastrad UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP 923 1.1 riastrad UCHAR ucHPD_ID; // HPD ID (1-6). =0 means to skip HDP programming. New comparing to previous version 924 1.1 riastrad }DIG_ENCODER_CONTROL_PARAMETERS_V4; 925 1.1 riastrad 926 1.1 riastrad // define ucBitPerColor: 927 1.1 riastrad #define PANEL_BPC_UNDEFINE 0x00 928 1.1 riastrad #define PANEL_6BIT_PER_COLOR 0x01 929 1.1 riastrad #define PANEL_8BIT_PER_COLOR 0x02 930 1.1 riastrad #define PANEL_10BIT_PER_COLOR 0x03 931 1.1 riastrad #define PANEL_12BIT_PER_COLOR 0x04 932 1.1 riastrad #define PANEL_16BIT_PER_COLOR 0x05 933 1.1 riastrad 934 1.1 riastrad //define ucPanelMode 935 1.1 riastrad #define DP_PANEL_MODE_EXTERNAL_DP_MODE 0x00 936 1.1 riastrad #define DP_PANEL_MODE_INTERNAL_DP2_MODE 0x01 937 1.1 riastrad #define DP_PANEL_MODE_INTERNAL_DP1_MODE 0x11 938 1.1 riastrad 939 1.1 riastrad /****************************************************************************/ 940 1.1 riastrad // Structures used by UNIPHYTransmitterControlTable 941 1.1 riastrad // LVTMATransmitterControlTable 942 1.1 riastrad // DVOOutputControlTable 943 1.1 riastrad /****************************************************************************/ 944 1.1 riastrad typedef struct _ATOM_DP_VS_MODE 945 1.1 riastrad { 946 1.1 riastrad UCHAR ucLaneSel; 947 1.1 riastrad UCHAR ucLaneSet; 948 1.1 riastrad }ATOM_DP_VS_MODE; 949 1.1 riastrad 950 1.1 riastrad typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS 951 1.1 riastrad { 952 1.1 riastrad union 953 1.1 riastrad { 954 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 955 1.1 riastrad USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h 956 1.1 riastrad ATOM_DP_VS_MODE asMode; // DP Voltage swing mode 957 1.1 riastrad }; 958 1.1 riastrad UCHAR ucConfig; 959 1.1 riastrad // [0]=0: 4 lane Link, 960 1.1 riastrad // =1: 8 lane Link ( Dual Links TMDS ) 961 1.1 riastrad // [1]=0: InCoherent mode 962 1.1 riastrad // =1: Coherent Mode 963 1.1 riastrad // [2] Link Select: 964 1.1 riastrad // =0: PHY linkA if bfLane<3 965 1.1 riastrad // =1: PHY linkB if bfLanes<3 966 1.1 riastrad // =0: PHY linkA+B if bfLanes=3 967 1.1 riastrad // [5:4]PCIE lane Sel 968 1.1 riastrad // =0: lane 0~3 or 0~7 969 1.1 riastrad // =1: lane 4~7 970 1.1 riastrad // =2: lane 8~11 or 8~15 971 1.1 riastrad // =3: lane 12~15 972 1.1 riastrad UCHAR ucAction; // =0: turn off encoder 973 1.1 riastrad // =1: turn on encoder 974 1.1 riastrad UCHAR ucReserved[4]; 975 1.1 riastrad }DIG_TRANSMITTER_CONTROL_PARAMETERS; 976 1.1 riastrad 977 1.1 riastrad #define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PARAMETERS 978 1.1 riastrad 979 1.1 riastrad //ucInitInfo 980 1.1 riastrad #define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK 0x00ff 981 1.1 riastrad 982 1.1 riastrad //ucConfig 983 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_8LANE_LINK 0x01 984 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_COHERENT 0x02 985 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK 0x04 986 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LINKA 0x00 987 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LINKB 0x04 988 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LINKA_B 0x00 989 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LINKB_A 0x04 990 1.1 riastrad 991 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK 0x08 // only used when ATOM_TRANSMITTER_ACTION_ENABLE 992 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER 0x00 // only used when ATOM_TRANSMITTER_ACTION_ENABLE 993 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER 0x08 // only used when ATOM_TRANSMITTER_ACTION_ENABLE 994 1.1 riastrad 995 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_CLKSRC_MASK 0x30 996 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL 0x00 997 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PCIE 0x20 998 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_CLKSRC_XTALIN 0x30 999 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_SEL_MASK 0xc0 1000 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_0_3 0x00 1001 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_0_7 0x00 1002 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_4_7 0x40 1003 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_8_11 0x80 1004 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_8_15 0x80 1005 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_LANE_12_15 0xc0 1006 1.1 riastrad 1007 1.1 riastrad //ucAction 1008 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_DISABLE 0 1009 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_ENABLE 1 1010 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_LCD_BLOFF 2 1011 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_LCD_BLON 3 1012 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL 4 1013 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_START 5 1014 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_STOP 6 1015 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_INIT 7 1016 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT 8 1017 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT 9 1018 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_SETUP 10 1019 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH 11 1020 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_POWER_ON 12 1021 1.1 riastrad #define ATOM_TRANSMITTER_ACTION_POWER_OFF 13 1022 1.1 riastrad 1023 1.1 riastrad // Following are used for DigTransmitterControlTable ver1.2 1024 1.1 riastrad typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2 1025 1.1 riastrad { 1026 1.1 riastrad #if ATOM_BIG_ENDIAN 1027 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1028 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1029 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1030 1.1 riastrad UCHAR ucReserved:1; 1031 1.1 riastrad UCHAR fDPConnector:1; //bit4=0: DP connector =1: None DP connector 1032 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) 1033 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1034 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1035 1.1 riastrad 1036 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1037 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1038 1.1 riastrad #else 1039 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1040 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1041 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1042 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1043 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) 1044 1.1 riastrad UCHAR fDPConnector:1; //bit4=0: DP connector =1: None DP connector 1045 1.1 riastrad UCHAR ucReserved:1; 1046 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1047 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1048 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1049 1.1 riastrad #endif 1050 1.1 riastrad }ATOM_DIG_TRANSMITTER_CONFIG_V2; 1051 1.1 riastrad 1052 1.1 riastrad //ucConfig 1053 1.1 riastrad //Bit0 1054 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR 0x01 1055 1.1 riastrad 1056 1.1 riastrad //Bit1 1057 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_COHERENT 0x02 1058 1.1 riastrad 1059 1.1 riastrad //Bit2 1060 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK 0x04 1061 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_LINKA 0x00 1062 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_LINKB 0x04 1063 1.1 riastrad 1064 1.1 riastrad // Bit3 1065 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK 0x08 1066 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER 0x00 // only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP 1067 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER 0x08 // only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP 1068 1.1 riastrad 1069 1.1 riastrad // Bit4 1070 1.1 riastrad #define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR 0x10 1071 1.1 riastrad 1072 1.1 riastrad // Bit7:6 1073 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK 0xC0 1074 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1 0x00 //AB 1075 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2 0x40 //CD 1076 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3 0x80 //EF 1077 1.1 riastrad 1078 1.1 riastrad typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2 1079 1.1 riastrad { 1080 1.1 riastrad union 1081 1.1 riastrad { 1082 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 1083 1.1 riastrad USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h 1084 1.1 riastrad ATOM_DP_VS_MODE asMode; // DP Voltage swing mode 1085 1.1 riastrad }; 1086 1.1 riastrad ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig; 1087 1.1 riastrad UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX 1088 1.1 riastrad UCHAR ucReserved[4]; 1089 1.1 riastrad }DIG_TRANSMITTER_CONTROL_PARAMETERS_V2; 1090 1.1 riastrad 1091 1.1 riastrad typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V3 1092 1.1 riastrad { 1093 1.1 riastrad #if ATOM_BIG_ENDIAN 1094 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1095 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1096 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1097 1.1 riastrad UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2 1098 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F 1099 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1100 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1101 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1102 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1103 1.1 riastrad #else 1104 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1105 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1106 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1107 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1108 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F 1109 1.1 riastrad UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2 1110 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1111 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1112 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1113 1.1 riastrad #endif 1114 1.1 riastrad }ATOM_DIG_TRANSMITTER_CONFIG_V3; 1115 1.1 riastrad 1116 1.1 riastrad 1117 1.1 riastrad typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 1118 1.1 riastrad { 1119 1.1 riastrad union 1120 1.1 riastrad { 1121 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 1122 1.1 riastrad USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h 1123 1.1 riastrad ATOM_DP_VS_MODE asMode; // DP Voltage swing mode 1124 1.1 riastrad }; 1125 1.1 riastrad ATOM_DIG_TRANSMITTER_CONFIG_V3 acConfig; 1126 1.1 riastrad UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX 1127 1.1 riastrad UCHAR ucLaneNum; 1128 1.1 riastrad UCHAR ucReserved[3]; 1129 1.1 riastrad }DIG_TRANSMITTER_CONTROL_PARAMETERS_V3; 1130 1.1 riastrad 1131 1.1 riastrad //ucConfig 1132 1.1 riastrad //Bit0 1133 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_DUAL_LINK_CONNECTOR 0x01 1134 1.1 riastrad 1135 1.1 riastrad //Bit1 1136 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_COHERENT 0x02 1137 1.1 riastrad 1138 1.1 riastrad //Bit2 1139 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_LINK_SEL_MASK 0x04 1140 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_LINKA 0x00 1141 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_LINKB 0x04 1142 1.1 riastrad 1143 1.1 riastrad // Bit3 1144 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_ENCODER_SEL_MASK 0x08 1145 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_DIG1_ENCODER 0x00 1146 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_DIG2_ENCODER 0x08 1147 1.1 riastrad 1148 1.1 riastrad // Bit5:4 1149 1.1 riastrad #define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SEL_MASK 0x30 1150 1.1 riastrad #define ATOM_TRASMITTER_CONFIG_V3_P1PLL 0x00 1151 1.1 riastrad #define ATOM_TRASMITTER_CONFIG_V3_P2PLL 0x10 1152 1.1 riastrad #define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SRC_EXT 0x20 1153 1.1 riastrad 1154 1.1 riastrad // Bit7:6 1155 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER_SEL_MASK 0xC0 1156 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER1 0x00 //AB 1157 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2 0x40 //CD 1158 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3 0x80 //EF 1159 1.1 riastrad 1160 1.1 riastrad 1161 1.1 riastrad /****************************************************************************/ 1162 1.1 riastrad // Structures used by UNIPHYTransmitterControlTable V1.4 1163 1.1 riastrad // ASIC Families: NI 1164 1.1 riastrad // ucTableFormatRevision=1 1165 1.1 riastrad // ucTableContentRevision=4 1166 1.1 riastrad /****************************************************************************/ 1167 1.1 riastrad typedef struct _ATOM_DP_VS_MODE_V4 1168 1.1 riastrad { 1169 1.1 riastrad UCHAR ucLaneSel; 1170 1.1 riastrad union 1171 1.1 riastrad { 1172 1.1 riastrad UCHAR ucLaneSet; 1173 1.1 riastrad struct { 1174 1.1 riastrad #if ATOM_BIG_ENDIAN 1175 1.1 riastrad UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 1176 1.1 riastrad UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level 1177 1.1 riastrad UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level 1178 1.1 riastrad #else 1179 1.1 riastrad UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level 1180 1.1 riastrad UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level 1181 1.1 riastrad UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 1182 1.1 riastrad #endif 1183 1.1 riastrad }; 1184 1.1 riastrad }; 1185 1.1 riastrad }ATOM_DP_VS_MODE_V4; 1186 1.1 riastrad 1187 1.1 riastrad typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V4 1188 1.1 riastrad { 1189 1.1 riastrad #if ATOM_BIG_ENDIAN 1190 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1191 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1192 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1193 1.1 riastrad UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New 1194 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F 1195 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1196 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1197 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1198 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1199 1.1 riastrad #else 1200 1.1 riastrad UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector 1201 1.1 riastrad UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) 1202 1.1 riastrad UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E 1203 1.1 riastrad // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F 1204 1.1 riastrad UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F 1205 1.1 riastrad UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New 1206 1.1 riastrad UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) 1207 1.1 riastrad // =1 Dig Transmitter 2 ( Uniphy CD ) 1208 1.1 riastrad // =2 Dig Transmitter 3 ( Uniphy EF ) 1209 1.1 riastrad #endif 1210 1.1 riastrad }ATOM_DIG_TRANSMITTER_CONFIG_V4; 1211 1.1 riastrad 1212 1.1 riastrad typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V4 1213 1.1 riastrad { 1214 1.1 riastrad union 1215 1.1 riastrad { 1216 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 1217 1.1 riastrad USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h 1218 1.1 riastrad ATOM_DP_VS_MODE_V4 asMode; // DP Voltage swing mode Redefined comparing to previous version 1219 1.1 riastrad }; 1220 1.1 riastrad union 1221 1.1 riastrad { 1222 1.1 riastrad ATOM_DIG_TRANSMITTER_CONFIG_V4 acConfig; 1223 1.1 riastrad UCHAR ucConfig; 1224 1.1 riastrad }; 1225 1.1 riastrad UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX 1226 1.1 riastrad UCHAR ucLaneNum; 1227 1.1 riastrad UCHAR ucReserved[3]; 1228 1.1 riastrad }DIG_TRANSMITTER_CONTROL_PARAMETERS_V4; 1229 1.1 riastrad 1230 1.1 riastrad //ucConfig 1231 1.1 riastrad //Bit0 1232 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_DUAL_LINK_CONNECTOR 0x01 1233 1.1 riastrad //Bit1 1234 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_COHERENT 0x02 1235 1.1 riastrad //Bit2 1236 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_LINK_SEL_MASK 0x04 1237 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_LINKA 0x00 1238 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_LINKB 0x04 1239 1.1 riastrad // Bit3 1240 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_ENCODER_SEL_MASK 0x08 1241 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_DIG1_ENCODER 0x00 1242 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_DIG2_ENCODER 0x08 1243 1.1 riastrad // Bit5:4 1244 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SEL_MASK 0x30 1245 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_P1PLL 0x00 1246 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_P2PLL 0x10 1247 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_DCPLL 0x20 // New in _V4 1248 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SRC_EXT 0x30 // Changed comparing to V3 1249 1.1 riastrad // Bit7:6 1250 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER_SEL_MASK 0xC0 1251 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER1 0x00 //AB 1252 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER2 0x40 //CD 1253 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80 //EF 1254 1.1 riastrad 1255 1.1 riastrad 1256 1.1 riastrad typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V5 1257 1.1 riastrad { 1258 1.1 riastrad #if ATOM_BIG_ENDIAN 1259 1.1 riastrad UCHAR ucReservd1:1; 1260 1.1 riastrad UCHAR ucHPDSel:3; 1261 1.1 riastrad UCHAR ucPhyClkSrcId:2; 1262 1.1 riastrad UCHAR ucCoherentMode:1; 1263 1.1 riastrad UCHAR ucReserved:1; 1264 1.1 riastrad #else 1265 1.1 riastrad UCHAR ucReserved:1; 1266 1.1 riastrad UCHAR ucCoherentMode:1; 1267 1.1 riastrad UCHAR ucPhyClkSrcId:2; 1268 1.1 riastrad UCHAR ucHPDSel:3; 1269 1.1 riastrad UCHAR ucReservd1:1; 1270 1.1 riastrad #endif 1271 1.1 riastrad }ATOM_DIG_TRANSMITTER_CONFIG_V5; 1272 1.1 riastrad 1273 1.1 riastrad typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5 1274 1.1 riastrad { 1275 1.1 riastrad USHORT usSymClock; // Encoder Clock in 10kHz,(DP mode)= linkclock/10, (TMDS/LVDS/HDMI)= pixel clock, (HDMI deep color), =pixel clock * deep_color_ratio 1276 1.1 riastrad UCHAR ucPhyId; // 0=UNIPHYA, 1=UNIPHYB, 2=UNIPHYC, 3=UNIPHYD, 4= UNIPHYE 5=UNIPHYF 1277 1.1 riastrad UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_xxx 1278 1.1 riastrad UCHAR ucLaneNum; // indicate lane number 1-8 1279 1.1 riastrad UCHAR ucConnObjId; // Connector Object Id defined in ObjectId.h 1280 1.1 riastrad UCHAR ucDigMode; // indicate DIG mode 1281 1.1 riastrad union{ 1282 1.1 riastrad ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig; 1283 1.1 riastrad UCHAR ucConfig; 1284 1.1 riastrad }; 1285 1.1 riastrad UCHAR ucDigEncoderSel; // indicate DIG front end encoder 1286 1.1 riastrad UCHAR ucDPLaneSet; 1287 1.1 riastrad UCHAR ucReserved; 1288 1.1 riastrad UCHAR ucReserved1; 1289 1.1 riastrad }DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5; 1290 1.1 riastrad 1291 1.1 riastrad //ucPhyId 1292 1.1 riastrad #define ATOM_PHY_ID_UNIPHYA 0 1293 1.1 riastrad #define ATOM_PHY_ID_UNIPHYB 1 1294 1.1 riastrad #define ATOM_PHY_ID_UNIPHYC 2 1295 1.1 riastrad #define ATOM_PHY_ID_UNIPHYD 3 1296 1.1 riastrad #define ATOM_PHY_ID_UNIPHYE 4 1297 1.1 riastrad #define ATOM_PHY_ID_UNIPHYF 5 1298 1.1 riastrad #define ATOM_PHY_ID_UNIPHYG 6 1299 1.1 riastrad 1300 1.1 riastrad // ucDigEncoderSel 1301 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGA_SEL 0x01 1302 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGB_SEL 0x02 1303 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGC_SEL 0x04 1304 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGD_SEL 0x08 1305 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGE_SEL 0x10 1306 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGF_SEL 0x20 1307 1.1 riastrad #define ATOM_TRANMSITTER_V5__DIGG_SEL 0x40 1308 1.1 riastrad 1309 1.1 riastrad // ucDigMode 1310 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_DP 0 1311 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_LVDS 1 1312 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_DVI 2 1313 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_HDMI 3 1314 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_SDVO 4 1315 1.1 riastrad #define ATOM_TRANSMITTER_DIGMODE_V5_DP_MST 5 1316 1.1 riastrad 1317 1.1 riastrad // ucDPLaneSet 1318 1.1 riastrad #define DP_LANE_SET__0DB_0_4V 0x00 1319 1.1 riastrad #define DP_LANE_SET__0DB_0_6V 0x01 1320 1.1 riastrad #define DP_LANE_SET__0DB_0_8V 0x02 1321 1.1 riastrad #define DP_LANE_SET__0DB_1_2V 0x03 1322 1.1 riastrad #define DP_LANE_SET__3_5DB_0_4V 0x08 1323 1.1 riastrad #define DP_LANE_SET__3_5DB_0_6V 0x09 1324 1.1 riastrad #define DP_LANE_SET__3_5DB_0_8V 0x0a 1325 1.1 riastrad #define DP_LANE_SET__6DB_0_4V 0x10 1326 1.1 riastrad #define DP_LANE_SET__6DB_0_6V 0x11 1327 1.1 riastrad #define DP_LANE_SET__9_5DB_0_4V 0x18 1328 1.1 riastrad 1329 1.1 riastrad // ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig; 1330 1.1 riastrad // Bit1 1331 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_COHERENT 0x02 1332 1.1 riastrad 1333 1.1 riastrad // Bit3:2 1334 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_MASK 0x0c 1335 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_SHIFT 0x02 1336 1.1 riastrad 1337 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_P1PLL 0x00 1338 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_P2PLL 0x04 1339 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_P0PLL 0x08 1340 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SRC_EXT 0x0c 1341 1.1 riastrad // Bit6:4 1342 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_MASK 0x70 1343 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_SHIFT 0x04 1344 1.1 riastrad 1345 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_NO_HPD_SEL 0x00 1346 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD1_SEL 0x10 1347 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD2_SEL 0x20 1348 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD3_SEL 0x30 1349 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD4_SEL 0x40 1350 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD5_SEL 0x50 1351 1.1 riastrad #define ATOM_TRANSMITTER_CONFIG_V5_HPD6_SEL 0x60 1352 1.1 riastrad 1353 1.1 riastrad #define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION_V1_5 DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5 1354 1.1 riastrad 1355 1.1 riastrad 1356 1.1 riastrad /****************************************************************************/ 1357 1.1 riastrad // Structures used by ExternalEncoderControlTable V1.3 1358 1.1 riastrad // ASIC Families: Evergreen, Llano, NI 1359 1.1 riastrad // ucTableFormatRevision=1 1360 1.1 riastrad // ucTableContentRevision=3 1361 1.1 riastrad /****************************************************************************/ 1362 1.1 riastrad 1363 1.1 riastrad typedef struct _EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 1364 1.1 riastrad { 1365 1.1 riastrad union{ 1366 1.1 riastrad USHORT usPixelClock; // pixel clock in 10Khz, valid when ucAction=SETUP/ENABLE_OUTPUT 1367 1.1 riastrad USHORT usConnectorId; // connector id, valid when ucAction = INIT 1368 1.1 riastrad }; 1369 1.1 riastrad UCHAR ucConfig; // indicate which encoder, and DP link rate when ucAction = SETUP/ENABLE_OUTPUT 1370 1.1 riastrad UCHAR ucAction; // 1371 1.1 riastrad UCHAR ucEncoderMode; // encoder mode, only used when ucAction = SETUP/ENABLE_OUTPUT 1372 1.1 riastrad UCHAR ucLaneNum; // lane number, only used when ucAction = SETUP/ENABLE_OUTPUT 1373 1.1 riastrad UCHAR ucBitPerColor; // output bit per color, only valid when ucAction = SETUP/ENABLE_OUTPUT and ucEncodeMode= DP 1374 1.1 riastrad UCHAR ucReserved; 1375 1.1 riastrad }EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3; 1376 1.1 riastrad 1377 1.1 riastrad // ucAction 1378 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_DISABLE_OUTPUT 0x00 1379 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_ENABLE_OUTPUT 0x01 1380 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT 0x07 1381 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP 0x0f 1382 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING_OFF 0x10 1383 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING 0x11 1384 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION 0x12 1385 1.1 riastrad #define EXTERNAL_ENCODER_ACTION_V3_DDC_SETUP 0x14 1386 1.1 riastrad 1387 1.1 riastrad // ucConfig 1388 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 1389 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 1390 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 1391 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_5_40GHZ 0x02 1392 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER_SEL_MASK 0x70 1393 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER1 0x00 1394 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER2 0x10 1395 1.1 riastrad #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER3 0x20 1396 1.1 riastrad 1397 1.1 riastrad typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3 1398 1.1 riastrad { 1399 1.1 riastrad EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 sExtEncoder; 1400 1.1 riastrad ULONG ulReserved[2]; 1401 1.1 riastrad }EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3; 1402 1.1 riastrad 1403 1.1 riastrad 1404 1.1 riastrad /****************************************************************************/ 1405 1.1 riastrad // Structures used by DAC1OuputControlTable 1406 1.1 riastrad // DAC2OuputControlTable 1407 1.1 riastrad // LVTMAOutputControlTable (Before DEC30) 1408 1.1 riastrad // TMDSAOutputControlTable (Before DEC30) 1409 1.1 riastrad /****************************************************************************/ 1410 1.1 riastrad typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1411 1.1 riastrad { 1412 1.1 riastrad UCHAR ucAction; // Possible input:ATOM_ENABLE||ATOMDISABLE 1413 1.1 riastrad // When the display is LCD, in addition to above: 1414 1.1 riastrad // ATOM_LCD_BLOFF|| ATOM_LCD_BLON ||ATOM_LCD_BL_BRIGHTNESS_CONTROL||ATOM_LCD_SELFTEST_START|| 1415 1.1 riastrad // ATOM_LCD_SELFTEST_STOP 1416 1.1 riastrad 1417 1.1 riastrad UCHAR aucPadding[3]; // padding to DWORD aligned 1418 1.1 riastrad }DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS; 1419 1.1 riastrad 1420 1.1 riastrad #define DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1421 1.1 riastrad 1422 1.1 riastrad 1423 1.1 riastrad #define CRT1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1424 1.1 riastrad #define CRT1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1425 1.1 riastrad 1426 1.1 riastrad #define CRT2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1427 1.1 riastrad #define CRT2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1428 1.1 riastrad 1429 1.1 riastrad #define CV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1430 1.1 riastrad #define CV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1431 1.1 riastrad 1432 1.1 riastrad #define TV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1433 1.1 riastrad #define TV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1434 1.1 riastrad 1435 1.1 riastrad #define DFP1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1436 1.1 riastrad #define DFP1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1437 1.1 riastrad 1438 1.1 riastrad #define DFP2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1439 1.1 riastrad #define DFP2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1440 1.1 riastrad 1441 1.1 riastrad #define LCD1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1442 1.1 riastrad #define LCD1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION 1443 1.1 riastrad 1444 1.1 riastrad #define DVO_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS 1445 1.1 riastrad #define DVO_OUTPUT_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PS_ALLOCATION 1446 1.1 riastrad #define DVO_OUTPUT_CONTROL_PARAMETERS_V3 DIG_TRANSMITTER_CONTROL_PARAMETERS 1447 1.1 riastrad 1448 1.1 riastrad /****************************************************************************/ 1449 1.1 riastrad // Structures used by BlankCRTCTable 1450 1.1 riastrad /****************************************************************************/ 1451 1.1 riastrad typedef struct _BLANK_CRTC_PARAMETERS 1452 1.1 riastrad { 1453 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1454 1.1 riastrad UCHAR ucBlanking; // ATOM_BLANKING or ATOM_BLANKINGOFF 1455 1.1 riastrad USHORT usBlackColorRCr; 1456 1.1 riastrad USHORT usBlackColorGY; 1457 1.1 riastrad USHORT usBlackColorBCb; 1458 1.1 riastrad }BLANK_CRTC_PARAMETERS; 1459 1.1 riastrad #define BLANK_CRTC_PS_ALLOCATION BLANK_CRTC_PARAMETERS 1460 1.1 riastrad 1461 1.1 riastrad /****************************************************************************/ 1462 1.1 riastrad // Structures used by EnableCRTCTable 1463 1.1 riastrad // EnableCRTCMemReqTable 1464 1.1 riastrad // UpdateCRTC_DoubleBufferRegistersTable 1465 1.1 riastrad /****************************************************************************/ 1466 1.1 riastrad typedef struct _ENABLE_CRTC_PARAMETERS 1467 1.1 riastrad { 1468 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1469 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 1470 1.1 riastrad UCHAR ucPadding[2]; 1471 1.1 riastrad }ENABLE_CRTC_PARAMETERS; 1472 1.1 riastrad #define ENABLE_CRTC_PS_ALLOCATION ENABLE_CRTC_PARAMETERS 1473 1.1 riastrad 1474 1.1 riastrad /****************************************************************************/ 1475 1.1 riastrad // Structures used by SetCRTC_OverScanTable 1476 1.1 riastrad /****************************************************************************/ 1477 1.1 riastrad typedef struct _SET_CRTC_OVERSCAN_PARAMETERS 1478 1.1 riastrad { 1479 1.1 riastrad USHORT usOverscanRight; // right 1480 1.1 riastrad USHORT usOverscanLeft; // left 1481 1.1 riastrad USHORT usOverscanBottom; // bottom 1482 1.1 riastrad USHORT usOverscanTop; // top 1483 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1484 1.1 riastrad UCHAR ucPadding[3]; 1485 1.1 riastrad }SET_CRTC_OVERSCAN_PARAMETERS; 1486 1.1 riastrad #define SET_CRTC_OVERSCAN_PS_ALLOCATION SET_CRTC_OVERSCAN_PARAMETERS 1487 1.1 riastrad 1488 1.1 riastrad /****************************************************************************/ 1489 1.1 riastrad // Structures used by SetCRTC_ReplicationTable 1490 1.1 riastrad /****************************************************************************/ 1491 1.1 riastrad typedef struct _SET_CRTC_REPLICATION_PARAMETERS 1492 1.1 riastrad { 1493 1.1 riastrad UCHAR ucH_Replication; // horizontal replication 1494 1.1 riastrad UCHAR ucV_Replication; // vertical replication 1495 1.1 riastrad UCHAR usCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1496 1.1 riastrad UCHAR ucPadding; 1497 1.1 riastrad }SET_CRTC_REPLICATION_PARAMETERS; 1498 1.1 riastrad #define SET_CRTC_REPLICATION_PS_ALLOCATION SET_CRTC_REPLICATION_PARAMETERS 1499 1.1 riastrad 1500 1.1 riastrad /****************************************************************************/ 1501 1.1 riastrad // Structures used by SelectCRTC_SourceTable 1502 1.1 riastrad /****************************************************************************/ 1503 1.1 riastrad typedef struct _SELECT_CRTC_SOURCE_PARAMETERS 1504 1.1 riastrad { 1505 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1506 1.1 riastrad UCHAR ucDevice; // ATOM_DEVICE_CRT1|ATOM_DEVICE_CRT2|.... 1507 1.1 riastrad UCHAR ucPadding[2]; 1508 1.1 riastrad }SELECT_CRTC_SOURCE_PARAMETERS; 1509 1.1 riastrad #define SELECT_CRTC_SOURCE_PS_ALLOCATION SELECT_CRTC_SOURCE_PARAMETERS 1510 1.1 riastrad 1511 1.1 riastrad typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2 1512 1.1 riastrad { 1513 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 1514 1.1 riastrad UCHAR ucEncoderID; // DAC1/DAC2/TVOUT/DIG1/DIG2/DVO 1515 1.1 riastrad UCHAR ucEncodeMode; // Encoding mode, only valid when using DIG1/DIG2/DVO 1516 1.1 riastrad UCHAR ucPadding; 1517 1.1 riastrad }SELECT_CRTC_SOURCE_PARAMETERS_V2; 1518 1.1 riastrad 1519 1.1 riastrad //ucEncoderID 1520 1.1 riastrad //#define ASIC_INT_DAC1_ENCODER_ID 0x00 1521 1.1 riastrad //#define ASIC_INT_TV_ENCODER_ID 0x02 1522 1.1 riastrad //#define ASIC_INT_DIG1_ENCODER_ID 0x03 1523 1.1 riastrad //#define ASIC_INT_DAC2_ENCODER_ID 0x04 1524 1.1 riastrad //#define ASIC_EXT_TV_ENCODER_ID 0x06 1525 1.1 riastrad //#define ASIC_INT_DVO_ENCODER_ID 0x07 1526 1.1 riastrad //#define ASIC_INT_DIG2_ENCODER_ID 0x09 1527 1.1 riastrad //#define ASIC_EXT_DIG_ENCODER_ID 0x05 1528 1.1 riastrad 1529 1.1 riastrad //ucEncodeMode 1530 1.1 riastrad //#define ATOM_ENCODER_MODE_DP 0 1531 1.1 riastrad //#define ATOM_ENCODER_MODE_LVDS 1 1532 1.1 riastrad //#define ATOM_ENCODER_MODE_DVI 2 1533 1.1 riastrad //#define ATOM_ENCODER_MODE_HDMI 3 1534 1.1 riastrad //#define ATOM_ENCODER_MODE_SDVO 4 1535 1.1 riastrad //#define ATOM_ENCODER_MODE_TV 13 1536 1.1 riastrad //#define ATOM_ENCODER_MODE_CV 14 1537 1.1 riastrad //#define ATOM_ENCODER_MODE_CRT 15 1538 1.1 riastrad 1539 1.1 riastrad /****************************************************************************/ 1540 1.1 riastrad // Structures used by SetPixelClockTable 1541 1.1 riastrad // GetPixelClockTable 1542 1.1 riastrad /****************************************************************************/ 1543 1.1 riastrad //Major revision=1., Minor revision=1 1544 1.1 riastrad typedef struct _PIXEL_CLOCK_PARAMETERS 1545 1.1 riastrad { 1546 1.1 riastrad USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) 1547 1.1 riastrad // 0 means disable PPLL 1548 1.1 riastrad USHORT usRefDiv; // Reference divider 1549 1.1 riastrad USHORT usFbDiv; // feedback divider 1550 1.1 riastrad UCHAR ucPostDiv; // post divider 1551 1.1 riastrad UCHAR ucFracFbDiv; // fractional feedback divider 1552 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 1553 1.1 riastrad UCHAR ucRefDivSrc; // ATOM_PJITTER or ATO_NONPJITTER 1554 1.1 riastrad UCHAR ucCRTC; // Which CRTC uses this Ppll 1555 1.1 riastrad UCHAR ucPadding; 1556 1.1 riastrad }PIXEL_CLOCK_PARAMETERS; 1557 1.1 riastrad 1558 1.1 riastrad //Major revision=1., Minor revision=2, add ucMiscIfno 1559 1.1 riastrad //ucMiscInfo: 1560 1.1 riastrad #define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1 1561 1.1 riastrad #define MISC_DEVICE_INDEX_MASK 0xF0 1562 1.1 riastrad #define MISC_DEVICE_INDEX_SHIFT 4 1563 1.1 riastrad 1564 1.1 riastrad typedef struct _PIXEL_CLOCK_PARAMETERS_V2 1565 1.1 riastrad { 1566 1.1 riastrad USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) 1567 1.1 riastrad // 0 means disable PPLL 1568 1.1 riastrad USHORT usRefDiv; // Reference divider 1569 1.1 riastrad USHORT usFbDiv; // feedback divider 1570 1.1 riastrad UCHAR ucPostDiv; // post divider 1571 1.1 riastrad UCHAR ucFracFbDiv; // fractional feedback divider 1572 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 1573 1.1 riastrad UCHAR ucRefDivSrc; // ATOM_PJITTER or ATO_NONPJITTER 1574 1.1 riastrad UCHAR ucCRTC; // Which CRTC uses this Ppll 1575 1.1 riastrad UCHAR ucMiscInfo; // Different bits for different purpose, bit [7:4] as device index, bit[0]=Force prog 1576 1.1 riastrad }PIXEL_CLOCK_PARAMETERS_V2; 1577 1.1 riastrad 1578 1.1 riastrad //Major revision=1., Minor revision=3, structure/definition change 1579 1.1 riastrad //ucEncoderMode: 1580 1.1 riastrad //ATOM_ENCODER_MODE_DP 1581 1.1 riastrad //ATOM_ENOCDER_MODE_LVDS 1582 1.1 riastrad //ATOM_ENOCDER_MODE_DVI 1583 1.1 riastrad //ATOM_ENOCDER_MODE_HDMI 1584 1.1 riastrad //ATOM_ENOCDER_MODE_SDVO 1585 1.1 riastrad //ATOM_ENCODER_MODE_TV 13 1586 1.1 riastrad //ATOM_ENCODER_MODE_CV 14 1587 1.1 riastrad //ATOM_ENCODER_MODE_CRT 15 1588 1.1 riastrad 1589 1.1 riastrad //ucDVOConfig 1590 1.1 riastrad //#define DVO_ENCODER_CONFIG_RATE_SEL 0x01 1591 1.1 riastrad //#define DVO_ENCODER_CONFIG_DDR_SPEED 0x00 1592 1.1 riastrad //#define DVO_ENCODER_CONFIG_SDR_SPEED 0x01 1593 1.1 riastrad //#define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c 1594 1.1 riastrad //#define DVO_ENCODER_CONFIG_LOW12BIT 0x00 1595 1.1 riastrad //#define DVO_ENCODER_CONFIG_UPPER12BIT 0x04 1596 1.1 riastrad //#define DVO_ENCODER_CONFIG_24BIT 0x08 1597 1.1 riastrad 1598 1.1 riastrad //ucMiscInfo: also changed, see below 1599 1.1 riastrad #define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL 0x01 1600 1.1 riastrad #define PIXEL_CLOCK_MISC_VGA_MODE 0x02 1601 1.1 riastrad #define PIXEL_CLOCK_MISC_CRTC_SEL_MASK 0x04 1602 1.1 riastrad #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1 0x00 1603 1.1 riastrad #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2 0x04 1604 1.1 riastrad #define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK 0x08 1605 1.1 riastrad #define PIXEL_CLOCK_MISC_REF_DIV_SRC 0x10 1606 1.1 riastrad // V1.4 for RoadRunner 1607 1.1 riastrad #define PIXEL_CLOCK_V4_MISC_SS_ENABLE 0x10 1608 1.1 riastrad #define PIXEL_CLOCK_V4_MISC_COHERENT_MODE 0x20 1609 1.1 riastrad 1610 1.1 riastrad 1611 1.1 riastrad typedef struct _PIXEL_CLOCK_PARAMETERS_V3 1612 1.1 riastrad { 1613 1.1 riastrad USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) 1614 1.1 riastrad // 0 means disable PPLL. For VGA PPLL,make sure this value is not 0. 1615 1.1 riastrad USHORT usRefDiv; // Reference divider 1616 1.1 riastrad USHORT usFbDiv; // feedback divider 1617 1.1 riastrad UCHAR ucPostDiv; // post divider 1618 1.1 riastrad UCHAR ucFracFbDiv; // fractional feedback divider 1619 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 1620 1.1 riastrad UCHAR ucTransmitterId; // graphic encoder id defined in objectId.h 1621 1.1 riastrad union 1622 1.1 riastrad { 1623 1.1 riastrad UCHAR ucEncoderMode; // encoder type defined as ATOM_ENCODER_MODE_DP/DVI/HDMI/ 1624 1.1 riastrad UCHAR ucDVOConfig; // when use DVO, need to know SDR/DDR, 12bit or 24bit 1625 1.1 riastrad }; 1626 1.1 riastrad UCHAR ucMiscInfo; // bit[0]=Force program, bit[1]= set pclk for VGA, b[2]= CRTC sel 1627 1.1 riastrad // bit[3]=0:use PPLL for dispclk source, =1: use engine clock for dispclock source 1628 1.1 riastrad // bit[4]=0:use XTALIN as the source of reference divider,=1 use the pre-defined clock as the source of reference divider 1629 1.1 riastrad }PIXEL_CLOCK_PARAMETERS_V3; 1630 1.1 riastrad 1631 1.1 riastrad #define PIXEL_CLOCK_PARAMETERS_LAST PIXEL_CLOCK_PARAMETERS_V2 1632 1.1 riastrad #define GET_PIXEL_CLOCK_PS_ALLOCATION PIXEL_CLOCK_PARAMETERS_LAST 1633 1.1 riastrad 1634 1.1 riastrad typedef struct _PIXEL_CLOCK_PARAMETERS_V5 1635 1.1 riastrad { 1636 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1~6, indicate the CRTC controller to 1637 1.1 riastrad // drive the pixel clock. not used for DCPLL case. 1638 1.1 riastrad union{ 1639 1.1 riastrad UCHAR ucReserved; 1640 1.1 riastrad UCHAR ucFracFbDiv; // [gphan] temporary to prevent build problem. remove it after driver code is changed. 1641 1.1 riastrad }; 1642 1.1 riastrad USHORT usPixelClock; // target the pixel clock to drive the CRTC timing 1643 1.1 riastrad // 0 means disable PPLL/DCPLL. 1644 1.1 riastrad USHORT usFbDiv; // feedback divider integer part. 1645 1.1 riastrad UCHAR ucPostDiv; // post divider. 1646 1.1 riastrad UCHAR ucRefDiv; // Reference divider 1647 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL 1648 1.1 riastrad UCHAR ucTransmitterID; // ASIC encoder id defined in objectId.h, 1649 1.1 riastrad // indicate which graphic encoder will be used. 1650 1.1 riastrad UCHAR ucEncoderMode; // Encoder mode: 1651 1.1 riastrad UCHAR ucMiscInfo; // bit[0]= Force program PPLL 1652 1.1 riastrad // bit[1]= when VGA timing is used. 1653 1.1 riastrad // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp 1654 1.1 riastrad // bit[4]= RefClock source for PPLL. 1655 1.1 riastrad // =0: XTLAIN( default mode ) 1656 1.1 riastrad // =1: other external clock source, which is pre-defined 1657 1.1 riastrad // by VBIOS depend on the feature required. 1658 1.1 riastrad // bit[7:5]: reserved. 1659 1.1 riastrad ULONG ulFbDivDecFrac; // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 ) 1660 1.1 riastrad 1661 1.1 riastrad }PIXEL_CLOCK_PARAMETERS_V5; 1662 1.1 riastrad 1663 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_FORCE_PROG_PPLL 0x01 1664 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_VGA_MODE 0x02 1665 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_HDMI_BPP_MASK 0x0c 1666 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_HDMI_24BPP 0x00 1667 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_HDMI_30BPP 0x04 1668 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_HDMI_32BPP 0x08 1669 1.1 riastrad #define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC 0x10 1670 1.1 riastrad 1671 1.1 riastrad typedef struct _CRTC_PIXEL_CLOCK_FREQ 1672 1.1 riastrad { 1673 1.1 riastrad #if ATOM_BIG_ENDIAN 1674 1.1 riastrad ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to 1675 1.1 riastrad // drive the pixel clock. not used for DCPLL case. 1676 1.1 riastrad ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. 1677 1.1 riastrad // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. 1678 1.1 riastrad #else 1679 1.1 riastrad ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. 1680 1.1 riastrad // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. 1681 1.1 riastrad ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to 1682 1.1 riastrad // drive the pixel clock. not used for DCPLL case. 1683 1.1 riastrad #endif 1684 1.1 riastrad }CRTC_PIXEL_CLOCK_FREQ; 1685 1.1 riastrad 1686 1.1 riastrad typedef struct _PIXEL_CLOCK_PARAMETERS_V6 1687 1.1 riastrad { 1688 1.1 riastrad union{ 1689 1.1 riastrad CRTC_PIXEL_CLOCK_FREQ ulCrtcPclkFreq; // pixel clock and CRTC id frequency 1690 1.1 riastrad ULONG ulDispEngClkFreq; // dispclk frequency 1691 1.1 riastrad }; 1692 1.1 riastrad USHORT usFbDiv; // feedback divider integer part. 1693 1.1 riastrad UCHAR ucPostDiv; // post divider. 1694 1.1 riastrad UCHAR ucRefDiv; // Reference divider 1695 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL 1696 1.1 riastrad UCHAR ucTransmitterID; // ASIC encoder id defined in objectId.h, 1697 1.1 riastrad // indicate which graphic encoder will be used. 1698 1.1 riastrad UCHAR ucEncoderMode; // Encoder mode: 1699 1.1 riastrad UCHAR ucMiscInfo; // bit[0]= Force program PPLL 1700 1.1 riastrad // bit[1]= when VGA timing is used. 1701 1.1 riastrad // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp 1702 1.1 riastrad // bit[4]= RefClock source for PPLL. 1703 1.1 riastrad // =0: XTLAIN( default mode ) 1704 1.1 riastrad // =1: other external clock source, which is pre-defined 1705 1.1 riastrad // by VBIOS depend on the feature required. 1706 1.1 riastrad // bit[7:5]: reserved. 1707 1.1 riastrad ULONG ulFbDivDecFrac; // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 ) 1708 1.1 riastrad 1709 1.1 riastrad }PIXEL_CLOCK_PARAMETERS_V6; 1710 1.1 riastrad 1711 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_FORCE_PROG_PPLL 0x01 1712 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_VGA_MODE 0x02 1713 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_BPP_MASK 0x0c 1714 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_24BPP 0x00 1715 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP 0x04 1716 1.4 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP_V6 0x08 //for V6, the correct defintion for 36bpp should be 2 for 36bpp(2:1) 1717 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP 0x08 1718 1.4 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP_V6 0x04 //for V6, the correct defintion for 30bpp should be 1 for 36bpp(5:4) 1719 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_HDMI_48BPP 0x0c 1720 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_REF_DIV_SRC 0x10 1721 1.1 riastrad #define PIXEL_CLOCK_V6_MISC_GEN_DPREFCLK 0x40 1722 1.1 riastrad 1723 1.1 riastrad typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2 1724 1.1 riastrad { 1725 1.1 riastrad PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput; 1726 1.1 riastrad }GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2; 1727 1.1 riastrad 1728 1.1 riastrad typedef struct _GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2 1729 1.1 riastrad { 1730 1.1 riastrad UCHAR ucStatus; 1731 1.1 riastrad UCHAR ucRefDivSrc; // =1: reference clock source from XTALIN, =0: source from PCIE ref clock 1732 1.1 riastrad UCHAR ucReserved[2]; 1733 1.1 riastrad }GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2; 1734 1.1 riastrad 1735 1.1 riastrad typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3 1736 1.1 riastrad { 1737 1.1 riastrad PIXEL_CLOCK_PARAMETERS_V5 sDispClkInput; 1738 1.1 riastrad }GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3; 1739 1.1 riastrad 1740 1.1 riastrad /****************************************************************************/ 1741 1.1 riastrad // Structures used by AdjustDisplayPllTable 1742 1.1 riastrad /****************************************************************************/ 1743 1.1 riastrad typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS 1744 1.1 riastrad { 1745 1.1 riastrad USHORT usPixelClock; 1746 1.1 riastrad UCHAR ucTransmitterID; 1747 1.1 riastrad UCHAR ucEncodeMode; 1748 1.1 riastrad union 1749 1.1 riastrad { 1750 1.1 riastrad UCHAR ucDVOConfig; //if DVO, need passing link rate and output 12bitlow or 24bit 1751 1.1 riastrad UCHAR ucConfig; //if none DVO, not defined yet 1752 1.1 riastrad }; 1753 1.1 riastrad UCHAR ucReserved[3]; 1754 1.1 riastrad }ADJUST_DISPLAY_PLL_PARAMETERS; 1755 1.1 riastrad 1756 1.1 riastrad #define ADJUST_DISPLAY_CONFIG_SS_ENABLE 0x10 1757 1.1 riastrad #define ADJUST_DISPLAY_PLL_PS_ALLOCATION ADJUST_DISPLAY_PLL_PARAMETERS 1758 1.1 riastrad 1759 1.1 riastrad typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 1760 1.1 riastrad { 1761 1.1 riastrad USHORT usPixelClock; // target pixel clock 1762 1.1 riastrad UCHAR ucTransmitterID; // GPU transmitter id defined in objectid.h 1763 1.1 riastrad UCHAR ucEncodeMode; // encoder mode: CRT, LVDS, DP, TMDS or HDMI 1764 1.1 riastrad UCHAR ucDispPllConfig; // display pll configure parameter defined as following DISPPLL_CONFIG_XXXX 1765 1.1 riastrad UCHAR ucExtTransmitterID; // external encoder id. 1766 1.1 riastrad UCHAR ucReserved[2]; 1767 1.1 riastrad }ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3; 1768 1.1 riastrad 1769 1.1 riastrad // usDispPllConfig v1.2 for RoadRunner 1770 1.1 riastrad #define DISPPLL_CONFIG_DVO_RATE_SEL 0x0001 // need only when ucTransmitterID = DVO 1771 1.1 riastrad #define DISPPLL_CONFIG_DVO_DDR_SPEED 0x0000 // need only when ucTransmitterID = DVO 1772 1.1 riastrad #define DISPPLL_CONFIG_DVO_SDR_SPEED 0x0001 // need only when ucTransmitterID = DVO 1773 1.1 riastrad #define DISPPLL_CONFIG_DVO_OUTPUT_SEL 0x000c // need only when ucTransmitterID = DVO 1774 1.1 riastrad #define DISPPLL_CONFIG_DVO_LOW12BIT 0x0000 // need only when ucTransmitterID = DVO 1775 1.1 riastrad #define DISPPLL_CONFIG_DVO_UPPER12BIT 0x0004 // need only when ucTransmitterID = DVO 1776 1.1 riastrad #define DISPPLL_CONFIG_DVO_24BIT 0x0008 // need only when ucTransmitterID = DVO 1777 1.1 riastrad #define DISPPLL_CONFIG_SS_ENABLE 0x0010 // Only used when ucEncoderMode = DP or LVDS 1778 1.1 riastrad #define DISPPLL_CONFIG_COHERENT_MODE 0x0020 // Only used when ucEncoderMode = TMDS or HDMI 1779 1.1 riastrad #define DISPPLL_CONFIG_DUAL_LINK 0x0040 // Only used when ucEncoderMode = TMDS or LVDS 1780 1.1 riastrad 1781 1.1 riastrad 1782 1.1 riastrad typedef struct _ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 1783 1.1 riastrad { 1784 1.1 riastrad ULONG ulDispPllFreq; // return display PPLL freq which is used to generate the pixclock, and related idclk, symclk etc 1785 1.1 riastrad UCHAR ucRefDiv; // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider and post_div ( if it is not given ) 1786 1.1 riastrad UCHAR ucPostDiv; // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider 1787 1.1 riastrad UCHAR ucReserved[2]; 1788 1.1 riastrad }ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3; 1789 1.1 riastrad 1790 1.1 riastrad typedef struct _ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3 1791 1.1 riastrad { 1792 1.1 riastrad union 1793 1.1 riastrad { 1794 1.1 riastrad ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 sInput; 1795 1.1 riastrad ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 sOutput; 1796 1.1 riastrad }; 1797 1.1 riastrad } ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3; 1798 1.1 riastrad 1799 1.1 riastrad /****************************************************************************/ 1800 1.1 riastrad // Structures used by EnableYUVTable 1801 1.1 riastrad /****************************************************************************/ 1802 1.1 riastrad typedef struct _ENABLE_YUV_PARAMETERS 1803 1.1 riastrad { 1804 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE:Enable YUV or ATOM_DISABLE:Disable YUV (RGB) 1805 1.1 riastrad UCHAR ucCRTC; // Which CRTC needs this YUV or RGB format 1806 1.1 riastrad UCHAR ucPadding[2]; 1807 1.1 riastrad }ENABLE_YUV_PARAMETERS; 1808 1.1 riastrad #define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS 1809 1.1 riastrad 1810 1.1 riastrad /****************************************************************************/ 1811 1.1 riastrad // Structures used by GetMemoryClockTable 1812 1.1 riastrad /****************************************************************************/ 1813 1.1 riastrad typedef struct _GET_MEMORY_CLOCK_PARAMETERS 1814 1.1 riastrad { 1815 1.1 riastrad ULONG ulReturnMemoryClock; // current memory speed in 10KHz unit 1816 1.1 riastrad } GET_MEMORY_CLOCK_PARAMETERS; 1817 1.1 riastrad #define GET_MEMORY_CLOCK_PS_ALLOCATION GET_MEMORY_CLOCK_PARAMETERS 1818 1.1 riastrad 1819 1.1 riastrad /****************************************************************************/ 1820 1.1 riastrad // Structures used by GetEngineClockTable 1821 1.1 riastrad /****************************************************************************/ 1822 1.1 riastrad typedef struct _GET_ENGINE_CLOCK_PARAMETERS 1823 1.1 riastrad { 1824 1.1 riastrad ULONG ulReturnEngineClock; // current engine speed in 10KHz unit 1825 1.1 riastrad } GET_ENGINE_CLOCK_PARAMETERS; 1826 1.1 riastrad #define GET_ENGINE_CLOCK_PS_ALLOCATION GET_ENGINE_CLOCK_PARAMETERS 1827 1.1 riastrad 1828 1.1 riastrad /****************************************************************************/ 1829 1.1 riastrad // Following Structures and constant may be obsolete 1830 1.1 riastrad /****************************************************************************/ 1831 1.1 riastrad //Maxium 8 bytes,the data read in will be placed in the parameter space. 1832 1.1 riastrad //Read operaion successeful when the paramter space is non-zero, otherwise read operation failed 1833 1.1 riastrad typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS 1834 1.1 riastrad { 1835 1.1 riastrad USHORT usPrescale; //Ratio between Engine clock and I2C clock 1836 1.1 riastrad USHORT usVRAMAddress; //Address in Frame Buffer where to pace raw EDID 1837 1.1 riastrad USHORT usStatus; //When use output: lower byte EDID checksum, high byte hardware status 1838 1.1 riastrad //WHen use input: lower byte as 'byte to read':currently limited to 128byte or 1byte 1839 1.1 riastrad UCHAR ucSlaveAddr; //Read from which slave 1840 1.1 riastrad UCHAR ucLineNumber; //Read from which HW assisted line 1841 1.1 riastrad }READ_EDID_FROM_HW_I2C_DATA_PARAMETERS; 1842 1.1 riastrad #define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION READ_EDID_FROM_HW_I2C_DATA_PARAMETERS 1843 1.1 riastrad 1844 1.1 riastrad 1845 1.1 riastrad #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE 0 1846 1.1 riastrad #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES 1 1847 1.1 riastrad #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK 2 1848 1.1 riastrad #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK 3 1849 1.1 riastrad #define ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK 4 1850 1.1 riastrad 1851 1.1 riastrad typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS 1852 1.1 riastrad { 1853 1.1 riastrad USHORT usPrescale; //Ratio between Engine clock and I2C clock 1854 1.1 riastrad USHORT usByteOffset; //Write to which byte 1855 1.1 riastrad //Upper portion of usByteOffset is Format of data 1856 1.1 riastrad //1bytePS+offsetPS 1857 1.1 riastrad //2bytesPS+offsetPS 1858 1.1 riastrad //blockID+offsetPS 1859 1.1 riastrad //blockID+offsetID 1860 1.1 riastrad //blockID+counterID+offsetID 1861 1.1 riastrad UCHAR ucData; //PS data1 1862 1.1 riastrad UCHAR ucStatus; //Status byte 1=success, 2=failure, Also is used as PS data2 1863 1.1 riastrad UCHAR ucSlaveAddr; //Write to which slave 1864 1.1 riastrad UCHAR ucLineNumber; //Write from which HW assisted line 1865 1.1 riastrad }WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS; 1866 1.1 riastrad 1867 1.1 riastrad #define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS 1868 1.1 riastrad 1869 1.1 riastrad typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS 1870 1.1 riastrad { 1871 1.1 riastrad USHORT usPrescale; //Ratio between Engine clock and I2C clock 1872 1.1 riastrad UCHAR ucSlaveAddr; //Write to which slave 1873 1.1 riastrad UCHAR ucLineNumber; //Write from which HW assisted line 1874 1.1 riastrad }SET_UP_HW_I2C_DATA_PARAMETERS; 1875 1.1 riastrad 1876 1.1 riastrad 1877 1.1 riastrad /**************************************************************************/ 1878 1.1 riastrad #define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS 1879 1.1 riastrad 1880 1.1 riastrad 1881 1.1 riastrad /****************************************************************************/ 1882 1.1 riastrad // Structures used by PowerConnectorDetectionTable 1883 1.1 riastrad /****************************************************************************/ 1884 1.1 riastrad typedef struct _POWER_CONNECTOR_DETECTION_PARAMETERS 1885 1.1 riastrad { 1886 1.1 riastrad UCHAR ucPowerConnectorStatus; //Used for return value 0: detected, 1:not detected 1887 1.1 riastrad UCHAR ucPwrBehaviorId; 1888 1.1 riastrad USHORT usPwrBudget; //how much power currently boot to in unit of watt 1889 1.1 riastrad }POWER_CONNECTOR_DETECTION_PARAMETERS; 1890 1.1 riastrad 1891 1.1 riastrad typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION 1892 1.1 riastrad { 1893 1.1 riastrad UCHAR ucPowerConnectorStatus; //Used for return value 0: detected, 1:not detected 1894 1.1 riastrad UCHAR ucReserved; 1895 1.1 riastrad USHORT usPwrBudget; //how much power currently boot to in unit of watt 1896 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; 1897 1.1 riastrad }POWER_CONNECTOR_DETECTION_PS_ALLOCATION; 1898 1.1 riastrad 1899 1.1 riastrad /****************************LVDS SS Command Table Definitions**********************/ 1900 1.1 riastrad 1901 1.1 riastrad /****************************************************************************/ 1902 1.1 riastrad // Structures used by EnableSpreadSpectrumOnPPLLTable 1903 1.1 riastrad /****************************************************************************/ 1904 1.1 riastrad typedef struct _ENABLE_LVDS_SS_PARAMETERS 1905 1.1 riastrad { 1906 1.1 riastrad USHORT usSpreadSpectrumPercentage; 1907 1.1 riastrad UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD 1908 1.1 riastrad UCHAR ucSpreadSpectrumStepSize_Delay; //bits3:2 SS_STEP_SIZE; bit 6:4 SS_DELAY 1909 1.1 riastrad UCHAR ucEnable; //ATOM_ENABLE or ATOM_DISABLE 1910 1.1 riastrad UCHAR ucPadding[3]; 1911 1.1 riastrad }ENABLE_LVDS_SS_PARAMETERS; 1912 1.1 riastrad 1913 1.1 riastrad //ucTableFormatRevision=1,ucTableContentRevision=2 1914 1.1 riastrad typedef struct _ENABLE_LVDS_SS_PARAMETERS_V2 1915 1.1 riastrad { 1916 1.1 riastrad USHORT usSpreadSpectrumPercentage; 1917 1.1 riastrad UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD 1918 1.1 riastrad UCHAR ucSpreadSpectrumStep; // 1919 1.1 riastrad UCHAR ucEnable; //ATOM_ENABLE or ATOM_DISABLE 1920 1.1 riastrad UCHAR ucSpreadSpectrumDelay; 1921 1.1 riastrad UCHAR ucSpreadSpectrumRange; 1922 1.1 riastrad UCHAR ucPadding; 1923 1.1 riastrad }ENABLE_LVDS_SS_PARAMETERS_V2; 1924 1.1 riastrad 1925 1.1 riastrad //This new structure is based on ENABLE_LVDS_SS_PARAMETERS but expands to SS on PPLL, so other devices can use SS. 1926 1.1 riastrad typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL 1927 1.1 riastrad { 1928 1.1 riastrad USHORT usSpreadSpectrumPercentage; 1929 1.1 riastrad UCHAR ucSpreadSpectrumType; // Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD 1930 1.1 riastrad UCHAR ucSpreadSpectrumStep; // 1931 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 1932 1.1 riastrad UCHAR ucSpreadSpectrumDelay; 1933 1.1 riastrad UCHAR ucSpreadSpectrumRange; 1934 1.1 riastrad UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2 1935 1.1 riastrad }ENABLE_SPREAD_SPECTRUM_ON_PPLL; 1936 1.1 riastrad 1937 1.1 riastrad typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2 1938 1.1 riastrad { 1939 1.1 riastrad USHORT usSpreadSpectrumPercentage; 1940 1.1 riastrad UCHAR ucSpreadSpectrumType; // Bit[0]: 0-Down Spread,1-Center Spread. 1941 1.1 riastrad // Bit[1]: 1-Ext. 0-Int. 1942 1.1 riastrad // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL 1943 1.1 riastrad // Bits[7:4] reserved 1944 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 1945 1.1 riastrad USHORT usSpreadSpectrumAmount; // Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8] 1946 1.1 riastrad USHORT usSpreadSpectrumStep; // SS_STEP_SIZE_DSFRAC 1947 1.1 riastrad }ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2; 1948 1.1 riastrad 1949 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_DOWN_SPREAD 0x00 1950 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD 0x01 1951 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_EXT_SPREAD 0x02 1952 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_PPLL_SEL_MASK 0x0c 1953 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_P1PLL 0x00 1954 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_P2PLL 0x04 1955 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V2_DCPLL 0x08 1956 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK 0x00FF 1957 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_SHIFT 0 1958 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK 0x0F00 1959 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT 8 1960 1.1 riastrad 1961 1.1 riastrad // Used by DCE5.0 1962 1.1 riastrad typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3 1963 1.1 riastrad { 1964 1.1 riastrad USHORT usSpreadSpectrumAmountFrac; // SS_AMOUNT_DSFRAC New in DCE5.0 1965 1.1 riastrad UCHAR ucSpreadSpectrumType; // Bit[0]: 0-Down Spread,1-Center Spread. 1966 1.1 riastrad // Bit[1]: 1-Ext. 0-Int. 1967 1.1 riastrad // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL 1968 1.1 riastrad // Bits[7:4] reserved 1969 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 1970 1.1 riastrad USHORT usSpreadSpectrumAmount; // Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8] 1971 1.1 riastrad USHORT usSpreadSpectrumStep; // SS_STEP_SIZE_DSFRAC 1972 1.1 riastrad }ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3; 1973 1.1 riastrad 1974 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_DOWN_SPREAD 0x00 1975 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_CENTRE_SPREAD 0x01 1976 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_EXT_SPREAD 0x02 1977 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_PPLL_SEL_MASK 0x0c 1978 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00 1979 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04 1980 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08 1981 1.1 riastrad #define ATOM_PPLL_SS_TYPE_V3_P0PLL ATOM_PPLL_SS_TYPE_V3_DCPLL 1982 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF 1983 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0 1984 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00 1985 1.1 riastrad #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_SHIFT 8 1986 1.1 riastrad 1987 1.1 riastrad #define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL 1988 1.1 riastrad 1989 1.1 riastrad /**************************************************************************/ 1990 1.1 riastrad 1991 1.1 riastrad typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION 1992 1.1 riastrad { 1993 1.1 riastrad PIXEL_CLOCK_PARAMETERS sPCLKInput; 1994 1.1 riastrad ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved;//Caller doesn't need to init this portion 1995 1.1 riastrad }SET_PIXEL_CLOCK_PS_ALLOCATION; 1996 1.1 riastrad 1997 1.1 riastrad #define ENABLE_VGA_RENDER_PS_ALLOCATION SET_PIXEL_CLOCK_PS_ALLOCATION 1998 1.1 riastrad 1999 1.1 riastrad /****************************************************************************/ 2000 1.1 riastrad // Structures used by ### 2001 1.1 riastrad /****************************************************************************/ 2002 1.1 riastrad typedef struct _MEMORY_TRAINING_PARAMETERS 2003 1.1 riastrad { 2004 1.1 riastrad ULONG ulTargetMemoryClock; //In 10Khz unit 2005 1.1 riastrad }MEMORY_TRAINING_PARAMETERS; 2006 1.1 riastrad #define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS 2007 1.1 riastrad 2008 1.1 riastrad 2009 1.1 riastrad /****************************LVDS and other encoder command table definitions **********************/ 2010 1.1 riastrad 2011 1.1 riastrad 2012 1.1 riastrad /****************************************************************************/ 2013 1.1 riastrad // Structures used by LVDSEncoderControlTable (Before DCE30) 2014 1.1 riastrad // LVTMAEncoderControlTable (Before DCE30) 2015 1.1 riastrad // TMDSAEncoderControlTable (Before DCE30) 2016 1.1 riastrad /****************************************************************************/ 2017 1.1 riastrad typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS 2018 1.1 riastrad { 2019 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 2020 1.1 riastrad UCHAR ucMisc; // bit0=0: Enable single link 2021 1.1 riastrad // =1: Enable dual link 2022 1.1 riastrad // Bit1=0: 666RGB 2023 1.1 riastrad // =1: 888RGB 2024 1.1 riastrad UCHAR ucAction; // 0: turn off encoder 2025 1.1 riastrad // 1: setup and turn on encoder 2026 1.1 riastrad }LVDS_ENCODER_CONTROL_PARAMETERS; 2027 1.1 riastrad 2028 1.1 riastrad #define LVDS_ENCODER_CONTROL_PS_ALLOCATION LVDS_ENCODER_CONTROL_PARAMETERS 2029 1.1 riastrad 2030 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PARAMETERS LVDS_ENCODER_CONTROL_PARAMETERS 2031 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION TMDS1_ENCODER_CONTROL_PARAMETERS 2032 1.1 riastrad 2033 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PARAMETERS TMDS1_ENCODER_CONTROL_PARAMETERS 2034 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION TMDS2_ENCODER_CONTROL_PARAMETERS 2035 1.1 riastrad 2036 1.1 riastrad 2037 1.1 riastrad //ucTableFormatRevision=1,ucTableContentRevision=2 2038 1.1 riastrad typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS_V2 2039 1.1 riastrad { 2040 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 2041 1.4 riastrad UCHAR ucMisc; // see PANEL_ENCODER_MISC_xx defintions below 2042 1.1 riastrad UCHAR ucAction; // 0: turn off encoder 2043 1.1 riastrad // 1: setup and turn on encoder 2044 1.1 riastrad UCHAR ucTruncate; // bit0=0: Disable truncate 2045 1.1 riastrad // =1: Enable truncate 2046 1.1 riastrad // bit4=0: 666RGB 2047 1.1 riastrad // =1: 888RGB 2048 1.1 riastrad UCHAR ucSpatial; // bit0=0: Disable spatial dithering 2049 1.1 riastrad // =1: Enable spatial dithering 2050 1.1 riastrad // bit4=0: 666RGB 2051 1.1 riastrad // =1: 888RGB 2052 1.1 riastrad UCHAR ucTemporal; // bit0=0: Disable temporal dithering 2053 1.1 riastrad // =1: Enable temporal dithering 2054 1.1 riastrad // bit4=0: 666RGB 2055 1.1 riastrad // =1: 888RGB 2056 1.1 riastrad // bit5=0: Gray level 2 2057 1.1 riastrad // =1: Gray level 4 2058 1.1 riastrad UCHAR ucFRC; // bit4=0: 25FRC_SEL pattern E 2059 1.1 riastrad // =1: 25FRC_SEL pattern F 2060 1.1 riastrad // bit6:5=0: 50FRC_SEL pattern A 2061 1.1 riastrad // =1: 50FRC_SEL pattern B 2062 1.1 riastrad // =2: 50FRC_SEL pattern C 2063 1.1 riastrad // =3: 50FRC_SEL pattern D 2064 1.1 riastrad // bit7=0: 75FRC_SEL pattern E 2065 1.1 riastrad // =1: 75FRC_SEL pattern F 2066 1.1 riastrad }LVDS_ENCODER_CONTROL_PARAMETERS_V2; 2067 1.1 riastrad 2068 1.1 riastrad #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 2069 1.1 riastrad 2070 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 2071 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2 2072 1.1 riastrad 2073 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PARAMETERS_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2 2074 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS2_ENCODER_CONTROL_PARAMETERS_V2 2075 1.1 riastrad 2076 1.1 riastrad #define LVDS_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V2 2077 1.1 riastrad #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 2078 1.1 riastrad 2079 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 2080 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS1_ENCODER_CONTROL_PARAMETERS_V3 2081 1.1 riastrad 2082 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 2083 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3 2084 1.1 riastrad 2085 1.1 riastrad /****************************************************************************/ 2086 1.1 riastrad // Structures used by ### 2087 1.1 riastrad /****************************************************************************/ 2088 1.1 riastrad typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS 2089 1.1 riastrad { 2090 1.1 riastrad UCHAR ucEnable; // Enable or Disable External TMDS encoder 2091 1.1 riastrad UCHAR ucMisc; // Bit0=0:Enable Single link;=1:Enable Dual link;Bit1 {=0:666RGB, =1:888RGB} 2092 1.1 riastrad UCHAR ucPadding[2]; 2093 1.1 riastrad }ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS; 2094 1.1 riastrad 2095 1.1 riastrad typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION 2096 1.1 riastrad { 2097 1.1 riastrad ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder; 2098 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion 2099 1.1 riastrad }ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION; 2100 1.1 riastrad 2101 1.1 riastrad #define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 2102 1.1 riastrad 2103 1.1 riastrad typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2 2104 1.1 riastrad { 2105 1.1 riastrad ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder; 2106 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion 2107 1.1 riastrad }ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2; 2108 1.1 riastrad 2109 1.1 riastrad typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION 2110 1.1 riastrad { 2111 1.1 riastrad DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder; 2112 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; 2113 1.1 riastrad }EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION; 2114 1.1 riastrad 2115 1.1 riastrad /****************************************************************************/ 2116 1.1 riastrad // Structures used by DVOEncoderControlTable 2117 1.1 riastrad /****************************************************************************/ 2118 1.1 riastrad //ucTableFormatRevision=1,ucTableContentRevision=3 2119 1.1 riastrad 2120 1.1 riastrad //ucDVOConfig: 2121 1.1 riastrad #define DVO_ENCODER_CONFIG_RATE_SEL 0x01 2122 1.1 riastrad #define DVO_ENCODER_CONFIG_DDR_SPEED 0x00 2123 1.1 riastrad #define DVO_ENCODER_CONFIG_SDR_SPEED 0x01 2124 1.1 riastrad #define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c 2125 1.1 riastrad #define DVO_ENCODER_CONFIG_LOW12BIT 0x00 2126 1.1 riastrad #define DVO_ENCODER_CONFIG_UPPER12BIT 0x04 2127 1.1 riastrad #define DVO_ENCODER_CONFIG_24BIT 0x08 2128 1.1 riastrad 2129 1.1 riastrad typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3 2130 1.1 riastrad { 2131 1.1 riastrad USHORT usPixelClock; 2132 1.1 riastrad UCHAR ucDVOConfig; 2133 1.1 riastrad UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT 2134 1.1 riastrad UCHAR ucReseved[4]; 2135 1.1 riastrad }DVO_ENCODER_CONTROL_PARAMETERS_V3; 2136 1.1 riastrad #define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3 DVO_ENCODER_CONTROL_PARAMETERS_V3 2137 1.1 riastrad 2138 1.1 riastrad typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V1_4 2139 1.1 riastrad { 2140 1.1 riastrad USHORT usPixelClock; 2141 1.1 riastrad UCHAR ucDVOConfig; 2142 1.1 riastrad UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT 2143 1.1 riastrad UCHAR ucBitPerColor; //please refer to definition of PANEL_xBIT_PER_COLOR 2144 1.1 riastrad UCHAR ucReseved[3]; 2145 1.1 riastrad }DVO_ENCODER_CONTROL_PARAMETERS_V1_4; 2146 1.1 riastrad #define DVO_ENCODER_CONTROL_PS_ALLOCATION_V1_4 DVO_ENCODER_CONTROL_PARAMETERS_V1_4 2147 1.1 riastrad 2148 1.1 riastrad 2149 1.1 riastrad //ucTableFormatRevision=1 2150 1.1 riastrad //ucTableContentRevision=3 structure is not changed but usMisc add bit 1 as another input for 2151 1.1 riastrad // bit1=0: non-coherent mode 2152 1.1 riastrad // =1: coherent mode 2153 1.1 riastrad 2154 1.1 riastrad //========================================================================================== 2155 1.1 riastrad //Only change is here next time when changing encoder parameter definitions again! 2156 1.1 riastrad #define LVDS_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 2157 1.1 riastrad #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_LAST LVDS_ENCODER_CONTROL_PARAMETERS_LAST 2158 1.1 riastrad 2159 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 2160 1.1 riastrad #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS1_ENCODER_CONTROL_PARAMETERS_LAST 2161 1.1 riastrad 2162 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 2163 1.1 riastrad #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST 2164 1.1 riastrad 2165 1.1 riastrad #define DVO_ENCODER_CONTROL_PARAMETERS_LAST DVO_ENCODER_CONTROL_PARAMETERS 2166 1.1 riastrad #define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST DVO_ENCODER_CONTROL_PS_ALLOCATION 2167 1.1 riastrad 2168 1.1 riastrad //========================================================================================== 2169 1.1 riastrad #define PANEL_ENCODER_MISC_DUAL 0x01 2170 1.1 riastrad #define PANEL_ENCODER_MISC_COHERENT 0x02 2171 1.1 riastrad #define PANEL_ENCODER_MISC_TMDS_LINKB 0x04 2172 1.1 riastrad #define PANEL_ENCODER_MISC_HDMI_TYPE 0x08 2173 1.1 riastrad 2174 1.1 riastrad #define PANEL_ENCODER_ACTION_DISABLE ATOM_DISABLE 2175 1.1 riastrad #define PANEL_ENCODER_ACTION_ENABLE ATOM_ENABLE 2176 1.1 riastrad #define PANEL_ENCODER_ACTION_COHERENTSEQ (ATOM_ENABLE+1) 2177 1.1 riastrad 2178 1.1 riastrad #define PANEL_ENCODER_TRUNCATE_EN 0x01 2179 1.1 riastrad #define PANEL_ENCODER_TRUNCATE_DEPTH 0x10 2180 1.1 riastrad #define PANEL_ENCODER_SPATIAL_DITHER_EN 0x01 2181 1.1 riastrad #define PANEL_ENCODER_SPATIAL_DITHER_DEPTH 0x10 2182 1.1 riastrad #define PANEL_ENCODER_TEMPORAL_DITHER_EN 0x01 2183 1.1 riastrad #define PANEL_ENCODER_TEMPORAL_DITHER_DEPTH 0x10 2184 1.1 riastrad #define PANEL_ENCODER_TEMPORAL_LEVEL_4 0x20 2185 1.1 riastrad #define PANEL_ENCODER_25FRC_MASK 0x10 2186 1.1 riastrad #define PANEL_ENCODER_25FRC_E 0x00 2187 1.1 riastrad #define PANEL_ENCODER_25FRC_F 0x10 2188 1.1 riastrad #define PANEL_ENCODER_50FRC_MASK 0x60 2189 1.1 riastrad #define PANEL_ENCODER_50FRC_A 0x00 2190 1.1 riastrad #define PANEL_ENCODER_50FRC_B 0x20 2191 1.1 riastrad #define PANEL_ENCODER_50FRC_C 0x40 2192 1.1 riastrad #define PANEL_ENCODER_50FRC_D 0x60 2193 1.1 riastrad #define PANEL_ENCODER_75FRC_MASK 0x80 2194 1.1 riastrad #define PANEL_ENCODER_75FRC_E 0x00 2195 1.1 riastrad #define PANEL_ENCODER_75FRC_F 0x80 2196 1.1 riastrad 2197 1.1 riastrad /****************************************************************************/ 2198 1.1 riastrad // Structures used by SetVoltageTable 2199 1.1 riastrad /****************************************************************************/ 2200 1.1 riastrad #define SET_VOLTAGE_TYPE_ASIC_VDDC 1 2201 1.1 riastrad #define SET_VOLTAGE_TYPE_ASIC_MVDDC 2 2202 1.1 riastrad #define SET_VOLTAGE_TYPE_ASIC_MVDDQ 3 2203 1.1 riastrad #define SET_VOLTAGE_TYPE_ASIC_VDDCI 4 2204 1.1 riastrad #define SET_VOLTAGE_INIT_MODE 5 2205 1.1 riastrad #define SET_VOLTAGE_GET_MAX_VOLTAGE 6 //Gets the Max. voltage for the soldered Asic 2206 1.1 riastrad 2207 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE 0x1 2208 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_SOURCE_A 0x2 2209 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_SOURCE_B 0x4 2210 1.1 riastrad 2211 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE 0x0 2212 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL 0x1 2213 1.1 riastrad #define SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK 0x2 2214 1.1 riastrad 2215 1.1 riastrad typedef struct _SET_VOLTAGE_PARAMETERS 2216 1.1 riastrad { 2217 1.1 riastrad UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ 2218 1.1 riastrad UCHAR ucVoltageMode; // To set all, to set source A or source B or ... 2219 1.1 riastrad UCHAR ucVoltageIndex; // An index to tell which voltage level 2220 1.1 riastrad UCHAR ucReserved; 2221 1.1 riastrad }SET_VOLTAGE_PARAMETERS; 2222 1.1 riastrad 2223 1.1 riastrad typedef struct _SET_VOLTAGE_PARAMETERS_V2 2224 1.1 riastrad { 2225 1.1 riastrad UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ 2226 1.1 riastrad UCHAR ucVoltageMode; // Not used, maybe use for state machine for differen power mode 2227 1.1 riastrad USHORT usVoltageLevel; // real voltage level 2228 1.1 riastrad }SET_VOLTAGE_PARAMETERS_V2; 2229 1.1 riastrad 2230 1.1 riastrad // used by both SetVoltageTable v1.3 and v1.4 2231 1.1 riastrad typedef struct _SET_VOLTAGE_PARAMETERS_V1_3 2232 1.1 riastrad { 2233 1.1 riastrad UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI 2234 1.1 riastrad UCHAR ucVoltageMode; // Indicate action: Set voltage level 2235 1.1 riastrad USHORT usVoltageLevel; // real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) 2236 1.1 riastrad }SET_VOLTAGE_PARAMETERS_V1_3; 2237 1.1 riastrad 2238 1.1 riastrad //ucVoltageType 2239 1.1 riastrad #define VOLTAGE_TYPE_VDDC 1 2240 1.1 riastrad #define VOLTAGE_TYPE_MVDDC 2 2241 1.1 riastrad #define VOLTAGE_TYPE_MVDDQ 3 2242 1.1 riastrad #define VOLTAGE_TYPE_VDDCI 4 2243 1.1 riastrad 2244 1.1 riastrad //SET_VOLTAGE_PARAMETERS_V3.ucVoltageMode 2245 1.1 riastrad #define ATOM_SET_VOLTAGE 0 //Set voltage Level 2246 1.1 riastrad #define ATOM_INIT_VOLTAGE_REGULATOR 3 //Init Regulator 2247 1.1 riastrad #define ATOM_SET_VOLTAGE_PHASE 4 //Set Vregulator Phase, only for SVID/PVID regulator 2248 1.1 riastrad #define ATOM_GET_MAX_VOLTAGE 6 //Get Max Voltage, not used from SetVoltageTable v1.3 2249 1.1 riastrad #define ATOM_GET_VOLTAGE_LEVEL 6 //Get Voltage level from vitual voltage ID, not used for SetVoltage v1.4 2250 1.1 riastrad #define ATOM_GET_LEAKAGE_ID 8 //Get Leakage Voltage Id ( starting from SMU7x IP ), SetVoltage v1.4 2251 1.1 riastrad 2252 1.1 riastrad // define vitual voltage id in usVoltageLevel 2253 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01 2254 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID1 0xff02 2255 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID2 0xff03 2256 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID3 0xff04 2257 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID4 0xff05 2258 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID5 0xff06 2259 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID6 0xff07 2260 1.1 riastrad #define ATOM_VIRTUAL_VOLTAGE_ID7 0xff08 2261 1.1 riastrad 2262 1.1 riastrad typedef struct _SET_VOLTAGE_PS_ALLOCATION 2263 1.1 riastrad { 2264 1.1 riastrad SET_VOLTAGE_PARAMETERS sASICSetVoltage; 2265 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; 2266 1.1 riastrad }SET_VOLTAGE_PS_ALLOCATION; 2267 1.1 riastrad 2268 1.1 riastrad // New Added from SI for GetVoltageInfoTable, input parameter structure 2269 1.1 riastrad typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1 2270 1.1 riastrad { 2271 1.1 riastrad UCHAR ucVoltageType; // Input: To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI 2272 1.1 riastrad UCHAR ucVoltageMode; // Input: Indicate action: Get voltage info 2273 1.1 riastrad USHORT usVoltageLevel; // Input: real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) or Leakage Id 2274 1.1 riastrad ULONG ulReserved; 2275 1.1 riastrad }GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1; 2276 1.1 riastrad 2277 1.1 riastrad // New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_VID 2278 1.1 riastrad typedef struct _GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1 2279 1.1 riastrad { 2280 1.1 riastrad ULONG ulVotlageGpioState; 2281 1.1 riastrad ULONG ulVoltageGPioMask; 2282 1.1 riastrad }GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1; 2283 1.1 riastrad 2284 1.1 riastrad // New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_STATEx_LEAKAGE_VID 2285 1.1 riastrad typedef struct _GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1 2286 1.1 riastrad { 2287 1.1 riastrad USHORT usVoltageLevel; 2288 1.1 riastrad USHORT usVoltageId; // Voltage Id programmed in Voltage Regulator 2289 1.1 riastrad ULONG ulReseved; 2290 1.1 riastrad }GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1; 2291 1.1 riastrad 2292 1.1 riastrad 2293 1.1 riastrad // GetVoltageInfo v1.1 ucVoltageMode 2294 1.1 riastrad #define ATOM_GET_VOLTAGE_VID 0x00 2295 1.1 riastrad #define ATOM_GET_VOTLAGE_INIT_SEQ 0x03 2296 1.1 riastrad #define ATOM_GET_VOLTTAGE_PHASE_PHASE_VID 0x04 2297 1.1 riastrad #define ATOM_GET_VOLTAGE_SVID2 0x07 //Get SVI2 Regulator Info 2298 1.1 riastrad 2299 1.1 riastrad // for SI, this state map to 0xff02 voltage state in Power Play table, which is power boost state 2300 1.1 riastrad #define ATOM_GET_VOLTAGE_STATE0_LEAKAGE_VID 0x10 2301 1.1 riastrad // for SI, this state map to 0xff01 voltage state in Power Play table, which is performance state 2302 1.1 riastrad #define ATOM_GET_VOLTAGE_STATE1_LEAKAGE_VID 0x11 2303 1.1 riastrad 2304 1.1 riastrad #define ATOM_GET_VOLTAGE_STATE2_LEAKAGE_VID 0x12 2305 1.1 riastrad #define ATOM_GET_VOLTAGE_STATE3_LEAKAGE_VID 0x13 2306 1.1 riastrad 2307 1.1 riastrad // New Added from CI Hawaii for GetVoltageInfoTable, input parameter structure 2308 1.1 riastrad typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2 2309 1.1 riastrad { 2310 1.1 riastrad UCHAR ucVoltageType; // Input: To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI 2311 1.1 riastrad UCHAR ucVoltageMode; // Input: Indicate action: Get voltage info 2312 1.1 riastrad USHORT usVoltageLevel; // Input: real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) or Leakage Id 2313 1.1 riastrad ULONG ulSCLKFreq; // Input: when ucVoltageMode= ATOM_GET_VOLTAGE_EVV_VOLTAGE, DPM state SCLK frequency, Define in PPTable SCLK/Voltage dependence table 2314 1.1 riastrad }GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2; 2315 1.1 riastrad 2316 1.1 riastrad // New in GetVoltageInfo v1.2 ucVoltageMode 2317 1.1 riastrad #define ATOM_GET_VOLTAGE_EVV_VOLTAGE 0x09 2318 1.1 riastrad 2319 1.1 riastrad // New Added from CI Hawaii for EVV feature 2320 1.1 riastrad typedef struct _GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2 2321 1.1 riastrad { 2322 1.1 riastrad USHORT usVoltageLevel; // real voltage level in unit of mv 2323 1.1 riastrad USHORT usVoltageId; // Voltage Id programmed in Voltage Regulator 2324 1.1 riastrad ULONG ulReseved; 2325 1.1 riastrad }GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2; 2326 1.1 riastrad 2327 1.1 riastrad /****************************************************************************/ 2328 1.1 riastrad // Structures used by TVEncoderControlTable 2329 1.1 riastrad /****************************************************************************/ 2330 1.1 riastrad typedef struct _TV_ENCODER_CONTROL_PARAMETERS 2331 1.1 riastrad { 2332 1.1 riastrad USHORT usPixelClock; // in 10KHz; for bios convenient 2333 1.1 riastrad UCHAR ucTvStandard; // See definition "ATOM_TV_NTSC ..." 2334 1.1 riastrad UCHAR ucAction; // 0: turn off encoder 2335 1.1 riastrad // 1: setup and turn on encoder 2336 1.1 riastrad }TV_ENCODER_CONTROL_PARAMETERS; 2337 1.1 riastrad 2338 1.1 riastrad typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION 2339 1.1 riastrad { 2340 1.1 riastrad TV_ENCODER_CONTROL_PARAMETERS sTVEncoder; 2341 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; // Don't set this one 2342 1.1 riastrad }TV_ENCODER_CONTROL_PS_ALLOCATION; 2343 1.1 riastrad 2344 1.1 riastrad //==============================Data Table Portion==================================== 2345 1.1 riastrad 2346 1.1 riastrad /****************************************************************************/ 2347 1.1 riastrad // Structure used in Data.mtb 2348 1.1 riastrad /****************************************************************************/ 2349 1.1 riastrad typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES 2350 1.1 riastrad { 2351 1.1 riastrad USHORT UtilityPipeLine; // Offest for the utility to get parser info,Don't change this position! 2352 1.1 riastrad USHORT MultimediaCapabilityInfo; // Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios 2353 1.1 riastrad USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios 2354 1.1 riastrad USHORT StandardVESA_Timing; // Only used by Bios 2355 1.1 riastrad USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4 2356 1.1 riastrad USHORT PaletteData; // Only used by BIOS 2357 1.1 riastrad USHORT LCD_Info; // Shared by various SW components,latest version 1.3, was called LVDS_Info 2358 1.1 riastrad USHORT DIGTransmitterInfo; // Internal used by VBIOS only version 3.1 2359 1.1 riastrad USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 2360 1.1 riastrad USHORT SupportedDevicesInfo; // Will be obsolete from R600 2361 1.1 riastrad USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600 2362 1.1 riastrad USHORT VRAM_UsageByFirmware; // Shared by various SW components,latest version 1.3 will be used from R600 2363 1.1 riastrad USHORT GPIO_Pin_LUT; // Shared by various SW components,latest version 1.1 2364 1.1 riastrad USHORT VESA_ToInternalModeLUT; // Only used by Bios 2365 1.1 riastrad USHORT ComponentVideoInfo; // Shared by various SW components,latest version 2.1 will be used from R600 2366 1.1 riastrad USHORT PowerPlayInfo; // Shared by various SW components,latest version 2.1,new design from R600 2367 1.1 riastrad USHORT CompassionateData; // Will be obsolete from R600 2368 1.1 riastrad USHORT SaveRestoreInfo; // Only used by Bios 2369 1.1 riastrad USHORT PPLL_SS_Info; // Shared by various SW components,latest version 1.2, used to call SS_Info, change to new name because of int ASIC SS info 2370 1.1 riastrad USHORT OemInfo; // Defined and used by external SW, should be obsolete soon 2371 1.1 riastrad USHORT XTMDS_Info; // Will be obsolete from R600 2372 1.1 riastrad USHORT MclkSS_Info; // Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used 2373 1.1 riastrad USHORT Object_Header; // Shared by various SW components,latest version 1.1 2374 1.1 riastrad USHORT IndirectIOAccess; // Only used by Bios,this table position can't change at all!! 2375 1.1 riastrad USHORT MC_InitParameter; // Only used by command table 2376 1.1 riastrad USHORT ASIC_VDDC_Info; // Will be obsolete from R600 2377 1.1 riastrad USHORT ASIC_InternalSS_Info; // New tabel name from R600, used to be called "ASIC_MVDDC_Info" 2378 1.1 riastrad USHORT TV_VideoMode; // Only used by command table 2379 1.1 riastrad USHORT VRAM_Info; // Only used by command table, latest version 1.3 2380 1.1 riastrad USHORT MemoryTrainingInfo; // Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1 2381 1.1 riastrad USHORT IntegratedSystemInfo; // Shared by various SW components 2382 1.1 riastrad USHORT ASIC_ProfilingInfo; // New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600 2383 1.1 riastrad USHORT VoltageObjectInfo; // Shared by various SW components, latest version 1.1 2384 1.1 riastrad USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1 2385 1.1 riastrad }ATOM_MASTER_LIST_OF_DATA_TABLES; 2386 1.1 riastrad 2387 1.1 riastrad typedef struct _ATOM_MASTER_DATA_TABLE 2388 1.1 riastrad { 2389 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2390 1.1 riastrad ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables; 2391 1.1 riastrad }ATOM_MASTER_DATA_TABLE; 2392 1.1 riastrad 2393 1.1 riastrad // For backward compatible 2394 1.1 riastrad #define LVDS_Info LCD_Info 2395 1.1 riastrad #define DAC_Info PaletteData 2396 1.1 riastrad #define TMDS_Info DIGTransmitterInfo 2397 1.1 riastrad 2398 1.1 riastrad /****************************************************************************/ 2399 1.1 riastrad // Structure used in MultimediaCapabilityInfoTable 2400 1.1 riastrad /****************************************************************************/ 2401 1.1 riastrad typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO 2402 1.1 riastrad { 2403 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2404 1.1 riastrad ULONG ulSignature; // HW info table signature string "$ATI" 2405 1.1 riastrad UCHAR ucI2C_Type; // I2C type (normal GP_IO, ImpactTV GP_IO, Dedicated I2C pin, etc) 2406 1.1 riastrad UCHAR ucTV_OutInfo; // Type of TV out supported (3:0) and video out crystal frequency (6:4) and TV data port (7) 2407 1.1 riastrad UCHAR ucVideoPortInfo; // Provides the video port capabilities 2408 1.1 riastrad UCHAR ucHostPortInfo; // Provides host port configuration information 2409 1.1 riastrad }ATOM_MULTIMEDIA_CAPABILITY_INFO; 2410 1.1 riastrad 2411 1.1 riastrad /****************************************************************************/ 2412 1.1 riastrad // Structure used in MultimediaConfigInfoTable 2413 1.1 riastrad /****************************************************************************/ 2414 1.1 riastrad typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO 2415 1.1 riastrad { 2416 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2417 1.1 riastrad ULONG ulSignature; // MM info table signature sting "$MMT" 2418 1.1 riastrad UCHAR ucTunerInfo; // Type of tuner installed on the adapter (4:0) and video input for tuner (7:5) 2419 1.1 riastrad UCHAR ucAudioChipInfo; // List the audio chip type (3:0) product type (4) and OEM revision (7:5) 2420 1.1 riastrad UCHAR ucProductID; // Defines as OEM ID or ATI board ID dependent on product type setting 2421 1.1 riastrad UCHAR ucMiscInfo1; // Tuner voltage (1:0) HW teletext support (3:2) FM audio decoder (5:4) reserved (6) audio scrambling (7) 2422 1.1 riastrad UCHAR ucMiscInfo2; // I2S input config (0) I2S output config (1) I2S Audio Chip (4:2) SPDIF Output Config (5) reserved (7:6) 2423 1.1 riastrad UCHAR ucMiscInfo3; // Video Decoder Type (3:0) Video In Standard/Crystal (7:4) 2424 1.1 riastrad UCHAR ucMiscInfo4; // Video Decoder Host Config (2:0) reserved (7:3) 2425 1.1 riastrad UCHAR ucVideoInput0Info;// Video Input 0 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) 2426 1.1 riastrad UCHAR ucVideoInput1Info;// Video Input 1 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) 2427 1.1 riastrad UCHAR ucVideoInput2Info;// Video Input 2 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) 2428 1.1 riastrad UCHAR ucVideoInput3Info;// Video Input 3 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) 2429 1.1 riastrad UCHAR ucVideoInput4Info;// Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) 2430 1.1 riastrad }ATOM_MULTIMEDIA_CONFIG_INFO; 2431 1.1 riastrad 2432 1.1 riastrad 2433 1.1 riastrad /****************************************************************************/ 2434 1.1 riastrad // Structures used in FirmwareInfoTable 2435 1.1 riastrad /****************************************************************************/ 2436 1.1 riastrad 2437 1.1 riastrad // usBIOSCapability Definition: 2438 1.1 riastrad // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; 2439 1.1 riastrad // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; 2440 1.1 riastrad // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; 2441 1.1 riastrad // Others: Reserved 2442 1.1 riastrad #define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED 0x0001 2443 1.1 riastrad #define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT 0x0002 2444 1.1 riastrad #define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT 0x0004 2445 1.1 riastrad #define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT 0x0008 // (valid from v1.1 ~v1.4):=1: memclk SS enable, =0 memclk SS disable. 2446 1.1 riastrad #define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT 0x0010 // (valid from v1.1 ~v1.4):=1: engclk SS enable, =0 engclk SS disable. 2447 1.1 riastrad #define ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU 0x0020 2448 1.1 riastrad #define ATOM_BIOS_INFO_WMI_SUPPORT 0x0040 2449 1.1 riastrad #define ATOM_BIOS_INFO_PPMODE_ASSIGNGED_BY_SYSTEM 0x0080 2450 1.1 riastrad #define ATOM_BIOS_INFO_HYPERMEMORY_SUPPORT 0x0100 2451 1.1 riastrad #define ATOM_BIOS_INFO_HYPERMEMORY_SIZE_MASK 0x1E00 2452 1.1 riastrad #define ATOM_BIOS_INFO_VPOST_WITHOUT_FIRST_MODE_SET 0x2000 2453 1.1 riastrad #define ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE 0x4000 2454 1.1 riastrad #define ATOM_BIOS_INFO_MEMORY_CLOCK_EXT_SS_SUPPORT 0x0008 // (valid from v2.1 ): =1: memclk ss enable with external ss chip 2455 1.1 riastrad #define ATOM_BIOS_INFO_ENGINE_CLOCK_EXT_SS_SUPPORT 0x0010 // (valid from v2.1 ): =1: engclk ss enable with external ss chip 2456 1.1 riastrad 2457 1.1 riastrad #ifndef _H2INC 2458 1.1 riastrad 2459 1.1 riastrad //Please don't add or expand this bitfield structure below, this one will retire soon.! 2460 1.1 riastrad typedef struct _ATOM_FIRMWARE_CAPABILITY 2461 1.1 riastrad { 2462 1.1 riastrad #if ATOM_BIG_ENDIAN 2463 1.1 riastrad USHORT Reserved:1; 2464 1.1 riastrad USHORT SCL2Redefined:1; 2465 1.1 riastrad USHORT PostWithoutModeSet:1; 2466 1.1 riastrad USHORT HyperMemory_Size:4; 2467 1.1 riastrad USHORT HyperMemory_Support:1; 2468 1.1 riastrad USHORT PPMode_Assigned:1; 2469 1.1 riastrad USHORT WMI_SUPPORT:1; 2470 1.1 riastrad USHORT GPUControlsBL:1; 2471 1.1 riastrad USHORT EngineClockSS_Support:1; 2472 1.1 riastrad USHORT MemoryClockSS_Support:1; 2473 1.1 riastrad USHORT ExtendedDesktopSupport:1; 2474 1.1 riastrad USHORT DualCRTC_Support:1; 2475 1.1 riastrad USHORT FirmwarePosted:1; 2476 1.1 riastrad #else 2477 1.1 riastrad USHORT FirmwarePosted:1; 2478 1.1 riastrad USHORT DualCRTC_Support:1; 2479 1.1 riastrad USHORT ExtendedDesktopSupport:1; 2480 1.1 riastrad USHORT MemoryClockSS_Support:1; 2481 1.1 riastrad USHORT EngineClockSS_Support:1; 2482 1.1 riastrad USHORT GPUControlsBL:1; 2483 1.1 riastrad USHORT WMI_SUPPORT:1; 2484 1.1 riastrad USHORT PPMode_Assigned:1; 2485 1.1 riastrad USHORT HyperMemory_Support:1; 2486 1.1 riastrad USHORT HyperMemory_Size:4; 2487 1.1 riastrad USHORT PostWithoutModeSet:1; 2488 1.1 riastrad USHORT SCL2Redefined:1; 2489 1.1 riastrad USHORT Reserved:1; 2490 1.1 riastrad #endif 2491 1.1 riastrad }ATOM_FIRMWARE_CAPABILITY; 2492 1.1 riastrad 2493 1.1 riastrad typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS 2494 1.1 riastrad { 2495 1.1 riastrad ATOM_FIRMWARE_CAPABILITY sbfAccess; 2496 1.1 riastrad USHORT susAccess; 2497 1.1 riastrad }ATOM_FIRMWARE_CAPABILITY_ACCESS; 2498 1.1 riastrad 2499 1.1 riastrad #else 2500 1.1 riastrad 2501 1.1 riastrad typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS 2502 1.1 riastrad { 2503 1.1 riastrad USHORT susAccess; 2504 1.1 riastrad }ATOM_FIRMWARE_CAPABILITY_ACCESS; 2505 1.1 riastrad 2506 1.1 riastrad #endif 2507 1.1 riastrad 2508 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO 2509 1.1 riastrad { 2510 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2511 1.1 riastrad ULONG ulFirmwareRevision; 2512 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2513 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2514 1.1 riastrad ULONG ulDriverTargetEngineClock; //In 10Khz unit 2515 1.1 riastrad ULONG ulDriverTargetMemoryClock; //In 10Khz unit 2516 1.1 riastrad ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit 2517 1.1 riastrad ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit 2518 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2519 1.1 riastrad ULONG ulASICMaxEngineClock; //In 10Khz unit 2520 1.1 riastrad ULONG ulASICMaxMemoryClock; //In 10Khz unit 2521 1.1 riastrad UCHAR ucASICMaxTemperature; 2522 1.1 riastrad UCHAR ucPadding[3]; //Don't use them 2523 1.1 riastrad ULONG aulReservedForBIOS[3]; //Don't use them 2524 1.1 riastrad USHORT usMinEngineClockPLL_Input; //In 10Khz unit 2525 1.1 riastrad USHORT usMaxEngineClockPLL_Input; //In 10Khz unit 2526 1.1 riastrad USHORT usMinEngineClockPLL_Output; //In 10Khz unit 2527 1.1 riastrad USHORT usMinMemoryClockPLL_Input; //In 10Khz unit 2528 1.1 riastrad USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit 2529 1.1 riastrad USHORT usMinMemoryClockPLL_Output; //In 10Khz unit 2530 1.1 riastrad USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk 2531 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2532 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2533 1.1 riastrad USHORT usMinPixelClockPLL_Output; //In 10Khz unit, the definitions above can't change!!! 2534 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2535 1.1 riastrad USHORT usReferenceClock; //In 10Khz unit 2536 1.1 riastrad USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit 2537 1.1 riastrad UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit 2538 1.1 riastrad UCHAR ucDesign_ID; //Indicate what is the board design 2539 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2540 1.1 riastrad }ATOM_FIRMWARE_INFO; 2541 1.1 riastrad 2542 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO_V1_2 2543 1.1 riastrad { 2544 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2545 1.1 riastrad ULONG ulFirmwareRevision; 2546 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2547 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2548 1.1 riastrad ULONG ulDriverTargetEngineClock; //In 10Khz unit 2549 1.1 riastrad ULONG ulDriverTargetMemoryClock; //In 10Khz unit 2550 1.1 riastrad ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit 2551 1.1 riastrad ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit 2552 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2553 1.1 riastrad ULONG ulASICMaxEngineClock; //In 10Khz unit 2554 1.1 riastrad ULONG ulASICMaxMemoryClock; //In 10Khz unit 2555 1.1 riastrad UCHAR ucASICMaxTemperature; 2556 1.1 riastrad UCHAR ucMinAllowedBL_Level; 2557 1.1 riastrad UCHAR ucPadding[2]; //Don't use them 2558 1.1 riastrad ULONG aulReservedForBIOS[2]; //Don't use them 2559 1.1 riastrad ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2560 1.1 riastrad USHORT usMinEngineClockPLL_Input; //In 10Khz unit 2561 1.1 riastrad USHORT usMaxEngineClockPLL_Input; //In 10Khz unit 2562 1.1 riastrad USHORT usMinEngineClockPLL_Output; //In 10Khz unit 2563 1.1 riastrad USHORT usMinMemoryClockPLL_Input; //In 10Khz unit 2564 1.1 riastrad USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit 2565 1.1 riastrad USHORT usMinMemoryClockPLL_Output; //In 10Khz unit 2566 1.1 riastrad USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk 2567 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2568 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2569 1.1 riastrad USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output 2570 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2571 1.1 riastrad USHORT usReferenceClock; //In 10Khz unit 2572 1.1 riastrad USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit 2573 1.1 riastrad UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit 2574 1.1 riastrad UCHAR ucDesign_ID; //Indicate what is the board design 2575 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2576 1.1 riastrad }ATOM_FIRMWARE_INFO_V1_2; 2577 1.1 riastrad 2578 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO_V1_3 2579 1.1 riastrad { 2580 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2581 1.1 riastrad ULONG ulFirmwareRevision; 2582 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2583 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2584 1.1 riastrad ULONG ulDriverTargetEngineClock; //In 10Khz unit 2585 1.1 riastrad ULONG ulDriverTargetMemoryClock; //In 10Khz unit 2586 1.1 riastrad ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit 2587 1.1 riastrad ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit 2588 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2589 1.1 riastrad ULONG ulASICMaxEngineClock; //In 10Khz unit 2590 1.1 riastrad ULONG ulASICMaxMemoryClock; //In 10Khz unit 2591 1.1 riastrad UCHAR ucASICMaxTemperature; 2592 1.1 riastrad UCHAR ucMinAllowedBL_Level; 2593 1.1 riastrad UCHAR ucPadding[2]; //Don't use them 2594 1.1 riastrad ULONG aulReservedForBIOS; //Don't use them 2595 1.1 riastrad ULONG ul3DAccelerationEngineClock;//In 10Khz unit 2596 1.1 riastrad ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2597 1.1 riastrad USHORT usMinEngineClockPLL_Input; //In 10Khz unit 2598 1.1 riastrad USHORT usMaxEngineClockPLL_Input; //In 10Khz unit 2599 1.1 riastrad USHORT usMinEngineClockPLL_Output; //In 10Khz unit 2600 1.1 riastrad USHORT usMinMemoryClockPLL_Input; //In 10Khz unit 2601 1.1 riastrad USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit 2602 1.1 riastrad USHORT usMinMemoryClockPLL_Output; //In 10Khz unit 2603 1.1 riastrad USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk 2604 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2605 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2606 1.1 riastrad USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output 2607 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2608 1.1 riastrad USHORT usReferenceClock; //In 10Khz unit 2609 1.1 riastrad USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit 2610 1.1 riastrad UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit 2611 1.1 riastrad UCHAR ucDesign_ID; //Indicate what is the board design 2612 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2613 1.1 riastrad }ATOM_FIRMWARE_INFO_V1_3; 2614 1.1 riastrad 2615 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO_V1_4 2616 1.1 riastrad { 2617 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2618 1.1 riastrad ULONG ulFirmwareRevision; 2619 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2620 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2621 1.1 riastrad ULONG ulDriverTargetEngineClock; //In 10Khz unit 2622 1.1 riastrad ULONG ulDriverTargetMemoryClock; //In 10Khz unit 2623 1.1 riastrad ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit 2624 1.1 riastrad ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit 2625 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2626 1.1 riastrad ULONG ulASICMaxEngineClock; //In 10Khz unit 2627 1.1 riastrad ULONG ulASICMaxMemoryClock; //In 10Khz unit 2628 1.1 riastrad UCHAR ucASICMaxTemperature; 2629 1.1 riastrad UCHAR ucMinAllowedBL_Level; 2630 1.1 riastrad USHORT usBootUpVDDCVoltage; //In MV unit 2631 1.1 riastrad USHORT usLcdMinPixelClockPLL_Output; // In MHz unit 2632 1.1 riastrad USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit 2633 1.1 riastrad ULONG ul3DAccelerationEngineClock;//In 10Khz unit 2634 1.1 riastrad ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2635 1.1 riastrad USHORT usMinEngineClockPLL_Input; //In 10Khz unit 2636 1.1 riastrad USHORT usMaxEngineClockPLL_Input; //In 10Khz unit 2637 1.1 riastrad USHORT usMinEngineClockPLL_Output; //In 10Khz unit 2638 1.1 riastrad USHORT usMinMemoryClockPLL_Input; //In 10Khz unit 2639 1.1 riastrad USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit 2640 1.1 riastrad USHORT usMinMemoryClockPLL_Output; //In 10Khz unit 2641 1.1 riastrad USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk 2642 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2643 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2644 1.1 riastrad USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output 2645 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2646 1.1 riastrad USHORT usReferenceClock; //In 10Khz unit 2647 1.1 riastrad USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit 2648 1.1 riastrad UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit 2649 1.1 riastrad UCHAR ucDesign_ID; //Indicate what is the board design 2650 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2651 1.1 riastrad }ATOM_FIRMWARE_INFO_V1_4; 2652 1.1 riastrad 2653 1.1 riastrad //the structure below to be used from Cypress 2654 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO_V2_1 2655 1.1 riastrad { 2656 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2657 1.1 riastrad ULONG ulFirmwareRevision; 2658 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2659 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2660 1.1 riastrad ULONG ulReserved1; 2661 1.1 riastrad ULONG ulReserved2; 2662 1.1 riastrad ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit 2663 1.1 riastrad ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit 2664 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2665 1.1 riastrad ULONG ulBinaryAlteredInfo; //Was ulASICMaxEngineClock 2666 1.1 riastrad ULONG ulDefaultDispEngineClkFreq; //In 10Khz unit 2667 1.1 riastrad UCHAR ucReserved1; //Was ucASICMaxTemperature; 2668 1.1 riastrad UCHAR ucMinAllowedBL_Level; 2669 1.1 riastrad USHORT usBootUpVDDCVoltage; //In MV unit 2670 1.1 riastrad USHORT usLcdMinPixelClockPLL_Output; // In MHz unit 2671 1.1 riastrad USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit 2672 1.1 riastrad ULONG ulReserved4; //Was ulAsicMaximumVoltage 2673 1.1 riastrad ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2674 1.1 riastrad USHORT usMinEngineClockPLL_Input; //In 10Khz unit 2675 1.1 riastrad USHORT usMaxEngineClockPLL_Input; //In 10Khz unit 2676 1.1 riastrad USHORT usMinEngineClockPLL_Output; //In 10Khz unit 2677 1.1 riastrad USHORT usMinMemoryClockPLL_Input; //In 10Khz unit 2678 1.1 riastrad USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit 2679 1.1 riastrad USHORT usMinMemoryClockPLL_Output; //In 10Khz unit 2680 1.1 riastrad USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk 2681 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2682 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2683 1.1 riastrad USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output 2684 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2685 1.1 riastrad USHORT usCoreReferenceClock; //In 10Khz unit 2686 1.1 riastrad USHORT usMemoryReferenceClock; //In 10Khz unit 2687 1.1 riastrad USHORT usUniphyDPModeExtClkFreq; //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock 2688 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2689 1.1 riastrad UCHAR ucReserved4[3]; 2690 1.1 riastrad }ATOM_FIRMWARE_INFO_V2_1; 2691 1.1 riastrad 2692 1.1 riastrad //the structure below to be used from NI 2693 1.1 riastrad //ucTableFormatRevision=2 2694 1.1 riastrad //ucTableContentRevision=2 2695 1.1 riastrad typedef struct _ATOM_FIRMWARE_INFO_V2_2 2696 1.1 riastrad { 2697 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2698 1.1 riastrad ULONG ulFirmwareRevision; 2699 1.1 riastrad ULONG ulDefaultEngineClock; //In 10Khz unit 2700 1.1 riastrad ULONG ulDefaultMemoryClock; //In 10Khz unit 2701 1.1 riastrad ULONG ulSPLL_OutputFreq; //In 10Khz unit 2702 1.1 riastrad ULONG ulGPUPLL_OutputFreq; //In 10Khz unit 2703 1.1 riastrad ULONG ulReserved1; //Was ulMaxEngineClockPLL_Output; //In 10Khz unit* 2704 1.1 riastrad ULONG ulReserved2; //Was ulMaxMemoryClockPLL_Output; //In 10Khz unit* 2705 1.1 riastrad ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit 2706 1.1 riastrad ULONG ulBinaryAlteredInfo; //Was ulASICMaxEngineClock ? 2707 1.1 riastrad ULONG ulDefaultDispEngineClkFreq; //In 10Khz unit. This is the frequency before DCDTO, corresponding to usBootUpVDDCVoltage. 2708 1.1 riastrad UCHAR ucReserved3; //Was ucASICMaxTemperature; 2709 1.1 riastrad UCHAR ucMinAllowedBL_Level; 2710 1.1 riastrad USHORT usBootUpVDDCVoltage; //In MV unit 2711 1.1 riastrad USHORT usLcdMinPixelClockPLL_Output; // In MHz unit 2712 1.1 riastrad USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit 2713 1.1 riastrad ULONG ulReserved4; //Was ulAsicMaximumVoltage 2714 1.1 riastrad ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2715 1.1 riastrad UCHAR ucRemoteDisplayConfig; 2716 1.1 riastrad UCHAR ucReserved5[3]; //Was usMinEngineClockPLL_Input and usMaxEngineClockPLL_Input 2717 1.1 riastrad ULONG ulReserved6; //Was usMinEngineClockPLL_Output and usMinMemoryClockPLL_Input 2718 1.1 riastrad ULONG ulReserved7; //Was usMaxMemoryClockPLL_Input and usMinMemoryClockPLL_Output 2719 1.1 riastrad USHORT usReserved11; //Was usMaxPixelClock; //In 10Khz unit, Max. Pclk used only for DAC 2720 1.1 riastrad USHORT usMinPixelClockPLL_Input; //In 10Khz unit 2721 1.1 riastrad USHORT usMaxPixelClockPLL_Input; //In 10Khz unit 2722 1.1 riastrad USHORT usBootUpVDDCIVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; 2723 1.1 riastrad ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; 2724 1.1 riastrad USHORT usCoreReferenceClock; //In 10Khz unit 2725 1.1 riastrad USHORT usMemoryReferenceClock; //In 10Khz unit 2726 1.1 riastrad USHORT usUniphyDPModeExtClkFreq; //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock 2727 1.1 riastrad UCHAR ucMemoryModule_ID; //Indicate what is the board design 2728 1.1 riastrad UCHAR ucReserved9[3]; 2729 1.1 riastrad USHORT usBootUpMVDDCVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; 2730 1.1 riastrad USHORT usReserved12; 2731 1.1 riastrad ULONG ulReserved10[3]; // New added comparing to previous version 2732 1.1 riastrad }ATOM_FIRMWARE_INFO_V2_2; 2733 1.1 riastrad 2734 1.1 riastrad #define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2 2735 1.1 riastrad 2736 1.1 riastrad 2737 1.1 riastrad // definition of ucRemoteDisplayConfig 2738 1.1 riastrad #define REMOTE_DISPLAY_DISABLE 0x00 2739 1.1 riastrad #define REMOTE_DISPLAY_ENABLE 0x01 2740 1.1 riastrad 2741 1.1 riastrad /****************************************************************************/ 2742 1.1 riastrad // Structures used in IntegratedSystemInfoTable 2743 1.1 riastrad /****************************************************************************/ 2744 1.1 riastrad #define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN 0x2 2745 1.1 riastrad #define IGP_CAP_FLAG_AC_CARD 0x4 2746 1.1 riastrad #define IGP_CAP_FLAG_SDVO_CARD 0x8 2747 1.1 riastrad #define IGP_CAP_FLAG_POSTDIV_BY_2_MODE 0x10 2748 1.1 riastrad 2749 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO 2750 1.1 riastrad { 2751 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2752 1.1 riastrad ULONG ulBootUpEngineClock; //in 10kHz unit 2753 1.1 riastrad ULONG ulBootUpMemoryClock; //in 10kHz unit 2754 1.1 riastrad ULONG ulMaxSystemMemoryClock; //in 10kHz unit 2755 1.1 riastrad ULONG ulMinSystemMemoryClock; //in 10kHz unit 2756 1.1 riastrad UCHAR ucNumberOfCyclesInPeriodHi; 2757 1.1 riastrad UCHAR ucLCDTimingSel; //=0:not valid.!=0 sel this timing descriptor from LCD EDID. 2758 1.1 riastrad USHORT usReserved1; 2759 1.1 riastrad USHORT usInterNBVoltageLow; //An intermidiate PMW value to set the voltage 2760 1.1 riastrad USHORT usInterNBVoltageHigh; //Another intermidiate PMW value to set the voltage 2761 1.1 riastrad ULONG ulReserved[2]; 2762 1.1 riastrad 2763 1.1 riastrad USHORT usFSBClock; //In MHz unit 2764 1.1 riastrad USHORT usCapabilityFlag; //Bit0=1 indicates the fake HDMI support,Bit1=0/1 for Dynamic clocking dis/enable 2765 1.1 riastrad //Bit[3:2]== 0:No PCIE card, 1:AC card, 2:SDVO card 2766 1.1 riastrad //Bit[4]==1: P/2 mode, ==0: P/1 mode 2767 1.1 riastrad USHORT usPCIENBCfgReg7; //bit[7:0]=MUX_Sel, bit[9:8]=MUX_SEL_LEVEL2, bit[10]=Lane_Reversal 2768 1.1 riastrad USHORT usK8MemoryClock; //in MHz unit 2769 1.1 riastrad USHORT usK8SyncStartDelay; //in 0.01 us unit 2770 1.1 riastrad USHORT usK8DataReturnTime; //in 0.01 us unit 2771 1.1 riastrad UCHAR ucMaxNBVoltage; 2772 1.1 riastrad UCHAR ucMinNBVoltage; 2773 1.1 riastrad UCHAR ucMemoryType; //[7:4]=1:DDR1;=2:DDR2;=3:DDR3.[3:0] is reserved 2774 1.1 riastrad UCHAR ucNumberOfCyclesInPeriod; //CG.FVTHROT_PWM_CTRL_REG0.NumberOfCyclesInPeriod 2775 1.1 riastrad UCHAR ucStartingPWM_HighTime; //CG.FVTHROT_PWM_CTRL_REG0.StartingPWM_HighTime 2776 1.1 riastrad UCHAR ucHTLinkWidth; //16 bit vs. 8 bit 2777 1.1 riastrad UCHAR ucMaxNBVoltageHigh; 2778 1.1 riastrad UCHAR ucMinNBVoltageHigh; 2779 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO; 2780 1.1 riastrad 2781 1.1 riastrad /* Explanation on entries in ATOM_INTEGRATED_SYSTEM_INFO 2782 1.1 riastrad ulBootUpMemoryClock: For Intel IGP,it's the UMA system memory clock 2783 1.1 riastrad For AMD IGP,it's 0 if no SidePort memory installed or it's the boot-up SidePort memory clock 2784 1.1 riastrad ulMaxSystemMemoryClock: For Intel IGP,it's the Max freq from memory SPD if memory runs in ASYNC mode or otherwise (SYNC mode) it's 0 2785 1.1 riastrad For AMD IGP,for now this can be 0 2786 1.1 riastrad ulMinSystemMemoryClock: For Intel IGP,it's 133MHz if memory runs in ASYNC mode or otherwise (SYNC mode) it's 0 2787 1.1 riastrad For AMD IGP,for now this can be 0 2788 1.1 riastrad 2789 1.1 riastrad usFSBClock: For Intel IGP,it's FSB Freq 2790 1.1 riastrad For AMD IGP,it's HT Link Speed 2791 1.1 riastrad 2792 1.1 riastrad usK8MemoryClock: For AMD IGP only. For RevF CPU, set it to 200 2793 1.1 riastrad usK8SyncStartDelay: For AMD IGP only. Memory access latency in K8, required for watermark calculation 2794 1.1 riastrad usK8DataReturnTime: For AMD IGP only. Memory access latency in K8, required for watermark calculation 2795 1.1 riastrad 2796 1.1 riastrad VC:Voltage Control 2797 1.1 riastrad ucMaxNBVoltage: Voltage regulator dependent PWM value. Low 8 bits of the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all. 2798 1.1 riastrad ucMinNBVoltage: Voltage regulator dependent PWM value. Low 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all. 2799 1.1 riastrad 2800 1.1 riastrad ucNumberOfCyclesInPeriod: Indicate how many cycles when PWM duty is 100%. low 8 bits of the value. 2801 1.1 riastrad ucNumberOfCyclesInPeriodHi: Indicate how many cycles when PWM duty is 100%. high 8 bits of the value.If the PWM has an inverter,set bit [7]==1,otherwise set it 0 2802 1.1 riastrad 2803 1.1 riastrad ucMaxNBVoltageHigh: Voltage regulator dependent PWM value. High 8 bits of the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all. 2804 1.1 riastrad ucMinNBVoltageHigh: Voltage regulator dependent PWM value. High 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all. 2805 1.1 riastrad 2806 1.1 riastrad 2807 1.1 riastrad usInterNBVoltageLow: Voltage regulator dependent PWM value. The value makes the the voltage >=Min NB voltage but <=InterNBVoltageHigh. Set this to 0x0000 if VC without PWM or no VC at all. 2808 1.1 riastrad usInterNBVoltageHigh: Voltage regulator dependent PWM value. The value makes the the voltage >=InterNBVoltageLow but <=Max NB voltage.Set this to 0x0000 if VC without PWM or no VC at all. 2809 1.1 riastrad */ 2810 1.1 riastrad 2811 1.1 riastrad 2812 1.1 riastrad /* 2813 1.1 riastrad The following IGP table is introduced from RS780, which is supposed to be put by SBIOS in FB before IGP VBIOS starts VPOST; 2814 1.1 riastrad Then VBIOS will copy the whole structure to its image so all GPU SW components can access this data structure to get whatever they need. 2815 1.1 riastrad The enough reservation should allow us to never change table revisions. Whenever needed, a GPU SW component can use reserved portion for new data entries. 2816 1.1 riastrad 2817 1.1 riastrad SW components can access the IGP system infor structure in the same way as before 2818 1.1 riastrad */ 2819 1.1 riastrad 2820 1.1 riastrad 2821 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 2822 1.1 riastrad { 2823 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2824 1.1 riastrad ULONG ulBootUpEngineClock; //in 10kHz unit 2825 1.1 riastrad ULONG ulReserved1[2]; //must be 0x0 for the reserved 2826 1.1 riastrad ULONG ulBootUpUMAClock; //in 10kHz unit 2827 1.1 riastrad ULONG ulBootUpSidePortClock; //in 10kHz unit 2828 1.1 riastrad ULONG ulMinSidePortClock; //in 10kHz unit 2829 1.1 riastrad ULONG ulReserved2[6]; //must be 0x0 for the reserved 2830 1.1 riastrad ULONG ulSystemConfig; //see explanation below 2831 1.1 riastrad ULONG ulBootUpReqDisplayVector; 2832 1.1 riastrad ULONG ulOtherDisplayMisc; 2833 1.1 riastrad ULONG ulDDISlot1Config; 2834 1.1 riastrad ULONG ulDDISlot2Config; 2835 1.1 riastrad UCHAR ucMemoryType; //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved 2836 1.1 riastrad UCHAR ucUMAChannelNumber; 2837 1.1 riastrad UCHAR ucDockingPinBit; 2838 1.1 riastrad UCHAR ucDockingPinPolarity; 2839 1.1 riastrad ULONG ulDockingPinCFGInfo; 2840 1.1 riastrad ULONG ulCPUCapInfo; 2841 1.1 riastrad USHORT usNumberOfCyclesInPeriod; 2842 1.1 riastrad USHORT usMaxNBVoltage; 2843 1.1 riastrad USHORT usMinNBVoltage; 2844 1.1 riastrad USHORT usBootUpNBVoltage; 2845 1.1 riastrad ULONG ulHTLinkFreq; //in 10Khz 2846 1.1 riastrad USHORT usMinHTLinkWidth; 2847 1.1 riastrad USHORT usMaxHTLinkWidth; 2848 1.1 riastrad USHORT usUMASyncStartDelay; 2849 1.1 riastrad USHORT usUMADataReturnTime; 2850 1.1 riastrad USHORT usLinkStatusZeroTime; 2851 1.1 riastrad USHORT usDACEfuse; //for storing badgap value (for RS880 only) 2852 1.1 riastrad ULONG ulHighVoltageHTLinkFreq; // in 10Khz 2853 1.1 riastrad ULONG ulLowVoltageHTLinkFreq; // in 10Khz 2854 1.1 riastrad USHORT usMaxUpStreamHTLinkWidth; 2855 1.1 riastrad USHORT usMaxDownStreamHTLinkWidth; 2856 1.1 riastrad USHORT usMinUpStreamHTLinkWidth; 2857 1.1 riastrad USHORT usMinDownStreamHTLinkWidth; 2858 1.1 riastrad USHORT usFirmwareVersion; //0 means FW is not supported. Otherwise it's the FW version loaded by SBIOS and driver should enable FW. 2859 1.1 riastrad USHORT usFullT0Time; // Input to calculate minimum HT link change time required by NB P-State. Unit is 0.01us. 2860 1.1 riastrad ULONG ulReserved3[96]; //must be 0x0 2861 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO_V2; 2862 1.1 riastrad 2863 1.1 riastrad /* 2864 1.1 riastrad ulBootUpEngineClock: Boot-up Engine Clock in 10Khz; 2865 1.1 riastrad ulBootUpUMAClock: Boot-up UMA Clock in 10Khz; it must be 0x0 when UMA is not present 2866 1.1 riastrad ulBootUpSidePortClock: Boot-up SidePort Clock in 10Khz; it must be 0x0 when SidePort Memory is not present,this could be equal to or less than maximum supported Sideport memory clock 2867 1.1 riastrad 2868 1.1 riastrad ulSystemConfig: 2869 1.1 riastrad Bit[0]=1: PowerExpress mode =0 Non-PowerExpress mode; 2870 1.1 riastrad Bit[1]=1: system boots up at AMD overdrived state or user customized mode. In this case, driver will just stick to this boot-up mode. No other PowerPlay state 2871 1.1 riastrad =0: system boots up at driver control state. Power state depends on PowerPlay table. 2872 1.1 riastrad Bit[2]=1: PWM method is used on NB voltage control. =0: GPIO method is used. 2873 1.1 riastrad Bit[3]=1: Only one power state(Performance) will be supported. 2874 1.1 riastrad =0: Multiple power states supported from PowerPlay table. 2875 1.1 riastrad Bit[4]=1: CLMC is supported and enabled on current system. 2876 1.1 riastrad =0: CLMC is not supported or enabled on current system. SBIOS need to support HT link/freq change through ATIF interface. 2877 1.1 riastrad Bit[5]=1: Enable CDLW for all driver control power states. Max HT width is from SBIOS, while Min HT width is determined by display requirement. 2878 1.1 riastrad =0: CDLW is disabled. If CLMC is enabled case, Min HT width will be set equal to Max HT width. If CLMC disabled case, Max HT width will be applied. 2879 1.1 riastrad Bit[6]=1: High Voltage requested for all power states. In this case, voltage will be forced at 1.1v and powerplay table voltage drop/throttling request will be ignored. 2880 1.1 riastrad =0: Voltage settings is determined by powerplay table. 2881 1.1 riastrad Bit[7]=1: Enable CLMC as hybrid Mode. CDLD and CILR will be disabled in this case and we're using legacy C1E. This is workaround for CPU(Griffin) performance issue. 2882 1.1 riastrad =0: Enable CLMC as regular mode, CDLD and CILR will be enabled. 2883 1.1 riastrad Bit[8]=1: CDLF is supported and enabled on current system. 2884 1.1 riastrad =0: CDLF is not supported or enabled on current system. 2885 1.1 riastrad Bit[9]=1: DLL Shut Down feature is enabled on current system. 2886 1.1 riastrad =0: DLL Shut Down feature is not enabled or supported on current system. 2887 1.1 riastrad 2888 1.1 riastrad ulBootUpReqDisplayVector: This dword is a bit vector indicates what display devices are requested during boot-up. Refer to ATOM_DEVICE_xxx_SUPPORT for the bit vector definitions. 2889 1.1 riastrad 2890 1.1 riastrad ulOtherDisplayMisc: [15:8]- Bootup LCD Expansion selection; 0-center, 1-full panel size expansion; 2891 1.1 riastrad [7:0] - BootupTV standard selection; This is a bit vector to indicate what TV standards are supported by the system. Refer to ucTVSupportedStd definition; 2892 1.1 riastrad 2893 1.1 riastrad ulDDISlot1Config: Describes the PCIE lane configuration on this DDI PCIE slot (ADD2 card) or connector (Mobile design). 2894 1.1 riastrad [3:0] - Bit vector to indicate PCIE lane config of the DDI slot/connector on chassis (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12) 2895 1.1 riastrad [7:4] - Bit vector to indicate PCIE lane config of the same DDI slot/connector on docking station (bit 4=1 lane 3:0; bit 5=1 lane 7:4; bit 6=1 lane 11:8; bit 7=1 lane 15:12) 2896 1.1 riastrad When a DDI connector is not "paired" (meaming two connections mutualexclusive on chassis or docking, only one of them can be connected at one time. 2897 1.1 riastrad in both chassis and docking, SBIOS has to duplicate the same PCIE lane info from chassis to docking or vice versa. For example: 2898 1.1 riastrad one DDI connector is only populated in docking with PCIE lane 8-11, but there is no paired connection on chassis, SBIOS has to copy bit 6 to bit 2. 2899 1.1 riastrad 2900 1.1 riastrad [15:8] - Lane configuration attribute; 2901 1.1 riastrad [23:16]- Connector type, possible value: 2902 1.1 riastrad CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D 2903 1.1 riastrad CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D 2904 1.1 riastrad CONNECTOR_OBJECT_ID_HDMI_TYPE_A 2905 1.1 riastrad CONNECTOR_OBJECT_ID_DISPLAYPORT 2906 1.1 riastrad CONNECTOR_OBJECT_ID_eDP 2907 1.1 riastrad [31:24]- Reserved 2908 1.1 riastrad 2909 1.1 riastrad ulDDISlot2Config: Same as Slot1. 2910 1.1 riastrad ucMemoryType: SidePort memory type, set it to 0x0 when Sideport memory is not installed. Driver needs this info to change sideport memory clock. Not for display in CCC. 2911 1.1 riastrad For IGP, Hypermemory is the only memory type showed in CCC. 2912 1.1 riastrad 2913 1.1 riastrad ucUMAChannelNumber: how many channels for the UMA; 2914 1.1 riastrad 2915 1.1 riastrad ulDockingPinCFGInfo: [15:0]-Bus/Device/Function # to CFG to read this Docking Pin; [31:16]-reg offset in CFG to read this pin 2916 1.1 riastrad ucDockingPinBit: which bit in this register to read the pin status; 2917 1.1 riastrad ucDockingPinPolarity:Polarity of the pin when docked; 2918 1.1 riastrad 2919 1.1 riastrad ulCPUCapInfo: [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, [7:0]=4:Pharaoh, other bits reserved for now and must be 0x0 2920 1.1 riastrad 2921 1.1 riastrad usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%. 2922 1.1 riastrad 2923 1.1 riastrad usMaxNBVoltage:Max. voltage control value in either PWM or GPIO mode. 2924 1.1 riastrad usMinNBVoltage:Min. voltage control value in either PWM or GPIO mode. 2925 1.1 riastrad GPIO mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=0 2926 1.1 riastrad PWM mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=1 2927 1.1 riastrad GPU SW don't control mode: usMaxNBVoltage & usMinNBVoltage=0 and no care about ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE 2928 1.1 riastrad 2929 1.1 riastrad usBootUpNBVoltage:Boot-up voltage regulator dependent PWM value. 2930 1.1 riastrad 2931 1.1 riastrad ulHTLinkFreq: Bootup HT link Frequency in 10Khz. 2932 1.1 riastrad usMinHTLinkWidth: Bootup minimum HT link width. If CDLW disabled, this is equal to usMaxHTLinkWidth. 2933 1.1 riastrad If CDLW enabled, both upstream and downstream width should be the same during bootup. 2934 1.1 riastrad usMaxHTLinkWidth: Bootup maximum HT link width. If CDLW disabled, this is equal to usMinHTLinkWidth. 2935 1.1 riastrad If CDLW enabled, both upstream and downstream width should be the same during bootup. 2936 1.1 riastrad 2937 1.1 riastrad usUMASyncStartDelay: Memory access latency, required for watermark calculation 2938 1.1 riastrad usUMADataReturnTime: Memory access latency, required for watermark calculation 2939 1.1 riastrad usLinkStatusZeroTime:Memory access latency required for watermark calculation, set this to 0x0 for K8 CPU, set a proper value in 0.01 the unit of us 2940 1.1 riastrad for Griffin or Greyhound. SBIOS needs to convert to actual time by: 2941 1.1 riastrad if T0Ttime [5:4]=00b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.1us (0.0 to 1.5us) 2942 1.1 riastrad if T0Ttime [5:4]=01b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.5us (0.0 to 7.5us) 2943 1.1 riastrad if T0Ttime [5:4]=10b, then usLinkStatusZeroTime=T0Ttime [3:0]*2.0us (0.0 to 30us) 2944 1.1 riastrad if T0Ttime [5:4]=11b, and T0Ttime [3:0]=0x0 to 0xa, then usLinkStatusZeroTime=T0Ttime [3:0]*20us (0.0 to 200us) 2945 1.1 riastrad 2946 1.1 riastrad ulHighVoltageHTLinkFreq: HT link frequency for power state with low voltage. If boot up runs in HT1, this must be 0. 2947 1.1 riastrad This must be less than or equal to ulHTLinkFreq(bootup frequency). 2948 1.1 riastrad ulLowVoltageHTLinkFreq: HT link frequency for power state with low voltage or voltage scaling 1.0v~1.1v. If boot up runs in HT1, this must be 0. 2949 1.1 riastrad This must be less than or equal to ulHighVoltageHTLinkFreq. 2950 1.1 riastrad 2951 1.1 riastrad usMaxUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMaxHTLinkWidth. Not used for now. 2952 1.1 riastrad usMaxDownStreamHTLinkWidth: same as above. 2953 1.1 riastrad usMinUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMinHTLinkWidth. Not used for now. 2954 1.1 riastrad usMinDownStreamHTLinkWidth: same as above. 2955 1.1 riastrad */ 2956 1.1 riastrad 2957 1.1 riastrad // ATOM_INTEGRATED_SYSTEM_INFO::ulCPUCapInfo - CPU type definition 2958 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__UNKNOWN_CPU 0 2959 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GRIFFIN 1 2960 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2 2961 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3 2962 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4 2963 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI 5 2964 1.1 riastrad 2965 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI // this deff reflects max defined CPU code 2966 1.1 riastrad 2967 1.1 riastrad #define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001 2968 1.1 riastrad #define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002 2969 1.1 riastrad #define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE 0x00000004 2970 1.1 riastrad #define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY 0x00000008 2971 1.1 riastrad #define SYSTEM_CONFIG_CLMC_ENABLED 0x00000010 2972 1.1 riastrad #define SYSTEM_CONFIG_CDLW_ENABLED 0x00000020 2973 1.1 riastrad #define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED 0x00000040 2974 1.1 riastrad #define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED 0x00000080 2975 1.1 riastrad #define SYSTEM_CONFIG_CDLF_ENABLED 0x00000100 2976 1.1 riastrad #define SYSTEM_CONFIG_DLL_SHUTDOWN_ENABLED 0x00000200 2977 1.1 riastrad 2978 1.1 riastrad #define IGP_DDI_SLOT_LANE_CONFIG_MASK 0x000000FF 2979 1.1 riastrad 2980 1.1 riastrad #define b0IGP_DDI_SLOT_LANE_MAP_MASK 0x0F 2981 1.1 riastrad #define b0IGP_DDI_SLOT_DOCKING_LANE_MAP_MASK 0xF0 2982 1.1 riastrad #define b0IGP_DDI_SLOT_CONFIG_LANE_0_3 0x01 2983 1.1 riastrad #define b0IGP_DDI_SLOT_CONFIG_LANE_4_7 0x02 2984 1.1 riastrad #define b0IGP_DDI_SLOT_CONFIG_LANE_8_11 0x04 2985 1.1 riastrad #define b0IGP_DDI_SLOT_CONFIG_LANE_12_15 0x08 2986 1.1 riastrad 2987 1.1 riastrad #define IGP_DDI_SLOT_ATTRIBUTE_MASK 0x0000FF00 2988 1.1 riastrad #define IGP_DDI_SLOT_CONFIG_REVERSED 0x00000100 2989 1.1 riastrad #define b1IGP_DDI_SLOT_CONFIG_REVERSED 0x01 2990 1.1 riastrad 2991 1.1 riastrad #define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK 0x00FF0000 2992 1.1 riastrad 2993 1.1 riastrad // IntegratedSystemInfoTable new Rev is V5 after V2, because of the real rev of V2 is v1.4. This rev is used for RR 2994 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V5 2995 1.1 riastrad { 2996 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 2997 1.1 riastrad ULONG ulBootUpEngineClock; //in 10kHz unit 2998 1.1 riastrad ULONG ulDentistVCOFreq; //Dentist VCO clock in 10kHz unit, the source of GPU SCLK, LCLK, UCLK and VCLK. 2999 1.1 riastrad ULONG ulLClockFreq; //GPU Lclk freq in 10kHz unit, have relationship with NCLK in NorthBridge 3000 1.1 riastrad ULONG ulBootUpUMAClock; //in 10kHz unit 3001 1.1 riastrad ULONG ulReserved1[8]; //must be 0x0 for the reserved 3002 1.1 riastrad ULONG ulBootUpReqDisplayVector; 3003 1.1 riastrad ULONG ulOtherDisplayMisc; 3004 1.1 riastrad ULONG ulReserved2[4]; //must be 0x0 for the reserved 3005 1.1 riastrad ULONG ulSystemConfig; //TBD 3006 1.1 riastrad ULONG ulCPUCapInfo; //TBD 3007 1.1 riastrad USHORT usMaxNBVoltage; //high NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; 3008 1.1 riastrad USHORT usMinNBVoltage; //low NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; 3009 1.1 riastrad USHORT usBootUpNBVoltage; //boot up NB voltage 3010 1.1 riastrad UCHAR ucHtcTmpLmt; //bit [22:16] of D24F3x64 Hardware Thermal Control (HTC) Register, may not be needed, TBD 3011 1.1 riastrad UCHAR ucTjOffset; //bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed, TBD 3012 1.1 riastrad ULONG ulReserved3[4]; //must be 0x0 for the reserved 3013 1.1 riastrad ULONG ulDDISlot1Config; //see above ulDDISlot1Config definition 3014 1.1 riastrad ULONG ulDDISlot2Config; 3015 1.1 riastrad ULONG ulDDISlot3Config; 3016 1.1 riastrad ULONG ulDDISlot4Config; 3017 1.1 riastrad ULONG ulReserved4[4]; //must be 0x0 for the reserved 3018 1.1 riastrad UCHAR ucMemoryType; //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved 3019 1.1 riastrad UCHAR ucUMAChannelNumber; 3020 1.1 riastrad USHORT usReserved; 3021 1.1 riastrad ULONG ulReserved5[4]; //must be 0x0 for the reserved 3022 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10];//arrays with values for CSR M3 arbiter for default 3023 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_UVD[10]; //arrays with values for CSR M3 arbiter for UVD playback 3024 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_FS3D[10];//arrays with values for CSR M3 arbiter for Full Screen 3D applications 3025 1.1 riastrad ULONG ulReserved6[61]; //must be 0x0 3026 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO_V5; 3027 1.1 riastrad 3028 1.1 riastrad #define ATOM_CRT_INT_ENCODER1_INDEX 0x00000000 3029 1.1 riastrad #define ATOM_LCD_INT_ENCODER1_INDEX 0x00000001 3030 1.1 riastrad #define ATOM_TV_INT_ENCODER1_INDEX 0x00000002 3031 1.1 riastrad #define ATOM_DFP_INT_ENCODER1_INDEX 0x00000003 3032 1.1 riastrad #define ATOM_CRT_INT_ENCODER2_INDEX 0x00000004 3033 1.1 riastrad #define ATOM_LCD_EXT_ENCODER1_INDEX 0x00000005 3034 1.1 riastrad #define ATOM_TV_EXT_ENCODER1_INDEX 0x00000006 3035 1.1 riastrad #define ATOM_DFP_EXT_ENCODER1_INDEX 0x00000007 3036 1.1 riastrad #define ATOM_CV_INT_ENCODER1_INDEX 0x00000008 3037 1.1 riastrad #define ATOM_DFP_INT_ENCODER2_INDEX 0x00000009 3038 1.1 riastrad #define ATOM_CRT_EXT_ENCODER1_INDEX 0x0000000A 3039 1.1 riastrad #define ATOM_CV_EXT_ENCODER1_INDEX 0x0000000B 3040 1.1 riastrad #define ATOM_DFP_INT_ENCODER3_INDEX 0x0000000C 3041 1.1 riastrad #define ATOM_DFP_INT_ENCODER4_INDEX 0x0000000D 3042 1.1 riastrad 3043 1.1 riastrad // define ASIC internal encoder id ( bit vector ), used for CRTC_SourceSelTable 3044 1.1 riastrad #define ASIC_INT_DAC1_ENCODER_ID 0x00 3045 1.1 riastrad #define ASIC_INT_TV_ENCODER_ID 0x02 3046 1.1 riastrad #define ASIC_INT_DIG1_ENCODER_ID 0x03 3047 1.1 riastrad #define ASIC_INT_DAC2_ENCODER_ID 0x04 3048 1.1 riastrad #define ASIC_EXT_TV_ENCODER_ID 0x06 3049 1.1 riastrad #define ASIC_INT_DVO_ENCODER_ID 0x07 3050 1.1 riastrad #define ASIC_INT_DIG2_ENCODER_ID 0x09 3051 1.1 riastrad #define ASIC_EXT_DIG_ENCODER_ID 0x05 3052 1.1 riastrad #define ASIC_EXT_DIG2_ENCODER_ID 0x08 3053 1.1 riastrad #define ASIC_INT_DIG3_ENCODER_ID 0x0a 3054 1.1 riastrad #define ASIC_INT_DIG4_ENCODER_ID 0x0b 3055 1.1 riastrad #define ASIC_INT_DIG5_ENCODER_ID 0x0c 3056 1.1 riastrad #define ASIC_INT_DIG6_ENCODER_ID 0x0d 3057 1.1 riastrad #define ASIC_INT_DIG7_ENCODER_ID 0x0e 3058 1.1 riastrad 3059 1.1 riastrad //define Encoder attribute 3060 1.1 riastrad #define ATOM_ANALOG_ENCODER 0 3061 1.1 riastrad #define ATOM_DIGITAL_ENCODER 1 3062 1.1 riastrad #define ATOM_DP_ENCODER 2 3063 1.1 riastrad 3064 1.1 riastrad #define ATOM_ENCODER_ENUM_MASK 0x70 3065 1.1 riastrad #define ATOM_ENCODER_ENUM_ID1 0x00 3066 1.1 riastrad #define ATOM_ENCODER_ENUM_ID2 0x10 3067 1.1 riastrad #define ATOM_ENCODER_ENUM_ID3 0x20 3068 1.1 riastrad #define ATOM_ENCODER_ENUM_ID4 0x30 3069 1.1 riastrad #define ATOM_ENCODER_ENUM_ID5 0x40 3070 1.1 riastrad #define ATOM_ENCODER_ENUM_ID6 0x50 3071 1.1 riastrad 3072 1.1 riastrad #define ATOM_DEVICE_CRT1_INDEX 0x00000000 3073 1.1 riastrad #define ATOM_DEVICE_LCD1_INDEX 0x00000001 3074 1.1 riastrad #define ATOM_DEVICE_TV1_INDEX 0x00000002 3075 1.1 riastrad #define ATOM_DEVICE_DFP1_INDEX 0x00000003 3076 1.1 riastrad #define ATOM_DEVICE_CRT2_INDEX 0x00000004 3077 1.1 riastrad #define ATOM_DEVICE_LCD2_INDEX 0x00000005 3078 1.1 riastrad #define ATOM_DEVICE_DFP6_INDEX 0x00000006 3079 1.1 riastrad #define ATOM_DEVICE_DFP2_INDEX 0x00000007 3080 1.1 riastrad #define ATOM_DEVICE_CV_INDEX 0x00000008 3081 1.1 riastrad #define ATOM_DEVICE_DFP3_INDEX 0x00000009 3082 1.1 riastrad #define ATOM_DEVICE_DFP4_INDEX 0x0000000A 3083 1.1 riastrad #define ATOM_DEVICE_DFP5_INDEX 0x0000000B 3084 1.1 riastrad 3085 1.1 riastrad #define ATOM_DEVICE_RESERVEDC_INDEX 0x0000000C 3086 1.1 riastrad #define ATOM_DEVICE_RESERVEDD_INDEX 0x0000000D 3087 1.1 riastrad #define ATOM_DEVICE_RESERVEDE_INDEX 0x0000000E 3088 1.1 riastrad #define ATOM_DEVICE_RESERVEDF_INDEX 0x0000000F 3089 1.1 riastrad #define ATOM_MAX_SUPPORTED_DEVICE_INFO (ATOM_DEVICE_DFP3_INDEX+1) 3090 1.1 riastrad #define ATOM_MAX_SUPPORTED_DEVICE_INFO_2 ATOM_MAX_SUPPORTED_DEVICE_INFO 3091 1.1 riastrad #define ATOM_MAX_SUPPORTED_DEVICE_INFO_3 (ATOM_DEVICE_DFP5_INDEX + 1 ) 3092 1.1 riastrad 3093 1.1 riastrad #define ATOM_MAX_SUPPORTED_DEVICE (ATOM_DEVICE_RESERVEDF_INDEX+1) 3094 1.1 riastrad 3095 1.1 riastrad #define ATOM_DEVICE_CRT1_SUPPORT (0x1L << ATOM_DEVICE_CRT1_INDEX ) 3096 1.1 riastrad #define ATOM_DEVICE_LCD1_SUPPORT (0x1L << ATOM_DEVICE_LCD1_INDEX ) 3097 1.1 riastrad #define ATOM_DEVICE_TV1_SUPPORT (0x1L << ATOM_DEVICE_TV1_INDEX ) 3098 1.1 riastrad #define ATOM_DEVICE_DFP1_SUPPORT (0x1L << ATOM_DEVICE_DFP1_INDEX ) 3099 1.1 riastrad #define ATOM_DEVICE_CRT2_SUPPORT (0x1L << ATOM_DEVICE_CRT2_INDEX ) 3100 1.1 riastrad #define ATOM_DEVICE_LCD2_SUPPORT (0x1L << ATOM_DEVICE_LCD2_INDEX ) 3101 1.1 riastrad #define ATOM_DEVICE_DFP6_SUPPORT (0x1L << ATOM_DEVICE_DFP6_INDEX ) 3102 1.1 riastrad #define ATOM_DEVICE_DFP2_SUPPORT (0x1L << ATOM_DEVICE_DFP2_INDEX ) 3103 1.1 riastrad #define ATOM_DEVICE_CV_SUPPORT (0x1L << ATOM_DEVICE_CV_INDEX ) 3104 1.1 riastrad #define ATOM_DEVICE_DFP3_SUPPORT (0x1L << ATOM_DEVICE_DFP3_INDEX ) 3105 1.1 riastrad #define ATOM_DEVICE_DFP4_SUPPORT (0x1L << ATOM_DEVICE_DFP4_INDEX ) 3106 1.1 riastrad #define ATOM_DEVICE_DFP5_SUPPORT (0x1L << ATOM_DEVICE_DFP5_INDEX ) 3107 1.1 riastrad 3108 1.1 riastrad #define ATOM_DEVICE_CRT_SUPPORT (ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT) 3109 1.1 riastrad #define ATOM_DEVICE_DFP_SUPPORT (ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT | ATOM_DEVICE_DFP3_SUPPORT | ATOM_DEVICE_DFP4_SUPPORT | ATOM_DEVICE_DFP5_SUPPORT | ATOM_DEVICE_DFP6_SUPPORT) 3110 1.1 riastrad #define ATOM_DEVICE_TV_SUPPORT (ATOM_DEVICE_TV1_SUPPORT) 3111 1.1 riastrad #define ATOM_DEVICE_LCD_SUPPORT (ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT) 3112 1.1 riastrad 3113 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_TYPE_MASK 0x000000F0 3114 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT 0x00000004 3115 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_VGA 0x00000001 3116 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_DVI_I 0x00000002 3117 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_DVI_D 0x00000003 3118 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_DVI_A 0x00000004 3119 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_SVIDEO 0x00000005 3120 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_COMPOSITE 0x00000006 3121 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_LVDS 0x00000007 3122 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_DIGI_LINK 0x00000008 3123 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_SCART 0x00000009 3124 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A 0x0000000A 3125 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B 0x0000000B 3126 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_CASE_1 0x0000000E 3127 1.1 riastrad #define ATOM_DEVICE_CONNECTOR_DISPLAYPORT 0x0000000F 3128 1.1 riastrad 3129 1.1 riastrad 3130 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_MASK 0x0000000F 3131 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_SHIFT 0x00000000 3132 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_NODAC 0x00000000 3133 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_DACA 0x00000001 3134 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_DACB 0x00000002 3135 1.1 riastrad #define ATOM_DEVICE_DAC_INFO_EXDAC 0x00000003 3136 1.1 riastrad 3137 1.1 riastrad #define ATOM_DEVICE_I2C_ID_NOI2C 0x00000000 3138 1.1 riastrad 3139 1.1 riastrad #define ATOM_DEVICE_I2C_LINEMUX_MASK 0x0000000F 3140 1.1 riastrad #define ATOM_DEVICE_I2C_LINEMUX_SHIFT 0x00000000 3141 1.1 riastrad 3142 1.1 riastrad #define ATOM_DEVICE_I2C_ID_MASK 0x00000070 3143 1.1 riastrad #define ATOM_DEVICE_I2C_ID_SHIFT 0x00000004 3144 1.1 riastrad #define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE 0x00000001 3145 1.1 riastrad #define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE 0x00000002 3146 1.1 riastrad #define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE 0x00000003 //For IGP RS600 3147 1.1 riastrad #define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL 0x00000004 //For IGP RS690 3148 1.1 riastrad 3149 1.1 riastrad #define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK 0x00000080 3150 1.1 riastrad #define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT 0x00000007 3151 1.1 riastrad #define ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C 0x00000000 3152 1.1 riastrad #define ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C 0x00000001 3153 1.1 riastrad 3154 1.1 riastrad // usDeviceSupport: 3155 1.1 riastrad // Bits0 = 0 - no CRT1 support= 1- CRT1 is supported 3156 1.1 riastrad // Bit 1 = 0 - no LCD1 support= 1- LCD1 is supported 3157 1.1 riastrad // Bit 2 = 0 - no TV1 support= 1- TV1 is supported 3158 1.1 riastrad // Bit 3 = 0 - no DFP1 support= 1- DFP1 is supported 3159 1.1 riastrad // Bit 4 = 0 - no CRT2 support= 1- CRT2 is supported 3160 1.1 riastrad // Bit 5 = 0 - no LCD2 support= 1- LCD2 is supported 3161 1.1 riastrad // Bit 6 = 0 - no DFP6 support= 1- DFP6 is supported 3162 1.1 riastrad // Bit 7 = 0 - no DFP2 support= 1- DFP2 is supported 3163 1.1 riastrad // Bit 8 = 0 - no CV support= 1- CV is supported 3164 1.1 riastrad // Bit 9 = 0 - no DFP3 support= 1- DFP3 is supported 3165 1.1 riastrad // Bit 10 = 0 - no DFP4 support= 1- DFP4 is supported 3166 1.1 riastrad // Bit 11 = 0 - no DFP5 support= 1- DFP5 is supported 3167 1.1 riastrad // 3168 1.1 riastrad // 3169 1.1 riastrad 3170 1.1 riastrad /****************************************************************************/ 3171 1.1 riastrad /* Structure used in MclkSS_InfoTable */ 3172 1.1 riastrad /****************************************************************************/ 3173 1.1 riastrad // ucI2C_ConfigID 3174 1.1 riastrad // [7:0] - I2C LINE Associate ID 3175 1.1 riastrad // = 0 - no I2C 3176 1.1 riastrad // [7] - HW_Cap = 1, [6:0]=HW assisted I2C ID(HW line selection) 3177 1.1 riastrad // = 0, [6:0]=SW assisted I2C ID 3178 1.1 riastrad // [6-4] - HW_ENGINE_ID = 1, HW engine for NON multimedia use 3179 1.1 riastrad // = 2, HW engine for Multimedia use 3180 1.1 riastrad // = 3-7 Reserved for future I2C engines 3181 1.1 riastrad // [3-0] - I2C_LINE_MUX = A Mux number when it's HW assisted I2C or GPIO ID when it's SW I2C 3182 1.1 riastrad 3183 1.1 riastrad typedef struct _ATOM_I2C_ID_CONFIG 3184 1.1 riastrad { 3185 1.1 riastrad #if ATOM_BIG_ENDIAN 3186 1.1 riastrad UCHAR bfHW_Capable:1; 3187 1.1 riastrad UCHAR bfHW_EngineID:3; 3188 1.1 riastrad UCHAR bfI2C_LineMux:4; 3189 1.1 riastrad #else 3190 1.1 riastrad UCHAR bfI2C_LineMux:4; 3191 1.1 riastrad UCHAR bfHW_EngineID:3; 3192 1.1 riastrad UCHAR bfHW_Capable:1; 3193 1.1 riastrad #endif 3194 1.1 riastrad }ATOM_I2C_ID_CONFIG; 3195 1.1 riastrad 3196 1.1 riastrad typedef union _ATOM_I2C_ID_CONFIG_ACCESS 3197 1.1 riastrad { 3198 1.1 riastrad ATOM_I2C_ID_CONFIG sbfAccess; 3199 1.1 riastrad UCHAR ucAccess; 3200 1.1 riastrad }ATOM_I2C_ID_CONFIG_ACCESS; 3201 1.1 riastrad 3202 1.1 riastrad 3203 1.1 riastrad /****************************************************************************/ 3204 1.1 riastrad // Structure used in GPIO_I2C_InfoTable 3205 1.1 riastrad /****************************************************************************/ 3206 1.1 riastrad typedef struct _ATOM_GPIO_I2C_ASSIGMENT 3207 1.1 riastrad { 3208 1.1 riastrad USHORT usClkMaskRegisterIndex; 3209 1.1 riastrad USHORT usClkEnRegisterIndex; 3210 1.1 riastrad USHORT usClkY_RegisterIndex; 3211 1.1 riastrad USHORT usClkA_RegisterIndex; 3212 1.1 riastrad USHORT usDataMaskRegisterIndex; 3213 1.1 riastrad USHORT usDataEnRegisterIndex; 3214 1.1 riastrad USHORT usDataY_RegisterIndex; 3215 1.1 riastrad USHORT usDataA_RegisterIndex; 3216 1.1 riastrad ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; 3217 1.1 riastrad UCHAR ucClkMaskShift; 3218 1.1 riastrad UCHAR ucClkEnShift; 3219 1.1 riastrad UCHAR ucClkY_Shift; 3220 1.1 riastrad UCHAR ucClkA_Shift; 3221 1.1 riastrad UCHAR ucDataMaskShift; 3222 1.1 riastrad UCHAR ucDataEnShift; 3223 1.1 riastrad UCHAR ucDataY_Shift; 3224 1.1 riastrad UCHAR ucDataA_Shift; 3225 1.1 riastrad UCHAR ucReserved1; 3226 1.1 riastrad UCHAR ucReserved2; 3227 1.1 riastrad }ATOM_GPIO_I2C_ASSIGMENT; 3228 1.1 riastrad 3229 1.1 riastrad typedef struct _ATOM_GPIO_I2C_INFO 3230 1.1 riastrad { 3231 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3232 1.1 riastrad ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE]; 3233 1.1 riastrad }ATOM_GPIO_I2C_INFO; 3234 1.1 riastrad 3235 1.1 riastrad /****************************************************************************/ 3236 1.1 riastrad // Common Structure used in other structures 3237 1.1 riastrad /****************************************************************************/ 3238 1.1 riastrad 3239 1.1 riastrad #ifndef _H2INC 3240 1.1 riastrad 3241 1.1 riastrad //Please don't add or expand this bitfield structure below, this one will retire soon.! 3242 1.1 riastrad typedef struct _ATOM_MODE_MISC_INFO 3243 1.1 riastrad { 3244 1.1 riastrad #if ATOM_BIG_ENDIAN 3245 1.1 riastrad USHORT Reserved:6; 3246 1.1 riastrad USHORT RGB888:1; 3247 1.1 riastrad USHORT DoubleClock:1; 3248 1.1 riastrad USHORT Interlace:1; 3249 1.1 riastrad USHORT CompositeSync:1; 3250 1.1 riastrad USHORT V_ReplicationBy2:1; 3251 1.1 riastrad USHORT H_ReplicationBy2:1; 3252 1.1 riastrad USHORT VerticalCutOff:1; 3253 1.1 riastrad USHORT VSyncPolarity:1; //0=Active High, 1=Active Low 3254 1.1 riastrad USHORT HSyncPolarity:1; //0=Active High, 1=Active Low 3255 1.1 riastrad USHORT HorizontalCutOff:1; 3256 1.1 riastrad #else 3257 1.1 riastrad USHORT HorizontalCutOff:1; 3258 1.1 riastrad USHORT HSyncPolarity:1; //0=Active High, 1=Active Low 3259 1.1 riastrad USHORT VSyncPolarity:1; //0=Active High, 1=Active Low 3260 1.1 riastrad USHORT VerticalCutOff:1; 3261 1.1 riastrad USHORT H_ReplicationBy2:1; 3262 1.1 riastrad USHORT V_ReplicationBy2:1; 3263 1.1 riastrad USHORT CompositeSync:1; 3264 1.1 riastrad USHORT Interlace:1; 3265 1.1 riastrad USHORT DoubleClock:1; 3266 1.1 riastrad USHORT RGB888:1; 3267 1.1 riastrad USHORT Reserved:6; 3268 1.1 riastrad #endif 3269 1.1 riastrad }ATOM_MODE_MISC_INFO; 3270 1.1 riastrad 3271 1.1 riastrad typedef union _ATOM_MODE_MISC_INFO_ACCESS 3272 1.1 riastrad { 3273 1.1 riastrad ATOM_MODE_MISC_INFO sbfAccess; 3274 1.1 riastrad USHORT usAccess; 3275 1.1 riastrad }ATOM_MODE_MISC_INFO_ACCESS; 3276 1.1 riastrad 3277 1.1 riastrad #else 3278 1.1 riastrad 3279 1.1 riastrad typedef union _ATOM_MODE_MISC_INFO_ACCESS 3280 1.1 riastrad { 3281 1.1 riastrad USHORT usAccess; 3282 1.1 riastrad }ATOM_MODE_MISC_INFO_ACCESS; 3283 1.1 riastrad 3284 1.1 riastrad #endif 3285 1.1 riastrad 3286 1.1 riastrad // usModeMiscInfo- 3287 1.1 riastrad #define ATOM_H_CUTOFF 0x01 3288 1.1 riastrad #define ATOM_HSYNC_POLARITY 0x02 //0=Active High, 1=Active Low 3289 1.1 riastrad #define ATOM_VSYNC_POLARITY 0x04 //0=Active High, 1=Active Low 3290 1.1 riastrad #define ATOM_V_CUTOFF 0x08 3291 1.1 riastrad #define ATOM_H_REPLICATIONBY2 0x10 3292 1.1 riastrad #define ATOM_V_REPLICATIONBY2 0x20 3293 1.1 riastrad #define ATOM_COMPOSITESYNC 0x40 3294 1.1 riastrad #define ATOM_INTERLACE 0x80 3295 1.1 riastrad #define ATOM_DOUBLE_CLOCK_MODE 0x100 3296 1.1 riastrad #define ATOM_RGB888_MODE 0x200 3297 1.1 riastrad 3298 1.1 riastrad //usRefreshRate- 3299 1.1 riastrad #define ATOM_REFRESH_43 43 3300 1.1 riastrad #define ATOM_REFRESH_47 47 3301 1.1 riastrad #define ATOM_REFRESH_56 56 3302 1.1 riastrad #define ATOM_REFRESH_60 60 3303 1.1 riastrad #define ATOM_REFRESH_65 65 3304 1.1 riastrad #define ATOM_REFRESH_70 70 3305 1.1 riastrad #define ATOM_REFRESH_72 72 3306 1.1 riastrad #define ATOM_REFRESH_75 75 3307 1.1 riastrad #define ATOM_REFRESH_85 85 3308 1.1 riastrad 3309 1.1 riastrad // ATOM_MODE_TIMING data are exactly the same as VESA timing data. 3310 1.1 riastrad // Translation from EDID to ATOM_MODE_TIMING, use the following formula. 3311 1.1 riastrad // 3312 1.1 riastrad // VESA_HTOTAL = VESA_ACTIVE + 2* VESA_BORDER + VESA_BLANK 3313 1.1 riastrad // = EDID_HA + EDID_HBL 3314 1.1 riastrad // VESA_HDISP = VESA_ACTIVE = EDID_HA 3315 1.1 riastrad // VESA_HSYNC_START = VESA_ACTIVE + VESA_BORDER + VESA_FRONT_PORCH 3316 1.1 riastrad // = EDID_HA + EDID_HSO 3317 1.1 riastrad // VESA_HSYNC_WIDTH = VESA_HSYNC_TIME = EDID_HSPW 3318 1.1 riastrad // VESA_BORDER = EDID_BORDER 3319 1.1 riastrad 3320 1.1 riastrad /****************************************************************************/ 3321 1.1 riastrad // Structure used in SetCRTC_UsingDTDTimingTable 3322 1.1 riastrad /****************************************************************************/ 3323 1.1 riastrad typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS 3324 1.1 riastrad { 3325 1.1 riastrad USHORT usH_Size; 3326 1.1 riastrad USHORT usH_Blanking_Time; 3327 1.1 riastrad USHORT usV_Size; 3328 1.1 riastrad USHORT usV_Blanking_Time; 3329 1.1 riastrad USHORT usH_SyncOffset; 3330 1.1 riastrad USHORT usH_SyncWidth; 3331 1.1 riastrad USHORT usV_SyncOffset; 3332 1.1 riastrad USHORT usV_SyncWidth; 3333 1.1 riastrad ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; 3334 1.1 riastrad UCHAR ucH_Border; // From DFP EDID 3335 1.1 riastrad UCHAR ucV_Border; 3336 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 3337 1.1 riastrad UCHAR ucPadding[3]; 3338 1.1 riastrad }SET_CRTC_USING_DTD_TIMING_PARAMETERS; 3339 1.1 riastrad 3340 1.1 riastrad /****************************************************************************/ 3341 1.1 riastrad // Structure used in SetCRTC_TimingTable 3342 1.1 riastrad /****************************************************************************/ 3343 1.1 riastrad typedef struct _SET_CRTC_TIMING_PARAMETERS 3344 1.1 riastrad { 3345 1.1 riastrad USHORT usH_Total; // horizontal total 3346 1.1 riastrad USHORT usH_Disp; // horizontal display 3347 1.1 riastrad USHORT usH_SyncStart; // horozontal Sync start 3348 1.1 riastrad USHORT usH_SyncWidth; // horizontal Sync width 3349 1.1 riastrad USHORT usV_Total; // vertical total 3350 1.1 riastrad USHORT usV_Disp; // vertical display 3351 1.1 riastrad USHORT usV_SyncStart; // vertical Sync start 3352 1.1 riastrad USHORT usV_SyncWidth; // vertical Sync width 3353 1.1 riastrad ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; 3354 1.1 riastrad UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 3355 1.1 riastrad UCHAR ucOverscanRight; // right 3356 1.1 riastrad UCHAR ucOverscanLeft; // left 3357 1.1 riastrad UCHAR ucOverscanBottom; // bottom 3358 1.1 riastrad UCHAR ucOverscanTop; // top 3359 1.1 riastrad UCHAR ucReserved; 3360 1.1 riastrad }SET_CRTC_TIMING_PARAMETERS; 3361 1.1 riastrad #define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS 3362 1.1 riastrad 3363 1.1 riastrad /****************************************************************************/ 3364 1.1 riastrad // Structure used in StandardVESA_TimingTable 3365 1.1 riastrad // AnalogTV_InfoTable 3366 1.1 riastrad // ComponentVideoInfoTable 3367 1.1 riastrad /****************************************************************************/ 3368 1.1 riastrad typedef struct _ATOM_MODE_TIMING 3369 1.1 riastrad { 3370 1.1 riastrad USHORT usCRTC_H_Total; 3371 1.1 riastrad USHORT usCRTC_H_Disp; 3372 1.1 riastrad USHORT usCRTC_H_SyncStart; 3373 1.1 riastrad USHORT usCRTC_H_SyncWidth; 3374 1.1 riastrad USHORT usCRTC_V_Total; 3375 1.1 riastrad USHORT usCRTC_V_Disp; 3376 1.1 riastrad USHORT usCRTC_V_SyncStart; 3377 1.1 riastrad USHORT usCRTC_V_SyncWidth; 3378 1.1 riastrad USHORT usPixelClock; //in 10Khz unit 3379 1.1 riastrad ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; 3380 1.1 riastrad USHORT usCRTC_OverscanRight; 3381 1.1 riastrad USHORT usCRTC_OverscanLeft; 3382 1.1 riastrad USHORT usCRTC_OverscanBottom; 3383 1.1 riastrad USHORT usCRTC_OverscanTop; 3384 1.1 riastrad USHORT usReserve; 3385 1.1 riastrad UCHAR ucInternalModeNumber; 3386 1.1 riastrad UCHAR ucRefreshRate; 3387 1.1 riastrad }ATOM_MODE_TIMING; 3388 1.1 riastrad 3389 1.1 riastrad typedef struct _ATOM_DTD_FORMAT 3390 1.1 riastrad { 3391 1.1 riastrad USHORT usPixClk; 3392 1.1 riastrad USHORT usHActive; 3393 1.1 riastrad USHORT usHBlanking_Time; 3394 1.1 riastrad USHORT usVActive; 3395 1.1 riastrad USHORT usVBlanking_Time; 3396 1.1 riastrad USHORT usHSyncOffset; 3397 1.1 riastrad USHORT usHSyncWidth; 3398 1.1 riastrad USHORT usVSyncOffset; 3399 1.1 riastrad USHORT usVSyncWidth; 3400 1.1 riastrad USHORT usImageHSize; 3401 1.1 riastrad USHORT usImageVSize; 3402 1.1 riastrad UCHAR ucHBorder; 3403 1.1 riastrad UCHAR ucVBorder; 3404 1.1 riastrad ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; 3405 1.1 riastrad UCHAR ucInternalModeNumber; 3406 1.1 riastrad UCHAR ucRefreshRate; 3407 1.1 riastrad }ATOM_DTD_FORMAT; 3408 1.1 riastrad 3409 1.1 riastrad /****************************************************************************/ 3410 1.1 riastrad // Structure used in LVDS_InfoTable 3411 1.1 riastrad // * Need a document to describe this table 3412 1.1 riastrad /****************************************************************************/ 3413 1.1 riastrad #define SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 3414 1.1 riastrad #define SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 3415 1.1 riastrad #define SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 3416 1.1 riastrad #define SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 3417 1.1 riastrad 3418 1.1 riastrad //ucTableFormatRevision=1 3419 1.1 riastrad //ucTableContentRevision=1 3420 1.1 riastrad typedef struct _ATOM_LVDS_INFO 3421 1.1 riastrad { 3422 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3423 1.1 riastrad ATOM_DTD_FORMAT sLCDTiming; 3424 1.1 riastrad USHORT usModePatchTableOffset; 3425 1.1 riastrad USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. 3426 1.1 riastrad USHORT usOffDelayInMs; 3427 1.1 riastrad UCHAR ucPowerSequenceDigOntoDEin10Ms; 3428 1.1 riastrad UCHAR ucPowerSequenceDEtoBLOnin10Ms; 3429 1.1 riastrad UCHAR ucLVDS_Misc; // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} 3430 1.1 riastrad // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} 3431 1.1 riastrad // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} 3432 1.1 riastrad // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} 3433 1.1 riastrad UCHAR ucPanelDefaultRefreshRate; 3434 1.1 riastrad UCHAR ucPanelIdentification; 3435 1.1 riastrad UCHAR ucSS_Id; 3436 1.1 riastrad }ATOM_LVDS_INFO; 3437 1.1 riastrad 3438 1.1 riastrad //ucTableFormatRevision=1 3439 1.1 riastrad //ucTableContentRevision=2 3440 1.1 riastrad typedef struct _ATOM_LVDS_INFO_V12 3441 1.1 riastrad { 3442 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3443 1.1 riastrad ATOM_DTD_FORMAT sLCDTiming; 3444 1.1 riastrad USHORT usExtInfoTableOffset; 3445 1.1 riastrad USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. 3446 1.1 riastrad USHORT usOffDelayInMs; 3447 1.1 riastrad UCHAR ucPowerSequenceDigOntoDEin10Ms; 3448 1.1 riastrad UCHAR ucPowerSequenceDEtoBLOnin10Ms; 3449 1.1 riastrad UCHAR ucLVDS_Misc; // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} 3450 1.1 riastrad // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} 3451 1.1 riastrad // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} 3452 1.1 riastrad // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} 3453 1.1 riastrad UCHAR ucPanelDefaultRefreshRate; 3454 1.1 riastrad UCHAR ucPanelIdentification; 3455 1.1 riastrad UCHAR ucSS_Id; 3456 1.1 riastrad USHORT usLCDVenderID; 3457 1.1 riastrad USHORT usLCDProductID; 3458 1.1 riastrad UCHAR ucLCDPanel_SpecialHandlingCap; 3459 1.1 riastrad UCHAR ucPanelInfoSize; // start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable 3460 1.1 riastrad UCHAR ucReserved[2]; 3461 1.1 riastrad }ATOM_LVDS_INFO_V12; 3462 1.1 riastrad 3463 1.1 riastrad //Definitions for ucLCDPanel_SpecialHandlingCap: 3464 1.1 riastrad 3465 1.1 riastrad //Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. 3466 1.1 riastrad //Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL 3467 1.1 riastrad #define LCDPANEL_CAP_READ_EDID 0x1 3468 1.1 riastrad 3469 1.1 riastrad //If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together 3470 1.1 riastrad //with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static 3471 1.1 riastrad //refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12 3472 1.1 riastrad #define LCDPANEL_CAP_DRR_SUPPORTED 0x2 3473 1.1 riastrad 3474 1.1 riastrad //Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. 3475 1.1 riastrad #define LCDPANEL_CAP_eDP 0x4 3476 1.1 riastrad 3477 1.1 riastrad 3478 1.1 riastrad //Color Bit Depth definition in EDID V1.4 @BYTE 14h 3479 1.1 riastrad //Bit 6 5 4 3480 1.1 riastrad // 0 0 0 - Color bit depth is undefined 3481 1.1 riastrad // 0 0 1 - 6 Bits per Primary Color 3482 1.1 riastrad // 0 1 0 - 8 Bits per Primary Color 3483 1.1 riastrad // 0 1 1 - 10 Bits per Primary Color 3484 1.1 riastrad // 1 0 0 - 12 Bits per Primary Color 3485 1.1 riastrad // 1 0 1 - 14 Bits per Primary Color 3486 1.1 riastrad // 1 1 0 - 16 Bits per Primary Color 3487 1.1 riastrad // 1 1 1 - Reserved 3488 1.1 riastrad 3489 1.1 riastrad #define PANEL_COLOR_BIT_DEPTH_MASK 0x70 3490 1.1 riastrad 3491 1.1 riastrad // Bit7:{=0:Random Dithering disabled;1 Random Dithering enabled} 3492 1.1 riastrad #define PANEL_RANDOM_DITHER 0x80 3493 1.1 riastrad #define PANEL_RANDOM_DITHER_MASK 0x80 3494 1.1 riastrad 3495 1.1 riastrad #define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12 // no need to change this 3496 1.1 riastrad 3497 1.1 riastrad /****************************************************************************/ 3498 1.1 riastrad // Structures used by LCD_InfoTable V1.3 Note: previous version was called ATOM_LVDS_INFO_V12 3499 1.1 riastrad // ASIC Families: NI 3500 1.1 riastrad // ucTableFormatRevision=1 3501 1.1 riastrad // ucTableContentRevision=3 3502 1.1 riastrad /****************************************************************************/ 3503 1.1 riastrad typedef struct _ATOM_LCD_INFO_V13 3504 1.1 riastrad { 3505 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3506 1.1 riastrad ATOM_DTD_FORMAT sLCDTiming; 3507 1.1 riastrad USHORT usExtInfoTableOffset; 3508 1.1 riastrad USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. 3509 1.1 riastrad ULONG ulReserved0; 3510 1.1 riastrad UCHAR ucLCD_Misc; // Reorganized in V13 3511 1.1 riastrad // Bit0: {=0:single, =1:dual}, 3512 1.1 riastrad // Bit1: {=0:LDI format for RGB888, =1 FPDI format for RGB888} // was {=0:666RGB, =1:888RGB}, 3513 1.1 riastrad // Bit3:2: {Grey level} 3514 1.1 riastrad // Bit6:4 Color Bit Depth definition (see below definition in EDID V1.4 @BYTE 14h) 3515 1.1 riastrad // Bit7 Reserved. was for ATOM_PANEL_MISC_API_ENABLED, still need it? 3516 1.1 riastrad UCHAR ucPanelDefaultRefreshRate; 3517 1.1 riastrad UCHAR ucPanelIdentification; 3518 1.1 riastrad UCHAR ucSS_Id; 3519 1.1 riastrad USHORT usLCDVenderID; 3520 1.1 riastrad USHORT usLCDProductID; 3521 1.1 riastrad UCHAR ucLCDPanel_SpecialHandlingCap; // Reorganized in V13 3522 1.1 riastrad // Bit0: Once DAL sees this CAP is set, it will read EDID from LCD on its own 3523 1.1 riastrad // Bit1: See LCDPANEL_CAP_DRR_SUPPORTED 3524 1.1 riastrad // Bit2: a quick reference whether an embadded panel (LCD1 ) is LVDS (0) or eDP (1) 3525 1.1 riastrad // Bit7-3: Reserved 3526 1.1 riastrad UCHAR ucPanelInfoSize; // start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable 3527 1.1 riastrad USHORT usBacklightPWM; // Backlight PWM in Hz. New in _V13 3528 1.1 riastrad 3529 1.1 riastrad UCHAR ucPowerSequenceDIGONtoDE_in4Ms; 3530 1.1 riastrad UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms; 3531 1.1 riastrad UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms; 3532 1.1 riastrad UCHAR ucPowerSequenceDEtoDIGON_in4Ms; 3533 1.1 riastrad 3534 1.1 riastrad UCHAR ucOffDelay_in4Ms; 3535 1.1 riastrad UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms; 3536 1.1 riastrad UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms; 3537 1.1 riastrad UCHAR ucReserved1; 3538 1.1 riastrad 3539 1.1 riastrad UCHAR ucDPCD_eDP_CONFIGURATION_CAP; // dpcd 0dh 3540 1.1 riastrad UCHAR ucDPCD_MAX_LINK_RATE; // dpcd 01h 3541 1.1 riastrad UCHAR ucDPCD_MAX_LANE_COUNT; // dpcd 02h 3542 1.1 riastrad UCHAR ucDPCD_MAX_DOWNSPREAD; // dpcd 03h 3543 1.1 riastrad 3544 1.1 riastrad USHORT usMaxPclkFreqInSingleLink; // Max PixelClock frequency in single link mode. 3545 1.1 riastrad UCHAR uceDPToLVDSRxId; 3546 1.1 riastrad UCHAR ucLcdReservd; 3547 1.1 riastrad ULONG ulReserved[2]; 3548 1.1 riastrad }ATOM_LCD_INFO_V13; 3549 1.1 riastrad 3550 1.1 riastrad #define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13 3551 1.1 riastrad 3552 1.1 riastrad //Definitions for ucLCD_Misc 3553 1.1 riastrad #define ATOM_PANEL_MISC_V13_DUAL 0x00000001 3554 1.1 riastrad #define ATOM_PANEL_MISC_V13_FPDI 0x00000002 3555 1.1 riastrad #define ATOM_PANEL_MISC_V13_GREY_LEVEL 0x0000000C 3556 1.1 riastrad #define ATOM_PANEL_MISC_V13_GREY_LEVEL_SHIFT 2 3557 1.1 riastrad #define ATOM_PANEL_MISC_V13_COLOR_BIT_DEPTH_MASK 0x70 3558 1.1 riastrad #define ATOM_PANEL_MISC_V13_6BIT_PER_COLOR 0x10 3559 1.1 riastrad #define ATOM_PANEL_MISC_V13_8BIT_PER_COLOR 0x20 3560 1.1 riastrad 3561 1.1 riastrad //Color Bit Depth definition in EDID V1.4 @BYTE 14h 3562 1.1 riastrad //Bit 6 5 4 3563 1.1 riastrad // 0 0 0 - Color bit depth is undefined 3564 1.1 riastrad // 0 0 1 - 6 Bits per Primary Color 3565 1.1 riastrad // 0 1 0 - 8 Bits per Primary Color 3566 1.1 riastrad // 0 1 1 - 10 Bits per Primary Color 3567 1.1 riastrad // 1 0 0 - 12 Bits per Primary Color 3568 1.1 riastrad // 1 0 1 - 14 Bits per Primary Color 3569 1.1 riastrad // 1 1 0 - 16 Bits per Primary Color 3570 1.1 riastrad // 1 1 1 - Reserved 3571 1.1 riastrad 3572 1.1 riastrad //Definitions for ucLCDPanel_SpecialHandlingCap: 3573 1.1 riastrad 3574 1.1 riastrad //Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. 3575 1.1 riastrad //Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL 3576 1.1 riastrad #define LCDPANEL_CAP_V13_READ_EDID 0x1 // = LCDPANEL_CAP_READ_EDID no change comparing to previous version 3577 1.1 riastrad 3578 1.1 riastrad //If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together 3579 1.1 riastrad //with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static 3580 1.1 riastrad //refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12 3581 1.1 riastrad #define LCDPANEL_CAP_V13_DRR_SUPPORTED 0x2 // = LCDPANEL_CAP_DRR_SUPPORTED no change comparing to previous version 3582 1.1 riastrad 3583 1.1 riastrad //Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. 3584 1.1 riastrad #define LCDPANEL_CAP_V13_eDP 0x4 // = LCDPANEL_CAP_eDP no change comparing to previous version 3585 1.1 riastrad 3586 1.1 riastrad //uceDPToLVDSRxId 3587 1.1 riastrad #define eDP_TO_LVDS_RX_DISABLE 0x00 // no eDP->LVDS translator chip 3588 1.1 riastrad #define eDP_TO_LVDS_COMMON_ID 0x01 // common eDP->LVDS translator chip without AMD SW init 3589 1.1 riastrad #define eDP_TO_LVDS_RT_ID 0x02 // RT tanslator which require AMD SW init 3590 1.1 riastrad 3591 1.1 riastrad typedef struct _ATOM_PATCH_RECORD_MODE 3592 1.1 riastrad { 3593 1.1 riastrad UCHAR ucRecordType; 3594 1.1 riastrad USHORT usHDisp; 3595 1.1 riastrad USHORT usVDisp; 3596 1.1 riastrad }ATOM_PATCH_RECORD_MODE; 3597 1.1 riastrad 3598 1.1 riastrad typedef struct _ATOM_LCD_RTS_RECORD 3599 1.1 riastrad { 3600 1.1 riastrad UCHAR ucRecordType; 3601 1.1 riastrad UCHAR ucRTSValue; 3602 1.1 riastrad }ATOM_LCD_RTS_RECORD; 3603 1.1 riastrad 3604 1.1 riastrad //!! If the record below exits, it shoud always be the first record for easy use in command table!!! 3605 1.1 riastrad // The record below is only used when LVDS_Info is present. From ATOM_LVDS_INFO_V12, use ucLCDPanel_SpecialHandlingCap instead. 3606 1.1 riastrad typedef struct _ATOM_LCD_MODE_CONTROL_CAP 3607 1.1 riastrad { 3608 1.1 riastrad UCHAR ucRecordType; 3609 1.1 riastrad USHORT usLCDCap; 3610 1.1 riastrad }ATOM_LCD_MODE_CONTROL_CAP; 3611 1.1 riastrad 3612 1.1 riastrad #define LCD_MODE_CAP_BL_OFF 1 3613 1.1 riastrad #define LCD_MODE_CAP_CRTC_OFF 2 3614 1.1 riastrad #define LCD_MODE_CAP_PANEL_OFF 4 3615 1.1 riastrad 3616 1.1 riastrad typedef struct _ATOM_FAKE_EDID_PATCH_RECORD 3617 1.1 riastrad { 3618 1.1 riastrad UCHAR ucRecordType; 3619 1.1 riastrad UCHAR ucFakeEDIDLength; 3620 1.1 riastrad UCHAR ucFakeEDIDString[1]; // This actually has ucFakeEdidLength elements. 3621 1.1 riastrad } ATOM_FAKE_EDID_PATCH_RECORD; 3622 1.1 riastrad 3623 1.1 riastrad typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD 3624 1.1 riastrad { 3625 1.1 riastrad UCHAR ucRecordType; 3626 1.1 riastrad USHORT usHSize; 3627 1.1 riastrad USHORT usVSize; 3628 1.1 riastrad }ATOM_PANEL_RESOLUTION_PATCH_RECORD; 3629 1.1 riastrad 3630 1.1 riastrad #define LCD_MODE_PATCH_RECORD_MODE_TYPE 1 3631 1.1 riastrad #define LCD_RTS_RECORD_TYPE 2 3632 1.1 riastrad #define LCD_CAP_RECORD_TYPE 3 3633 1.1 riastrad #define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4 3634 1.1 riastrad #define LCD_PANEL_RESOLUTION_RECORD_TYPE 5 3635 1.1 riastrad #define LCD_EDID_OFFSET_PATCH_RECORD_TYPE 6 3636 1.1 riastrad #define ATOM_RECORD_END_TYPE 0xFF 3637 1.1 riastrad 3638 1.1 riastrad /****************************Spread Spectrum Info Table Definitions **********************/ 3639 1.1 riastrad 3640 1.1 riastrad //ucTableFormatRevision=1 3641 1.1 riastrad //ucTableContentRevision=2 3642 1.1 riastrad typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT 3643 1.1 riastrad { 3644 1.1 riastrad USHORT usSpreadSpectrumPercentage; 3645 1.1 riastrad UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Bit2=1: PCIE REFCLK SS =0 iternal PPLL SS Others:TBD 3646 1.1 riastrad UCHAR ucSS_Step; 3647 1.1 riastrad UCHAR ucSS_Delay; 3648 1.1 riastrad UCHAR ucSS_Id; 3649 1.1 riastrad UCHAR ucRecommendedRef_Div; 3650 1.1 riastrad UCHAR ucSS_Range; //it was reserved for V11 3651 1.1 riastrad }ATOM_SPREAD_SPECTRUM_ASSIGNMENT; 3652 1.1 riastrad 3653 1.1 riastrad #define ATOM_MAX_SS_ENTRY 16 3654 1.1 riastrad #define ATOM_DP_SS_ID1 0x0f1 // SS ID for internal DP stream at 2.7Ghz. if ATOM_DP_SS_ID2 does not exist in SS_InfoTable, it is used for internal DP stream at 1.62Ghz as well. 3655 1.1 riastrad #define ATOM_DP_SS_ID2 0x0f2 // SS ID for internal DP stream at 1.62Ghz, if it exists in SS_InfoTable. 3656 1.1 riastrad #define ATOM_LVLINK_2700MHz_SS_ID 0x0f3 // SS ID for LV link translator chip at 2.7Ghz 3657 1.1 riastrad #define ATOM_LVLINK_1620MHz_SS_ID 0x0f4 // SS ID for LV link translator chip at 1.62Ghz 3658 1.1 riastrad 3659 1.1 riastrad 3660 1.1 riastrad #define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000 3661 1.1 riastrad #define ATOM_SS_DOWN_SPREAD_MODE 0x00000000 3662 1.1 riastrad #define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001 3663 1.1 riastrad #define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001 3664 1.1 riastrad #define ATOM_INTERNAL_SS_MASK 0x00000000 3665 1.1 riastrad #define ATOM_EXTERNAL_SS_MASK 0x00000002 3666 1.1 riastrad #define EXEC_SS_STEP_SIZE_SHIFT 2 3667 1.1 riastrad #define EXEC_SS_DELAY_SHIFT 4 3668 1.1 riastrad #define ACTIVEDATA_TO_BLON_DELAY_SHIFT 4 3669 1.1 riastrad 3670 1.1 riastrad typedef struct _ATOM_SPREAD_SPECTRUM_INFO 3671 1.1 riastrad { 3672 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3673 1.1 riastrad ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY]; 3674 1.1 riastrad }ATOM_SPREAD_SPECTRUM_INFO; 3675 1.1 riastrad 3676 1.1 riastrad /****************************************************************************/ 3677 1.1 riastrad // Structure used in AnalogTV_InfoTable (Top level) 3678 1.1 riastrad /****************************************************************************/ 3679 1.1 riastrad //ucTVBootUpDefaultStd definition: 3680 1.1 riastrad 3681 1.1 riastrad //ATOM_TV_NTSC 1 3682 1.1 riastrad //ATOM_TV_NTSCJ 2 3683 1.1 riastrad //ATOM_TV_PAL 3 3684 1.1 riastrad //ATOM_TV_PALM 4 3685 1.1 riastrad //ATOM_TV_PALCN 5 3686 1.1 riastrad //ATOM_TV_PALN 6 3687 1.1 riastrad //ATOM_TV_PAL60 7 3688 1.1 riastrad //ATOM_TV_SECAM 8 3689 1.1 riastrad 3690 1.1 riastrad //ucTVSupportedStd definition: 3691 1.1 riastrad #define NTSC_SUPPORT 0x1 3692 1.1 riastrad #define NTSCJ_SUPPORT 0x2 3693 1.1 riastrad 3694 1.1 riastrad #define PAL_SUPPORT 0x4 3695 1.1 riastrad #define PALM_SUPPORT 0x8 3696 1.1 riastrad #define PALCN_SUPPORT 0x10 3697 1.1 riastrad #define PALN_SUPPORT 0x20 3698 1.1 riastrad #define PAL60_SUPPORT 0x40 3699 1.1 riastrad #define SECAM_SUPPORT 0x80 3700 1.1 riastrad 3701 1.1 riastrad #define MAX_SUPPORTED_TV_TIMING 2 3702 1.1 riastrad 3703 1.1 riastrad typedef struct _ATOM_ANALOG_TV_INFO 3704 1.1 riastrad { 3705 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3706 1.1 riastrad UCHAR ucTV_SupportedStandard; 3707 1.1 riastrad UCHAR ucTV_BootUpDefaultStandard; 3708 1.1 riastrad UCHAR ucExt_TV_ASIC_ID; 3709 1.1 riastrad UCHAR ucExt_TV_ASIC_SlaveAddr; 3710 1.1 riastrad /*ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING];*/ 3711 1.1 riastrad ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING]; 3712 1.1 riastrad }ATOM_ANALOG_TV_INFO; 3713 1.1 riastrad 3714 1.1 riastrad #define MAX_SUPPORTED_TV_TIMING_V1_2 3 3715 1.1 riastrad 3716 1.1 riastrad typedef struct _ATOM_ANALOG_TV_INFO_V1_2 3717 1.1 riastrad { 3718 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3719 1.1 riastrad UCHAR ucTV_SupportedStandard; 3720 1.1 riastrad UCHAR ucTV_BootUpDefaultStandard; 3721 1.1 riastrad UCHAR ucExt_TV_ASIC_ID; 3722 1.1 riastrad UCHAR ucExt_TV_ASIC_SlaveAddr; 3723 1.1 riastrad ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2]; 3724 1.1 riastrad }ATOM_ANALOG_TV_INFO_V1_2; 3725 1.1 riastrad 3726 1.1 riastrad typedef struct _ATOM_DPCD_INFO 3727 1.1 riastrad { 3728 1.1 riastrad UCHAR ucRevisionNumber; //10h : Revision 1.0; 11h : Revision 1.1 3729 1.1 riastrad UCHAR ucMaxLinkRate; //06h : 1.62Gbps per lane; 0Ah = 2.7Gbps per lane 3730 1.1 riastrad UCHAR ucMaxLane; //Bits 4:0 = MAX_LANE_COUNT (1/2/4). Bit 7 = ENHANCED_FRAME_CAP 3731 1.1 riastrad UCHAR ucMaxDownSpread; //Bit0 = 0: No Down spread; Bit0 = 1: 0.5% (Subject to change according to DP spec) 3732 1.1 riastrad }ATOM_DPCD_INFO; 3733 1.1 riastrad 3734 1.1 riastrad #define ATOM_DPCD_MAX_LANE_MASK 0x1F 3735 1.1 riastrad 3736 1.1 riastrad /**************************************************************************/ 3737 1.4 riastrad // VRAM usage and their defintions 3738 1.1 riastrad 3739 1.1 riastrad // One chunk of VRAM used by Bios are for HWICON surfaces,EDID data. 3740 1.1 riastrad // Current Mode timing and Dail Timing and/or STD timing data EACH device. They can be broken down as below. 3741 1.1 riastrad // All the addresses below are the offsets from the frame buffer start.They all MUST be Dword aligned! 3742 1.1 riastrad // To driver: The physical address of this memory portion=mmFB_START(4K aligned)+ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR 3743 1.1 riastrad // To Bios: ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR->MM_INDEX 3744 1.1 riastrad 3745 1.1 riastrad #ifndef VESA_MEMORY_IN_64K_BLOCK 3746 1.1 riastrad #define VESA_MEMORY_IN_64K_BLOCK 0x100 //256*64K=16Mb (Max. VESA memory is 16Mb!) 3747 1.1 riastrad #endif 3748 1.1 riastrad 3749 1.1 riastrad #define ATOM_EDID_RAW_DATASIZE 256 //In Bytes 3750 1.1 riastrad #define ATOM_HWICON_SURFACE_SIZE 4096 //In Bytes 3751 1.1 riastrad #define ATOM_HWICON_INFOTABLE_SIZE 32 3752 1.1 riastrad #define MAX_DTD_MODE_IN_VRAM 6 3753 1.1 riastrad #define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28) //28= (SIZEOF ATOM_DTD_FORMAT) 3754 1.1 riastrad #define ATOM_STD_MODE_SUPPORT_TBL_SIZE 32*8 //32 is a predefined number,8= (SIZEOF ATOM_STD_FORMAT) 3755 1.1 riastrad //20 bytes for Encoder Type and DPCD in STD EDID area 3756 1.1 riastrad #define DFP_ENCODER_TYPE_OFFSET (ATOM_EDID_RAW_DATASIZE + ATOM_DTD_MODE_SUPPORT_TBL_SIZE + ATOM_STD_MODE_SUPPORT_TBL_SIZE - 20) 3757 1.1 riastrad #define ATOM_DP_DPCD_OFFSET (DFP_ENCODER_TYPE_OFFSET + 4 ) 3758 1.1 riastrad 3759 1.1 riastrad #define ATOM_HWICON1_SURFACE_ADDR 0 3760 1.1 riastrad #define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) 3761 1.1 riastrad #define ATOM_HWICON_INFOTABLE_ADDR (ATOM_HWICON2_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) 3762 1.1 riastrad #define ATOM_CRT1_EDID_ADDR (ATOM_HWICON_INFOTABLE_ADDR + ATOM_HWICON_INFOTABLE_SIZE) 3763 1.1 riastrad #define ATOM_CRT1_DTD_MODE_TBL_ADDR (ATOM_CRT1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3764 1.1 riastrad #define ATOM_CRT1_STD_MODE_TBL_ADDR (ATOM_CRT1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3765 1.1 riastrad 3766 1.1 riastrad #define ATOM_LCD1_EDID_ADDR (ATOM_CRT1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3767 1.1 riastrad #define ATOM_LCD1_DTD_MODE_TBL_ADDR (ATOM_LCD1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3768 1.1 riastrad #define ATOM_LCD1_STD_MODE_TBL_ADDR (ATOM_LCD1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3769 1.1 riastrad 3770 1.1 riastrad #define ATOM_TV1_DTD_MODE_TBL_ADDR (ATOM_LCD1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3771 1.1 riastrad 3772 1.1 riastrad #define ATOM_DFP1_EDID_ADDR (ATOM_TV1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3773 1.1 riastrad #define ATOM_DFP1_DTD_MODE_TBL_ADDR (ATOM_DFP1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3774 1.1 riastrad #define ATOM_DFP1_STD_MODE_TBL_ADDR (ATOM_DFP1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3775 1.1 riastrad 3776 1.1 riastrad #define ATOM_CRT2_EDID_ADDR (ATOM_DFP1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3777 1.1 riastrad #define ATOM_CRT2_DTD_MODE_TBL_ADDR (ATOM_CRT2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3778 1.1 riastrad #define ATOM_CRT2_STD_MODE_TBL_ADDR (ATOM_CRT2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3779 1.1 riastrad 3780 1.1 riastrad #define ATOM_LCD2_EDID_ADDR (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3781 1.1 riastrad #define ATOM_LCD2_DTD_MODE_TBL_ADDR (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3782 1.1 riastrad #define ATOM_LCD2_STD_MODE_TBL_ADDR (ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3783 1.1 riastrad 3784 1.1 riastrad #define ATOM_DFP6_EDID_ADDR (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3785 1.1 riastrad #define ATOM_DFP6_DTD_MODE_TBL_ADDR (ATOM_DFP6_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3786 1.1 riastrad #define ATOM_DFP6_STD_MODE_TBL_ADDR (ATOM_DFP6_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3787 1.1 riastrad 3788 1.1 riastrad #define ATOM_DFP2_EDID_ADDR (ATOM_DFP6_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3789 1.1 riastrad #define ATOM_DFP2_DTD_MODE_TBL_ADDR (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3790 1.1 riastrad #define ATOM_DFP2_STD_MODE_TBL_ADDR (ATOM_DFP2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3791 1.1 riastrad 3792 1.1 riastrad #define ATOM_CV_EDID_ADDR (ATOM_DFP2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3793 1.1 riastrad #define ATOM_CV_DTD_MODE_TBL_ADDR (ATOM_CV_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3794 1.1 riastrad #define ATOM_CV_STD_MODE_TBL_ADDR (ATOM_CV_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3795 1.1 riastrad 3796 1.1 riastrad #define ATOM_DFP3_EDID_ADDR (ATOM_CV_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3797 1.1 riastrad #define ATOM_DFP3_DTD_MODE_TBL_ADDR (ATOM_DFP3_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3798 1.1 riastrad #define ATOM_DFP3_STD_MODE_TBL_ADDR (ATOM_DFP3_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3799 1.1 riastrad 3800 1.1 riastrad #define ATOM_DFP4_EDID_ADDR (ATOM_DFP3_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3801 1.1 riastrad #define ATOM_DFP4_DTD_MODE_TBL_ADDR (ATOM_DFP4_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3802 1.1 riastrad #define ATOM_DFP4_STD_MODE_TBL_ADDR (ATOM_DFP4_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3803 1.1 riastrad 3804 1.1 riastrad #define ATOM_DFP5_EDID_ADDR (ATOM_DFP4_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3805 1.1 riastrad #define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) 3806 1.1 riastrad #define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) 3807 1.1 riastrad 3808 1.1 riastrad #define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) 3809 1.1 riastrad 3810 1.1 riastrad #define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR + 1024) 3811 1.1 riastrad #define ATOM_STACK_STORAGE_END ATOM_STACK_STORAGE_START + 512 3812 1.1 riastrad 3813 1.1 riastrad //The size below is in Kb! 3814 1.1 riastrad #define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC) 3815 1.1 riastrad 3816 1.1 riastrad #define ATOM_VRAM_RESERVE_V2_SIZE 32 3817 1.1 riastrad 3818 1.1 riastrad #define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L 3819 1.1 riastrad #define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30 3820 1.1 riastrad #define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1 3821 1.1 riastrad #define ATOM_VRAM_BLOCK_NEEDS_RESERVATION 0x0 3822 1.1 riastrad 3823 1.1 riastrad /***********************************************************************************/ 3824 1.1 riastrad // Structure used in VRAM_UsageByFirmwareTable 3825 1.1 riastrad // Note1: This table is filled by SetBiosReservationStartInFB in CoreCommSubs.asm 3826 1.1 riastrad // at running time. 3827 1.1 riastrad // note2: From RV770, the memory is more than 32bit addressable, so we will change 3828 1.1 riastrad // ucTableFormatRevision=1,ucTableContentRevision=4, the strcuture remains 3829 1.1 riastrad // exactly same as 1.1 and 1.2 (1.3 is never in use), but ulStartAddrUsedByFirmware 3830 1.1 riastrad // (in offset to start of memory address) is KB aligned instead of byte aligend. 3831 1.1 riastrad /***********************************************************************************/ 3832 1.1 riastrad // Note3: 3833 1.1 riastrad /* If we change usReserved to "usFBUsedbyDrvInKB", then to VBIOS this usFBUsedbyDrvInKB is a predefined, unchanged constant across VGA or non VGA adapter, 3834 1.1 riastrad for CAIL, The size of FB access area is known, only thing missing is the Offset of FB Access area, so we can have: 3835 1.1 riastrad 3836 1.1 riastrad If (ulStartAddrUsedByFirmware!=0) 3837 1.1 riastrad FBAccessAreaOffset= ulStartAddrUsedByFirmware - usFBUsedbyDrvInKB; 3838 1.1 riastrad Reserved area has been claimed by VBIOS including this FB access area; CAIL doesn't need to reserve any extra area for this purpose 3839 1.1 riastrad else //Non VGA case 3840 1.1 riastrad if (FB_Size<=2Gb) 3841 1.1 riastrad FBAccessAreaOffset= FB_Size - usFBUsedbyDrvInKB; 3842 1.1 riastrad else 3843 1.1 riastrad FBAccessAreaOffset= Aper_Size - usFBUsedbyDrvInKB 3844 1.1 riastrad 3845 1.1 riastrad CAIL needs to claim an reserved area defined by FBAccessAreaOffset and usFBUsedbyDrvInKB in non VGA case.*/ 3846 1.1 riastrad 3847 1.1 riastrad /***********************************************************************************/ 3848 1.1 riastrad #define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1 3849 1.1 riastrad 3850 1.1 riastrad typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO 3851 1.1 riastrad { 3852 1.1 riastrad ULONG ulStartAddrUsedByFirmware; 3853 1.1 riastrad USHORT usFirmwareUseInKb; 3854 1.1 riastrad USHORT usReserved; 3855 1.1 riastrad }ATOM_FIRMWARE_VRAM_RESERVE_INFO; 3856 1.1 riastrad 3857 1.1 riastrad typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE 3858 1.1 riastrad { 3859 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3860 1.1 riastrad ATOM_FIRMWARE_VRAM_RESERVE_INFO asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO]; 3861 1.1 riastrad }ATOM_VRAM_USAGE_BY_FIRMWARE; 3862 1.1 riastrad 3863 1.1 riastrad // change verion to 1.5, when allow driver to allocate the vram area for command table access. 3864 1.1 riastrad typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5 3865 1.1 riastrad { 3866 1.1 riastrad ULONG ulStartAddrUsedByFirmware; 3867 1.1 riastrad USHORT usFirmwareUseInKb; 3868 1.1 riastrad USHORT usFBUsedByDrvInKb; 3869 1.1 riastrad }ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5; 3870 1.1 riastrad 3871 1.1 riastrad typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5 3872 1.1 riastrad { 3873 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3874 1.1 riastrad ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5 asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO]; 3875 1.1 riastrad }ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5; 3876 1.1 riastrad 3877 1.1 riastrad /****************************************************************************/ 3878 1.1 riastrad // Structure used in GPIO_Pin_LUTTable 3879 1.1 riastrad /****************************************************************************/ 3880 1.1 riastrad typedef struct _ATOM_GPIO_PIN_ASSIGNMENT 3881 1.1 riastrad { 3882 1.1 riastrad USHORT usGpioPin_AIndex; 3883 1.1 riastrad UCHAR ucGpioPinBitShift; 3884 1.1 riastrad UCHAR ucGPIO_ID; 3885 1.1 riastrad }ATOM_GPIO_PIN_ASSIGNMENT; 3886 1.1 riastrad 3887 1.1 riastrad //ucGPIO_ID pre-define id for multiple usage 3888 1.5 riastrad //from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC switching feature is enable 3889 1.1 riastrad #define PP_AC_DC_SWITCH_GPIO_PINID 60 3890 1.1 riastrad //from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable 3891 1.1 riastrad #define VDDC_VRHOT_GPIO_PINID 61 3892 1.1 riastrad //if ucGPIO_ID=VDDC_PCC_GPIO_PINID in GPIO_LUTable, Peak Current Control feature is enabled 3893 1.1 riastrad #define VDDC_PCC_GPIO_PINID 62 3894 1.1 riastrad 3895 1.1 riastrad typedef struct _ATOM_GPIO_PIN_LUT 3896 1.1 riastrad { 3897 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3898 1.1 riastrad ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1]; 3899 1.1 riastrad }ATOM_GPIO_PIN_LUT; 3900 1.1 riastrad 3901 1.1 riastrad /****************************************************************************/ 3902 1.1 riastrad // Structure used in ComponentVideoInfoTable 3903 1.1 riastrad /****************************************************************************/ 3904 1.1 riastrad #define GPIO_PIN_ACTIVE_HIGH 0x1 3905 1.1 riastrad 3906 1.1 riastrad #define MAX_SUPPORTED_CV_STANDARDS 5 3907 1.1 riastrad 3908 1.1 riastrad // definitions for ATOM_D_INFO.ucSettings 3909 1.1 riastrad #define ATOM_GPIO_SETTINGS_BITSHIFT_MASK 0x1F // [4:0] 3910 1.1 riastrad #define ATOM_GPIO_SETTINGS_RESERVED_MASK 0x60 // [6:5] = must be zeroed out 3911 1.1 riastrad #define ATOM_GPIO_SETTINGS_ACTIVE_MASK 0x80 // [7] 3912 1.1 riastrad 3913 1.1 riastrad typedef struct _ATOM_GPIO_INFO 3914 1.1 riastrad { 3915 1.1 riastrad USHORT usAOffset; 3916 1.1 riastrad UCHAR ucSettings; 3917 1.1 riastrad UCHAR ucReserved; 3918 1.1 riastrad }ATOM_GPIO_INFO; 3919 1.1 riastrad 3920 1.1 riastrad // definitions for ATOM_COMPONENT_VIDEO_INFO.ucMiscInfo (bit vector) 3921 1.1 riastrad #define ATOM_CV_RESTRICT_FORMAT_SELECTION 0x2 3922 1.1 riastrad 3923 1.1 riastrad // definitions for ATOM_COMPONENT_VIDEO_INFO.uc480i/uc480p/uc720p/uc1080i 3924 1.1 riastrad #define ATOM_GPIO_DEFAULT_MODE_EN 0x80 //[7]; 3925 1.1 riastrad #define ATOM_GPIO_SETTING_PERMODE_MASK 0x7F //[6:0] 3926 1.1 riastrad 3927 1.1 riastrad // definitions for ATOM_COMPONENT_VIDEO_INFO.ucLetterBoxMode 3928 1.1 riastrad //Line 3 out put 5V. 3929 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A 0x01 //represent gpio 3 state for 16:9 3930 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B 0x02 //represent gpio 4 state for 16:9 3931 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT 0x0 3932 1.1 riastrad 3933 1.1 riastrad //Line 3 out put 2.2V 3934 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04 //represent gpio 3 state for 4:3 Letter box 3935 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08 //represent gpio 4 state for 4:3 Letter box 3936 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2 3937 1.1 riastrad 3938 1.1 riastrad //Line 3 out put 0V 3939 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A 0x10 //represent gpio 3 state for 4:3 3940 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B 0x20 //represent gpio 4 state for 4:3 3941 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT 0x4 3942 1.1 riastrad 3943 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_MASK 0x3F // bit [5:0] 3944 1.1 riastrad 3945 1.1 riastrad #define ATOM_CV_LINE3_ASPECTRATIO_EXIST 0x80 //bit 7 3946 1.1 riastrad 3947 1.1 riastrad //GPIO bit index in gpio setting per mode value, also represend the block no. in gpio blocks. 3948 1.1 riastrad #define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_A 3 //bit 3 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. 3949 1.1 riastrad #define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_B 4 //bit 4 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. 3950 1.1 riastrad 3951 1.1 riastrad 3952 1.1 riastrad typedef struct _ATOM_COMPONENT_VIDEO_INFO 3953 1.1 riastrad { 3954 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3955 1.1 riastrad USHORT usMask_PinRegisterIndex; 3956 1.1 riastrad USHORT usEN_PinRegisterIndex; 3957 1.1 riastrad USHORT usY_PinRegisterIndex; 3958 1.1 riastrad USHORT usA_PinRegisterIndex; 3959 1.1 riastrad UCHAR ucBitShift; 3960 1.1 riastrad UCHAR ucPinActiveState; //ucPinActiveState: Bit0=1 active high, =0 active low 3961 1.1 riastrad ATOM_DTD_FORMAT sReserved; // must be zeroed out 3962 1.1 riastrad UCHAR ucMiscInfo; 3963 1.1 riastrad UCHAR uc480i; 3964 1.1 riastrad UCHAR uc480p; 3965 1.1 riastrad UCHAR uc720p; 3966 1.1 riastrad UCHAR uc1080i; 3967 1.1 riastrad UCHAR ucLetterBoxMode; 3968 1.1 riastrad UCHAR ucReserved[3]; 3969 1.1 riastrad UCHAR ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector 3970 1.1 riastrad ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS]; 3971 1.1 riastrad ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS]; 3972 1.1 riastrad }ATOM_COMPONENT_VIDEO_INFO; 3973 1.1 riastrad 3974 1.1 riastrad //ucTableFormatRevision=2 3975 1.1 riastrad //ucTableContentRevision=1 3976 1.1 riastrad typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21 3977 1.1 riastrad { 3978 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3979 1.1 riastrad UCHAR ucMiscInfo; 3980 1.1 riastrad UCHAR uc480i; 3981 1.1 riastrad UCHAR uc480p; 3982 1.1 riastrad UCHAR uc720p; 3983 1.1 riastrad UCHAR uc1080i; 3984 1.1 riastrad UCHAR ucReserved; 3985 1.1 riastrad UCHAR ucLetterBoxMode; 3986 1.1 riastrad UCHAR ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector 3987 1.1 riastrad ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS]; 3988 1.1 riastrad ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS]; 3989 1.1 riastrad }ATOM_COMPONENT_VIDEO_INFO_V21; 3990 1.1 riastrad 3991 1.1 riastrad #define ATOM_COMPONENT_VIDEO_INFO_LAST ATOM_COMPONENT_VIDEO_INFO_V21 3992 1.1 riastrad 3993 1.1 riastrad /****************************************************************************/ 3994 1.1 riastrad // Structure used in object_InfoTable 3995 1.1 riastrad /****************************************************************************/ 3996 1.1 riastrad typedef struct _ATOM_OBJECT_HEADER 3997 1.1 riastrad { 3998 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 3999 1.1 riastrad USHORT usDeviceSupport; 4000 1.1 riastrad USHORT usConnectorObjectTableOffset; 4001 1.1 riastrad USHORT usRouterObjectTableOffset; 4002 1.1 riastrad USHORT usEncoderObjectTableOffset; 4003 1.1 riastrad USHORT usProtectionObjectTableOffset; //only available when Protection block is independent. 4004 1.1 riastrad USHORT usDisplayPathTableOffset; 4005 1.1 riastrad }ATOM_OBJECT_HEADER; 4006 1.1 riastrad 4007 1.1 riastrad typedef struct _ATOM_OBJECT_HEADER_V3 4008 1.1 riastrad { 4009 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4010 1.1 riastrad USHORT usDeviceSupport; 4011 1.1 riastrad USHORT usConnectorObjectTableOffset; 4012 1.1 riastrad USHORT usRouterObjectTableOffset; 4013 1.1 riastrad USHORT usEncoderObjectTableOffset; 4014 1.1 riastrad USHORT usProtectionObjectTableOffset; //only available when Protection block is independent. 4015 1.1 riastrad USHORT usDisplayPathTableOffset; 4016 1.1 riastrad USHORT usMiscObjectTableOffset; 4017 1.1 riastrad }ATOM_OBJECT_HEADER_V3; 4018 1.1 riastrad 4019 1.1 riastrad typedef struct _ATOM_DISPLAY_OBJECT_PATH 4020 1.1 riastrad { 4021 1.1 riastrad USHORT usDeviceTag; //supported device 4022 1.1 riastrad USHORT usSize; //the size of ATOM_DISPLAY_OBJECT_PATH 4023 1.1 riastrad USHORT usConnObjectId; //Connector Object ID 4024 1.1 riastrad USHORT usGPUObjectId; //GPU ID 4025 1.1 riastrad USHORT usGraphicObjIds[1]; //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. 4026 1.1 riastrad }ATOM_DISPLAY_OBJECT_PATH; 4027 1.1 riastrad 4028 1.1 riastrad typedef struct _ATOM_DISPLAY_EXTERNAL_OBJECT_PATH 4029 1.1 riastrad { 4030 1.1 riastrad USHORT usDeviceTag; //supported device 4031 1.1 riastrad USHORT usSize; //the size of ATOM_DISPLAY_OBJECT_PATH 4032 1.1 riastrad USHORT usConnObjectId; //Connector Object ID 4033 1.1 riastrad USHORT usGPUObjectId; //GPU ID 4034 1.1 riastrad USHORT usGraphicObjIds[2]; //usGraphicObjIds[0]= GPU internal encoder, usGraphicObjIds[1]= external encoder 4035 1.1 riastrad }ATOM_DISPLAY_EXTERNAL_OBJECT_PATH; 4036 1.1 riastrad 4037 1.1 riastrad typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE 4038 1.1 riastrad { 4039 1.1 riastrad UCHAR ucNumOfDispPath; 4040 1.1 riastrad UCHAR ucVersion; 4041 1.1 riastrad UCHAR ucPadding[2]; 4042 1.1 riastrad ATOM_DISPLAY_OBJECT_PATH asDispPath[1]; 4043 1.1 riastrad }ATOM_DISPLAY_OBJECT_PATH_TABLE; 4044 1.1 riastrad 4045 1.1 riastrad 4046 1.1 riastrad typedef struct _ATOM_OBJECT //each object has this structure 4047 1.1 riastrad { 4048 1.1 riastrad USHORT usObjectID; 4049 1.1 riastrad USHORT usSrcDstTableOffset; 4050 1.1 riastrad USHORT usRecordOffset; //this pointing to a bunch of records defined below 4051 1.1 riastrad USHORT usReserved; 4052 1.1 riastrad }ATOM_OBJECT; 4053 1.1 riastrad 4054 1.1 riastrad typedef struct _ATOM_OBJECT_TABLE //Above 4 object table offset pointing to a bunch of objects all have this structure 4055 1.1 riastrad { 4056 1.1 riastrad UCHAR ucNumberOfObjects; 4057 1.1 riastrad UCHAR ucPadding[3]; 4058 1.1 riastrad ATOM_OBJECT asObjects[1]; 4059 1.1 riastrad }ATOM_OBJECT_TABLE; 4060 1.1 riastrad 4061 1.1 riastrad typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT //usSrcDstTableOffset pointing to this structure 4062 1.1 riastrad { 4063 1.1 riastrad UCHAR ucNumberOfSrc; 4064 1.1 riastrad USHORT usSrcObjectID[1]; 4065 1.1 riastrad UCHAR ucNumberOfDst; 4066 1.1 riastrad USHORT usDstObjectID[1]; 4067 1.1 riastrad }ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT; 4068 1.1 riastrad 4069 1.1 riastrad 4070 1.1 riastrad //Two definitions below are for OPM on MXM module designs 4071 1.1 riastrad 4072 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_0 0 4073 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_1 1 4074 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_2 2 4075 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_3 3 4076 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_4 4 4077 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_5 5 4078 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_6 6 4079 1.1 riastrad #define EXT_HPDPIN_LUTINDEX_7 7 4080 1.1 riastrad #define MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES (EXT_HPDPIN_LUTINDEX_7+1) 4081 1.1 riastrad 4082 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_0 0 4083 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_1 1 4084 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_2 2 4085 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_3 3 4086 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_4 4 4087 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_5 5 4088 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_6 6 4089 1.1 riastrad #define EXT_AUXDDC_LUTINDEX_7 7 4090 1.1 riastrad #define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES (EXT_AUXDDC_LUTINDEX_7+1) 4091 1.1 riastrad 4092 1.1 riastrad //ucChannelMapping are defined as following 4093 1.1 riastrad //for DP connector, eDP, DP to VGA/LVDS 4094 1.1 riastrad //Bit[1:0]: Define which pin connect to DP connector DP_Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4095 1.1 riastrad //Bit[3:2]: Define which pin connect to DP connector DP_Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4096 1.1 riastrad //Bit[5:4]: Define which pin connect to DP connector DP_Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4097 1.1 riastrad //Bit[7:6]: Define which pin connect to DP connector DP_Lane3, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4098 1.1 riastrad typedef struct _ATOM_DP_CONN_CHANNEL_MAPPING 4099 1.1 riastrad { 4100 1.1 riastrad #if ATOM_BIG_ENDIAN 4101 1.1 riastrad UCHAR ucDP_Lane3_Source:2; 4102 1.1 riastrad UCHAR ucDP_Lane2_Source:2; 4103 1.1 riastrad UCHAR ucDP_Lane1_Source:2; 4104 1.1 riastrad UCHAR ucDP_Lane0_Source:2; 4105 1.1 riastrad #else 4106 1.1 riastrad UCHAR ucDP_Lane0_Source:2; 4107 1.1 riastrad UCHAR ucDP_Lane1_Source:2; 4108 1.1 riastrad UCHAR ucDP_Lane2_Source:2; 4109 1.1 riastrad UCHAR ucDP_Lane3_Source:2; 4110 1.1 riastrad #endif 4111 1.1 riastrad }ATOM_DP_CONN_CHANNEL_MAPPING; 4112 1.1 riastrad 4113 1.1 riastrad //for DVI/HDMI, in dual link case, both links have to have same mapping. 4114 1.1 riastrad //Bit[1:0]: Define which pin connect to DVI connector data Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4115 1.1 riastrad //Bit[3:2]: Define which pin connect to DVI connector data Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4116 1.1 riastrad //Bit[5:4]: Define which pin connect to DVI connector data Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4117 1.1 riastrad //Bit[7:6]: Define which pin connect to DVI connector clock lane, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 4118 1.1 riastrad typedef struct _ATOM_DVI_CONN_CHANNEL_MAPPING 4119 1.1 riastrad { 4120 1.1 riastrad #if ATOM_BIG_ENDIAN 4121 1.1 riastrad UCHAR ucDVI_CLK_Source:2; 4122 1.1 riastrad UCHAR ucDVI_DATA0_Source:2; 4123 1.1 riastrad UCHAR ucDVI_DATA1_Source:2; 4124 1.1 riastrad UCHAR ucDVI_DATA2_Source:2; 4125 1.1 riastrad #else 4126 1.1 riastrad UCHAR ucDVI_DATA2_Source:2; 4127 1.1 riastrad UCHAR ucDVI_DATA1_Source:2; 4128 1.1 riastrad UCHAR ucDVI_DATA0_Source:2; 4129 1.1 riastrad UCHAR ucDVI_CLK_Source:2; 4130 1.1 riastrad #endif 4131 1.1 riastrad }ATOM_DVI_CONN_CHANNEL_MAPPING; 4132 1.1 riastrad 4133 1.1 riastrad typedef struct _EXT_DISPLAY_PATH 4134 1.1 riastrad { 4135 1.1 riastrad USHORT usDeviceTag; //A bit vector to show what devices are supported 4136 1.1 riastrad USHORT usDeviceACPIEnum; //16bit device ACPI id. 4137 1.1 riastrad USHORT usDeviceConnector; //A physical connector for displays to plug in, using object connector definitions 4138 1.1 riastrad UCHAR ucExtAUXDDCLutIndex; //An index into external AUX/DDC channel LUT 4139 1.1 riastrad UCHAR ucExtHPDPINLutIndex; //An index into external HPD pin LUT 4140 1.1 riastrad USHORT usExtEncoderObjId; //external encoder object id 4141 1.1 riastrad union{ 4142 1.1 riastrad UCHAR ucChannelMapping; // if ucChannelMapping=0, using default one to one mapping 4143 1.1 riastrad ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping; 4144 1.1 riastrad ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping; 4145 1.1 riastrad }; 4146 1.1 riastrad UCHAR ucChPNInvert; // bit vector for up to 8 lanes, =0: P and N is not invert, =1 P and N is inverted 4147 1.1 riastrad USHORT usCaps; 4148 1.1 riastrad USHORT usReserved; 4149 1.1 riastrad }EXT_DISPLAY_PATH; 4150 1.1 riastrad 4151 1.1 riastrad #define NUMBER_OF_UCHAR_FOR_GUID 16 4152 1.1 riastrad #define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7 4153 1.1 riastrad 4154 1.1 riastrad //usCaps 4155 1.1 riastrad #define EXT_DISPLAY_PATH_CAPS__HBR2_DISABLE 0x01 4156 1.1 riastrad #define EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN 0x02 4157 1.1 riastrad 4158 1.1 riastrad typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO 4159 1.1 riastrad { 4160 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4161 1.1 riastrad UCHAR ucGuid [NUMBER_OF_UCHAR_FOR_GUID]; // a GUID is a 16 byte long string 4162 1.1 riastrad EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries. 4163 1.1 riastrad UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0. 4164 1.1 riastrad UCHAR uc3DStereoPinId; // use for eDP panel 4165 1.1 riastrad UCHAR ucRemoteDisplayConfig; 4166 1.1 riastrad UCHAR uceDPToLVDSRxId; 4167 1.1 riastrad UCHAR ucFixDPVoltageSwing; // usCaps[1]=1, this indicate DP_LANE_SET value 4168 1.1 riastrad UCHAR Reserved[3]; // for potential expansion 4169 1.1 riastrad }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; 4170 1.1 riastrad 4171 1.1 riastrad //Related definitions, all records are different but they have a commond header 4172 1.1 riastrad typedef struct _ATOM_COMMON_RECORD_HEADER 4173 1.1 riastrad { 4174 1.1 riastrad UCHAR ucRecordType; //An emun to indicate the record type 4175 1.1 riastrad UCHAR ucRecordSize; //The size of the whole record in byte 4176 1.1 riastrad }ATOM_COMMON_RECORD_HEADER; 4177 1.1 riastrad 4178 1.1 riastrad 4179 1.1 riastrad #define ATOM_I2C_RECORD_TYPE 1 4180 1.1 riastrad #define ATOM_HPD_INT_RECORD_TYPE 2 4181 1.1 riastrad #define ATOM_OUTPUT_PROTECTION_RECORD_TYPE 3 4182 1.1 riastrad #define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE 4 4183 1.1 riastrad #define ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE 5 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE 4184 1.1 riastrad #define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE 6 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE 4185 1.1 riastrad #define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE 7 4186 1.1 riastrad #define ATOM_JTAG_RECORD_TYPE 8 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE 4187 1.1 riastrad #define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE 9 4188 1.1 riastrad #define ATOM_ENCODER_DVO_CF_RECORD_TYPE 10 4189 1.1 riastrad #define ATOM_CONNECTOR_CF_RECORD_TYPE 11 4190 1.1 riastrad #define ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE 12 4191 1.1 riastrad #define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE 13 4192 1.1 riastrad #define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE 14 4193 1.1 riastrad #define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE 15 4194 1.1 riastrad #define ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE 16 //This is for the case when connectors are not known to object table 4195 1.1 riastrad #define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 17 //This is for the case when connectors are not known to object table 4196 1.1 riastrad #define ATOM_OBJECT_LINK_RECORD_TYPE 18 //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record 4197 1.1 riastrad #define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE 19 4198 1.1 riastrad #define ATOM_ENCODER_CAP_RECORD_TYPE 20 4199 1.1 riastrad #define ATOM_BRACKET_LAYOUT_RECORD_TYPE 21 4200 1.1 riastrad 4201 1.1 riastrad //Must be updated when new record type is added,equal to that record definition! 4202 1.1 riastrad #define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_BRACKET_LAYOUT_RECORD_TYPE 4203 1.1 riastrad 4204 1.1 riastrad typedef struct _ATOM_I2C_RECORD 4205 1.1 riastrad { 4206 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4207 1.1 riastrad ATOM_I2C_ID_CONFIG sucI2cId; 4208 1.1 riastrad UCHAR ucI2CAddr; //The slave address, it's 0 when the record is attached to connector for DDC 4209 1.1 riastrad }ATOM_I2C_RECORD; 4210 1.1 riastrad 4211 1.1 riastrad typedef struct _ATOM_HPD_INT_RECORD 4212 1.1 riastrad { 4213 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4214 1.1 riastrad UCHAR ucHPDIntGPIOID; //Corresponding block in GPIO_PIN_INFO table gives the pin info 4215 1.1 riastrad UCHAR ucPlugged_PinState; 4216 1.1 riastrad }ATOM_HPD_INT_RECORD; 4217 1.1 riastrad 4218 1.1 riastrad 4219 1.1 riastrad typedef struct _ATOM_OUTPUT_PROTECTION_RECORD 4220 1.1 riastrad { 4221 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4222 1.1 riastrad UCHAR ucProtectionFlag; 4223 1.1 riastrad UCHAR ucReserved; 4224 1.1 riastrad }ATOM_OUTPUT_PROTECTION_RECORD; 4225 1.1 riastrad 4226 1.1 riastrad typedef struct _ATOM_CONNECTOR_DEVICE_TAG 4227 1.1 riastrad { 4228 1.1 riastrad ULONG ulACPIDeviceEnum; //Reserved for now 4229 1.1 riastrad USHORT usDeviceID; //This Id is same as "ATOM_DEVICE_XXX_SUPPORT" 4230 1.1 riastrad USHORT usPadding; 4231 1.1 riastrad }ATOM_CONNECTOR_DEVICE_TAG; 4232 1.1 riastrad 4233 1.1 riastrad typedef struct _ATOM_CONNECTOR_DEVICE_TAG_RECORD 4234 1.1 riastrad { 4235 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4236 1.1 riastrad UCHAR ucNumberOfDevice; 4237 1.1 riastrad UCHAR ucReserved; 4238 1.1 riastrad ATOM_CONNECTOR_DEVICE_TAG asDeviceTag[1]; //This Id is same as "ATOM_DEVICE_XXX_SUPPORT", 1 is only for allocation 4239 1.1 riastrad }ATOM_CONNECTOR_DEVICE_TAG_RECORD; 4240 1.1 riastrad 4241 1.1 riastrad 4242 1.1 riastrad typedef struct _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD 4243 1.1 riastrad { 4244 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4245 1.1 riastrad UCHAR ucConfigGPIOID; 4246 1.1 riastrad UCHAR ucConfigGPIOState; //Set to 1 when it's active high to enable external flow in 4247 1.1 riastrad UCHAR ucFlowinGPIPID; 4248 1.1 riastrad UCHAR ucExtInGPIPID; 4249 1.1 riastrad }ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD; 4250 1.1 riastrad 4251 1.1 riastrad typedef struct _ATOM_ENCODER_FPGA_CONTROL_RECORD 4252 1.1 riastrad { 4253 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4254 1.1 riastrad UCHAR ucCTL1GPIO_ID; 4255 1.1 riastrad UCHAR ucCTL1GPIOState; //Set to 1 when it's active high 4256 1.1 riastrad UCHAR ucCTL2GPIO_ID; 4257 1.1 riastrad UCHAR ucCTL2GPIOState; //Set to 1 when it's active high 4258 1.1 riastrad UCHAR ucCTL3GPIO_ID; 4259 1.1 riastrad UCHAR ucCTL3GPIOState; //Set to 1 when it's active high 4260 1.1 riastrad UCHAR ucCTLFPGA_IN_ID; 4261 1.1 riastrad UCHAR ucPadding[3]; 4262 1.1 riastrad }ATOM_ENCODER_FPGA_CONTROL_RECORD; 4263 1.1 riastrad 4264 1.1 riastrad typedef struct _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD 4265 1.1 riastrad { 4266 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4267 1.1 riastrad UCHAR ucGPIOID; //Corresponding block in GPIO_PIN_INFO table gives the pin info 4268 1.1 riastrad UCHAR ucTVActiveState; //Indicating when the pin==0 or 1 when TV is connected 4269 1.1 riastrad }ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD; 4270 1.1 riastrad 4271 1.1 riastrad typedef struct _ATOM_JTAG_RECORD 4272 1.1 riastrad { 4273 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4274 1.1 riastrad UCHAR ucTMSGPIO_ID; 4275 1.1 riastrad UCHAR ucTMSGPIOState; //Set to 1 when it's active high 4276 1.1 riastrad UCHAR ucTCKGPIO_ID; 4277 1.1 riastrad UCHAR ucTCKGPIOState; //Set to 1 when it's active high 4278 1.1 riastrad UCHAR ucTDOGPIO_ID; 4279 1.1 riastrad UCHAR ucTDOGPIOState; //Set to 1 when it's active high 4280 1.1 riastrad UCHAR ucTDIGPIO_ID; 4281 1.1 riastrad UCHAR ucTDIGPIOState; //Set to 1 when it's active high 4282 1.1 riastrad UCHAR ucPadding[2]; 4283 1.1 riastrad }ATOM_JTAG_RECORD; 4284 1.1 riastrad 4285 1.1 riastrad 4286 1.1 riastrad //The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually 4287 1.1 riastrad typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR 4288 1.1 riastrad { 4289 1.1 riastrad UCHAR ucGPIOID; // GPIO_ID, find the corresponding ID in GPIO_LUT table 4290 1.1 riastrad UCHAR ucGPIO_PinState; // Pin state showing how to set-up the pin 4291 1.1 riastrad }ATOM_GPIO_PIN_CONTROL_PAIR; 4292 1.1 riastrad 4293 1.1 riastrad typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD 4294 1.1 riastrad { 4295 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4296 1.1 riastrad UCHAR ucFlags; // Future expnadibility 4297 1.1 riastrad UCHAR ucNumberOfPins; // Number of GPIO pins used to control the object 4298 1.1 riastrad ATOM_GPIO_PIN_CONTROL_PAIR asGpio[1]; // the real gpio pin pair determined by number of pins ucNumberOfPins 4299 1.1 riastrad }ATOM_OBJECT_GPIO_CNTL_RECORD; 4300 1.1 riastrad 4301 1.1 riastrad //Definitions for GPIO pin state 4302 1.1 riastrad #define GPIO_PIN_TYPE_INPUT 0x00 4303 1.1 riastrad #define GPIO_PIN_TYPE_OUTPUT 0x10 4304 1.1 riastrad #define GPIO_PIN_TYPE_HW_CONTROL 0x20 4305 1.1 riastrad 4306 1.1 riastrad //For GPIO_PIN_TYPE_OUTPUT the following is defined 4307 1.1 riastrad #define GPIO_PIN_OUTPUT_STATE_MASK 0x01 4308 1.1 riastrad #define GPIO_PIN_OUTPUT_STATE_SHIFT 0 4309 1.1 riastrad #define GPIO_PIN_STATE_ACTIVE_LOW 0x0 4310 1.1 riastrad #define GPIO_PIN_STATE_ACTIVE_HIGH 0x1 4311 1.1 riastrad 4312 1.1 riastrad // Indexes to GPIO array in GLSync record 4313 1.1 riastrad // GLSync record is for Frame Lock/Gen Lock feature. 4314 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_REFCLK 0 4315 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_HSYNC 1 4316 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_VSYNC 2 4317 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ 3 4318 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT 4 4319 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5 4320 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_V_RESET 6 4321 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL 7 4322 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL 8 4323 1.1 riastrad #define ATOM_GPIO_INDEX_GLSYNC_MAX 9 4324 1.1 riastrad 4325 1.1 riastrad typedef struct _ATOM_ENCODER_DVO_CF_RECORD 4326 1.1 riastrad { 4327 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4328 1.1 riastrad ULONG ulStrengthControl; // DVOA strength control for CF 4329 1.1 riastrad UCHAR ucPadding[2]; 4330 1.1 riastrad }ATOM_ENCODER_DVO_CF_RECORD; 4331 1.1 riastrad 4332 1.1 riastrad // Bit maps for ATOM_ENCODER_CAP_RECORD.ucEncoderCap 4333 1.1 riastrad #define ATOM_ENCODER_CAP_RECORD_HBR2 0x01 // DP1.2 HBR2 is supported by HW encoder 4334 1.1 riastrad #define ATOM_ENCODER_CAP_RECORD_HBR2_EN 0x02 // DP1.2 HBR2 setting is qualified and HBR2 can be enabled 4335 1.1 riastrad 4336 1.1 riastrad typedef struct _ATOM_ENCODER_CAP_RECORD 4337 1.1 riastrad { 4338 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4339 1.1 riastrad union { 4340 1.1 riastrad USHORT usEncoderCap; 4341 1.1 riastrad struct { 4342 1.1 riastrad #if ATOM_BIG_ENDIAN 4343 1.1 riastrad USHORT usReserved:14; // Bit1-15 may be defined for other capability in future 4344 1.1 riastrad USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable 4345 1.1 riastrad USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. 4346 1.1 riastrad #else 4347 1.1 riastrad USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. 4348 1.1 riastrad USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable 4349 1.1 riastrad USHORT usReserved:14; // Bit1-15 may be defined for other capability in future 4350 1.1 riastrad #endif 4351 1.1 riastrad }; 4352 1.1 riastrad }; 4353 1.1 riastrad }ATOM_ENCODER_CAP_RECORD; 4354 1.1 riastrad 4355 1.1 riastrad // value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle 4356 1.1 riastrad #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1 4357 1.1 riastrad #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2 4358 1.1 riastrad 4359 1.1 riastrad typedef struct _ATOM_CONNECTOR_CF_RECORD 4360 1.1 riastrad { 4361 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4362 1.1 riastrad USHORT usMaxPixClk; 4363 1.1 riastrad UCHAR ucFlowCntlGpioId; 4364 1.1 riastrad UCHAR ucSwapCntlGpioId; 4365 1.1 riastrad UCHAR ucConnectedDvoBundle; 4366 1.1 riastrad UCHAR ucPadding; 4367 1.1 riastrad }ATOM_CONNECTOR_CF_RECORD; 4368 1.1 riastrad 4369 1.1 riastrad typedef struct _ATOM_CONNECTOR_HARDCODE_DTD_RECORD 4370 1.1 riastrad { 4371 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4372 1.1 riastrad ATOM_DTD_FORMAT asTiming; 4373 1.1 riastrad }ATOM_CONNECTOR_HARDCODE_DTD_RECORD; 4374 1.1 riastrad 4375 1.1 riastrad typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD 4376 1.1 riastrad { 4377 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; //ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE 4378 1.1 riastrad UCHAR ucSubConnectorType; //CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D|X_ID_DUAL_LINK_DVI_D|HDMI_TYPE_A 4379 1.1 riastrad UCHAR ucReserved; 4380 1.1 riastrad }ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD; 4381 1.1 riastrad 4382 1.1 riastrad 4383 1.1 riastrad typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD 4384 1.1 riastrad { 4385 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4386 1.1 riastrad UCHAR ucMuxType; //decide the number of ucMuxState, =0, no pin state, =1: single state with complement, >1: multiple state 4387 1.1 riastrad UCHAR ucMuxControlPin; 4388 1.1 riastrad UCHAR ucMuxState[2]; //for alligment purpose 4389 1.1 riastrad }ATOM_ROUTER_DDC_PATH_SELECT_RECORD; 4390 1.1 riastrad 4391 1.1 riastrad typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD 4392 1.1 riastrad { 4393 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4394 1.1 riastrad UCHAR ucMuxType; 4395 1.1 riastrad UCHAR ucMuxControlPin; 4396 1.1 riastrad UCHAR ucMuxState[2]; //for alligment purpose 4397 1.1 riastrad }ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD; 4398 1.1 riastrad 4399 1.1 riastrad // define ucMuxType 4400 1.1 riastrad #define ATOM_ROUTER_MUX_PIN_STATE_MASK 0x0f 4401 1.1 riastrad #define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT 0x01 4402 1.1 riastrad 4403 1.1 riastrad typedef struct _ATOM_CONNECTOR_HPDPIN_LUT_RECORD //record for ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE 4404 1.1 riastrad { 4405 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4406 1.1 riastrad UCHAR ucHPDPINMap[MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES]; //An fixed size array which maps external pins to internal GPIO_PIN_INFO table 4407 1.1 riastrad }ATOM_CONNECTOR_HPDPIN_LUT_RECORD; 4408 1.1 riastrad 4409 1.1 riastrad typedef struct _ATOM_CONNECTOR_AUXDDC_LUT_RECORD //record for ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 4410 1.1 riastrad { 4411 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4412 1.1 riastrad ATOM_I2C_ID_CONFIG ucAUXDDCMap[MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES]; //An fixed size array which maps external pins to internal DDC ID 4413 1.1 riastrad }ATOM_CONNECTOR_AUXDDC_LUT_RECORD; 4414 1.1 riastrad 4415 1.1 riastrad typedef struct _ATOM_OBJECT_LINK_RECORD 4416 1.1 riastrad { 4417 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4418 1.1 riastrad USHORT usObjectID; //could be connector, encorder or other object in object.h 4419 1.1 riastrad }ATOM_OBJECT_LINK_RECORD; 4420 1.1 riastrad 4421 1.1 riastrad typedef struct _ATOM_CONNECTOR_REMOTE_CAP_RECORD 4422 1.1 riastrad { 4423 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4424 1.1 riastrad USHORT usReserved; 4425 1.1 riastrad }ATOM_CONNECTOR_REMOTE_CAP_RECORD; 4426 1.1 riastrad 4427 1.1 riastrad typedef struct _ATOM_CONNECTOR_LAYOUT_INFO 4428 1.1 riastrad { 4429 1.1 riastrad USHORT usConnectorObjectId; 4430 1.1 riastrad UCHAR ucConnectorType; 4431 1.1 riastrad UCHAR ucPosition; 4432 1.1 riastrad }ATOM_CONNECTOR_LAYOUT_INFO; 4433 1.1 riastrad 4434 1.1 riastrad // define ATOM_CONNECTOR_LAYOUT_INFO.ucConnectorType to describe the display connector size 4435 1.1 riastrad #define CONNECTOR_TYPE_DVI_D 1 4436 1.1 riastrad #define CONNECTOR_TYPE_DVI_I 2 4437 1.1 riastrad #define CONNECTOR_TYPE_VGA 3 4438 1.1 riastrad #define CONNECTOR_TYPE_HDMI 4 4439 1.1 riastrad #define CONNECTOR_TYPE_DISPLAY_PORT 5 4440 1.1 riastrad #define CONNECTOR_TYPE_MINI_DISPLAY_PORT 6 4441 1.1 riastrad 4442 1.1 riastrad typedef struct _ATOM_BRACKET_LAYOUT_RECORD 4443 1.1 riastrad { 4444 1.1 riastrad ATOM_COMMON_RECORD_HEADER sheader; 4445 1.1 riastrad UCHAR ucLength; 4446 1.1 riastrad UCHAR ucWidth; 4447 1.1 riastrad UCHAR ucConnNum; 4448 1.1 riastrad UCHAR ucReserved; 4449 1.1 riastrad ATOM_CONNECTOR_LAYOUT_INFO asConnInfo[1]; 4450 1.1 riastrad }ATOM_BRACKET_LAYOUT_RECORD; 4451 1.1 riastrad 4452 1.1 riastrad /****************************************************************************/ 4453 1.1 riastrad // ASIC voltage data table 4454 1.1 riastrad /****************************************************************************/ 4455 1.1 riastrad typedef struct _ATOM_VOLTAGE_INFO_HEADER 4456 1.1 riastrad { 4457 1.1 riastrad USHORT usVDDCBaseLevel; //In number of 50mv unit 4458 1.1 riastrad USHORT usReserved; //For possible extension table offset 4459 1.1 riastrad UCHAR ucNumOfVoltageEntries; 4460 1.1 riastrad UCHAR ucBytesPerVoltageEntry; 4461 1.1 riastrad UCHAR ucVoltageStep; //Indicating in how many mv increament is one step, 0.5mv unit 4462 1.1 riastrad UCHAR ucDefaultVoltageEntry; 4463 1.1 riastrad UCHAR ucVoltageControlI2cLine; 4464 1.1 riastrad UCHAR ucVoltageControlAddress; 4465 1.1 riastrad UCHAR ucVoltageControlOffset; 4466 1.1 riastrad }ATOM_VOLTAGE_INFO_HEADER; 4467 1.1 riastrad 4468 1.1 riastrad typedef struct _ATOM_VOLTAGE_INFO 4469 1.1 riastrad { 4470 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4471 1.1 riastrad ATOM_VOLTAGE_INFO_HEADER viHeader; 4472 1.1 riastrad UCHAR ucVoltageEntries[64]; //64 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries*ucBytesPerVoltageEntry 4473 1.1 riastrad }ATOM_VOLTAGE_INFO; 4474 1.1 riastrad 4475 1.1 riastrad 4476 1.1 riastrad typedef struct _ATOM_VOLTAGE_FORMULA 4477 1.1 riastrad { 4478 1.1 riastrad USHORT usVoltageBaseLevel; // In number of 1mv unit 4479 1.1 riastrad USHORT usVoltageStep; // Indicating in how many mv increament is one step, 1mv unit 4480 1.1 riastrad UCHAR ucNumOfVoltageEntries; // Number of Voltage Entry, which indicate max Voltage 4481 1.1 riastrad UCHAR ucFlag; // bit0=0 :step is 1mv =1 0.5mv 4482 1.1 riastrad UCHAR ucBaseVID; // if there is no lookup table, VID= BaseVID + ( Vol - BaseLevle ) /VoltageStep 4483 1.1 riastrad UCHAR ucReserved; 4484 1.1 riastrad UCHAR ucVIDAdjustEntries[32]; // 32 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries 4485 1.1 riastrad }ATOM_VOLTAGE_FORMULA; 4486 1.1 riastrad 4487 1.1 riastrad typedef struct _VOLTAGE_LUT_ENTRY 4488 1.1 riastrad { 4489 1.1 riastrad USHORT usVoltageCode; // The Voltage ID, either GPIO or I2C code 4490 1.1 riastrad USHORT usVoltageValue; // The corresponding Voltage Value, in mV 4491 1.1 riastrad }VOLTAGE_LUT_ENTRY; 4492 1.1 riastrad 4493 1.1 riastrad typedef struct _ATOM_VOLTAGE_FORMULA_V2 4494 1.1 riastrad { 4495 1.1 riastrad UCHAR ucNumOfVoltageEntries; // Number of Voltage Entry, which indicate max Voltage 4496 1.1 riastrad UCHAR ucReserved[3]; 4497 1.1 riastrad VOLTAGE_LUT_ENTRY asVIDAdjustEntries[32];// 32 is for allocation, the actual number of entries is in ucNumOfVoltageEntries 4498 1.1 riastrad }ATOM_VOLTAGE_FORMULA_V2; 4499 1.1 riastrad 4500 1.1 riastrad typedef struct _ATOM_VOLTAGE_CONTROL 4501 1.1 riastrad { 4502 1.1 riastrad UCHAR ucVoltageControlId; //Indicate it is controlled by I2C or GPIO or HW state machine 4503 1.1 riastrad UCHAR ucVoltageControlI2cLine; 4504 1.1 riastrad UCHAR ucVoltageControlAddress; 4505 1.1 riastrad UCHAR ucVoltageControlOffset; 4506 1.1 riastrad USHORT usGpioPin_AIndex; //GPIO_PAD register index 4507 1.1 riastrad UCHAR ucGpioPinBitShift[9]; //at most 8 pin support 255 VIDs, termintate with 0xff 4508 1.1 riastrad UCHAR ucReserved; 4509 1.1 riastrad }ATOM_VOLTAGE_CONTROL; 4510 1.1 riastrad 4511 1.1 riastrad // Define ucVoltageControlId 4512 1.1 riastrad #define VOLTAGE_CONTROLLED_BY_HW 0x00 4513 1.1 riastrad #define VOLTAGE_CONTROLLED_BY_I2C_MASK 0x7F 4514 1.1 riastrad #define VOLTAGE_CONTROLLED_BY_GPIO 0x80 4515 1.1 riastrad #define VOLTAGE_CONTROL_ID_LM64 0x01 //I2C control, used for R5xx Core Voltage 4516 1.1 riastrad #define VOLTAGE_CONTROL_ID_DAC 0x02 //I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI 4517 1.1 riastrad #define VOLTAGE_CONTROL_ID_VT116xM 0x03 //I2C control, used for R6xx Core Voltage 4518 1.1 riastrad #define VOLTAGE_CONTROL_ID_DS4402 0x04 4519 1.1 riastrad #define VOLTAGE_CONTROL_ID_UP6266 0x05 4520 1.1 riastrad #define VOLTAGE_CONTROL_ID_SCORPIO 0x06 4521 1.1 riastrad #define VOLTAGE_CONTROL_ID_VT1556M 0x07 4522 1.1 riastrad #define VOLTAGE_CONTROL_ID_CHL822x 0x08 4523 1.1 riastrad #define VOLTAGE_CONTROL_ID_VT1586M 0x09 4524 1.1 riastrad #define VOLTAGE_CONTROL_ID_UP1637 0x0A 4525 1.1 riastrad #define VOLTAGE_CONTROL_ID_CHL8214 0x0B 4526 1.1 riastrad #define VOLTAGE_CONTROL_ID_UP1801 0x0C 4527 1.1 riastrad #define VOLTAGE_CONTROL_ID_ST6788A 0x0D 4528 1.1 riastrad #define VOLTAGE_CONTROL_ID_CHLIR3564SVI2 0x0E 4529 1.1 riastrad #define VOLTAGE_CONTROL_ID_AD527x 0x0F 4530 1.1 riastrad #define VOLTAGE_CONTROL_ID_NCP81022 0x10 4531 1.1 riastrad #define VOLTAGE_CONTROL_ID_LTC2635 0x11 4532 1.1 riastrad 4533 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT 4534 1.1 riastrad { 4535 1.1 riastrad UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI 4536 1.1 riastrad UCHAR ucSize; //Size of Object 4537 1.1 riastrad ATOM_VOLTAGE_CONTROL asControl; //describ how to control 4538 1.1 riastrad ATOM_VOLTAGE_FORMULA asFormula; //Indicate How to convert real Voltage to VID 4539 1.1 riastrad }ATOM_VOLTAGE_OBJECT; 4540 1.1 riastrad 4541 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT_V2 4542 1.1 riastrad { 4543 1.1 riastrad UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI 4544 1.1 riastrad UCHAR ucSize; //Size of Object 4545 1.1 riastrad ATOM_VOLTAGE_CONTROL asControl; //describ how to control 4546 1.1 riastrad ATOM_VOLTAGE_FORMULA_V2 asFormula; //Indicate How to convert real Voltage to VID 4547 1.1 riastrad }ATOM_VOLTAGE_OBJECT_V2; 4548 1.1 riastrad 4549 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT_INFO 4550 1.1 riastrad { 4551 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4552 1.1 riastrad ATOM_VOLTAGE_OBJECT asVoltageObj[3]; //Info for Voltage control 4553 1.1 riastrad }ATOM_VOLTAGE_OBJECT_INFO; 4554 1.1 riastrad 4555 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V2 4556 1.1 riastrad { 4557 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4558 1.1 riastrad ATOM_VOLTAGE_OBJECT_V2 asVoltageObj[3]; //Info for Voltage control 4559 1.1 riastrad }ATOM_VOLTAGE_OBJECT_INFO_V2; 4560 1.1 riastrad 4561 1.1 riastrad typedef struct _ATOM_LEAKID_VOLTAGE 4562 1.1 riastrad { 4563 1.1 riastrad UCHAR ucLeakageId; 4564 1.1 riastrad UCHAR ucReserved; 4565 1.1 riastrad USHORT usVoltage; 4566 1.1 riastrad }ATOM_LEAKID_VOLTAGE; 4567 1.1 riastrad 4568 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT_HEADER_V3{ 4569 1.1 riastrad UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI 4570 1.1 riastrad UCHAR ucVoltageMode; //Indicate voltage control mode: Init/Set/Leakage/Set phase 4571 1.1 riastrad USHORT usSize; //Size of Object 4572 1.1 riastrad }ATOM_VOLTAGE_OBJECT_HEADER_V3; 4573 1.1 riastrad 4574 1.1 riastrad // ATOM_VOLTAGE_OBJECT_HEADER_V3.ucVoltageMode 4575 1.1 riastrad #define VOLTAGE_OBJ_GPIO_LUT 0 //VOLTAGE and GPIO Lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 4576 1.1 riastrad #define VOLTAGE_OBJ_VR_I2C_INIT_SEQ 3 //VOLTAGE REGULATOR INIT sequece through I2C -> ATOM_I2C_VOLTAGE_OBJECT_V3 4577 1.1 riastrad #define VOLTAGE_OBJ_PHASE_LUT 4 //Set Vregulator Phase lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 4578 1.1 riastrad #define VOLTAGE_OBJ_SVID2 7 //Indicate voltage control by SVID2 ->ATOM_SVID2_VOLTAGE_OBJECT_V3 4579 1.1 riastrad #define VOLTAGE_OBJ_EVV 8 4580 1.1 riastrad #define VOLTAGE_OBJ_PWRBOOST_LEAKAGE_LUT 0x10 //Powerboost Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 4581 1.1 riastrad #define VOLTAGE_OBJ_HIGH_STATE_LEAKAGE_LUT 0x11 //High voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 4582 1.1 riastrad #define VOLTAGE_OBJ_HIGH1_STATE_LEAKAGE_LUT 0x12 //High1 voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 4583 1.1 riastrad 4584 1.1 riastrad typedef struct _VOLTAGE_LUT_ENTRY_V2 4585 1.1 riastrad { 4586 1.1 riastrad ULONG ulVoltageId; // The Voltage ID which is used to program GPIO register 4587 1.1 riastrad USHORT usVoltageValue; // The corresponding Voltage Value, in mV 4588 1.1 riastrad }VOLTAGE_LUT_ENTRY_V2; 4589 1.1 riastrad 4590 1.1 riastrad typedef struct _LEAKAGE_VOLTAGE_LUT_ENTRY_V2 4591 1.1 riastrad { 4592 1.1 riastrad USHORT usVoltageLevel; // The Voltage ID which is used to program GPIO register 4593 1.1 riastrad USHORT usVoltageId; 4594 1.1 riastrad USHORT usLeakageId; // The corresponding Voltage Value, in mV 4595 1.1 riastrad }LEAKAGE_VOLTAGE_LUT_ENTRY_V2; 4596 1.1 riastrad 4597 1.1 riastrad typedef struct _ATOM_I2C_VOLTAGE_OBJECT_V3 4598 1.1 riastrad { 4599 1.1 riastrad ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_VR_I2C_INIT_SEQ 4600 1.1 riastrad UCHAR ucVoltageRegulatorId; //Indicate Voltage Regulator Id 4601 1.1 riastrad UCHAR ucVoltageControlI2cLine; 4602 1.1 riastrad UCHAR ucVoltageControlAddress; 4603 1.1 riastrad UCHAR ucVoltageControlOffset; 4604 1.1 riastrad ULONG ulReserved; 4605 1.1 riastrad VOLTAGE_LUT_ENTRY asVolI2cLut[1]; // end with 0xff 4606 1.1 riastrad }ATOM_I2C_VOLTAGE_OBJECT_V3; 4607 1.1 riastrad 4608 1.1 riastrad // ATOM_I2C_VOLTAGE_OBJECT_V3.ucVoltageControlFlag 4609 1.1 riastrad #define VOLTAGE_DATA_ONE_BYTE 0 4610 1.1 riastrad #define VOLTAGE_DATA_TWO_BYTE 1 4611 1.1 riastrad 4612 1.1 riastrad typedef struct _ATOM_GPIO_VOLTAGE_OBJECT_V3 4613 1.1 riastrad { 4614 1.1 riastrad ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_GPIO_LUT or VOLTAGE_OBJ_PHASE_LUT 4615 1.1 riastrad UCHAR ucVoltageGpioCntlId; // default is 0 which indicate control through CG VID mode 4616 1.1 riastrad UCHAR ucGpioEntryNum; // indiate the entry numbers of Votlage/Gpio value Look up table 4617 1.1 riastrad UCHAR ucPhaseDelay; // phase delay in unit of micro second 4618 1.1 riastrad UCHAR ucReserved; 4619 1.1 riastrad ULONG ulGpioMaskVal; // GPIO Mask value 4620 1.1 riastrad VOLTAGE_LUT_ENTRY_V2 asVolGpioLut[1]; 4621 1.1 riastrad }ATOM_GPIO_VOLTAGE_OBJECT_V3; 4622 1.1 riastrad 4623 1.1 riastrad typedef struct _ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 4624 1.1 riastrad { 4625 1.1 riastrad ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = 0x10/0x11/0x12 4626 1.1 riastrad UCHAR ucLeakageCntlId; // default is 0 4627 1.1 riastrad UCHAR ucLeakageEntryNum; // indicate the entry number of LeakageId/Voltage Lut table 4628 1.1 riastrad UCHAR ucReserved[2]; 4629 1.1 riastrad ULONG ulMaxVoltageLevel; 4630 1.1 riastrad LEAKAGE_VOLTAGE_LUT_ENTRY_V2 asLeakageIdLut[1]; 4631 1.1 riastrad }ATOM_LEAKAGE_VOLTAGE_OBJECT_V3; 4632 1.1 riastrad 4633 1.1 riastrad 4634 1.1 riastrad typedef struct _ATOM_SVID2_VOLTAGE_OBJECT_V3 4635 1.1 riastrad { 4636 1.1 riastrad ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_SVID2 4637 1.1 riastrad // 14:7 PSI0_VID 4638 1.1 riastrad // 6 PSI0_EN 4639 1.1 riastrad // 5 PSI1 4640 1.1 riastrad // 4:2 load line slope trim. 4641 1.1 riastrad // 1:0 offset trim, 4642 1.1 riastrad USHORT usLoadLine_PSI; 4643 1.1 riastrad // GPU GPIO pin Id to SVID2 regulator VRHot pin. possible value 0~31. 0 means GPIO0, 31 means GPIO31 4644 1.1 riastrad UCHAR ucSVDGpioId; //0~31 indicate GPIO0~31 4645 1.1 riastrad UCHAR ucSVCGpioId; //0~31 indicate GPIO0~31 4646 1.1 riastrad ULONG ulReserved; 4647 1.1 riastrad }ATOM_SVID2_VOLTAGE_OBJECT_V3; 4648 1.1 riastrad 4649 1.1 riastrad typedef union _ATOM_VOLTAGE_OBJECT_V3{ 4650 1.1 riastrad ATOM_GPIO_VOLTAGE_OBJECT_V3 asGpioVoltageObj; 4651 1.1 riastrad ATOM_I2C_VOLTAGE_OBJECT_V3 asI2cVoltageObj; 4652 1.1 riastrad ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 asLeakageObj; 4653 1.1 riastrad ATOM_SVID2_VOLTAGE_OBJECT_V3 asSVID2Obj; 4654 1.1 riastrad }ATOM_VOLTAGE_OBJECT_V3; 4655 1.1 riastrad 4656 1.1 riastrad typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V3_1 4657 1.1 riastrad { 4658 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4659 1.1 riastrad ATOM_VOLTAGE_OBJECT_V3 asVoltageObj[3]; //Info for Voltage control 4660 1.1 riastrad }ATOM_VOLTAGE_OBJECT_INFO_V3_1; 4661 1.1 riastrad 4662 1.1 riastrad typedef struct _ATOM_ASIC_PROFILE_VOLTAGE 4663 1.1 riastrad { 4664 1.1 riastrad UCHAR ucProfileId; 4665 1.1 riastrad UCHAR ucReserved; 4666 1.1 riastrad USHORT usSize; 4667 1.1 riastrad USHORT usEfuseSpareStartAddr; 4668 1.1 riastrad USHORT usFuseIndex[8]; //from LSB to MSB, Max 8bit,end of 0xffff if less than 8 efuse id, 4669 1.1 riastrad ATOM_LEAKID_VOLTAGE asLeakVol[2]; //Leakid and relatd voltage 4670 1.1 riastrad }ATOM_ASIC_PROFILE_VOLTAGE; 4671 1.1 riastrad 4672 1.1 riastrad //ucProfileId 4673 1.1 riastrad #define ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE 1 4674 1.1 riastrad #define ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE 1 4675 1.1 riastrad #define ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE 2 4676 1.1 riastrad 4677 1.1 riastrad typedef struct _ATOM_ASIC_PROFILING_INFO 4678 1.1 riastrad { 4679 1.1 riastrad ATOM_COMMON_TABLE_HEADER asHeader; 4680 1.1 riastrad ATOM_ASIC_PROFILE_VOLTAGE asVoltage; 4681 1.1 riastrad }ATOM_ASIC_PROFILING_INFO; 4682 1.1 riastrad 4683 1.1 riastrad typedef struct _ATOM_ASIC_PROFILING_INFO_V2_1 4684 1.1 riastrad { 4685 1.1 riastrad ATOM_COMMON_TABLE_HEADER asHeader; 4686 1.1 riastrad UCHAR ucLeakageBinNum; // indicate the entry number of LeakageId/Voltage Lut table 4687 1.1 riastrad USHORT usLeakageBinArrayOffset; // offset of USHORT Leakage Bin list array ( from lower LeakageId to higher) 4688 1.1 riastrad 4689 1.1 riastrad UCHAR ucElbVDDC_Num; 4690 1.1 riastrad USHORT usElbVDDC_IdArrayOffset; // offset of USHORT virtual VDDC voltage id ( 0xff01~0xff08 ) 4691 1.1 riastrad USHORT usElbVDDC_LevelArrayOffset; // offset of 2 dimension voltage level USHORT array 4692 1.1 riastrad 4693 1.1 riastrad UCHAR ucElbVDDCI_Num; 4694 1.1 riastrad USHORT usElbVDDCI_IdArrayOffset; // offset of USHORT virtual VDDCI voltage id ( 0xff01~0xff08 ) 4695 1.1 riastrad USHORT usElbVDDCI_LevelArrayOffset; // offset of 2 dimension voltage level USHORT array 4696 1.1 riastrad }ATOM_ASIC_PROFILING_INFO_V2_1; 4697 1.1 riastrad 4698 1.1 riastrad typedef struct _ATOM_ASIC_PROFILING_INFO_V3_1 4699 1.1 riastrad { 4700 1.1 riastrad ATOM_COMMON_TABLE_HEADER asHeader; 4701 1.1 riastrad ULONG ulEvvDerateTdp; 4702 1.1 riastrad ULONG ulEvvDerateTdc; 4703 1.1 riastrad ULONG ulBoardCoreTemp; 4704 1.1 riastrad ULONG ulMaxVddc; 4705 1.1 riastrad ULONG ulMinVddc; 4706 1.1 riastrad ULONG ulLoadLineSlop; 4707 1.1 riastrad ULONG ulLeakageTemp; 4708 1.1 riastrad ULONG ulLeakageVoltage; 4709 1.1 riastrad ULONG ulCACmEncodeRange; 4710 1.1 riastrad ULONG ulCACmEncodeAverage; 4711 1.1 riastrad ULONG ulCACbEncodeRange; 4712 1.1 riastrad ULONG ulCACbEncodeAverage; 4713 1.1 riastrad ULONG ulKt_bEncodeRange; 4714 1.1 riastrad ULONG ulKt_bEncodeAverage; 4715 1.1 riastrad ULONG ulKv_mEncodeRange; 4716 1.1 riastrad ULONG ulKv_mEncodeAverage; 4717 1.1 riastrad ULONG ulKv_bEncodeRange; 4718 1.1 riastrad ULONG ulKv_bEncodeAverage; 4719 1.1 riastrad ULONG ulLkgEncodeLn_MaxDivMin; 4720 1.1 riastrad ULONG ulLkgEncodeMin; 4721 1.1 riastrad ULONG ulEfuseLogisticAlpha; 4722 1.1 riastrad USHORT usPowerDpm0; 4723 1.1 riastrad USHORT usCurrentDpm0; 4724 1.1 riastrad USHORT usPowerDpm1; 4725 1.1 riastrad USHORT usCurrentDpm1; 4726 1.1 riastrad USHORT usPowerDpm2; 4727 1.1 riastrad USHORT usCurrentDpm2; 4728 1.1 riastrad USHORT usPowerDpm3; 4729 1.1 riastrad USHORT usCurrentDpm3; 4730 1.1 riastrad USHORT usPowerDpm4; 4731 1.1 riastrad USHORT usCurrentDpm4; 4732 1.1 riastrad USHORT usPowerDpm5; 4733 1.1 riastrad USHORT usCurrentDpm5; 4734 1.1 riastrad USHORT usPowerDpm6; 4735 1.1 riastrad USHORT usCurrentDpm6; 4736 1.1 riastrad USHORT usPowerDpm7; 4737 1.1 riastrad USHORT usCurrentDpm7; 4738 1.1 riastrad }ATOM_ASIC_PROFILING_INFO_V3_1; 4739 1.1 riastrad 4740 1.1 riastrad 4741 1.1 riastrad typedef struct _ATOM_POWER_SOURCE_OBJECT 4742 1.1 riastrad { 4743 1.1 riastrad UCHAR ucPwrSrcId; // Power source 4744 1.1 riastrad UCHAR ucPwrSensorType; // GPIO, I2C or none 4745 1.1 riastrad UCHAR ucPwrSensId; // if GPIO detect, it is GPIO id, if I2C detect, it is I2C id 4746 1.1 riastrad UCHAR ucPwrSensSlaveAddr; // Slave address if I2C detect 4747 1.1 riastrad UCHAR ucPwrSensRegIndex; // I2C register Index if I2C detect 4748 1.1 riastrad UCHAR ucPwrSensRegBitMask; // detect which bit is used if I2C detect 4749 1.1 riastrad UCHAR ucPwrSensActiveState; // high active or low active 4750 1.1 riastrad UCHAR ucReserve[3]; // reserve 4751 1.1 riastrad USHORT usSensPwr; // in unit of watt 4752 1.1 riastrad }ATOM_POWER_SOURCE_OBJECT; 4753 1.1 riastrad 4754 1.1 riastrad typedef struct _ATOM_POWER_SOURCE_INFO 4755 1.1 riastrad { 4756 1.1 riastrad ATOM_COMMON_TABLE_HEADER asHeader; 4757 1.1 riastrad UCHAR asPwrbehave[16]; 4758 1.1 riastrad ATOM_POWER_SOURCE_OBJECT asPwrObj[1]; 4759 1.1 riastrad }ATOM_POWER_SOURCE_INFO; 4760 1.1 riastrad 4761 1.1 riastrad 4762 1.1 riastrad //Define ucPwrSrcId 4763 1.1 riastrad #define POWERSOURCE_PCIE_ID1 0x00 4764 1.1 riastrad #define POWERSOURCE_6PIN_CONNECTOR_ID1 0x01 4765 1.1 riastrad #define POWERSOURCE_8PIN_CONNECTOR_ID1 0x02 4766 1.1 riastrad #define POWERSOURCE_6PIN_CONNECTOR_ID2 0x04 4767 1.1 riastrad #define POWERSOURCE_8PIN_CONNECTOR_ID2 0x08 4768 1.1 riastrad 4769 1.1 riastrad //define ucPwrSensorId 4770 1.1 riastrad #define POWER_SENSOR_ALWAYS 0x00 4771 1.1 riastrad #define POWER_SENSOR_GPIO 0x01 4772 1.1 riastrad #define POWER_SENSOR_I2C 0x02 4773 1.1 riastrad 4774 1.1 riastrad typedef struct _ATOM_CLK_VOLT_CAPABILITY 4775 1.1 riastrad { 4776 1.1 riastrad ULONG ulVoltageIndex; // The Voltage Index indicated by FUSE, same voltage index shared with SCLK DPM fuse table 4777 1.1 riastrad ULONG ulMaximumSupportedCLK; // Maximum clock supported with specified voltage index, unit in 10kHz 4778 1.1 riastrad }ATOM_CLK_VOLT_CAPABILITY; 4779 1.1 riastrad 4780 1.1 riastrad typedef struct _ATOM_AVAILABLE_SCLK_LIST 4781 1.1 riastrad { 4782 1.1 riastrad ULONG ulSupportedSCLK; // Maximum clock supported with specified voltage index, unit in 10kHz 4783 1.1 riastrad USHORT usVoltageIndex; // The Voltage Index indicated by FUSE for specified SCLK 4784 1.1 riastrad USHORT usVoltageID; // The Voltage ID indicated by FUSE for specified SCLK 4785 1.1 riastrad }ATOM_AVAILABLE_SCLK_LIST; 4786 1.1 riastrad 4787 1.1 riastrad // ATOM_INTEGRATED_SYSTEM_INFO_V6 ulSystemConfig cap definition 4788 1.1 riastrad #define ATOM_IGP_INFO_V6_SYSTEM_CONFIG__PCIE_POWER_GATING_ENABLE 1 // refer to ulSystemConfig bit[0] 4789 1.1 riastrad 4790 1.1 riastrad // this IntegrateSystemInfoTable is used for Liano/Ontario APU 4791 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 4792 1.1 riastrad { 4793 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4794 1.1 riastrad ULONG ulBootUpEngineClock; 4795 1.1 riastrad ULONG ulDentistVCOFreq; 4796 1.1 riastrad ULONG ulBootUpUMAClock; 4797 1.1 riastrad ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; 4798 1.1 riastrad ULONG ulBootUpReqDisplayVector; 4799 1.1 riastrad ULONG ulOtherDisplayMisc; 4800 1.1 riastrad ULONG ulGPUCapInfo; 4801 1.1 riastrad ULONG ulSB_MMIO_Base_Addr; 4802 1.1 riastrad USHORT usRequestedPWMFreqInHz; 4803 1.1 riastrad UCHAR ucHtcTmpLmt; 4804 1.1 riastrad UCHAR ucHtcHystLmt; 4805 1.1 riastrad ULONG ulMinEngineClock; 4806 1.1 riastrad ULONG ulSystemConfig; 4807 1.1 riastrad ULONG ulCPUCapInfo; 4808 1.1 riastrad USHORT usNBP0Voltage; 4809 1.1 riastrad USHORT usNBP1Voltage; 4810 1.1 riastrad USHORT usBootUpNBVoltage; 4811 1.1 riastrad USHORT usExtDispConnInfoOffset; 4812 1.1 riastrad USHORT usPanelRefreshRateRange; 4813 1.1 riastrad UCHAR ucMemoryType; 4814 1.1 riastrad UCHAR ucUMAChannelNumber; 4815 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10]; 4816 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_UVD[10]; 4817 1.1 riastrad ULONG ulCSR_M3_ARB_CNTL_FS3D[10]; 4818 1.1 riastrad ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; 4819 1.1 riastrad ULONG ulGMCRestoreResetTime; 4820 1.1 riastrad ULONG ulMinimumNClk; 4821 1.1 riastrad ULONG ulIdleNClk; 4822 1.1 riastrad ULONG ulDDR_DLL_PowerUpTime; 4823 1.1 riastrad ULONG ulDDR_PLL_PowerUpTime; 4824 1.1 riastrad USHORT usPCIEClkSSPercentage; 4825 1.1 riastrad USHORT usPCIEClkSSType; 4826 1.1 riastrad USHORT usLvdsSSPercentage; 4827 1.1 riastrad USHORT usLvdsSSpreadRateIn10Hz; 4828 1.1 riastrad USHORT usHDMISSPercentage; 4829 1.1 riastrad USHORT usHDMISSpreadRateIn10Hz; 4830 1.1 riastrad USHORT usDVISSPercentage; 4831 1.1 riastrad USHORT usDVISSpreadRateIn10Hz; 4832 1.1 riastrad ULONG SclkDpmBoostMargin; 4833 1.1 riastrad ULONG SclkDpmThrottleMargin; 4834 1.1 riastrad USHORT SclkDpmTdpLimitPG; 4835 1.1 riastrad USHORT SclkDpmTdpLimitBoost; 4836 1.1 riastrad ULONG ulBoostEngineCLock; 4837 1.1 riastrad UCHAR ulBoostVid_2bit; 4838 1.1 riastrad UCHAR EnableBoost; 4839 1.1 riastrad USHORT GnbTdpLimit; 4840 1.1 riastrad USHORT usMaxLVDSPclkFreqInSingleLink; 4841 1.1 riastrad UCHAR ucLvdsMisc; 4842 1.1 riastrad UCHAR ucLVDSReserved; 4843 1.1 riastrad ULONG ulReserved3[15]; 4844 1.1 riastrad ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; 4845 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO_V6; 4846 1.1 riastrad 4847 1.1 riastrad // ulGPUCapInfo 4848 1.1 riastrad #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 4849 1.1 riastrad #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08 4850 1.1 riastrad 4851 1.1 riastrad //ucLVDSMisc: 4852 1.1 riastrad #define SYS_INFO_LVDSMISC__888_FPDI_MODE 0x01 4853 1.1 riastrad #define SYS_INFO_LVDSMISC__DL_CH_SWAP 0x02 4854 1.1 riastrad #define SYS_INFO_LVDSMISC__888_BPC 0x04 4855 1.1 riastrad #define SYS_INFO_LVDSMISC__OVERRIDE_EN 0x08 4856 1.1 riastrad #define SYS_INFO_LVDSMISC__BLON_ACTIVE_LOW 0x10 4857 1.1 riastrad // new since Trinity 4858 1.1 riastrad #define SYS_INFO_LVDSMISC__TRAVIS_LVDS_VOL_OVERRIDE_EN 0x20 4859 1.1 riastrad 4860 1.1 riastrad // not used any more 4861 1.1 riastrad #define SYS_INFO_LVDSMISC__VSYNC_ACTIVE_LOW 0x04 4862 1.1 riastrad #define SYS_INFO_LVDSMISC__HSYNC_ACTIVE_LOW 0x08 4863 1.1 riastrad 4864 1.1 riastrad /********************************************************************************************************************** 4865 1.1 riastrad ATOM_INTEGRATED_SYSTEM_INFO_V6 Description 4866 1.1 riastrad ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock 4867 1.1 riastrad ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. 4868 1.1 riastrad ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. 4869 1.1 riastrad sDISPCLK_Voltage: Report Display clock voltage requirement. 4870 1.1 riastrad 4871 1.1 riastrad ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Liano/Ontaio projects: 4872 1.1 riastrad ATOM_DEVICE_CRT1_SUPPORT 0x0001 4873 1.1 riastrad ATOM_DEVICE_CRT2_SUPPORT 0x0010 4874 1.1 riastrad ATOM_DEVICE_DFP1_SUPPORT 0x0008 4875 1.1 riastrad ATOM_DEVICE_DFP6_SUPPORT 0x0040 4876 1.1 riastrad ATOM_DEVICE_DFP2_SUPPORT 0x0080 4877 1.1 riastrad ATOM_DEVICE_DFP3_SUPPORT 0x0200 4878 1.1 riastrad ATOM_DEVICE_DFP4_SUPPORT 0x0400 4879 1.1 riastrad ATOM_DEVICE_DFP5_SUPPORT 0x0800 4880 1.1 riastrad ATOM_DEVICE_LCD1_SUPPORT 0x0002 4881 1.1 riastrad ulOtherDisplayMisc: Other display related flags, not defined yet. 4882 1.1 riastrad ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode. 4883 1.1 riastrad =1: TMDS/HDMI Coherent Mode use signel PLL mode. 4884 1.1 riastrad bit[3]=0: Enable HW AUX mode detection logic 4885 1.1 riastrad =1: Disable HW AUX mode dettion logic 4886 1.1 riastrad ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage. 4887 1.1 riastrad 4888 1.1 riastrad usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). 4889 1.1 riastrad Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; 4890 1.1 riastrad 4891 1.1 riastrad When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: 4892 1.1 riastrad 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; 4893 1.1 riastrad VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, 4894 1.1 riastrad Changing BL using VBIOS function is functional in both driver and non-driver present environment; 4895 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 4896 1.1 riastrad 4897 1.1 riastrad 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating 4898 1.1 riastrad that BL control from GPU is expected. 4899 1.1 riastrad VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 4900 1.1 riastrad Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but 4901 1.1 riastrad it's per platform 4902 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 4903 1.1 riastrad 4904 1.1 riastrad ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. 4905 1.1 riastrad Threshold on value to enter HTC_active state. 4906 1.1 riastrad ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. 4907 1.1 riastrad To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. 4908 1.1 riastrad ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings. 4909 1.1 riastrad ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled 4910 1.1 riastrad =1: PCIE Power Gating Enabled 4911 1.1 riastrad Bit[1]=0: DDR-DLL shut-down feature disabled. 4912 1.1 riastrad 1: DDR-DLL shut-down feature enabled. 4913 1.1 riastrad Bit[2]=0: DDR-PLL Power down feature disabled. 4914 1.1 riastrad 1: DDR-PLL Power down feature enabled. 4915 1.1 riastrad ulCPUCapInfo: TBD 4916 1.1 riastrad usNBP0Voltage: VID for voltage on NB P0 State 4917 1.1 riastrad usNBP1Voltage: VID for voltage on NB P1 State 4918 1.1 riastrad usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement. 4919 1.1 riastrad usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure 4920 1.1 riastrad usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set 4921 1.1 riastrad to indicate a range. 4922 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 4923 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 4924 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 4925 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 4926 1.1 riastrad ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. 4927 1.1 riastrad ucUMAChannelNumber: System memory channel numbers. 4928 1.1 riastrad ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default 4929 1.1 riastrad ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. 4930 1.1 riastrad ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. 4931 1.1 riastrad sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high 4932 1.1 riastrad ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. 4933 1.1 riastrad ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. 4934 1.1 riastrad ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. 4935 1.1 riastrad ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. 4936 1.1 riastrad ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. 4937 1.1 riastrad usPCIEClkSSPercentage: PCIE Clock Spred Spectrum Percentage in unit 0.01%; 100 mean 1%. 4938 1.1 riastrad usPCIEClkSSType: PCIE Clock Spred Spectrum Type. 0 for Down spread(default); 1 for Center spread. 4939 1.1 riastrad usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. 4940 1.1 riastrad usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 4941 1.1 riastrad usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 4942 1.1 riastrad usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 4943 1.1 riastrad usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 4944 1.1 riastrad usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 4945 1.1 riastrad usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz 4946 1.1 riastrad ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode 4947 1.1 riastrad [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped 4948 1.1 riastrad [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color 4949 1.1 riastrad [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used 4950 1.1 riastrad [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) 4951 1.1 riastrad **********************************************************************************************************************/ 4952 1.1 riastrad 4953 1.1 riastrad // this Table is used for Liano/Ontario APU 4954 1.1 riastrad typedef struct _ATOM_FUSION_SYSTEM_INFO_V1 4955 1.1 riastrad { 4956 1.1 riastrad ATOM_INTEGRATED_SYSTEM_INFO_V6 sIntegratedSysInfo; 4957 1.1 riastrad ULONG ulPowerplayTable[128]; 4958 1.1 riastrad }ATOM_FUSION_SYSTEM_INFO_V1; 4959 1.1 riastrad 4960 1.1 riastrad 4961 1.1 riastrad typedef struct _ATOM_TDP_CONFIG_BITS 4962 1.1 riastrad { 4963 1.1 riastrad #if ATOM_BIG_ENDIAN 4964 1.1 riastrad ULONG uReserved:2; 4965 1.1 riastrad ULONG uTDP_Value:14; // Original TDP value in tens of milli watts 4966 1.1 riastrad ULONG uCTDP_Value:14; // Override value in tens of milli watts 4967 1.1 riastrad ULONG uCTDP_Enable:2; // = (uCTDP_Value > uTDP_Value? 2: (uCTDP_Value < uTDP_Value)) 4968 1.1 riastrad #else 4969 1.1 riastrad ULONG uCTDP_Enable:2; // = (uCTDP_Value > uTDP_Value? 2: (uCTDP_Value < uTDP_Value)) 4970 1.1 riastrad ULONG uCTDP_Value:14; // Override value in tens of milli watts 4971 1.1 riastrad ULONG uTDP_Value:14; // Original TDP value in tens of milli watts 4972 1.1 riastrad ULONG uReserved:2; 4973 1.1 riastrad #endif 4974 1.1 riastrad }ATOM_TDP_CONFIG_BITS; 4975 1.1 riastrad 4976 1.1 riastrad typedef union _ATOM_TDP_CONFIG 4977 1.1 riastrad { 4978 1.1 riastrad ATOM_TDP_CONFIG_BITS TDP_config; 4979 1.1 riastrad ULONG TDP_config_all; 4980 1.1 riastrad }ATOM_TDP_CONFIG; 4981 1.1 riastrad 4982 1.1 riastrad /********************************************************************************************************************** 4983 1.1 riastrad ATOM_FUSION_SYSTEM_INFO_V1 Description 4984 1.1 riastrad sIntegratedSysInfo: refer to ATOM_INTEGRATED_SYSTEM_INFO_V6 definition. 4985 1.1 riastrad ulPowerplayTable[128]: This 512 bytes memory is used to save ATOM_PPLIB_POWERPLAYTABLE3, starting form ulPowerplayTable[0] 4986 1.1 riastrad **********************************************************************************************************************/ 4987 1.1 riastrad 4988 1.1 riastrad // this IntegrateSystemInfoTable is used for Trinity APU 4989 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_7 4990 1.1 riastrad { 4991 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 4992 1.1 riastrad ULONG ulBootUpEngineClock; 4993 1.1 riastrad ULONG ulDentistVCOFreq; 4994 1.1 riastrad ULONG ulBootUpUMAClock; 4995 1.1 riastrad ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; 4996 1.1 riastrad ULONG ulBootUpReqDisplayVector; 4997 1.1 riastrad ULONG ulOtherDisplayMisc; 4998 1.1 riastrad ULONG ulGPUCapInfo; 4999 1.1 riastrad ULONG ulSB_MMIO_Base_Addr; 5000 1.1 riastrad USHORT usRequestedPWMFreqInHz; 5001 1.1 riastrad UCHAR ucHtcTmpLmt; 5002 1.1 riastrad UCHAR ucHtcHystLmt; 5003 1.1 riastrad ULONG ulMinEngineClock; 5004 1.1 riastrad ULONG ulSystemConfig; 5005 1.1 riastrad ULONG ulCPUCapInfo; 5006 1.1 riastrad USHORT usNBP0Voltage; 5007 1.1 riastrad USHORT usNBP1Voltage; 5008 1.1 riastrad USHORT usBootUpNBVoltage; 5009 1.1 riastrad USHORT usExtDispConnInfoOffset; 5010 1.1 riastrad USHORT usPanelRefreshRateRange; 5011 1.1 riastrad UCHAR ucMemoryType; 5012 1.1 riastrad UCHAR ucUMAChannelNumber; 5013 1.1 riastrad UCHAR strVBIOSMsg[40]; 5014 1.1 riastrad ATOM_TDP_CONFIG asTdpConfig; 5015 1.1 riastrad ULONG ulReserved[19]; 5016 1.1 riastrad ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; 5017 1.1 riastrad ULONG ulGMCRestoreResetTime; 5018 1.1 riastrad ULONG ulMinimumNClk; 5019 1.1 riastrad ULONG ulIdleNClk; 5020 1.1 riastrad ULONG ulDDR_DLL_PowerUpTime; 5021 1.1 riastrad ULONG ulDDR_PLL_PowerUpTime; 5022 1.1 riastrad USHORT usPCIEClkSSPercentage; 5023 1.1 riastrad USHORT usPCIEClkSSType; 5024 1.1 riastrad USHORT usLvdsSSPercentage; 5025 1.1 riastrad USHORT usLvdsSSpreadRateIn10Hz; 5026 1.1 riastrad USHORT usHDMISSPercentage; 5027 1.1 riastrad USHORT usHDMISSpreadRateIn10Hz; 5028 1.1 riastrad USHORT usDVISSPercentage; 5029 1.1 riastrad USHORT usDVISSpreadRateIn10Hz; 5030 1.1 riastrad ULONG SclkDpmBoostMargin; 5031 1.1 riastrad ULONG SclkDpmThrottleMargin; 5032 1.1 riastrad USHORT SclkDpmTdpLimitPG; 5033 1.1 riastrad USHORT SclkDpmTdpLimitBoost; 5034 1.1 riastrad ULONG ulBoostEngineCLock; 5035 1.1 riastrad UCHAR ulBoostVid_2bit; 5036 1.1 riastrad UCHAR EnableBoost; 5037 1.1 riastrad USHORT GnbTdpLimit; 5038 1.1 riastrad USHORT usMaxLVDSPclkFreqInSingleLink; 5039 1.1 riastrad UCHAR ucLvdsMisc; 5040 1.1 riastrad UCHAR ucTravisLVDSVolAdjust; 5041 1.1 riastrad UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms; 5042 1.1 riastrad UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms; 5043 1.1 riastrad UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms; 5044 1.1 riastrad UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms; 5045 1.1 riastrad UCHAR ucLVDSOffToOnDelay_in4Ms; 5046 1.1 riastrad UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms; 5047 1.1 riastrad UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms; 5048 1.1 riastrad UCHAR ucMinAllowedBL_Level; 5049 1.1 riastrad ULONG ulLCDBitDepthControlVal; 5050 1.1 riastrad ULONG ulNbpStateMemclkFreq[4]; 5051 1.1 riastrad USHORT usNBP2Voltage; 5052 1.1 riastrad USHORT usNBP3Voltage; 5053 1.1 riastrad ULONG ulNbpStateNClkFreq[4]; 5054 1.1 riastrad UCHAR ucNBDPMEnable; 5055 1.1 riastrad UCHAR ucReserved[3]; 5056 1.1 riastrad UCHAR ucDPMState0VclkFid; 5057 1.1 riastrad UCHAR ucDPMState0DclkFid; 5058 1.1 riastrad UCHAR ucDPMState1VclkFid; 5059 1.1 riastrad UCHAR ucDPMState1DclkFid; 5060 1.1 riastrad UCHAR ucDPMState2VclkFid; 5061 1.1 riastrad UCHAR ucDPMState2DclkFid; 5062 1.1 riastrad UCHAR ucDPMState3VclkFid; 5063 1.1 riastrad UCHAR ucDPMState3DclkFid; 5064 1.1 riastrad ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; 5065 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO_V1_7; 5066 1.1 riastrad 5067 1.1 riastrad // ulOtherDisplayMisc 5068 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01 5069 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__GET_BOOTUP_DISPLAY_CALLBACK_FUNC_SUPPORT 0x02 5070 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__GET_EXPANSION_CALLBACK_FUNC_SUPPORT 0x04 5071 1.1 riastrad #define INTEGRATED_SYSTEM_INFO__FAST_BOOT_SUPPORT 0x08 5072 1.1 riastrad 5073 1.1 riastrad // ulGPUCapInfo 5074 1.1 riastrad #define SYS_INFO_GPUCAPS__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 5075 1.1 riastrad #define SYS_INFO_GPUCAPS__DP_SINGLEPLL_MODE 0x02 5076 1.1 riastrad #define SYS_INFO_GPUCAPS__DISABLE_AUX_MODE_DETECT 0x08 5077 1.1 riastrad #define SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS 0x10 5078 1.1 riastrad 5079 1.1 riastrad /********************************************************************************************************************** 5080 1.1 riastrad ATOM_INTEGRATED_SYSTEM_INFO_V1_7 Description 5081 1.1 riastrad ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock 5082 1.1 riastrad ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. 5083 1.1 riastrad ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. 5084 1.1 riastrad sDISPCLK_Voltage: Report Display clock voltage requirement. 5085 1.1 riastrad 5086 1.1 riastrad ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Trinity projects: 5087 1.1 riastrad ATOM_DEVICE_CRT1_SUPPORT 0x0001 5088 1.1 riastrad ATOM_DEVICE_DFP1_SUPPORT 0x0008 5089 1.1 riastrad ATOM_DEVICE_DFP6_SUPPORT 0x0040 5090 1.1 riastrad ATOM_DEVICE_DFP2_SUPPORT 0x0080 5091 1.1 riastrad ATOM_DEVICE_DFP3_SUPPORT 0x0200 5092 1.1 riastrad ATOM_DEVICE_DFP4_SUPPORT 0x0400 5093 1.1 riastrad ATOM_DEVICE_DFP5_SUPPORT 0x0800 5094 1.1 riastrad ATOM_DEVICE_LCD1_SUPPORT 0x0002 5095 1.1 riastrad ulOtherDisplayMisc: bit[0]=0: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is not supported by SBIOS. 5096 1.1 riastrad =1: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is supported by SBIOS. 5097 1.1 riastrad bit[1]=0: INT15 callback function Get boot display( ax=4e08, bl=01h) is not supported by SBIOS 5098 1.1 riastrad =1: INT15 callback function Get boot display( ax=4e08, bl=01h) is supported by SBIOS 5099 1.1 riastrad bit[2]=0: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is not supported by SBIOS 5100 1.1 riastrad =1: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is supported by SBIOS 5101 1.1 riastrad bit[3]=0: VBIOS fast boot is disable 5102 1.1 riastrad =1: VBIOS fast boot is enable. ( VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open) 5103 1.1 riastrad ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode. 5104 1.1 riastrad =1: TMDS/HDMI Coherent Mode use signel PLL mode. 5105 1.1 riastrad bit[1]=0: DP mode use cascade PLL mode ( New for Trinity ) 5106 1.1 riastrad =1: DP mode use single PLL mode 5107 1.1 riastrad bit[3]=0: Enable AUX HW mode detection logic 5108 1.1 riastrad =1: Disable AUX HW mode detection logic 5109 1.1 riastrad 5110 1.1 riastrad ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage. 5111 1.1 riastrad 5112 1.1 riastrad usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). 5113 1.1 riastrad Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; 5114 1.1 riastrad 5115 1.1 riastrad When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: 5116 1.1 riastrad 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; 5117 1.1 riastrad VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, 5118 1.1 riastrad Changing BL using VBIOS function is functional in both driver and non-driver present environment; 5119 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 5120 1.1 riastrad 5121 1.1 riastrad 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating 5122 1.1 riastrad that BL control from GPU is expected. 5123 1.1 riastrad VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 5124 1.1 riastrad Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but 5125 1.1 riastrad it's per platform 5126 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 5127 1.1 riastrad 5128 1.1 riastrad ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. 5129 1.1 riastrad Threshold on value to enter HTC_active state. 5130 1.1 riastrad ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. 5131 1.1 riastrad To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. 5132 1.1 riastrad ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings. 5133 1.1 riastrad ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled 5134 1.1 riastrad =1: PCIE Power Gating Enabled 5135 1.1 riastrad Bit[1]=0: DDR-DLL shut-down feature disabled. 5136 1.1 riastrad 1: DDR-DLL shut-down feature enabled. 5137 1.1 riastrad Bit[2]=0: DDR-PLL Power down feature disabled. 5138 1.1 riastrad 1: DDR-PLL Power down feature enabled. 5139 1.1 riastrad ulCPUCapInfo: TBD 5140 1.1 riastrad usNBP0Voltage: VID for voltage on NB P0 State 5141 1.1 riastrad usNBP1Voltage: VID for voltage on NB P1 State 5142 1.1 riastrad usNBP2Voltage: VID for voltage on NB P2 State 5143 1.1 riastrad usNBP3Voltage: VID for voltage on NB P3 State 5144 1.1 riastrad usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement. 5145 1.1 riastrad usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure 5146 1.1 riastrad usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set 5147 1.1 riastrad to indicate a range. 5148 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 5149 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 5150 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 5151 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 5152 1.1 riastrad ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. 5153 1.1 riastrad ucUMAChannelNumber: System memory channel numbers. 5154 1.1 riastrad ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default 5155 1.1 riastrad ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. 5156 1.1 riastrad ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. 5157 1.1 riastrad sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high 5158 1.1 riastrad ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. 5159 1.1 riastrad ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. 5160 1.1 riastrad ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. 5161 1.1 riastrad ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. 5162 1.1 riastrad ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. 5163 1.1 riastrad usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. 5164 1.1 riastrad usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. 5165 1.1 riastrad usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. 5166 1.1 riastrad usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5167 1.1 riastrad usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 5168 1.1 riastrad usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5169 1.1 riastrad usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 5170 1.1 riastrad usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5171 1.1 riastrad usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz 5172 1.1 riastrad ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode 5173 1.1 riastrad [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped 5174 1.1 riastrad [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color 5175 1.1 riastrad [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used 5176 1.1 riastrad [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) 5177 1.1 riastrad [bit5] Travid LVDS output voltage override enable, when =1, use ucTravisLVDSVolAdjust value to overwrite Traivs register LVDS_CTRL_4 5178 1.1 riastrad ucTravisLVDSVolAdjust When ucLVDSMisc[5]=1,it means platform SBIOS want to overwrite TravisLVDSVoltage. Then VBIOS will use ucTravisLVDSVolAdjust 5179 1.1 riastrad value to program Travis register LVDS_CTRL_4 5180 1.1 riastrad ucLVDSPwrOnSeqDIGONtoDE_in4Ms: LVDS power up sequence time in unit of 4ms, time delay from DIGON signal active to data enable signal active( DE ). 5181 1.1 riastrad =0 mean use VBIOS default which is 8 ( 32ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. 5182 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5183 1.1 riastrad ucLVDSPwrOnDEtoVARY_BL_in4Ms: LVDS power up sequence time in unit of 4ms., time delay from DE( data enable ) active to Vary Brightness enable signal active( VARY_BL ). 5184 1.1 riastrad =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. 5185 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5186 1.1 riastrad 5187 1.1 riastrad ucLVDSPwrOffVARY_BLtoDE_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from data enable ( DE ) signal off to LCDVCC (DIGON) off. 5188 1.1 riastrad =0 mean use VBIOS default delay which is 8 ( 32ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON 5189 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5190 1.1 riastrad 5191 1.1 riastrad ucLVDSPwrOffDEtoDIGON_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from vary brightness enable signal( VARY_BL) off to data enable ( DE ) signal off. 5192 1.1 riastrad =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON 5193 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5194 1.1 riastrad 5195 1.1 riastrad ucLVDSOffToOnDelay_in4Ms: LVDS power down sequence time in unit of 4ms. Time delay from DIGON signal off to DIGON signal active. 5196 1.1 riastrad =0 means to use VBIOS default delay which is 125 ( 500ms ). 5197 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5198 1.1 riastrad 5199 1.1 riastrad ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms: 5200 1.1 riastrad LVDS power up sequence time in unit of 4ms. Time delay from VARY_BL signal on to DLON signal active. 5201 1.1 riastrad =0 means to use VBIOS default delay which is 0 ( 0ms ). 5202 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5203 1.1 riastrad 5204 1.1 riastrad ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms: 5205 1.1 riastrad LVDS power down sequence time in unit of 4ms. Time delay from BLON signal off to VARY_BL signal off. 5206 1.1 riastrad =0 means to use VBIOS default delay which is 0 ( 0ms ). 5207 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5208 1.1 riastrad 5209 1.1 riastrad ucMinAllowedBL_Level: Lowest LCD backlight PWM level. This is customer platform specific parameters. By default it is 0. 5210 1.1 riastrad 5211 1.1 riastrad ulNbpStateMemclkFreq[4]: system memory clock frequncey in unit of 10Khz in different NB pstate. 5212 1.1 riastrad 5213 1.1 riastrad **********************************************************************************************************************/ 5214 1.1 riastrad 5215 1.1 riastrad // this IntegrateSystemInfoTable is used for Kaveri & Kabini APU 5216 1.1 riastrad typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_8 5217 1.1 riastrad { 5218 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 5219 1.1 riastrad ULONG ulBootUpEngineClock; 5220 1.1 riastrad ULONG ulDentistVCOFreq; 5221 1.1 riastrad ULONG ulBootUpUMAClock; 5222 1.1 riastrad ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; 5223 1.1 riastrad ULONG ulBootUpReqDisplayVector; 5224 1.1 riastrad ULONG ulVBIOSMisc; 5225 1.1 riastrad ULONG ulGPUCapInfo; 5226 1.1 riastrad ULONG ulDISP_CLK2Freq; 5227 1.1 riastrad USHORT usRequestedPWMFreqInHz; 5228 1.1 riastrad UCHAR ucHtcTmpLmt; 5229 1.1 riastrad UCHAR ucHtcHystLmt; 5230 1.1 riastrad ULONG ulReserved2; 5231 1.1 riastrad ULONG ulSystemConfig; 5232 1.1 riastrad ULONG ulCPUCapInfo; 5233 1.1 riastrad ULONG ulReserved3; 5234 1.1 riastrad USHORT usGPUReservedSysMemSize; 5235 1.1 riastrad USHORT usExtDispConnInfoOffset; 5236 1.1 riastrad USHORT usPanelRefreshRateRange; 5237 1.1 riastrad UCHAR ucMemoryType; 5238 1.1 riastrad UCHAR ucUMAChannelNumber; 5239 1.1 riastrad UCHAR strVBIOSMsg[40]; 5240 1.1 riastrad ATOM_TDP_CONFIG asTdpConfig; 5241 1.1 riastrad ULONG ulReserved[19]; 5242 1.1 riastrad ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; 5243 1.1 riastrad ULONG ulGMCRestoreResetTime; 5244 1.1 riastrad ULONG ulReserved4; 5245 1.1 riastrad ULONG ulIdleNClk; 5246 1.1 riastrad ULONG ulDDR_DLL_PowerUpTime; 5247 1.1 riastrad ULONG ulDDR_PLL_PowerUpTime; 5248 1.1 riastrad USHORT usPCIEClkSSPercentage; 5249 1.1 riastrad USHORT usPCIEClkSSType; 5250 1.1 riastrad USHORT usLvdsSSPercentage; 5251 1.1 riastrad USHORT usLvdsSSpreadRateIn10Hz; 5252 1.1 riastrad USHORT usHDMISSPercentage; 5253 1.1 riastrad USHORT usHDMISSpreadRateIn10Hz; 5254 1.1 riastrad USHORT usDVISSPercentage; 5255 1.1 riastrad USHORT usDVISSpreadRateIn10Hz; 5256 1.1 riastrad ULONG ulGPUReservedSysMemBaseAddrLo; 5257 1.1 riastrad ULONG ulGPUReservedSysMemBaseAddrHi; 5258 1.1 riastrad ULONG ulReserved5[3]; 5259 1.1 riastrad USHORT usMaxLVDSPclkFreqInSingleLink; 5260 1.1 riastrad UCHAR ucLvdsMisc; 5261 1.1 riastrad UCHAR ucTravisLVDSVolAdjust; 5262 1.1 riastrad UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms; 5263 1.1 riastrad UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms; 5264 1.1 riastrad UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms; 5265 1.1 riastrad UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms; 5266 1.1 riastrad UCHAR ucLVDSOffToOnDelay_in4Ms; 5267 1.1 riastrad UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms; 5268 1.1 riastrad UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms; 5269 1.1 riastrad UCHAR ucMinAllowedBL_Level; 5270 1.1 riastrad ULONG ulLCDBitDepthControlVal; 5271 1.1 riastrad ULONG ulNbpStateMemclkFreq[4]; 5272 1.1 riastrad ULONG ulReserved6; 5273 1.1 riastrad ULONG ulNbpStateNClkFreq[4]; 5274 1.1 riastrad USHORT usNBPStateVoltage[4]; 5275 1.1 riastrad USHORT usBootUpNBVoltage; 5276 1.1 riastrad USHORT usReserved2; 5277 1.1 riastrad ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; 5278 1.1 riastrad }ATOM_INTEGRATED_SYSTEM_INFO_V1_8; 5279 1.1 riastrad 5280 1.1 riastrad /********************************************************************************************************************** 5281 1.1 riastrad ATOM_INTEGRATED_SYSTEM_INFO_V1_8 Description 5282 1.1 riastrad ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock 5283 1.1 riastrad ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. 5284 1.1 riastrad ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. 5285 1.1 riastrad sDISPCLK_Voltage: Report Display clock frequency requirement on GNB voltage(up to 4 voltage levels). 5286 1.1 riastrad 5287 1.1 riastrad ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Trinity projects: 5288 1.1 riastrad ATOM_DEVICE_CRT1_SUPPORT 0x0001 5289 1.1 riastrad ATOM_DEVICE_DFP1_SUPPORT 0x0008 5290 1.1 riastrad ATOM_DEVICE_DFP6_SUPPORT 0x0040 5291 1.1 riastrad ATOM_DEVICE_DFP2_SUPPORT 0x0080 5292 1.1 riastrad ATOM_DEVICE_DFP3_SUPPORT 0x0200 5293 1.1 riastrad ATOM_DEVICE_DFP4_SUPPORT 0x0400 5294 1.1 riastrad ATOM_DEVICE_DFP5_SUPPORT 0x0800 5295 1.1 riastrad ATOM_DEVICE_LCD1_SUPPORT 0x0002 5296 1.1 riastrad 5297 1.1 riastrad ulVBIOSMisc: Miscellenous flags for VBIOS requirement and interface 5298 1.1 riastrad bit[0]=0: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is not supported by SBIOS. 5299 1.1 riastrad =1: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is supported by SBIOS. 5300 1.1 riastrad bit[1]=0: INT15 callback function Get boot display( ax=4e08, bl=01h) is not supported by SBIOS 5301 1.1 riastrad =1: INT15 callback function Get boot display( ax=4e08, bl=01h) is supported by SBIOS 5302 1.1 riastrad bit[2]=0: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is not supported by SBIOS 5303 1.1 riastrad =1: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is supported by SBIOS 5304 1.1 riastrad bit[3]=0: VBIOS fast boot is disable 5305 1.1 riastrad =1: VBIOS fast boot is enable. ( VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open) 5306 1.1 riastrad 5307 1.1 riastrad ulGPUCapInfo: bit[0~2]= Reserved 5308 1.1 riastrad bit[3]=0: Enable AUX HW mode detection logic 5309 1.1 riastrad =1: Disable AUX HW mode detection logic 5310 1.1 riastrad bit[4]=0: Disable DFS bypass feature 5311 1.1 riastrad =1: Enable DFS bypass feature 5312 1.1 riastrad 5313 1.1 riastrad usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). 5314 1.1 riastrad Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; 5315 1.1 riastrad 5316 1.1 riastrad When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: 5317 1.1 riastrad 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; 5318 1.1 riastrad VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, 5319 1.1 riastrad Changing BL using VBIOS function is functional in both driver and non-driver present environment; 5320 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 5321 1.1 riastrad 5322 1.1 riastrad 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating 5323 1.1 riastrad that BL control from GPU is expected. 5324 1.1 riastrad VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 5325 1.1 riastrad Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but 5326 1.1 riastrad it's per platform 5327 1.1 riastrad and enabling VariBri under the driver environment from PP table is optional. 5328 1.1 riastrad 5329 1.1 riastrad ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. Threshold on value to enter HTC_active state. 5330 1.1 riastrad ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. 5331 1.1 riastrad To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. 5332 1.1 riastrad 5333 1.1 riastrad ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled 5334 1.1 riastrad =1: PCIE Power Gating Enabled 5335 1.1 riastrad Bit[1]=0: DDR-DLL shut-down feature disabled. 5336 1.1 riastrad 1: DDR-DLL shut-down feature enabled. 5337 1.1 riastrad Bit[2]=0: DDR-PLL Power down feature disabled. 5338 1.1 riastrad 1: DDR-PLL Power down feature enabled. 5339 1.1 riastrad Bit[3]=0: GNB DPM is disabled 5340 1.1 riastrad =1: GNB DPM is enabled 5341 1.1 riastrad ulCPUCapInfo: TBD 5342 1.1 riastrad 5343 1.1 riastrad usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure 5344 1.1 riastrad usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set 5345 1.1 riastrad to indicate a range. 5346 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 5347 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 5348 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 5349 1.1 riastrad SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 5350 1.1 riastrad 5351 1.1 riastrad ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3;=5:GDDR5; [7:4] is reserved. 5352 1.1 riastrad ucUMAChannelNumber: System memory channel numbers. 5353 1.1 riastrad 5354 1.1 riastrad strVBIOSMsg[40]: VBIOS boot up customized message string 5355 1.1 riastrad 5356 1.1 riastrad sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high 5357 1.1 riastrad 5358 1.1 riastrad ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. 5359 1.1 riastrad ulIdleNClk: NCLK speed while memory runs in self-refresh state, used to calculate self-refresh latency. Unit in 10kHz. 5360 1.1 riastrad ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. 5361 1.1 riastrad ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. 5362 1.1 riastrad 5363 1.1 riastrad usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. 5364 1.1 riastrad usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. 5365 1.1 riastrad usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. 5366 1.1 riastrad usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5367 1.1 riastrad usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 5368 1.1 riastrad usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5369 1.1 riastrad usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 5370 1.1 riastrad usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 5371 1.1 riastrad 5372 1.1 riastrad usGPUReservedSysMemSize: Reserved system memory size for ACP engine in APU GNB, units in MB. 0/2/4MB based on CMOS options, current default could be 0MB. KV only, not on KB. 5373 1.1 riastrad ulGPUReservedSysMemBaseAddrLo: Low 32 bits base address to the reserved system memory. 5374 1.1 riastrad ulGPUReservedSysMemBaseAddrHi: High 32 bits base address to the reserved system memory. 5375 1.1 riastrad 5376 1.1 riastrad usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz 5377 1.1 riastrad ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode 5378 1.1 riastrad [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped 5379 1.1 riastrad [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color 5380 1.1 riastrad [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used 5381 1.1 riastrad [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) 5382 1.1 riastrad [bit5] Travid LVDS output voltage override enable, when =1, use ucTravisLVDSVolAdjust value to overwrite Traivs register LVDS_CTRL_4 5383 1.1 riastrad ucTravisLVDSVolAdjust When ucLVDSMisc[5]=1,it means platform SBIOS want to overwrite TravisLVDSVoltage. Then VBIOS will use ucTravisLVDSVolAdjust 5384 1.1 riastrad value to program Travis register LVDS_CTRL_4 5385 1.1 riastrad ucLVDSPwrOnSeqDIGONtoDE_in4Ms: 5386 1.1 riastrad LVDS power up sequence time in unit of 4ms, time delay from DIGON signal active to data enable signal active( DE ). 5387 1.1 riastrad =0 mean use VBIOS default which is 8 ( 32ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. 5388 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5389 1.1 riastrad ucLVDSPwrOnDEtoVARY_BL_in4Ms: 5390 1.1 riastrad LVDS power up sequence time in unit of 4ms., time delay from DE( data enable ) active to Vary Brightness enable signal active( VARY_BL ). 5391 1.1 riastrad =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. 5392 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5393 1.1 riastrad ucLVDSPwrOffVARY_BLtoDE_in4Ms: 5394 1.1 riastrad LVDS power down sequence time in unit of 4ms, time delay from data enable ( DE ) signal off to LCDVCC (DIGON) off. 5395 1.1 riastrad =0 mean use VBIOS default delay which is 8 ( 32ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON 5396 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5397 1.1 riastrad ucLVDSPwrOffDEtoDIGON_in4Ms: 5398 1.1 riastrad LVDS power down sequence time in unit of 4ms, time delay from vary brightness enable signal( VARY_BL) off to data enable ( DE ) signal off. 5399 1.1 riastrad =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON 5400 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5401 1.1 riastrad ucLVDSOffToOnDelay_in4Ms: 5402 1.1 riastrad LVDS power down sequence time in unit of 4ms. Time delay from DIGON signal off to DIGON signal active. 5403 1.1 riastrad =0 means to use VBIOS default delay which is 125 ( 500ms ). 5404 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5405 1.1 riastrad ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms: 5406 1.1 riastrad LVDS power up sequence time in unit of 4ms. Time delay from VARY_BL signal on to DLON signal active. 5407 1.1 riastrad =0 means to use VBIOS default delay which is 0 ( 0ms ). 5408 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5409 1.1 riastrad 5410 1.1 riastrad ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms: 5411 1.1 riastrad LVDS power down sequence time in unit of 4ms. Time delay from BLON signal off to VARY_BL signal off. 5412 1.1 riastrad =0 means to use VBIOS default delay which is 0 ( 0ms ). 5413 1.1 riastrad This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. 5414 1.1 riastrad ucMinAllowedBL_Level: Lowest LCD backlight PWM level. This is customer platform specific parameters. By default it is 0. 5415 1.1 riastrad 5416 1.1 riastrad ulLCDBitDepthControlVal: GPU display control encoder bit dither control setting, used to program register mmFMT_BIT_DEPTH_CONTROL 5417 1.1 riastrad 5418 1.1 riastrad ulNbpStateMemclkFreq[4]: system memory clock frequncey in unit of 10Khz in different NB P-State(P0, P1, P2 & P3). 5419 1.1 riastrad ulNbpStateNClkFreq[4]: NB P-State NClk frequency in different NB P-State 5420 1.1 riastrad usNBPStateVoltage[4]: NB P-State (P0/P1 & P2/P3) voltage; NBP3 refers to lowes voltage 5421 1.1 riastrad usBootUpNBVoltage: NB P-State voltage during boot up before driver loaded 5422 1.1 riastrad sExtDispConnInfo: Display connector information table provided to VBIOS 5423 1.1 riastrad 5424 1.1 riastrad **********************************************************************************************************************/ 5425 1.1 riastrad 5426 1.1 riastrad // this Table is used for Kaveri/Kabini APU 5427 1.1 riastrad typedef struct _ATOM_FUSION_SYSTEM_INFO_V2 5428 1.1 riastrad { 5429 1.1 riastrad ATOM_INTEGRATED_SYSTEM_INFO_V1_8 sIntegratedSysInfo; // refer to ATOM_INTEGRATED_SYSTEM_INFO_V1_8 definition 5430 1.1 riastrad ULONG ulPowerplayTable[128]; // Update comments here to link new powerplay table definition structure 5431 1.1 riastrad }ATOM_FUSION_SYSTEM_INFO_V2; 5432 1.1 riastrad 5433 1.1 riastrad 5434 1.1 riastrad /**************************************************************************/ 5435 1.1 riastrad // This portion is only used when ext thermal chip or engine/memory clock SS chip is populated on a design 5436 1.1 riastrad //Memory SS Info Table 5437 1.1 riastrad //Define Memory Clock SS chip ID 5438 1.1 riastrad #define ICS91719 1 5439 1.1 riastrad #define ICS91720 2 5440 1.1 riastrad 5441 1.1 riastrad //Define one structure to inform SW a "block of data" writing to external SS chip via I2C protocol 5442 1.1 riastrad typedef struct _ATOM_I2C_DATA_RECORD 5443 1.1 riastrad { 5444 1.1 riastrad UCHAR ucNunberOfBytes; //Indicates how many bytes SW needs to write to the external ASIC for one block, besides to "Start" and "Stop" 5445 1.1 riastrad UCHAR ucI2CData[1]; //I2C data in bytes, should be less than 16 bytes usually 5446 1.1 riastrad }ATOM_I2C_DATA_RECORD; 5447 1.1 riastrad 5448 1.1 riastrad 5449 1.1 riastrad //Define one structure to inform SW how many blocks of data writing to external SS chip via I2C protocol, in addition to other information 5450 1.1 riastrad typedef struct _ATOM_I2C_DEVICE_SETUP_INFO 5451 1.1 riastrad { 5452 1.1 riastrad ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; //I2C line and HW/SW assisted cap. 5453 1.1 riastrad UCHAR ucSSChipID; //SS chip being used 5454 1.1 riastrad UCHAR ucSSChipSlaveAddr; //Slave Address to set up this SS chip 5455 1.1 riastrad UCHAR ucNumOfI2CDataRecords; //number of data block 5456 1.1 riastrad ATOM_I2C_DATA_RECORD asI2CData[1]; 5457 1.1 riastrad }ATOM_I2C_DEVICE_SETUP_INFO; 5458 1.1 riastrad 5459 1.1 riastrad //========================================================================================== 5460 1.1 riastrad typedef struct _ATOM_ASIC_MVDD_INFO 5461 1.1 riastrad { 5462 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 5463 1.1 riastrad ATOM_I2C_DEVICE_SETUP_INFO asI2CSetup[1]; 5464 1.1 riastrad }ATOM_ASIC_MVDD_INFO; 5465 1.1 riastrad 5466 1.1 riastrad //========================================================================================== 5467 1.1 riastrad #define ATOM_MCLK_SS_INFO ATOM_ASIC_MVDD_INFO 5468 1.1 riastrad 5469 1.1 riastrad //========================================================================================== 5470 1.1 riastrad /**************************************************************************/ 5471 1.1 riastrad 5472 1.1 riastrad typedef struct _ATOM_ASIC_SS_ASSIGNMENT 5473 1.1 riastrad { 5474 1.1 riastrad ULONG ulTargetClockRange; //Clock Out frequence (VCO ), in unit of 10Khz 5475 1.1 riastrad USHORT usSpreadSpectrumPercentage; //in unit of 0.01% 5476 1.1 riastrad USHORT usSpreadRateInKhz; //in unit of kHz, modulation freq 5477 1.1 riastrad UCHAR ucClockIndication; //Indicate which clock source needs SS 5478 1.1 riastrad UCHAR ucSpreadSpectrumMode; //Bit1=0 Down Spread,=1 Center Spread. 5479 1.1 riastrad UCHAR ucReserved[2]; 5480 1.1 riastrad }ATOM_ASIC_SS_ASSIGNMENT; 5481 1.1 riastrad 5482 1.1 riastrad //Define ucClockIndication, SW uses the IDs below to search if the SS is required/enabled on a clock branch/signal type. 5483 1.1 riastrad //SS is not required or enabled if a match is not found. 5484 1.1 riastrad #define ASIC_INTERNAL_MEMORY_SS 1 5485 1.1 riastrad #define ASIC_INTERNAL_ENGINE_SS 2 5486 1.1 riastrad #define ASIC_INTERNAL_UVD_SS 3 5487 1.1 riastrad #define ASIC_INTERNAL_SS_ON_TMDS 4 5488 1.1 riastrad #define ASIC_INTERNAL_SS_ON_HDMI 5 5489 1.1 riastrad #define ASIC_INTERNAL_SS_ON_LVDS 6 5490 1.1 riastrad #define ASIC_INTERNAL_SS_ON_DP 7 5491 1.1 riastrad #define ASIC_INTERNAL_SS_ON_DCPLL 8 5492 1.1 riastrad #define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9 5493 1.1 riastrad #define ASIC_INTERNAL_VCE_SS 10 5494 1.1 riastrad #define ASIC_INTERNAL_GPUPLL_SS 11 5495 1.1 riastrad 5496 1.1 riastrad 5497 1.1 riastrad typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2 5498 1.1 riastrad { 5499 1.1 riastrad ULONG ulTargetClockRange; //For mem/engine/uvd, Clock Out frequence (VCO ), in unit of 10Khz 5500 1.1 riastrad //For TMDS/HDMI/LVDS, it is pixel clock , for DP, it is link clock ( 27000 or 16200 ) 5501 1.1 riastrad USHORT usSpreadSpectrumPercentage; //in unit of 0.01% or 0.001%, decided by ucSpreadSpectrumMode bit4 5502 1.1 riastrad USHORT usSpreadRateIn10Hz; //in unit of 10Hz, modulation freq 5503 1.1 riastrad UCHAR ucClockIndication; //Indicate which clock source needs SS 5504 1.1 riastrad UCHAR ucSpreadSpectrumMode; //Bit0=0 Down Spread,=1 Center Spread, bit1=0: internal SS bit1=1: external SS 5505 1.1 riastrad UCHAR ucReserved[2]; 5506 1.1 riastrad }ATOM_ASIC_SS_ASSIGNMENT_V2; 5507 1.1 riastrad 5508 1.1 riastrad //ucSpreadSpectrumMode 5509 1.1 riastrad //#define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000 5510 1.1 riastrad //#define ATOM_SS_DOWN_SPREAD_MODE 0x00000000 5511 1.1 riastrad //#define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001 5512 1.1 riastrad //#define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001 5513 1.1 riastrad //#define ATOM_INTERNAL_SS_MASK 0x00000000 5514 1.1 riastrad //#define ATOM_EXTERNAL_SS_MASK 0x00000002 5515 1.1 riastrad 5516 1.1 riastrad typedef struct _ATOM_ASIC_INTERNAL_SS_INFO 5517 1.1 riastrad { 5518 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 5519 1.1 riastrad ATOM_ASIC_SS_ASSIGNMENT asSpreadSpectrum[4]; 5520 1.1 riastrad }ATOM_ASIC_INTERNAL_SS_INFO; 5521 1.1 riastrad 5522 1.1 riastrad typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V2 5523 1.1 riastrad { 5524 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 5525 1.1 riastrad ATOM_ASIC_SS_ASSIGNMENT_V2 asSpreadSpectrum[1]; //this is point only. 5526 1.1 riastrad }ATOM_ASIC_INTERNAL_SS_INFO_V2; 5527 1.1 riastrad 5528 1.1 riastrad typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V3 5529 1.1 riastrad { 5530 1.1 riastrad ULONG ulTargetClockRange; //For mem/engine/uvd, Clock Out frequence (VCO ), in unit of 10Khz 5531 1.1 riastrad //For TMDS/HDMI/LVDS, it is pixel clock , for DP, it is link clock ( 27000 or 16200 ) 5532 1.1 riastrad USHORT usSpreadSpectrumPercentage; //in unit of 0.01% 5533 1.1 riastrad USHORT usSpreadRateIn10Hz; //in unit of 10Hz, modulation freq 5534 1.1 riastrad UCHAR ucClockIndication; //Indicate which clock source needs SS 5535 1.1 riastrad UCHAR ucSpreadSpectrumMode; //Bit0=0 Down Spread,=1 Center Spread, bit1=0: internal SS bit1=1: external SS 5536 1.1 riastrad UCHAR ucReserved[2]; 5537 1.1 riastrad }ATOM_ASIC_SS_ASSIGNMENT_V3; 5538 1.1 riastrad 5539 1.1 riastrad //ATOM_ASIC_SS_ASSIGNMENT_V3.ucSpreadSpectrumMode 5540 1.1 riastrad #define SS_MODE_V3_CENTRE_SPREAD_MASK 0x01 5541 1.1 riastrad #define SS_MODE_V3_EXTERNAL_SS_MASK 0x02 5542 1.1 riastrad #define SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK 0x10 5543 1.1 riastrad 5544 1.1 riastrad typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 5545 1.1 riastrad { 5546 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 5547 1.1 riastrad ATOM_ASIC_SS_ASSIGNMENT_V3 asSpreadSpectrum[1]; //this is pointer only. 5548 1.1 riastrad }ATOM_ASIC_INTERNAL_SS_INFO_V3; 5549 1.1 riastrad 5550 1.1 riastrad 5551 1.1 riastrad //==============================Scratch Pad Definition Portion=============================== 5552 1.1 riastrad #define ATOM_DEVICE_CONNECT_INFO_DEF 0 5553 1.1 riastrad #define ATOM_ROM_LOCATION_DEF 1 5554 1.1 riastrad #define ATOM_TV_STANDARD_DEF 2 5555 1.1 riastrad #define ATOM_ACTIVE_INFO_DEF 3 5556 1.1 riastrad #define ATOM_LCD_INFO_DEF 4 5557 1.1 riastrad #define ATOM_DOS_REQ_INFO_DEF 5 5558 1.1 riastrad #define ATOM_ACC_CHANGE_INFO_DEF 6 5559 1.1 riastrad #define ATOM_DOS_MODE_INFO_DEF 7 5560 1.1 riastrad #define ATOM_I2C_CHANNEL_STATUS_DEF 8 5561 1.1 riastrad #define ATOM_I2C_CHANNEL_STATUS1_DEF 9 5562 1.1 riastrad #define ATOM_INTERNAL_TIMER_DEF 10 5563 1.1 riastrad 5564 1.1 riastrad // BIOS_0_SCRATCH Definition 5565 1.1 riastrad #define ATOM_S0_CRT1_MONO 0x00000001L 5566 1.1 riastrad #define ATOM_S0_CRT1_COLOR 0x00000002L 5567 1.1 riastrad #define ATOM_S0_CRT1_MASK (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR) 5568 1.1 riastrad 5569 1.1 riastrad #define ATOM_S0_TV1_COMPOSITE_A 0x00000004L 5570 1.1 riastrad #define ATOM_S0_TV1_SVIDEO_A 0x00000008L 5571 1.1 riastrad #define ATOM_S0_TV1_MASK_A (ATOM_S0_TV1_COMPOSITE_A+ATOM_S0_TV1_SVIDEO_A) 5572 1.1 riastrad 5573 1.1 riastrad #define ATOM_S0_CV_A 0x00000010L 5574 1.1 riastrad #define ATOM_S0_CV_DIN_A 0x00000020L 5575 1.1 riastrad #define ATOM_S0_CV_MASK_A (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A) 5576 1.1 riastrad 5577 1.1 riastrad 5578 1.1 riastrad #define ATOM_S0_CRT2_MONO 0x00000100L 5579 1.1 riastrad #define ATOM_S0_CRT2_COLOR 0x00000200L 5580 1.1 riastrad #define ATOM_S0_CRT2_MASK (ATOM_S0_CRT2_MONO+ATOM_S0_CRT2_COLOR) 5581 1.1 riastrad 5582 1.1 riastrad #define ATOM_S0_TV1_COMPOSITE 0x00000400L 5583 1.1 riastrad #define ATOM_S0_TV1_SVIDEO 0x00000800L 5584 1.1 riastrad #define ATOM_S0_TV1_SCART 0x00004000L 5585 1.1 riastrad #define ATOM_S0_TV1_MASK (ATOM_S0_TV1_COMPOSITE+ATOM_S0_TV1_SVIDEO+ATOM_S0_TV1_SCART) 5586 1.1 riastrad 5587 1.1 riastrad #define ATOM_S0_CV 0x00001000L 5588 1.1 riastrad #define ATOM_S0_CV_DIN 0x00002000L 5589 1.1 riastrad #define ATOM_S0_CV_MASK (ATOM_S0_CV+ATOM_S0_CV_DIN) 5590 1.1 riastrad 5591 1.1 riastrad #define ATOM_S0_DFP1 0x00010000L 5592 1.1 riastrad #define ATOM_S0_DFP2 0x00020000L 5593 1.1 riastrad #define ATOM_S0_LCD1 0x00040000L 5594 1.1 riastrad #define ATOM_S0_LCD2 0x00080000L 5595 1.1 riastrad #define ATOM_S0_DFP6 0x00100000L 5596 1.1 riastrad #define ATOM_S0_DFP3 0x00200000L 5597 1.1 riastrad #define ATOM_S0_DFP4 0x00400000L 5598 1.1 riastrad #define ATOM_S0_DFP5 0x00800000L 5599 1.1 riastrad 5600 1.1 riastrad #define ATOM_S0_DFP_MASK ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5 | ATOM_S0_DFP6 5601 1.1 riastrad 5602 1.1 riastrad #define ATOM_S0_FAD_REGISTER_BUG 0x02000000L // If set, indicates we are running a PCIE asic with 5603 1.1 riastrad // the FAD/HDP reg access bug. Bit is read by DAL, this is obsolete from RV5xx 5604 1.1 riastrad 5605 1.1 riastrad #define ATOM_S0_THERMAL_STATE_MASK 0x1C000000L 5606 1.1 riastrad #define ATOM_S0_THERMAL_STATE_SHIFT 26 5607 1.1 riastrad 5608 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_MASK 0xE0000000L 5609 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_SHIFT 29 5610 1.1 riastrad 5611 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1 5612 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2 5613 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 5614 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4 5615 1.1 riastrad 5616 1.1 riastrad //Byte aligned definition for BIOS usage 5617 1.1 riastrad #define ATOM_S0_CRT1_MONOb0 0x01 5618 1.1 riastrad #define ATOM_S0_CRT1_COLORb0 0x02 5619 1.1 riastrad #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) 5620 1.1 riastrad 5621 1.1 riastrad #define ATOM_S0_TV1_COMPOSITEb0 0x04 5622 1.1 riastrad #define ATOM_S0_TV1_SVIDEOb0 0x08 5623 1.1 riastrad #define ATOM_S0_TV1_MASKb0 (ATOM_S0_TV1_COMPOSITEb0+ATOM_S0_TV1_SVIDEOb0) 5624 1.1 riastrad 5625 1.1 riastrad #define ATOM_S0_CVb0 0x10 5626 1.1 riastrad #define ATOM_S0_CV_DINb0 0x20 5627 1.1 riastrad #define ATOM_S0_CV_MASKb0 (ATOM_S0_CVb0+ATOM_S0_CV_DINb0) 5628 1.1 riastrad 5629 1.1 riastrad #define ATOM_S0_CRT2_MONOb1 0x01 5630 1.1 riastrad #define ATOM_S0_CRT2_COLORb1 0x02 5631 1.1 riastrad #define ATOM_S0_CRT2_MASKb1 (ATOM_S0_CRT2_MONOb1+ATOM_S0_CRT2_COLORb1) 5632 1.1 riastrad 5633 1.1 riastrad #define ATOM_S0_TV1_COMPOSITEb1 0x04 5634 1.1 riastrad #define ATOM_S0_TV1_SVIDEOb1 0x08 5635 1.1 riastrad #define ATOM_S0_TV1_SCARTb1 0x40 5636 1.1 riastrad #define ATOM_S0_TV1_MASKb1 (ATOM_S0_TV1_COMPOSITEb1+ATOM_S0_TV1_SVIDEOb1+ATOM_S0_TV1_SCARTb1) 5637 1.1 riastrad 5638 1.1 riastrad #define ATOM_S0_CVb1 0x10 5639 1.1 riastrad #define ATOM_S0_CV_DINb1 0x20 5640 1.1 riastrad #define ATOM_S0_CV_MASKb1 (ATOM_S0_CVb1+ATOM_S0_CV_DINb1) 5641 1.1 riastrad 5642 1.1 riastrad #define ATOM_S0_DFP1b2 0x01 5643 1.1 riastrad #define ATOM_S0_DFP2b2 0x02 5644 1.1 riastrad #define ATOM_S0_LCD1b2 0x04 5645 1.1 riastrad #define ATOM_S0_LCD2b2 0x08 5646 1.1 riastrad #define ATOM_S0_DFP6b2 0x10 5647 1.1 riastrad #define ATOM_S0_DFP3b2 0x20 5648 1.1 riastrad #define ATOM_S0_DFP4b2 0x40 5649 1.1 riastrad #define ATOM_S0_DFP5b2 0x80 5650 1.1 riastrad 5651 1.1 riastrad 5652 1.1 riastrad #define ATOM_S0_THERMAL_STATE_MASKb3 0x1C 5653 1.1 riastrad #define ATOM_S0_THERMAL_STATE_SHIFTb3 2 5654 1.1 riastrad 5655 1.1 riastrad #define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0 5656 1.1 riastrad #define ATOM_S0_LCD1_SHIFT 18 5657 1.1 riastrad 5658 1.1 riastrad // BIOS_1_SCRATCH Definition 5659 1.1 riastrad #define ATOM_S1_ROM_LOCATION_MASK 0x0000FFFFL 5660 1.1 riastrad #define ATOM_S1_PCI_BUS_DEV_MASK 0xFFFF0000L 5661 1.1 riastrad 5662 1.1 riastrad // BIOS_2_SCRATCH Definition 5663 1.1 riastrad #define ATOM_S2_TV1_STANDARD_MASK 0x0000000FL 5664 1.1 riastrad #define ATOM_S2_CURRENT_BL_LEVEL_MASK 0x0000FF00L 5665 1.1 riastrad #define ATOM_S2_CURRENT_BL_LEVEL_SHIFT 8 5666 1.1 riastrad 5667 1.1 riastrad #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK 0x0C000000L 5668 1.1 riastrad #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26 5669 1.1 riastrad #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE 0x10000000L 5670 1.1 riastrad 5671 1.1 riastrad #define ATOM_S2_DEVICE_DPMS_STATE 0x00010000L 5672 1.1 riastrad #define ATOM_S2_VRI_BRIGHT_ENABLE 0x20000000L 5673 1.1 riastrad 5674 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_0_DEGREE 0x0 5675 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_90_DEGREE 0x1 5676 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_180_DEGREE 0x2 5677 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_270_DEGREE 0x3 5678 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30 5679 1.1 riastrad #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L 5680 1.1 riastrad 5681 1.1 riastrad 5682 1.1 riastrad //Byte aligned definition for BIOS usage 5683 1.1 riastrad #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F 5684 1.1 riastrad #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF 5685 1.1 riastrad #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 5686 1.1 riastrad 5687 1.1 riastrad #define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF 5688 1.1 riastrad #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C 5689 1.1 riastrad #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10 5690 1.1 riastrad #define ATOM_S2_TMDS_COHERENT_MODEb3 0x10 // used by VBIOS code only, use coherent mode for TMDS/HDMI mode 5691 1.1 riastrad #define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20 5692 1.1 riastrad #define ATOM_S2_ROTATION_STATE_MASKb3 0xC0 5693 1.1 riastrad 5694 1.1 riastrad 5695 1.1 riastrad // BIOS_3_SCRATCH Definition 5696 1.1 riastrad #define ATOM_S3_CRT1_ACTIVE 0x00000001L 5697 1.1 riastrad #define ATOM_S3_LCD1_ACTIVE 0x00000002L 5698 1.1 riastrad #define ATOM_S3_TV1_ACTIVE 0x00000004L 5699 1.1 riastrad #define ATOM_S3_DFP1_ACTIVE 0x00000008L 5700 1.1 riastrad #define ATOM_S3_CRT2_ACTIVE 0x00000010L 5701 1.1 riastrad #define ATOM_S3_LCD2_ACTIVE 0x00000020L 5702 1.1 riastrad #define ATOM_S3_DFP6_ACTIVE 0x00000040L 5703 1.1 riastrad #define ATOM_S3_DFP2_ACTIVE 0x00000080L 5704 1.1 riastrad #define ATOM_S3_CV_ACTIVE 0x00000100L 5705 1.1 riastrad #define ATOM_S3_DFP3_ACTIVE 0x00000200L 5706 1.1 riastrad #define ATOM_S3_DFP4_ACTIVE 0x00000400L 5707 1.1 riastrad #define ATOM_S3_DFP5_ACTIVE 0x00000800L 5708 1.1 riastrad 5709 1.1 riastrad #define ATOM_S3_DEVICE_ACTIVE_MASK 0x00000FFFL 5710 1.1 riastrad 5711 1.1 riastrad #define ATOM_S3_LCD_FULLEXPANSION_ACTIVE 0x00001000L 5712 1.1 riastrad #define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L 5713 1.1 riastrad 5714 1.1 riastrad #define ATOM_S3_CRT1_CRTC_ACTIVE 0x00010000L 5715 1.1 riastrad #define ATOM_S3_LCD1_CRTC_ACTIVE 0x00020000L 5716 1.1 riastrad #define ATOM_S3_TV1_CRTC_ACTIVE 0x00040000L 5717 1.1 riastrad #define ATOM_S3_DFP1_CRTC_ACTIVE 0x00080000L 5718 1.1 riastrad #define ATOM_S3_CRT2_CRTC_ACTIVE 0x00100000L 5719 1.1 riastrad #define ATOM_S3_LCD2_CRTC_ACTIVE 0x00200000L 5720 1.1 riastrad #define ATOM_S3_DFP6_CRTC_ACTIVE 0x00400000L 5721 1.1 riastrad #define ATOM_S3_DFP2_CRTC_ACTIVE 0x00800000L 5722 1.1 riastrad #define ATOM_S3_CV_CRTC_ACTIVE 0x01000000L 5723 1.1 riastrad #define ATOM_S3_DFP3_CRTC_ACTIVE 0x02000000L 5724 1.1 riastrad #define ATOM_S3_DFP4_CRTC_ACTIVE 0x04000000L 5725 1.1 riastrad #define ATOM_S3_DFP5_CRTC_ACTIVE 0x08000000L 5726 1.1 riastrad 5727 1.1 riastrad #define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L 5728 1.1 riastrad #define ATOM_S3_ASIC_GUI_ENGINE_HUNG 0x20000000L 5729 1.1 riastrad //Below two definitions are not supported in pplib, but in the old powerplay in DAL 5730 1.1 riastrad #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L 5731 1.1 riastrad #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L 5732 1.1 riastrad 5733 1.1 riastrad //Byte aligned definition for BIOS usage 5734 1.1 riastrad #define ATOM_S3_CRT1_ACTIVEb0 0x01 5735 1.1 riastrad #define ATOM_S3_LCD1_ACTIVEb0 0x02 5736 1.1 riastrad #define ATOM_S3_TV1_ACTIVEb0 0x04 5737 1.1 riastrad #define ATOM_S3_DFP1_ACTIVEb0 0x08 5738 1.1 riastrad #define ATOM_S3_CRT2_ACTIVEb0 0x10 5739 1.1 riastrad #define ATOM_S3_LCD2_ACTIVEb0 0x20 5740 1.1 riastrad #define ATOM_S3_DFP6_ACTIVEb0 0x40 5741 1.1 riastrad #define ATOM_S3_DFP2_ACTIVEb0 0x80 5742 1.1 riastrad #define ATOM_S3_CV_ACTIVEb1 0x01 5743 1.1 riastrad #define ATOM_S3_DFP3_ACTIVEb1 0x02 5744 1.1 riastrad #define ATOM_S3_DFP4_ACTIVEb1 0x04 5745 1.1 riastrad #define ATOM_S3_DFP5_ACTIVEb1 0x08 5746 1.1 riastrad 5747 1.1 riastrad #define ATOM_S3_ACTIVE_CRTC1w0 0xFFF 5748 1.1 riastrad 5749 1.1 riastrad #define ATOM_S3_CRT1_CRTC_ACTIVEb2 0x01 5750 1.1 riastrad #define ATOM_S3_LCD1_CRTC_ACTIVEb2 0x02 5751 1.1 riastrad #define ATOM_S3_TV1_CRTC_ACTIVEb2 0x04 5752 1.1 riastrad #define ATOM_S3_DFP1_CRTC_ACTIVEb2 0x08 5753 1.1 riastrad #define ATOM_S3_CRT2_CRTC_ACTIVEb2 0x10 5754 1.1 riastrad #define ATOM_S3_LCD2_CRTC_ACTIVEb2 0x20 5755 1.1 riastrad #define ATOM_S3_DFP6_CRTC_ACTIVEb2 0x40 5756 1.1 riastrad #define ATOM_S3_DFP2_CRTC_ACTIVEb2 0x80 5757 1.1 riastrad #define ATOM_S3_CV_CRTC_ACTIVEb3 0x01 5758 1.1 riastrad #define ATOM_S3_DFP3_CRTC_ACTIVEb3 0x02 5759 1.1 riastrad #define ATOM_S3_DFP4_CRTC_ACTIVEb3 0x04 5760 1.1 riastrad #define ATOM_S3_DFP5_CRTC_ACTIVEb3 0x08 5761 1.1 riastrad 5762 1.1 riastrad #define ATOM_S3_ACTIVE_CRTC2w1 0xFFF 5763 1.1 riastrad 5764 1.1 riastrad // BIOS_4_SCRATCH Definition 5765 1.1 riastrad #define ATOM_S4_LCD1_PANEL_ID_MASK 0x000000FFL 5766 1.1 riastrad #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L 5767 1.1 riastrad #define ATOM_S4_LCD1_REFRESH_SHIFT 8 5768 1.1 riastrad 5769 1.1 riastrad //Byte aligned definition for BIOS usage 5770 1.1 riastrad #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF 5771 1.1 riastrad #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 5772 1.1 riastrad #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 5773 1.1 riastrad 5774 1.1 riastrad // BIOS_5_SCRATCH Definition, BIOS_5_SCRATCH is used by Firmware only !!!! 5775 1.1 riastrad #define ATOM_S5_DOS_REQ_CRT1b0 0x01 5776 1.1 riastrad #define ATOM_S5_DOS_REQ_LCD1b0 0x02 5777 1.1 riastrad #define ATOM_S5_DOS_REQ_TV1b0 0x04 5778 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP1b0 0x08 5779 1.1 riastrad #define ATOM_S5_DOS_REQ_CRT2b0 0x10 5780 1.1 riastrad #define ATOM_S5_DOS_REQ_LCD2b0 0x20 5781 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP6b0 0x40 5782 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP2b0 0x80 5783 1.1 riastrad #define ATOM_S5_DOS_REQ_CVb1 0x01 5784 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP3b1 0x02 5785 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP4b1 0x04 5786 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP5b1 0x08 5787 1.1 riastrad 5788 1.1 riastrad #define ATOM_S5_DOS_REQ_DEVICEw0 0x0FFF 5789 1.1 riastrad 5790 1.1 riastrad #define ATOM_S5_DOS_REQ_CRT1 0x0001 5791 1.1 riastrad #define ATOM_S5_DOS_REQ_LCD1 0x0002 5792 1.1 riastrad #define ATOM_S5_DOS_REQ_TV1 0x0004 5793 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP1 0x0008 5794 1.1 riastrad #define ATOM_S5_DOS_REQ_CRT2 0x0010 5795 1.1 riastrad #define ATOM_S5_DOS_REQ_LCD2 0x0020 5796 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP6 0x0040 5797 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP2 0x0080 5798 1.1 riastrad #define ATOM_S5_DOS_REQ_CV 0x0100 5799 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP3 0x0200 5800 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP4 0x0400 5801 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP5 0x0800 5802 1.1 riastrad 5803 1.1 riastrad #define ATOM_S5_DOS_FORCE_CRT1b2 ATOM_S5_DOS_REQ_CRT1b0 5804 1.1 riastrad #define ATOM_S5_DOS_FORCE_TV1b2 ATOM_S5_DOS_REQ_TV1b0 5805 1.1 riastrad #define ATOM_S5_DOS_FORCE_CRT2b2 ATOM_S5_DOS_REQ_CRT2b0 5806 1.1 riastrad #define ATOM_S5_DOS_FORCE_CVb3 ATOM_S5_DOS_REQ_CVb1 5807 1.1 riastrad #define ATOM_S5_DOS_FORCE_DEVICEw1 (ATOM_S5_DOS_FORCE_CRT1b2+ATOM_S5_DOS_FORCE_TV1b2+ATOM_S5_DOS_FORCE_CRT2b2+\ 5808 1.1 riastrad (ATOM_S5_DOS_FORCE_CVb3<<8)) 5809 1.1 riastrad 5810 1.1 riastrad // BIOS_6_SCRATCH Definition 5811 1.1 riastrad #define ATOM_S6_DEVICE_CHANGE 0x00000001L 5812 1.1 riastrad #define ATOM_S6_SCALER_CHANGE 0x00000002L 5813 1.1 riastrad #define ATOM_S6_LID_CHANGE 0x00000004L 5814 1.1 riastrad #define ATOM_S6_DOCKING_CHANGE 0x00000008L 5815 1.1 riastrad #define ATOM_S6_ACC_MODE 0x00000010L 5816 1.1 riastrad #define ATOM_S6_EXT_DESKTOP_MODE 0x00000020L 5817 1.1 riastrad #define ATOM_S6_LID_STATE 0x00000040L 5818 1.1 riastrad #define ATOM_S6_DOCK_STATE 0x00000080L 5819 1.1 riastrad #define ATOM_S6_CRITICAL_STATE 0x00000100L 5820 1.1 riastrad #define ATOM_S6_HW_I2C_BUSY_STATE 0x00000200L 5821 1.1 riastrad #define ATOM_S6_THERMAL_STATE_CHANGE 0x00000400L 5822 1.1 riastrad #define ATOM_S6_INTERRUPT_SET_BY_BIOS 0x00000800L 5823 1.1 riastrad #define ATOM_S6_REQ_LCD_EXPANSION_FULL 0x00001000L //Normal expansion Request bit for LCD 5824 1.1 riastrad #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO 0x00002000L //Aspect ratio expansion Request bit for LCD 5825 1.1 riastrad 5826 1.1 riastrad #define ATOM_S6_DISPLAY_STATE_CHANGE 0x00004000L //This bit is recycled when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_H_expansion 5827 1.1 riastrad #define ATOM_S6_I2C_STATE_CHANGE 0x00008000L //This bit is recycled,when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_V_expansion 5828 1.1 riastrad 5829 1.1 riastrad #define ATOM_S6_ACC_REQ_CRT1 0x00010000L 5830 1.1 riastrad #define ATOM_S6_ACC_REQ_LCD1 0x00020000L 5831 1.1 riastrad #define ATOM_S6_ACC_REQ_TV1 0x00040000L 5832 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP1 0x00080000L 5833 1.1 riastrad #define ATOM_S6_ACC_REQ_CRT2 0x00100000L 5834 1.1 riastrad #define ATOM_S6_ACC_REQ_LCD2 0x00200000L 5835 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP6 0x00400000L 5836 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP2 0x00800000L 5837 1.1 riastrad #define ATOM_S6_ACC_REQ_CV 0x01000000L 5838 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP3 0x02000000L 5839 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP4 0x04000000L 5840 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP5 0x08000000L 5841 1.1 riastrad 5842 1.1 riastrad #define ATOM_S6_ACC_REQ_MASK 0x0FFF0000L 5843 1.1 riastrad #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE 0x10000000L 5844 1.1 riastrad #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH 0x20000000L 5845 1.1 riastrad #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L 5846 1.1 riastrad #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L 5847 1.1 riastrad 5848 1.1 riastrad //Byte aligned definition for BIOS usage 5849 1.1 riastrad #define ATOM_S6_DEVICE_CHANGEb0 0x01 5850 1.1 riastrad #define ATOM_S6_SCALER_CHANGEb0 0x02 5851 1.1 riastrad #define ATOM_S6_LID_CHANGEb0 0x04 5852 1.1 riastrad #define ATOM_S6_DOCKING_CHANGEb0 0x08 5853 1.1 riastrad #define ATOM_S6_ACC_MODEb0 0x10 5854 1.1 riastrad #define ATOM_S6_EXT_DESKTOP_MODEb0 0x20 5855 1.1 riastrad #define ATOM_S6_LID_STATEb0 0x40 5856 1.1 riastrad #define ATOM_S6_DOCK_STATEb0 0x80 5857 1.1 riastrad #define ATOM_S6_CRITICAL_STATEb1 0x01 5858 1.1 riastrad #define ATOM_S6_HW_I2C_BUSY_STATEb1 0x02 5859 1.1 riastrad #define ATOM_S6_THERMAL_STATE_CHANGEb1 0x04 5860 1.1 riastrad #define ATOM_S6_INTERRUPT_SET_BY_BIOSb1 0x08 5861 1.1 riastrad #define ATOM_S6_REQ_LCD_EXPANSION_FULLb1 0x10 5862 1.1 riastrad #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIOb1 0x20 5863 1.1 riastrad 5864 1.1 riastrad #define ATOM_S6_ACC_REQ_CRT1b2 0x01 5865 1.1 riastrad #define ATOM_S6_ACC_REQ_LCD1b2 0x02 5866 1.1 riastrad #define ATOM_S6_ACC_REQ_TV1b2 0x04 5867 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP1b2 0x08 5868 1.1 riastrad #define ATOM_S6_ACC_REQ_CRT2b2 0x10 5869 1.1 riastrad #define ATOM_S6_ACC_REQ_LCD2b2 0x20 5870 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP6b2 0x40 5871 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP2b2 0x80 5872 1.1 riastrad #define ATOM_S6_ACC_REQ_CVb3 0x01 5873 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP3b3 0x02 5874 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP4b3 0x04 5875 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP5b3 0x08 5876 1.1 riastrad 5877 1.1 riastrad #define ATOM_S6_ACC_REQ_DEVICEw1 ATOM_S5_DOS_REQ_DEVICEw0 5878 1.1 riastrad #define ATOM_S6_SYSTEM_POWER_MODE_CHANGEb3 0x10 5879 1.1 riastrad #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCHb3 0x20 5880 1.1 riastrad #define ATOM_S6_VRI_BRIGHTNESS_CHANGEb3 0x40 5881 1.1 riastrad #define ATOM_S6_CONFIG_DISPLAY_CHANGEb3 0x80 5882 1.1 riastrad 5883 1.1 riastrad #define ATOM_S6_DEVICE_CHANGE_SHIFT 0 5884 1.1 riastrad #define ATOM_S6_SCALER_CHANGE_SHIFT 1 5885 1.1 riastrad #define ATOM_S6_LID_CHANGE_SHIFT 2 5886 1.1 riastrad #define ATOM_S6_DOCKING_CHANGE_SHIFT 3 5887 1.1 riastrad #define ATOM_S6_ACC_MODE_SHIFT 4 5888 1.1 riastrad #define ATOM_S6_EXT_DESKTOP_MODE_SHIFT 5 5889 1.1 riastrad #define ATOM_S6_LID_STATE_SHIFT 6 5890 1.1 riastrad #define ATOM_S6_DOCK_STATE_SHIFT 7 5891 1.1 riastrad #define ATOM_S6_CRITICAL_STATE_SHIFT 8 5892 1.1 riastrad #define ATOM_S6_HW_I2C_BUSY_STATE_SHIFT 9 5893 1.1 riastrad #define ATOM_S6_THERMAL_STATE_CHANGE_SHIFT 10 5894 1.1 riastrad #define ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT 11 5895 1.1 riastrad #define ATOM_S6_REQ_SCALER_SHIFT 12 5896 1.1 riastrad #define ATOM_S6_REQ_SCALER_ARATIO_SHIFT 13 5897 1.1 riastrad #define ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT 14 5898 1.1 riastrad #define ATOM_S6_I2C_STATE_CHANGE_SHIFT 15 5899 1.1 riastrad #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT 28 5900 1.1 riastrad #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT 29 5901 1.1 riastrad #define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT 30 5902 1.1 riastrad #define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT 31 5903 1.1 riastrad 5904 1.1 riastrad // BIOS_7_SCRATCH Definition, BIOS_7_SCRATCH is used by Firmware only !!!! 5905 1.1 riastrad #define ATOM_S7_DOS_MODE_TYPEb0 0x03 5906 1.1 riastrad #define ATOM_S7_DOS_MODE_VGAb0 0x00 5907 1.1 riastrad #define ATOM_S7_DOS_MODE_VESAb0 0x01 5908 1.1 riastrad #define ATOM_S7_DOS_MODE_EXTb0 0x02 5909 1.1 riastrad #define ATOM_S7_DOS_MODE_PIXEL_DEPTHb0 0x0C 5910 1.1 riastrad #define ATOM_S7_DOS_MODE_PIXEL_FORMATb0 0xF0 5911 1.1 riastrad #define ATOM_S7_DOS_8BIT_DAC_ENb1 0x01 5912 1.1 riastrad #define ATOM_S7_ASIC_INIT_COMPLETEb1 0x02 5913 1.1 riastrad #define ATOM_S7_ASIC_INIT_COMPLETE_MASK 0x00000200 5914 1.1 riastrad #define ATOM_S7_DOS_MODE_NUMBERw1 0x0FFFF 5915 1.1 riastrad 5916 1.1 riastrad #define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT 8 5917 1.1 riastrad 5918 1.1 riastrad // BIOS_8_SCRATCH Definition 5919 1.1 riastrad #define ATOM_S8_I2C_CHANNEL_BUSY_MASK 0x00000FFFF 5920 1.1 riastrad #define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK 0x0FFFF0000 5921 1.1 riastrad 5922 1.1 riastrad #define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT 0 5923 1.1 riastrad #define ATOM_S8_I2C_ENGINE_BUSY_SHIFT 16 5924 1.1 riastrad 5925 1.1 riastrad // BIOS_9_SCRATCH Definition 5926 1.1 riastrad #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK 5927 1.1 riastrad #define ATOM_S9_I2C_CHANNEL_COMPLETED_MASK 0x0000FFFF 5928 1.1 riastrad #endif 5929 1.1 riastrad #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_MASK 5930 1.1 riastrad #define ATOM_S9_I2C_CHANNEL_ABORTED_MASK 0xFFFF0000 5931 1.1 riastrad #endif 5932 1.1 riastrad #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT 5933 1.1 riastrad #define ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT 0 5934 1.1 riastrad #endif 5935 1.1 riastrad #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT 5936 1.1 riastrad #define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT 16 5937 1.1 riastrad #endif 5938 1.1 riastrad 5939 1.1 riastrad 5940 1.1 riastrad #define ATOM_FLAG_SET 0x20 5941 1.1 riastrad #define ATOM_FLAG_CLEAR 0 5942 1.1 riastrad #define CLEAR_ATOM_S6_ACC_MODE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR) 5943 1.1 riastrad #define SET_ATOM_S6_DEVICE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET) 5944 1.1 riastrad #define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET) 5945 1.1 riastrad #define SET_ATOM_S6_SCALER_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET) 5946 1.1 riastrad #define SET_ATOM_S6_LID_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET) 5947 1.1 riastrad 5948 1.1 riastrad #define SET_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET) 5949 1.1 riastrad #define CLEAR_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR) 5950 1.1 riastrad 5951 1.1 riastrad #define SET_ATOM_S6_DOCK_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET) 5952 1.1 riastrad #define SET_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET) 5953 1.1 riastrad #define CLEAR_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR) 5954 1.1 riastrad 5955 1.1 riastrad #define SET_ATOM_S6_THERMAL_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET) 5956 1.1 riastrad #define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET) 5957 1.1 riastrad #define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET) 5958 1.1 riastrad 5959 1.1 riastrad #define SET_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET) 5960 1.1 riastrad #define CLEAR_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR) 5961 1.1 riastrad 5962 1.1 riastrad #define SET_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET) 5963 1.1 riastrad #define CLEAR_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR ) 5964 1.1 riastrad 5965 1.1 riastrad #define SET_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET ) 5966 1.1 riastrad #define CLEAR_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR ) 5967 1.1 riastrad 5968 1.1 riastrad #define SET_ATOM_S6_I2C_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET ) 5969 1.1 riastrad 5970 1.1 riastrad #define SET_ATOM_S6_DISPLAY_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET ) 5971 1.1 riastrad 5972 1.1 riastrad #define SET_ATOM_S6_DEVICE_RECONFIG ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET) 5973 1.1 riastrad #define CLEAR_ATOM_S0_LCD1 ((ATOM_DEVICE_CONNECT_INFO_DEF << 8 )| ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR ) 5974 1.1 riastrad #define SET_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET ) 5975 1.1 riastrad #define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR ) 5976 1.1 riastrad 5977 1.1 riastrad /****************************************************************************/ 5978 1.1 riastrad //Portion II: Definitinos only used in Driver 5979 1.1 riastrad /****************************************************************************/ 5980 1.1 riastrad 5981 1.1 riastrad // Macros used by driver 5982 1.1 riastrad #ifdef __cplusplus 5983 1.1 riastrad #define GetIndexIntoMasterTable(MasterOrData, FieldName) ((reinterpret_cast<char*>(&(static_cast<ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*>(0))->FieldName)-static_cast<char*>(0))/sizeof(USHORT)) 5984 1.1 riastrad 5985 1.1 riastrad #define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) (((static_cast<ATOM_COMMON_TABLE_HEADER*>(TABLE_HEADER_OFFSET))->ucTableFormatRevision )&0x3F) 5986 1.1 riastrad #define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) (((static_cast<ATOM_COMMON_TABLE_HEADER*>(TABLE_HEADER_OFFSET))->ucTableContentRevision)&0x3F) 5987 1.1 riastrad #else // not __cplusplus 5988 1.1 riastrad #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) 5989 1.1 riastrad 5990 1.1 riastrad #define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F) 5991 1.1 riastrad #define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F) 5992 1.1 riastrad #endif // __cplusplus 5993 1.1 riastrad 5994 1.1 riastrad #define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION 5995 1.1 riastrad #define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION 5996 1.1 riastrad 5997 1.1 riastrad /****************************************************************************/ 5998 1.1 riastrad //Portion III: Definitinos only used in VBIOS 5999 1.1 riastrad /****************************************************************************/ 6000 1.1 riastrad #define ATOM_DAC_SRC 0x80 6001 1.1 riastrad #define ATOM_SRC_DAC1 0 6002 1.1 riastrad #define ATOM_SRC_DAC2 0x80 6003 1.1 riastrad 6004 1.1 riastrad typedef struct _MEMORY_PLLINIT_PARAMETERS 6005 1.1 riastrad { 6006 1.1 riastrad ULONG ulTargetMemoryClock; //In 10Khz unit 6007 1.1 riastrad UCHAR ucAction; //not define yet 6008 1.1 riastrad UCHAR ucFbDiv_Hi; //Fbdiv Hi byte 6009 1.1 riastrad UCHAR ucFbDiv; //FB value 6010 1.1 riastrad UCHAR ucPostDiv; //Post div 6011 1.1 riastrad }MEMORY_PLLINIT_PARAMETERS; 6012 1.1 riastrad 6013 1.1 riastrad #define MEMORY_PLLINIT_PS_ALLOCATION MEMORY_PLLINIT_PARAMETERS 6014 1.1 riastrad 6015 1.1 riastrad 6016 1.1 riastrad #define GPIO_PIN_WRITE 0x01 6017 1.1 riastrad #define GPIO_PIN_READ 0x00 6018 1.1 riastrad 6019 1.1 riastrad typedef struct _GPIO_PIN_CONTROL_PARAMETERS 6020 1.1 riastrad { 6021 1.1 riastrad UCHAR ucGPIO_ID; //return value, read from GPIO pins 6022 1.1 riastrad UCHAR ucGPIOBitShift; //define which bit in uGPIOBitVal need to be update 6023 1.1 riastrad UCHAR ucGPIOBitVal; //Set/Reset corresponding bit defined in ucGPIOBitMask 6024 1.1 riastrad UCHAR ucAction; //=GPIO_PIN_WRITE: Read; =GPIO_PIN_READ: Write 6025 1.1 riastrad }GPIO_PIN_CONTROL_PARAMETERS; 6026 1.1 riastrad 6027 1.1 riastrad typedef struct _ENABLE_SCALER_PARAMETERS 6028 1.1 riastrad { 6029 1.1 riastrad UCHAR ucScaler; // ATOM_SCALER1, ATOM_SCALER2 6030 1.1 riastrad UCHAR ucEnable; // ATOM_SCALER_DISABLE or ATOM_SCALER_CENTER or ATOM_SCALER_EXPANSION 6031 1.1 riastrad UCHAR ucTVStandard; // 6032 1.1 riastrad UCHAR ucPadding[1]; 6033 1.1 riastrad }ENABLE_SCALER_PARAMETERS; 6034 1.1 riastrad #define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS 6035 1.1 riastrad 6036 1.1 riastrad //ucEnable: 6037 1.1 riastrad #define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION 0 6038 1.1 riastrad #define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION 1 6039 1.1 riastrad #define SCALER_ENABLE_2TAP_ALPHA_MODE 2 6040 1.1 riastrad #define SCALER_ENABLE_MULTITAP_MODE 3 6041 1.1 riastrad 6042 1.1 riastrad typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS 6043 1.1 riastrad { 6044 1.1 riastrad ULONG usHWIconHorzVertPosn; // Hardware Icon Vertical position 6045 1.1 riastrad UCHAR ucHWIconVertOffset; // Hardware Icon Vertical offset 6046 1.1 riastrad UCHAR ucHWIconHorzOffset; // Hardware Icon Horizontal offset 6047 1.1 riastrad UCHAR ucSelection; // ATOM_CURSOR1 or ATOM_ICON1 or ATOM_CURSOR2 or ATOM_ICON2 6048 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 6049 1.1 riastrad }ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS; 6050 1.1 riastrad 6051 1.1 riastrad typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION 6052 1.1 riastrad { 6053 1.1 riastrad ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon; 6054 1.1 riastrad ENABLE_CRTC_PARAMETERS sReserved; 6055 1.1 riastrad }ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION; 6056 1.1 riastrad 6057 1.1 riastrad typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS 6058 1.1 riastrad { 6059 1.1 riastrad USHORT usHight; // Image Hight 6060 1.1 riastrad USHORT usWidth; // Image Width 6061 1.1 riastrad UCHAR ucSurface; // Surface 1 or 2 6062 1.1 riastrad UCHAR ucPadding[3]; 6063 1.1 riastrad }ENABLE_GRAPH_SURFACE_PARAMETERS; 6064 1.1 riastrad 6065 1.1 riastrad typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2 6066 1.1 riastrad { 6067 1.1 riastrad USHORT usHight; // Image Hight 6068 1.1 riastrad USHORT usWidth; // Image Width 6069 1.1 riastrad UCHAR ucSurface; // Surface 1 or 2 6070 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 6071 1.1 riastrad UCHAR ucPadding[2]; 6072 1.1 riastrad }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2; 6073 1.1 riastrad 6074 1.1 riastrad typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3 6075 1.1 riastrad { 6076 1.1 riastrad USHORT usHight; // Image Hight 6077 1.1 riastrad USHORT usWidth; // Image Width 6078 1.1 riastrad UCHAR ucSurface; // Surface 1 or 2 6079 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 6080 1.1 riastrad USHORT usDeviceId; // Active Device Id for this surface. If no device, set to 0. 6081 1.1 riastrad }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3; 6082 1.1 riastrad 6083 1.1 riastrad typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4 6084 1.1 riastrad { 6085 1.1 riastrad USHORT usHight; // Image Hight 6086 1.1 riastrad USHORT usWidth; // Image Width 6087 1.1 riastrad USHORT usGraphPitch; 6088 1.1 riastrad UCHAR ucColorDepth; 6089 1.1 riastrad UCHAR ucPixelFormat; 6090 1.1 riastrad UCHAR ucSurface; // Surface 1 or 2 6091 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE 6092 1.1 riastrad UCHAR ucModeType; 6093 1.1 riastrad UCHAR ucReserved; 6094 1.1 riastrad }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4; 6095 1.1 riastrad 6096 1.1 riastrad // ucEnable 6097 1.1 riastrad #define ATOM_GRAPH_CONTROL_SET_PITCH 0x0f 6098 1.1 riastrad #define ATOM_GRAPH_CONTROL_SET_DISP_START 0x10 6099 1.1 riastrad 6100 1.1 riastrad typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION 6101 1.1 riastrad { 6102 1.1 riastrad ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface; 6103 1.1 riastrad ENABLE_YUV_PS_ALLOCATION sReserved; // Don't set this one 6104 1.1 riastrad }ENABLE_GRAPH_SURFACE_PS_ALLOCATION; 6105 1.1 riastrad 6106 1.1 riastrad typedef struct _MEMORY_CLEAN_UP_PARAMETERS 6107 1.1 riastrad { 6108 1.1 riastrad USHORT usMemoryStart; //in 8Kb boundary, offset from memory base address 6109 1.1 riastrad USHORT usMemorySize; //8Kb blocks aligned 6110 1.1 riastrad }MEMORY_CLEAN_UP_PARAMETERS; 6111 1.1 riastrad #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS 6112 1.1 riastrad 6113 1.1 riastrad typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS 6114 1.1 riastrad { 6115 1.1 riastrad USHORT usX_Size; //When use as input parameter, usX_Size indicates which CRTC 6116 1.1 riastrad USHORT usY_Size; 6117 1.1 riastrad }GET_DISPLAY_SURFACE_SIZE_PARAMETERS; 6118 1.1 riastrad 6119 1.1 riastrad typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2 6120 1.1 riastrad { 6121 1.1 riastrad union{ 6122 1.1 riastrad USHORT usX_Size; //When use as input parameter, usX_Size indicates which CRTC 6123 1.1 riastrad USHORT usSurface; 6124 1.1 riastrad }; 6125 1.1 riastrad USHORT usY_Size; 6126 1.1 riastrad USHORT usDispXStart; 6127 1.1 riastrad USHORT usDispYStart; 6128 1.1 riastrad }GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2; 6129 1.1 riastrad 6130 1.1 riastrad 6131 1.1 riastrad typedef struct _PALETTE_DATA_CONTROL_PARAMETERS_V3 6132 1.1 riastrad { 6133 1.1 riastrad UCHAR ucLutId; 6134 1.1 riastrad UCHAR ucAction; 6135 1.1 riastrad USHORT usLutStartIndex; 6136 1.1 riastrad USHORT usLutLength; 6137 1.1 riastrad USHORT usLutOffsetInVram; 6138 1.1 riastrad }PALETTE_DATA_CONTROL_PARAMETERS_V3; 6139 1.1 riastrad 6140 1.1 riastrad // ucAction: 6141 1.1 riastrad #define PALETTE_DATA_AUTO_FILL 1 6142 1.1 riastrad #define PALETTE_DATA_READ 2 6143 1.1 riastrad #define PALETTE_DATA_WRITE 3 6144 1.1 riastrad 6145 1.1 riastrad 6146 1.1 riastrad typedef struct _INTERRUPT_SERVICE_PARAMETERS_V2 6147 1.1 riastrad { 6148 1.1 riastrad UCHAR ucInterruptId; 6149 1.1 riastrad UCHAR ucServiceId; 6150 1.1 riastrad UCHAR ucStatus; 6151 1.1 riastrad UCHAR ucReserved; 6152 1.1 riastrad }INTERRUPT_SERVICE_PARAMETER_V2; 6153 1.1 riastrad 6154 1.1 riastrad // ucInterruptId 6155 1.1 riastrad #define HDP1_INTERRUPT_ID 1 6156 1.1 riastrad #define HDP2_INTERRUPT_ID 2 6157 1.1 riastrad #define HDP3_INTERRUPT_ID 3 6158 1.1 riastrad #define HDP4_INTERRUPT_ID 4 6159 1.1 riastrad #define HDP5_INTERRUPT_ID 5 6160 1.1 riastrad #define HDP6_INTERRUPT_ID 6 6161 1.1 riastrad #define SW_INTERRUPT_ID 11 6162 1.1 riastrad 6163 1.1 riastrad // ucAction 6164 1.1 riastrad #define INTERRUPT_SERVICE_GEN_SW_INT 1 6165 1.1 riastrad #define INTERRUPT_SERVICE_GET_STATUS 2 6166 1.1 riastrad 6167 1.1 riastrad // ucStatus 6168 1.1 riastrad #define INTERRUPT_STATUS__INT_TRIGGER 1 6169 1.1 riastrad #define INTERRUPT_STATUS__HPD_HIGH 2 6170 1.1 riastrad 6171 1.1 riastrad typedef struct _INDIRECT_IO_ACCESS 6172 1.1 riastrad { 6173 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6174 1.1 riastrad UCHAR IOAccessSequence[256]; 6175 1.1 riastrad } INDIRECT_IO_ACCESS; 6176 1.1 riastrad 6177 1.1 riastrad #define INDIRECT_READ 0x00 6178 1.1 riastrad #define INDIRECT_WRITE 0x80 6179 1.1 riastrad 6180 1.1 riastrad #define INDIRECT_IO_MM 0 6181 1.1 riastrad #define INDIRECT_IO_PLL 1 6182 1.1 riastrad #define INDIRECT_IO_MC 2 6183 1.1 riastrad #define INDIRECT_IO_PCIE 3 6184 1.1 riastrad #define INDIRECT_IO_PCIEP 4 6185 1.1 riastrad #define INDIRECT_IO_NBMISC 5 6186 1.1 riastrad #define INDIRECT_IO_SMU 5 6187 1.1 riastrad 6188 1.1 riastrad #define INDIRECT_IO_PLL_READ INDIRECT_IO_PLL | INDIRECT_READ 6189 1.1 riastrad #define INDIRECT_IO_PLL_WRITE INDIRECT_IO_PLL | INDIRECT_WRITE 6190 1.1 riastrad #define INDIRECT_IO_MC_READ INDIRECT_IO_MC | INDIRECT_READ 6191 1.1 riastrad #define INDIRECT_IO_MC_WRITE INDIRECT_IO_MC | INDIRECT_WRITE 6192 1.1 riastrad #define INDIRECT_IO_PCIE_READ INDIRECT_IO_PCIE | INDIRECT_READ 6193 1.1 riastrad #define INDIRECT_IO_PCIE_WRITE INDIRECT_IO_PCIE | INDIRECT_WRITE 6194 1.1 riastrad #define INDIRECT_IO_PCIEP_READ INDIRECT_IO_PCIEP | INDIRECT_READ 6195 1.1 riastrad #define INDIRECT_IO_PCIEP_WRITE INDIRECT_IO_PCIEP | INDIRECT_WRITE 6196 1.1 riastrad #define INDIRECT_IO_NBMISC_READ INDIRECT_IO_NBMISC | INDIRECT_READ 6197 1.1 riastrad #define INDIRECT_IO_NBMISC_WRITE INDIRECT_IO_NBMISC | INDIRECT_WRITE 6198 1.1 riastrad #define INDIRECT_IO_SMU_READ INDIRECT_IO_SMU | INDIRECT_READ 6199 1.1 riastrad #define INDIRECT_IO_SMU_WRITE INDIRECT_IO_SMU | INDIRECT_WRITE 6200 1.1 riastrad 6201 1.1 riastrad typedef struct _ATOM_OEM_INFO 6202 1.1 riastrad { 6203 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6204 1.1 riastrad ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; 6205 1.1 riastrad }ATOM_OEM_INFO; 6206 1.1 riastrad 6207 1.1 riastrad typedef struct _ATOM_TV_MODE 6208 1.1 riastrad { 6209 1.1 riastrad UCHAR ucVMode_Num; //Video mode number 6210 1.1 riastrad UCHAR ucTV_Mode_Num; //Internal TV mode number 6211 1.1 riastrad }ATOM_TV_MODE; 6212 1.1 riastrad 6213 1.1 riastrad typedef struct _ATOM_BIOS_INT_TVSTD_MODE 6214 1.1 riastrad { 6215 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6216 1.1 riastrad USHORT usTV_Mode_LUT_Offset; // Pointer to standard to internal number conversion table 6217 1.1 riastrad USHORT usTV_FIFO_Offset; // Pointer to FIFO entry table 6218 1.1 riastrad USHORT usNTSC_Tbl_Offset; // Pointer to SDTV_Mode_NTSC table 6219 1.1 riastrad USHORT usPAL_Tbl_Offset; // Pointer to SDTV_Mode_PAL table 6220 1.1 riastrad USHORT usCV_Tbl_Offset; // Pointer to SDTV_Mode_PAL table 6221 1.1 riastrad }ATOM_BIOS_INT_TVSTD_MODE; 6222 1.1 riastrad 6223 1.1 riastrad 6224 1.1 riastrad typedef struct _ATOM_TV_MODE_SCALER_PTR 6225 1.1 riastrad { 6226 1.1 riastrad USHORT ucFilter0_Offset; //Pointer to filter format 0 coefficients 6227 1.1 riastrad USHORT usFilter1_Offset; //Pointer to filter format 0 coefficients 6228 1.1 riastrad UCHAR ucTV_Mode_Num; 6229 1.1 riastrad }ATOM_TV_MODE_SCALER_PTR; 6230 1.1 riastrad 6231 1.1 riastrad typedef struct _ATOM_STANDARD_VESA_TIMING 6232 1.1 riastrad { 6233 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6234 1.1 riastrad ATOM_DTD_FORMAT aModeTimings[16]; // 16 is not the real array number, just for initial allocation 6235 1.1 riastrad }ATOM_STANDARD_VESA_TIMING; 6236 1.1 riastrad 6237 1.1 riastrad 6238 1.1 riastrad typedef struct _ATOM_STD_FORMAT 6239 1.1 riastrad { 6240 1.1 riastrad USHORT usSTD_HDisp; 6241 1.1 riastrad USHORT usSTD_VDisp; 6242 1.1 riastrad USHORT usSTD_RefreshRate; 6243 1.1 riastrad USHORT usReserved; 6244 1.1 riastrad }ATOM_STD_FORMAT; 6245 1.1 riastrad 6246 1.1 riastrad typedef struct _ATOM_VESA_TO_EXTENDED_MODE 6247 1.1 riastrad { 6248 1.1 riastrad USHORT usVESA_ModeNumber; 6249 1.1 riastrad USHORT usExtendedModeNumber; 6250 1.1 riastrad }ATOM_VESA_TO_EXTENDED_MODE; 6251 1.1 riastrad 6252 1.1 riastrad typedef struct _ATOM_VESA_TO_INTENAL_MODE_LUT 6253 1.1 riastrad { 6254 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6255 1.1 riastrad ATOM_VESA_TO_EXTENDED_MODE asVESA_ToExtendedModeInfo[76]; 6256 1.1 riastrad }ATOM_VESA_TO_INTENAL_MODE_LUT; 6257 1.1 riastrad 6258 1.1 riastrad /*************** ATOM Memory Related Data Structure ***********************/ 6259 1.1 riastrad typedef struct _ATOM_MEMORY_VENDOR_BLOCK{ 6260 1.1 riastrad UCHAR ucMemoryType; 6261 1.1 riastrad UCHAR ucMemoryVendor; 6262 1.1 riastrad UCHAR ucAdjMCId; 6263 1.1 riastrad UCHAR ucDynClkId; 6264 1.1 riastrad ULONG ulDllResetClkRange; 6265 1.1 riastrad }ATOM_MEMORY_VENDOR_BLOCK; 6266 1.1 riastrad 6267 1.1 riastrad 6268 1.1 riastrad typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG{ 6269 1.1 riastrad #if ATOM_BIG_ENDIAN 6270 1.1 riastrad ULONG ucMemBlkId:8; 6271 1.1 riastrad ULONG ulMemClockRange:24; 6272 1.1 riastrad #else 6273 1.1 riastrad ULONG ulMemClockRange:24; 6274 1.1 riastrad ULONG ucMemBlkId:8; 6275 1.1 riastrad #endif 6276 1.1 riastrad }ATOM_MEMORY_SETTING_ID_CONFIG; 6277 1.1 riastrad 6278 1.1 riastrad typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS 6279 1.1 riastrad { 6280 1.1 riastrad ATOM_MEMORY_SETTING_ID_CONFIG slAccess; 6281 1.1 riastrad ULONG ulAccess; 6282 1.1 riastrad }ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS; 6283 1.1 riastrad 6284 1.1 riastrad 6285 1.1 riastrad typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK{ 6286 1.1 riastrad ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID; 6287 1.1 riastrad ULONG aulMemData[1]; 6288 1.1 riastrad }ATOM_MEMORY_SETTING_DATA_BLOCK; 6289 1.1 riastrad 6290 1.1 riastrad 6291 1.1 riastrad typedef struct _ATOM_INIT_REG_INDEX_FORMAT{ 6292 1.1 riastrad USHORT usRegIndex; // MC register index 6293 1.1 riastrad UCHAR ucPreRegDataLength; // offset in ATOM_INIT_REG_DATA_BLOCK.saRegDataBuf 6294 1.1 riastrad }ATOM_INIT_REG_INDEX_FORMAT; 6295 1.1 riastrad 6296 1.1 riastrad 6297 1.1 riastrad typedef struct _ATOM_INIT_REG_BLOCK{ 6298 1.1 riastrad USHORT usRegIndexTblSize; //size of asRegIndexBuf 6299 1.1 riastrad USHORT usRegDataBlkSize; //size of ATOM_MEMORY_SETTING_DATA_BLOCK 6300 1.1 riastrad ATOM_INIT_REG_INDEX_FORMAT asRegIndexBuf[1]; 6301 1.1 riastrad ATOM_MEMORY_SETTING_DATA_BLOCK asRegDataBuf[1]; 6302 1.1 riastrad }ATOM_INIT_REG_BLOCK; 6303 1.1 riastrad 6304 1.1 riastrad #define END_OF_REG_INDEX_BLOCK 0x0ffff 6305 1.1 riastrad #define END_OF_REG_DATA_BLOCK 0x00000000 6306 1.1 riastrad #define ATOM_INIT_REG_MASK_FLAG 0x80 //Not used in BIOS 6307 1.1 riastrad #define CLOCK_RANGE_HIGHEST 0x00ffffff 6308 1.1 riastrad 6309 1.1 riastrad #define VALUE_DWORD SIZEOF ULONG 6310 1.1 riastrad #define VALUE_SAME_AS_ABOVE 0 6311 1.1 riastrad #define VALUE_MASK_DWORD 0x84 6312 1.1 riastrad 6313 1.1 riastrad #define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1) 6314 1.1 riastrad #define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1) 6315 1.1 riastrad #define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1) 6316 1.1 riastrad //#define ACCESS_MCIODEBUGIND 0x40 //defined in BIOS code 6317 1.1 riastrad #define ACCESS_PLACEHOLDER 0x80 6318 1.1 riastrad 6319 1.1 riastrad typedef struct _ATOM_MC_INIT_PARAM_TABLE 6320 1.1 riastrad { 6321 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6322 1.1 riastrad USHORT usAdjustARB_SEQDataOffset; 6323 1.1 riastrad USHORT usMCInitMemTypeTblOffset; 6324 1.1 riastrad USHORT usMCInitCommonTblOffset; 6325 1.1 riastrad USHORT usMCInitPowerDownTblOffset; 6326 1.1 riastrad ULONG ulARB_SEQDataBuf[32]; 6327 1.1 riastrad ATOM_INIT_REG_BLOCK asMCInitMemType; 6328 1.1 riastrad ATOM_INIT_REG_BLOCK asMCInitCommon; 6329 1.1 riastrad }ATOM_MC_INIT_PARAM_TABLE; 6330 1.1 riastrad 6331 1.1 riastrad 6332 1.1 riastrad #define _4Mx16 0x2 6333 1.1 riastrad #define _4Mx32 0x3 6334 1.1 riastrad #define _8Mx16 0x12 6335 1.1 riastrad #define _8Mx32 0x13 6336 1.1 riastrad #define _16Mx16 0x22 6337 1.1 riastrad #define _16Mx32 0x23 6338 1.1 riastrad #define _32Mx16 0x32 6339 1.1 riastrad #define _32Mx32 0x33 6340 1.1 riastrad #define _64Mx8 0x41 6341 1.1 riastrad #define _64Mx16 0x42 6342 1.1 riastrad #define _64Mx32 0x43 6343 1.1 riastrad #define _128Mx8 0x51 6344 1.1 riastrad #define _128Mx16 0x52 6345 1.1 riastrad #define _128Mx32 0x53 6346 1.1 riastrad #define _256Mx8 0x61 6347 1.1 riastrad #define _256Mx16 0x62 6348 1.1 riastrad #define _512Mx8 0x71 6349 1.1 riastrad 6350 1.1 riastrad #define SAMSUNG 0x1 6351 1.1 riastrad #define INFINEON 0x2 6352 1.1 riastrad #define ELPIDA 0x3 6353 1.1 riastrad #define ETRON 0x4 6354 1.1 riastrad #define NANYA 0x5 6355 1.1 riastrad #define HYNIX 0x6 6356 1.1 riastrad #define MOSEL 0x7 6357 1.1 riastrad #define WINBOND 0x8 6358 1.1 riastrad #define ESMT 0x9 6359 1.1 riastrad #define MICRON 0xF 6360 1.1 riastrad 6361 1.1 riastrad #define QIMONDA INFINEON 6362 1.1 riastrad #define PROMOS MOSEL 6363 1.1 riastrad #define KRETON INFINEON 6364 1.1 riastrad #define ELIXIR NANYA 6365 1.1 riastrad #define MEZZA ELPIDA 6366 1.1 riastrad 6367 1.1 riastrad 6368 1.1 riastrad /////////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// 6369 1.1 riastrad 6370 1.1 riastrad #define UCODE_ROM_START_ADDRESS 0x1b800 6371 1.1 riastrad #define UCODE_SIGNATURE 0x4375434d // 'MCuC' - MC uCode 6372 1.1 riastrad 6373 1.1 riastrad //uCode block header for reference 6374 1.1 riastrad 6375 1.1 riastrad typedef struct _MCuCodeHeader 6376 1.1 riastrad { 6377 1.1 riastrad ULONG ulSignature; 6378 1.1 riastrad UCHAR ucRevision; 6379 1.1 riastrad UCHAR ucChecksum; 6380 1.1 riastrad UCHAR ucReserved1; 6381 1.1 riastrad UCHAR ucReserved2; 6382 1.1 riastrad USHORT usParametersLength; 6383 1.1 riastrad USHORT usUCodeLength; 6384 1.1 riastrad USHORT usReserved1; 6385 1.1 riastrad USHORT usReserved2; 6386 1.1 riastrad } MCuCodeHeader; 6387 1.1 riastrad 6388 1.1 riastrad ////////////////////////////////////////////////////////////////////////////////// 6389 1.1 riastrad 6390 1.1 riastrad #define ATOM_MAX_NUMBER_OF_VRAM_MODULE 16 6391 1.1 riastrad 6392 1.1 riastrad #define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK 0xF 6393 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V1 6394 1.1 riastrad { 6395 1.1 riastrad ULONG ulReserved; 6396 1.1 riastrad USHORT usEMRSValue; 6397 1.1 riastrad USHORT usMRSValue; 6398 1.1 riastrad USHORT usReserved; 6399 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6400 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] reserved; 6401 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender 6402 1.1 riastrad UCHAR ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... 6403 1.1 riastrad UCHAR ucRow; // Number of Row,in power of 2; 6404 1.1 riastrad UCHAR ucColumn; // Number of Column,in power of 2; 6405 1.1 riastrad UCHAR ucBank; // Nunber of Bank; 6406 1.1 riastrad UCHAR ucRank; // Number of Rank, in power of 2 6407 1.1 riastrad UCHAR ucChannelNum; // Number of channel; 6408 1.1 riastrad UCHAR ucChannelConfig; // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 6409 1.1 riastrad UCHAR ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; 6410 1.1 riastrad UCHAR ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; 6411 1.1 riastrad UCHAR ucReserved[2]; 6412 1.1 riastrad }ATOM_VRAM_MODULE_V1; 6413 1.1 riastrad 6414 1.1 riastrad 6415 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V2 6416 1.1 riastrad { 6417 1.1 riastrad ULONG ulReserved; 6418 1.1 riastrad ULONG ulFlags; // To enable/disable functionalities based on memory type 6419 1.1 riastrad ULONG ulEngineClock; // Override of default engine clock for particular memory type 6420 1.1 riastrad ULONG ulMemoryClock; // Override of default memory clock for particular memory type 6421 1.1 riastrad USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type 6422 1.1 riastrad USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type 6423 1.1 riastrad USHORT usEMRSValue; 6424 1.1 riastrad USHORT usMRSValue; 6425 1.1 riastrad USHORT usReserved; 6426 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6427 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; 6428 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed 6429 1.1 riastrad UCHAR ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... 6430 1.1 riastrad UCHAR ucRow; // Number of Row,in power of 2; 6431 1.1 riastrad UCHAR ucColumn; // Number of Column,in power of 2; 6432 1.1 riastrad UCHAR ucBank; // Nunber of Bank; 6433 1.1 riastrad UCHAR ucRank; // Number of Rank, in power of 2 6434 1.1 riastrad UCHAR ucChannelNum; // Number of channel; 6435 1.1 riastrad UCHAR ucChannelConfig; // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 6436 1.1 riastrad UCHAR ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; 6437 1.1 riastrad UCHAR ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; 6438 1.1 riastrad UCHAR ucRefreshRateFactor; 6439 1.1 riastrad UCHAR ucReserved[3]; 6440 1.1 riastrad }ATOM_VRAM_MODULE_V2; 6441 1.1 riastrad 6442 1.1 riastrad 6443 1.1 riastrad typedef struct _ATOM_MEMORY_TIMING_FORMAT 6444 1.1 riastrad { 6445 1.1 riastrad ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 6446 1.1 riastrad union{ 6447 1.1 riastrad USHORT usMRS; // mode register 6448 1.1 riastrad USHORT usDDR3_MR0; 6449 1.1 riastrad }; 6450 1.1 riastrad union{ 6451 1.1 riastrad USHORT usEMRS; // extended mode register 6452 1.1 riastrad USHORT usDDR3_MR1; 6453 1.1 riastrad }; 6454 1.1 riastrad UCHAR ucCL; // CAS latency 6455 1.1 riastrad UCHAR ucWL; // WRITE Latency 6456 1.1 riastrad UCHAR uctRAS; // tRAS 6457 1.1 riastrad UCHAR uctRC; // tRC 6458 1.1 riastrad UCHAR uctRFC; // tRFC 6459 1.1 riastrad UCHAR uctRCDR; // tRCDR 6460 1.1 riastrad UCHAR uctRCDW; // tRCDW 6461 1.1 riastrad UCHAR uctRP; // tRP 6462 1.1 riastrad UCHAR uctRRD; // tRRD 6463 1.1 riastrad UCHAR uctWR; // tWR 6464 1.1 riastrad UCHAR uctWTR; // tWTR 6465 1.1 riastrad UCHAR uctPDIX; // tPDIX 6466 1.1 riastrad UCHAR uctFAW; // tFAW 6467 1.1 riastrad UCHAR uctAOND; // tAOND 6468 1.1 riastrad union 6469 1.1 riastrad { 6470 1.1 riastrad struct { 6471 1.1 riastrad UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon 6472 1.1 riastrad UCHAR ucReserved; 6473 1.1 riastrad }; 6474 1.1 riastrad USHORT usDDR3_MR2; 6475 1.1 riastrad }; 6476 1.1 riastrad }ATOM_MEMORY_TIMING_FORMAT; 6477 1.1 riastrad 6478 1.1 riastrad 6479 1.1 riastrad typedef struct _ATOM_MEMORY_TIMING_FORMAT_V1 6480 1.1 riastrad { 6481 1.1 riastrad ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 6482 1.1 riastrad USHORT usMRS; // mode register 6483 1.1 riastrad USHORT usEMRS; // extended mode register 6484 1.1 riastrad UCHAR ucCL; // CAS latency 6485 1.1 riastrad UCHAR ucWL; // WRITE Latency 6486 1.1 riastrad UCHAR uctRAS; // tRAS 6487 1.1 riastrad UCHAR uctRC; // tRC 6488 1.1 riastrad UCHAR uctRFC; // tRFC 6489 1.1 riastrad UCHAR uctRCDR; // tRCDR 6490 1.1 riastrad UCHAR uctRCDW; // tRCDW 6491 1.1 riastrad UCHAR uctRP; // tRP 6492 1.1 riastrad UCHAR uctRRD; // tRRD 6493 1.1 riastrad UCHAR uctWR; // tWR 6494 1.1 riastrad UCHAR uctWTR; // tWTR 6495 1.1 riastrad UCHAR uctPDIX; // tPDIX 6496 1.1 riastrad UCHAR uctFAW; // tFAW 6497 1.1 riastrad UCHAR uctAOND; // tAOND 6498 1.1 riastrad UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon 6499 1.1 riastrad ////////////////////////////////////GDDR parameters/////////////////////////////////// 6500 1.1 riastrad UCHAR uctCCDL; // 6501 1.1 riastrad UCHAR uctCRCRL; // 6502 1.1 riastrad UCHAR uctCRCWL; // 6503 1.1 riastrad UCHAR uctCKE; // 6504 1.1 riastrad UCHAR uctCKRSE; // 6505 1.1 riastrad UCHAR uctCKRSX; // 6506 1.1 riastrad UCHAR uctFAW32; // 6507 1.1 riastrad UCHAR ucMR5lo; // 6508 1.1 riastrad UCHAR ucMR5hi; // 6509 1.1 riastrad UCHAR ucTerminator; 6510 1.1 riastrad }ATOM_MEMORY_TIMING_FORMAT_V1; 6511 1.1 riastrad 6512 1.1 riastrad typedef struct _ATOM_MEMORY_TIMING_FORMAT_V2 6513 1.1 riastrad { 6514 1.1 riastrad ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 6515 1.1 riastrad USHORT usMRS; // mode register 6516 1.1 riastrad USHORT usEMRS; // extended mode register 6517 1.1 riastrad UCHAR ucCL; // CAS latency 6518 1.1 riastrad UCHAR ucWL; // WRITE Latency 6519 1.1 riastrad UCHAR uctRAS; // tRAS 6520 1.1 riastrad UCHAR uctRC; // tRC 6521 1.1 riastrad UCHAR uctRFC; // tRFC 6522 1.1 riastrad UCHAR uctRCDR; // tRCDR 6523 1.1 riastrad UCHAR uctRCDW; // tRCDW 6524 1.1 riastrad UCHAR uctRP; // tRP 6525 1.1 riastrad UCHAR uctRRD; // tRRD 6526 1.1 riastrad UCHAR uctWR; // tWR 6527 1.1 riastrad UCHAR uctWTR; // tWTR 6528 1.1 riastrad UCHAR uctPDIX; // tPDIX 6529 1.1 riastrad UCHAR uctFAW; // tFAW 6530 1.1 riastrad UCHAR uctAOND; // tAOND 6531 1.1 riastrad UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon 6532 1.1 riastrad ////////////////////////////////////GDDR parameters/////////////////////////////////// 6533 1.1 riastrad UCHAR uctCCDL; // 6534 1.1 riastrad UCHAR uctCRCRL; // 6535 1.1 riastrad UCHAR uctCRCWL; // 6536 1.1 riastrad UCHAR uctCKE; // 6537 1.1 riastrad UCHAR uctCKRSE; // 6538 1.1 riastrad UCHAR uctCKRSX; // 6539 1.1 riastrad UCHAR uctFAW32; // 6540 1.1 riastrad UCHAR ucMR4lo; // 6541 1.1 riastrad UCHAR ucMR4hi; // 6542 1.1 riastrad UCHAR ucMR5lo; // 6543 1.1 riastrad UCHAR ucMR5hi; // 6544 1.1 riastrad UCHAR ucTerminator; 6545 1.1 riastrad UCHAR ucReserved; 6546 1.1 riastrad }ATOM_MEMORY_TIMING_FORMAT_V2; 6547 1.1 riastrad 6548 1.1 riastrad typedef struct _ATOM_MEMORY_FORMAT 6549 1.1 riastrad { 6550 1.1 riastrad ULONG ulDllDisClock; // memory DLL will be disable when target memory clock is below this clock 6551 1.1 riastrad union{ 6552 1.1 riastrad USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type 6553 1.1 riastrad USHORT usDDR3_Reserved; // Not used for DDR3 memory 6554 1.1 riastrad }; 6555 1.1 riastrad union{ 6556 1.1 riastrad USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type 6557 1.1 riastrad USHORT usDDR3_MR3; // Used for DDR3 memory 6558 1.1 riastrad }; 6559 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; 6560 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed 6561 1.1 riastrad UCHAR ucRow; // Number of Row,in power of 2; 6562 1.1 riastrad UCHAR ucColumn; // Number of Column,in power of 2; 6563 1.1 riastrad UCHAR ucBank; // Nunber of Bank; 6564 1.1 riastrad UCHAR ucRank; // Number of Rank, in power of 2 6565 1.1 riastrad UCHAR ucBurstSize; // burst size, 0= burst size=4 1= burst size=8 6566 1.1 riastrad UCHAR ucDllDisBit; // position of DLL Enable/Disable bit in EMRS ( Extended Mode Register ) 6567 1.1 riastrad UCHAR ucRefreshRateFactor; // memory refresh rate in unit of ms 6568 1.1 riastrad UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 6569 1.1 riastrad UCHAR ucPreamble; //[7:4] Write Preamble, [3:0] Read Preamble 6570 1.1 riastrad UCHAR ucMemAttrib; // Memory Device Addribute, like RDBI/WDBI etc 6571 1.1 riastrad ATOM_MEMORY_TIMING_FORMAT asMemTiming[5]; //Memory Timing block sort from lower clock to higher clock 6572 1.1 riastrad }ATOM_MEMORY_FORMAT; 6573 1.1 riastrad 6574 1.1 riastrad 6575 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V3 6576 1.1 riastrad { 6577 1.1 riastrad ULONG ulChannelMapCfg; // board dependent paramenter:Channel combination 6578 1.1 riastrad USHORT usSize; // size of ATOM_VRAM_MODULE_V3 6579 1.1 riastrad USHORT usDefaultMVDDQ; // board dependent parameter:Default Memory Core Voltage 6580 1.1 riastrad USHORT usDefaultMVDDC; // board dependent parameter:Default Memory IO Voltage 6581 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6582 1.1 riastrad UCHAR ucChannelNum; // board dependent parameter:Number of channel; 6583 1.1 riastrad UCHAR ucChannelSize; // board dependent parameter:32bit or 64bit 6584 1.1 riastrad UCHAR ucVREFI; // board dependnt parameter: EXT or INT +160mv to -140mv 6585 1.1 riastrad UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters 6586 1.1 riastrad UCHAR ucFlag; // To enable/disable functionalities based on memory type 6587 1.1 riastrad ATOM_MEMORY_FORMAT asMemory; // describ all of video memory parameters from memory spec 6588 1.1 riastrad }ATOM_VRAM_MODULE_V3; 6589 1.1 riastrad 6590 1.1 riastrad 6591 1.1 riastrad //ATOM_VRAM_MODULE_V3.ucNPL_RT 6592 1.1 riastrad #define NPL_RT_MASK 0x0f 6593 1.1 riastrad #define BATTERY_ODT_MASK 0xc0 6594 1.1 riastrad 6595 1.1 riastrad #define ATOM_VRAM_MODULE ATOM_VRAM_MODULE_V3 6596 1.1 riastrad 6597 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V4 6598 1.1 riastrad { 6599 1.1 riastrad ULONG ulChannelMapCfg; // board dependent parameter: Channel combination 6600 1.1 riastrad USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE 6601 1.1 riastrad USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6602 1.1 riastrad // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) 6603 1.1 riastrad USHORT usReserved; 6604 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6605 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; 6606 1.1 riastrad UCHAR ucChannelNum; // Number of channels present in this module config 6607 1.1 riastrad UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits 6608 1.1 riastrad UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 6609 1.1 riastrad UCHAR ucFlag; // To enable/disable functionalities based on memory type 6610 1.1 riastrad UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 6611 1.1 riastrad UCHAR ucVREFI; // board dependent parameter 6612 1.1 riastrad UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters 6613 1.1 riastrad UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble 6614 1.1 riastrad UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6615 1.1 riastrad // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros 6616 1.1 riastrad UCHAR ucReserved[3]; 6617 1.1 riastrad 6618 1.1 riastrad //compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level 6619 1.1 riastrad union{ 6620 1.1 riastrad USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type 6621 1.1 riastrad USHORT usDDR3_Reserved; 6622 1.1 riastrad }; 6623 1.1 riastrad union{ 6624 1.1 riastrad USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type 6625 1.1 riastrad USHORT usDDR3_MR3; // Used for DDR3 memory 6626 1.1 riastrad }; 6627 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed 6628 1.1 riastrad UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) 6629 1.1 riastrad UCHAR ucReserved2[2]; 6630 1.1 riastrad ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];//Memory Timing block sort from lower clock to higher clock 6631 1.1 riastrad }ATOM_VRAM_MODULE_V4; 6632 1.1 riastrad 6633 1.1 riastrad #define VRAM_MODULE_V4_MISC_RANK_MASK 0x3 6634 1.1 riastrad #define VRAM_MODULE_V4_MISC_DUAL_RANK 0x1 6635 1.1 riastrad #define VRAM_MODULE_V4_MISC_BL_MASK 0x4 6636 1.1 riastrad #define VRAM_MODULE_V4_MISC_BL8 0x4 6637 1.1 riastrad #define VRAM_MODULE_V4_MISC_DUAL_CS 0x10 6638 1.1 riastrad 6639 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V5 6640 1.1 riastrad { 6641 1.1 riastrad ULONG ulChannelMapCfg; // board dependent parameter: Channel combination 6642 1.1 riastrad USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE 6643 1.1 riastrad USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6644 1.1 riastrad // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) 6645 1.1 riastrad USHORT usReserved; 6646 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6647 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; 6648 1.1 riastrad UCHAR ucChannelNum; // Number of channels present in this module config 6649 1.1 riastrad UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits 6650 1.1 riastrad UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 6651 1.1 riastrad UCHAR ucFlag; // To enable/disable functionalities based on memory type 6652 1.1 riastrad UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 6653 1.1 riastrad UCHAR ucVREFI; // board dependent parameter 6654 1.1 riastrad UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters 6655 1.1 riastrad UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble 6656 1.1 riastrad UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6657 1.1 riastrad // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros 6658 1.1 riastrad UCHAR ucReserved[3]; 6659 1.1 riastrad 6660 1.1 riastrad //compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level 6661 1.1 riastrad USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type 6662 1.1 riastrad USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type 6663 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed 6664 1.1 riastrad UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) 6665 1.1 riastrad UCHAR ucFIFODepth; // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth 6666 1.1 riastrad UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth 6667 1.1 riastrad ATOM_MEMORY_TIMING_FORMAT_V1 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock 6668 1.1 riastrad }ATOM_VRAM_MODULE_V5; 6669 1.1 riastrad 6670 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V6 6671 1.1 riastrad { 6672 1.1 riastrad ULONG ulChannelMapCfg; // board dependent parameter: Channel combination 6673 1.1 riastrad USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE 6674 1.1 riastrad USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6675 1.1 riastrad // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) 6676 1.1 riastrad USHORT usReserved; 6677 1.1 riastrad UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module 6678 1.1 riastrad UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; 6679 1.1 riastrad UCHAR ucChannelNum; // Number of channels present in this module config 6680 1.1 riastrad UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits 6681 1.1 riastrad UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 6682 1.1 riastrad UCHAR ucFlag; // To enable/disable functionalities based on memory type 6683 1.1 riastrad UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 6684 1.1 riastrad UCHAR ucVREFI; // board dependent parameter 6685 1.1 riastrad UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters 6686 1.1 riastrad UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble 6687 1.1 riastrad UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! 6688 1.1 riastrad // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros 6689 1.1 riastrad UCHAR ucReserved[3]; 6690 1.1 riastrad 6691 1.1 riastrad //compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level 6692 1.1 riastrad USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type 6693 1.1 riastrad USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type 6694 1.1 riastrad UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed 6695 1.1 riastrad UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) 6696 1.1 riastrad UCHAR ucFIFODepth; // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth 6697 1.1 riastrad UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth 6698 1.1 riastrad ATOM_MEMORY_TIMING_FORMAT_V2 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock 6699 1.1 riastrad }ATOM_VRAM_MODULE_V6; 6700 1.1 riastrad 6701 1.1 riastrad typedef struct _ATOM_VRAM_MODULE_V7 6702 1.1 riastrad { 6703 1.1 riastrad // Design Specific Values 6704 1.1 riastrad ULONG ulChannelMapCfg; // mmMC_SHARED_CHREMAP 6705 1.1 riastrad USHORT usModuleSize; // Size of ATOM_VRAM_MODULE_V7 6706 1.1 riastrad USHORT usPrivateReserved; // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) 6707 1.1 riastrad USHORT usEnableChannels; // bit vector which indicate which channels are enabled 6708 1.1 riastrad UCHAR ucExtMemoryID; // Current memory module ID 6709 1.1 riastrad UCHAR ucMemoryType; // MEM_TYPE_DDR2/DDR3/GDDR3/GDDR5 6710 1.1 riastrad UCHAR ucChannelNum; // Number of mem. channels supported in this module 6711 1.1 riastrad UCHAR ucChannelWidth; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT 6712 1.1 riastrad UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 6713 1.1 riastrad UCHAR ucReserve; // Former container for Mx_FLAGS like DBI_AC_MODE_ENABLE_ASIC for GDDR4. Not used now. 6714 1.1 riastrad UCHAR ucMisc; // RANK_OF_THISMEMORY etc. 6715 1.1 riastrad UCHAR ucVREFI; // Not used. 6716 1.1 riastrad UCHAR ucNPL_RT; // Round trip delay (MC_SEQ_CAS_TIMING [28:24]:TCL=CL+NPL_RT-2). Always 2. 6717 1.1 riastrad UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble 6718 1.1 riastrad UCHAR ucMemorySize; // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros 6719 1.1 riastrad USHORT usSEQSettingOffset; 6720 1.1 riastrad UCHAR ucReserved; 6721 1.1 riastrad // Memory Module specific values 6722 1.1 riastrad USHORT usEMRS2Value; // EMRS2/MR2 Value. 6723 1.1 riastrad USHORT usEMRS3Value; // EMRS3/MR3 Value. 6724 1.1 riastrad UCHAR ucMemoryVenderID; // [7:4] Revision, [3:0] Vendor code 6725 1.1 riastrad UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) 6726 1.1 riastrad UCHAR ucFIFODepth; // FIFO depth can be detected during vendor detection, here is hardcoded per memory 6727 1.1 riastrad UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth 6728 1.1 riastrad char strMemPNString[20]; // part number end with '0'. 6729 1.1 riastrad }ATOM_VRAM_MODULE_V7; 6730 1.1 riastrad 6731 1.1 riastrad typedef struct _ATOM_VRAM_INFO_V2 6732 1.1 riastrad { 6733 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6734 1.1 riastrad UCHAR ucNumOfVRAMModule; 6735 1.1 riastrad ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; 6736 1.1 riastrad }ATOM_VRAM_INFO_V2; 6737 1.1 riastrad 6738 1.1 riastrad typedef struct _ATOM_VRAM_INFO_V3 6739 1.1 riastrad { 6740 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6741 1.1 riastrad USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting 6742 1.1 riastrad USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting 6743 1.1 riastrad USHORT usRerseved; 6744 1.1 riastrad UCHAR aVID_PinsShift[9]; // 8 bit strap maximum+terminator 6745 1.1 riastrad UCHAR ucNumOfVRAMModule; 6746 1.1 riastrad ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; 6747 1.1 riastrad ATOM_INIT_REG_BLOCK asMemPatch; // for allocation 6748 1.1 riastrad // ATOM_INIT_REG_BLOCK aMemAdjust; 6749 1.1 riastrad }ATOM_VRAM_INFO_V3; 6750 1.1 riastrad 6751 1.1 riastrad #define ATOM_VRAM_INFO_LAST ATOM_VRAM_INFO_V3 6752 1.1 riastrad 6753 1.1 riastrad typedef struct _ATOM_VRAM_INFO_V4 6754 1.1 riastrad { 6755 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6756 1.1 riastrad USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting 6757 1.1 riastrad USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting 6758 1.1 riastrad USHORT usRerseved; 6759 1.1 riastrad UCHAR ucMemDQ7_0ByteRemap; // DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3 6760 1.1 riastrad ULONG ulMemDQ7_0BitRemap; // each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21] 6761 1.1 riastrad UCHAR ucReservde[4]; 6762 1.1 riastrad UCHAR ucNumOfVRAMModule; 6763 1.1 riastrad ATOM_VRAM_MODULE_V4 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; 6764 1.1 riastrad ATOM_INIT_REG_BLOCK asMemPatch; // for allocation 6765 1.1 riastrad // ATOM_INIT_REG_BLOCK aMemAdjust; 6766 1.1 riastrad }ATOM_VRAM_INFO_V4; 6767 1.1 riastrad 6768 1.1 riastrad typedef struct _ATOM_VRAM_INFO_HEADER_V2_1 6769 1.1 riastrad { 6770 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6771 1.1 riastrad USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting 6772 1.1 riastrad USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting 6773 1.1 riastrad USHORT usPerBytePresetOffset; // offset of ATOM_INIT_REG_BLOCK structure for Per Byte Offset Preset Settings 6774 1.1 riastrad USHORT usReserved[3]; 6775 1.1 riastrad UCHAR ucNumOfVRAMModule; // indicate number of VRAM module 6776 1.1 riastrad UCHAR ucMemoryClkPatchTblVer; // version of memory AC timing register list 6777 1.1 riastrad UCHAR ucVramModuleVer; // indicate ATOM_VRAM_MODUE version 6778 1.1 riastrad UCHAR ucReserved; 6779 1.1 riastrad ATOM_VRAM_MODULE_V7 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; 6780 1.1 riastrad }ATOM_VRAM_INFO_HEADER_V2_1; 6781 1.1 riastrad 6782 1.1 riastrad 6783 1.1 riastrad typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO 6784 1.1 riastrad { 6785 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6786 1.1 riastrad UCHAR aVID_PinsShift[9]; //8 bit strap maximum+terminator 6787 1.1 riastrad }ATOM_VRAM_GPIO_DETECTION_INFO; 6788 1.1 riastrad 6789 1.1 riastrad 6790 1.1 riastrad typedef struct _ATOM_MEMORY_TRAINING_INFO 6791 1.1 riastrad { 6792 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 6793 1.1 riastrad UCHAR ucTrainingLoop; 6794 1.1 riastrad UCHAR ucReserved[3]; 6795 1.1 riastrad ATOM_INIT_REG_BLOCK asMemTrainingSetting; 6796 1.1 riastrad }ATOM_MEMORY_TRAINING_INFO; 6797 1.1 riastrad 6798 1.1 riastrad 6799 1.1 riastrad typedef struct SW_I2C_CNTL_DATA_PARAMETERS 6800 1.1 riastrad { 6801 1.1 riastrad UCHAR ucControl; 6802 1.1 riastrad UCHAR ucData; 6803 1.1 riastrad UCHAR ucSatus; 6804 1.1 riastrad UCHAR ucTemp; 6805 1.1 riastrad } SW_I2C_CNTL_DATA_PARAMETERS; 6806 1.1 riastrad 6807 1.1 riastrad #define SW_I2C_CNTL_DATA_PS_ALLOCATION SW_I2C_CNTL_DATA_PARAMETERS 6808 1.1 riastrad 6809 1.1 riastrad typedef struct _SW_I2C_IO_DATA_PARAMETERS 6810 1.1 riastrad { 6811 1.1 riastrad USHORT GPIO_Info; 6812 1.1 riastrad UCHAR ucAct; 6813 1.1 riastrad UCHAR ucData; 6814 1.1 riastrad } SW_I2C_IO_DATA_PARAMETERS; 6815 1.1 riastrad 6816 1.1 riastrad #define SW_I2C_IO_DATA_PS_ALLOCATION SW_I2C_IO_DATA_PARAMETERS 6817 1.1 riastrad 6818 1.1 riastrad /****************************SW I2C CNTL DEFINITIONS**********************/ 6819 1.1 riastrad #define SW_I2C_IO_RESET 0 6820 1.1 riastrad #define SW_I2C_IO_GET 1 6821 1.1 riastrad #define SW_I2C_IO_DRIVE 2 6822 1.1 riastrad #define SW_I2C_IO_SET 3 6823 1.1 riastrad #define SW_I2C_IO_START 4 6824 1.1 riastrad 6825 1.1 riastrad #define SW_I2C_IO_CLOCK 0 6826 1.1 riastrad #define SW_I2C_IO_DATA 0x80 6827 1.1 riastrad 6828 1.1 riastrad #define SW_I2C_IO_ZERO 0 6829 1.1 riastrad #define SW_I2C_IO_ONE 0x100 6830 1.1 riastrad 6831 1.1 riastrad #define SW_I2C_CNTL_READ 0 6832 1.1 riastrad #define SW_I2C_CNTL_WRITE 1 6833 1.1 riastrad #define SW_I2C_CNTL_START 2 6834 1.1 riastrad #define SW_I2C_CNTL_STOP 3 6835 1.1 riastrad #define SW_I2C_CNTL_OPEN 4 6836 1.1 riastrad #define SW_I2C_CNTL_CLOSE 5 6837 1.1 riastrad #define SW_I2C_CNTL_WRITE1BIT 6 6838 1.1 riastrad 6839 1.1 riastrad //==============================VESA definition Portion=============================== 6840 1.1 riastrad #define VESA_OEM_PRODUCT_REV "01.00" 6841 1.1 riastrad #define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB //refer to VBE spec p.32, no TTY support 6842 1.1 riastrad #define VESA_MODE_WIN_ATTRIBUTE 7 6843 1.1 riastrad #define VESA_WIN_SIZE 64 6844 1.1 riastrad 6845 1.1 riastrad typedef struct _PTR_32_BIT_STRUCTURE 6846 1.1 riastrad { 6847 1.1 riastrad USHORT Offset16; 6848 1.1 riastrad USHORT Segment16; 6849 1.1 riastrad } PTR_32_BIT_STRUCTURE; 6850 1.1 riastrad 6851 1.1 riastrad typedef union _PTR_32_BIT_UNION 6852 1.1 riastrad { 6853 1.1 riastrad PTR_32_BIT_STRUCTURE SegmentOffset; 6854 1.1 riastrad ULONG Ptr32_Bit; 6855 1.1 riastrad } PTR_32_BIT_UNION; 6856 1.1 riastrad 6857 1.1 riastrad typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE 6858 1.1 riastrad { 6859 1.1 riastrad UCHAR VbeSignature[4]; 6860 1.1 riastrad USHORT VbeVersion; 6861 1.1 riastrad PTR_32_BIT_UNION OemStringPtr; 6862 1.1 riastrad UCHAR Capabilities[4]; 6863 1.1 riastrad PTR_32_BIT_UNION VideoModePtr; 6864 1.1 riastrad USHORT TotalMemory; 6865 1.1 riastrad } VBE_1_2_INFO_BLOCK_UPDATABLE; 6866 1.1 riastrad 6867 1.1 riastrad 6868 1.1 riastrad typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE 6869 1.1 riastrad { 6870 1.1 riastrad VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock; 6871 1.1 riastrad USHORT OemSoftRev; 6872 1.1 riastrad PTR_32_BIT_UNION OemVendorNamePtr; 6873 1.1 riastrad PTR_32_BIT_UNION OemProductNamePtr; 6874 1.1 riastrad PTR_32_BIT_UNION OemProductRevPtr; 6875 1.1 riastrad } VBE_2_0_INFO_BLOCK_UPDATABLE; 6876 1.1 riastrad 6877 1.1 riastrad typedef union _VBE_VERSION_UNION 6878 1.1 riastrad { 6879 1.1 riastrad VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock; 6880 1.1 riastrad VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock; 6881 1.1 riastrad } VBE_VERSION_UNION; 6882 1.1 riastrad 6883 1.1 riastrad typedef struct _VBE_INFO_BLOCK 6884 1.1 riastrad { 6885 1.1 riastrad VBE_VERSION_UNION UpdatableVBE_Info; 6886 1.1 riastrad UCHAR Reserved[222]; 6887 1.1 riastrad UCHAR OemData[256]; 6888 1.1 riastrad } VBE_INFO_BLOCK; 6889 1.1 riastrad 6890 1.1 riastrad typedef struct _VBE_FP_INFO 6891 1.1 riastrad { 6892 1.1 riastrad USHORT HSize; 6893 1.1 riastrad USHORT VSize; 6894 1.1 riastrad USHORT FPType; 6895 1.1 riastrad UCHAR RedBPP; 6896 1.1 riastrad UCHAR GreenBPP; 6897 1.1 riastrad UCHAR BlueBPP; 6898 1.1 riastrad UCHAR ReservedBPP; 6899 1.1 riastrad ULONG RsvdOffScrnMemSize; 6900 1.1 riastrad ULONG RsvdOffScrnMEmPtr; 6901 1.1 riastrad UCHAR Reserved[14]; 6902 1.1 riastrad } VBE_FP_INFO; 6903 1.1 riastrad 6904 1.1 riastrad typedef struct _VESA_MODE_INFO_BLOCK 6905 1.1 riastrad { 6906 1.1 riastrad // Mandatory information for all VBE revisions 6907 1.1 riastrad USHORT ModeAttributes; // dw ? ; mode attributes 6908 1.1 riastrad UCHAR WinAAttributes; // db ? ; window A attributes 6909 1.1 riastrad UCHAR WinBAttributes; // db ? ; window B attributes 6910 1.1 riastrad USHORT WinGranularity; // dw ? ; window granularity 6911 1.1 riastrad USHORT WinSize; // dw ? ; window size 6912 1.1 riastrad USHORT WinASegment; // dw ? ; window A start segment 6913 1.1 riastrad USHORT WinBSegment; // dw ? ; window B start segment 6914 1.1 riastrad ULONG WinFuncPtr; // dd ? ; real mode pointer to window function 6915 1.1 riastrad USHORT BytesPerScanLine;// dw ? ; bytes per scan line 6916 1.1 riastrad 6917 1.1 riastrad //; Mandatory information for VBE 1.2 and above 6918 1.1 riastrad USHORT XResolution; // dw ? ; horizontal resolution in pixels or characters 6919 1.1 riastrad USHORT YResolution; // dw ? ; vertical resolution in pixels or characters 6920 1.1 riastrad UCHAR XCharSize; // db ? ; character cell width in pixels 6921 1.1 riastrad UCHAR YCharSize; // db ? ; character cell height in pixels 6922 1.1 riastrad UCHAR NumberOfPlanes; // db ? ; number of memory planes 6923 1.1 riastrad UCHAR BitsPerPixel; // db ? ; bits per pixel 6924 1.1 riastrad UCHAR NumberOfBanks; // db ? ; number of banks 6925 1.1 riastrad UCHAR MemoryModel; // db ? ; memory model type 6926 1.1 riastrad UCHAR BankSize; // db ? ; bank size in KB 6927 1.1 riastrad UCHAR NumberOfImagePages;// db ? ; number of images 6928 1.1 riastrad UCHAR ReservedForPageFunction;//db 1 ; reserved for page function 6929 1.1 riastrad 6930 1.1 riastrad //; Direct Color fields(required for direct/6 and YUV/7 memory models) 6931 1.1 riastrad UCHAR RedMaskSize; // db ? ; size of direct color red mask in bits 6932 1.1 riastrad UCHAR RedFieldPosition; // db ? ; bit position of lsb of red mask 6933 1.1 riastrad UCHAR GreenMaskSize; // db ? ; size of direct color green mask in bits 6934 1.1 riastrad UCHAR GreenFieldPosition; // db ? ; bit position of lsb of green mask 6935 1.1 riastrad UCHAR BlueMaskSize; // db ? ; size of direct color blue mask in bits 6936 1.1 riastrad UCHAR BlueFieldPosition; // db ? ; bit position of lsb of blue mask 6937 1.1 riastrad UCHAR RsvdMaskSize; // db ? ; size of direct color reserved mask in bits 6938 1.1 riastrad UCHAR RsvdFieldPosition; // db ? ; bit position of lsb of reserved mask 6939 1.1 riastrad UCHAR DirectColorModeInfo;// db ? ; direct color mode attributes 6940 1.1 riastrad 6941 1.1 riastrad //; Mandatory information for VBE 2.0 and above 6942 1.1 riastrad ULONG PhysBasePtr; // dd ? ; physical address for flat memory frame buffer 6943 1.1 riastrad ULONG Reserved_1; // dd 0 ; reserved - always set to 0 6944 1.1 riastrad USHORT Reserved_2; // dw 0 ; reserved - always set to 0 6945 1.1 riastrad 6946 1.1 riastrad //; Mandatory information for VBE 3.0 and above 6947 1.1 riastrad USHORT LinBytesPerScanLine; // dw ? ; bytes per scan line for linear modes 6948 1.1 riastrad UCHAR BnkNumberOfImagePages;// db ? ; number of images for banked modes 6949 1.1 riastrad UCHAR LinNumberOfImagPages; // db ? ; number of images for linear modes 6950 1.1 riastrad UCHAR LinRedMaskSize; // db ? ; size of direct color red mask(linear modes) 6951 1.1 riastrad UCHAR LinRedFieldPosition; // db ? ; bit position of lsb of red mask(linear modes) 6952 1.1 riastrad UCHAR LinGreenMaskSize; // db ? ; size of direct color green mask(linear modes) 6953 1.1 riastrad UCHAR LinGreenFieldPosition;// db ? ; bit position of lsb of green mask(linear modes) 6954 1.1 riastrad UCHAR LinBlueMaskSize; // db ? ; size of direct color blue mask(linear modes) 6955 1.1 riastrad UCHAR LinBlueFieldPosition; // db ? ; bit position of lsb of blue mask(linear modes) 6956 1.1 riastrad UCHAR LinRsvdMaskSize; // db ? ; size of direct color reserved mask(linear modes) 6957 1.1 riastrad UCHAR LinRsvdFieldPosition; // db ? ; bit position of lsb of reserved mask(linear modes) 6958 1.1 riastrad ULONG MaxPixelClock; // dd ? ; maximum pixel clock(in Hz) for graphics mode 6959 1.1 riastrad UCHAR Reserved; // db 190 dup (0) 6960 1.1 riastrad } VESA_MODE_INFO_BLOCK; 6961 1.1 riastrad 6962 1.1 riastrad // BIOS function CALLS 6963 1.1 riastrad #define ATOM_BIOS_EXTENDED_FUNCTION_CODE 0xA0 // ATI Extended Function code 6964 1.1 riastrad #define ATOM_BIOS_FUNCTION_COP_MODE 0x00 6965 1.1 riastrad #define ATOM_BIOS_FUNCTION_SHORT_QUERY1 0x04 6966 1.1 riastrad #define ATOM_BIOS_FUNCTION_SHORT_QUERY2 0x05 6967 1.1 riastrad #define ATOM_BIOS_FUNCTION_SHORT_QUERY3 0x06 6968 1.1 riastrad #define ATOM_BIOS_FUNCTION_GET_DDC 0x0B 6969 1.1 riastrad #define ATOM_BIOS_FUNCTION_ASIC_DSTATE 0x0E 6970 1.1 riastrad #define ATOM_BIOS_FUNCTION_DEBUG_PLAY 0x0F 6971 1.1 riastrad #define ATOM_BIOS_FUNCTION_STV_STD 0x16 6972 1.1 riastrad #define ATOM_BIOS_FUNCTION_DEVICE_DET 0x17 6973 1.1 riastrad #define ATOM_BIOS_FUNCTION_DEVICE_SWITCH 0x18 6974 1.1 riastrad 6975 1.1 riastrad #define ATOM_BIOS_FUNCTION_PANEL_CONTROL 0x82 6976 1.1 riastrad #define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET 0x83 6977 1.1 riastrad #define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH 0x84 6978 1.1 riastrad #define ATOM_BIOS_FUNCTION_HW_ICON 0x8A 6979 1.1 riastrad #define ATOM_BIOS_FUNCTION_SET_CMOS 0x8B 6980 1.1 riastrad #define SUB_FUNCTION_UPDATE_DISPLAY_INFO 0x8000 // Sub function 80 6981 1.1 riastrad #define SUB_FUNCTION_UPDATE_EXPANSION_INFO 0x8100 // Sub function 80 6982 1.1 riastrad 6983 1.1 riastrad #define ATOM_BIOS_FUNCTION_DISPLAY_INFO 0x8D 6984 1.1 riastrad #define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF 0x8E 6985 1.1 riastrad #define ATOM_BIOS_FUNCTION_VIDEO_STATE 0x8F 6986 1.1 riastrad #define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE 0x0300 // Sub function 03 6987 1.1 riastrad #define ATOM_SUB_FUNCTION_GET_LIDSTATE 0x0700 // Sub function 7 6988 1.1 riastrad #define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE 0x1400 // Notify caller the current thermal state 6989 1.1 riastrad #define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300 // Notify caller the current critical state 6990 1.1 riastrad #define ATOM_SUB_FUNCTION_SET_LIDSTATE 0x8500 // Sub function 85 6991 1.1 riastrad #define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900// Sub function 89 6992 1.1 riastrad #define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT 0x9400 // Notify caller that ADC is supported 6993 1.1 riastrad 6994 1.1 riastrad 6995 1.1 riastrad #define ATOM_BIOS_FUNCTION_VESA_DPMS 0x4F10 // Set DPMS 6996 1.1 riastrad #define ATOM_SUB_FUNCTION_SET_DPMS 0x0001 // BL: Sub function 01 6997 1.1 riastrad #define ATOM_SUB_FUNCTION_GET_DPMS 0x0002 // BL: Sub function 02 6998 1.1 riastrad #define ATOM_PARAMETER_VESA_DPMS_ON 0x0000 // BH Parameter for DPMS ON. 6999 1.1 riastrad #define ATOM_PARAMETER_VESA_DPMS_STANDBY 0x0100 // BH Parameter for DPMS STANDBY 7000 1.1 riastrad #define ATOM_PARAMETER_VESA_DPMS_SUSPEND 0x0200 // BH Parameter for DPMS SUSPEND 7001 1.1 riastrad #define ATOM_PARAMETER_VESA_DPMS_OFF 0x0400 // BH Parameter for DPMS OFF 7002 1.1 riastrad #define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON 0x0800 // BH Parameter for DPMS REDUCE ON (NOT SUPPORTED) 7003 1.1 riastrad 7004 1.1 riastrad #define ATOM_BIOS_RETURN_CODE_MASK 0x0000FF00L 7005 1.1 riastrad #define ATOM_BIOS_REG_HIGH_MASK 0x0000FF00L 7006 1.1 riastrad #define ATOM_BIOS_REG_LOW_MASK 0x000000FFL 7007 1.1 riastrad 7008 1.1 riastrad // structure used for VBIOS only 7009 1.1 riastrad 7010 1.1 riastrad //DispOutInfoTable 7011 1.1 riastrad typedef struct _ASIC_TRANSMITTER_INFO 7012 1.1 riastrad { 7013 1.1 riastrad USHORT usTransmitterObjId; 7014 1.1 riastrad USHORT usSupportDevice; 7015 1.1 riastrad UCHAR ucTransmitterCmdTblId; 7016 1.1 riastrad UCHAR ucConfig; 7017 1.1 riastrad UCHAR ucEncoderID; //available 1st encoder ( default ) 7018 1.1 riastrad UCHAR ucOptionEncoderID; //available 2nd encoder ( optional ) 7019 1.1 riastrad UCHAR uc2ndEncoderID; 7020 1.1 riastrad UCHAR ucReserved; 7021 1.1 riastrad }ASIC_TRANSMITTER_INFO; 7022 1.1 riastrad 7023 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__DVO_SDR_MODE 0x01 7024 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__COHERENT_MODE 0x02 7025 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODEROBJ_ID_MASK 0xc4 7026 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_A 0x00 7027 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_B 0x04 7028 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_C 0x40 7029 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_D 0x44 7030 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_E 0x80 7031 1.1 riastrad #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_F 0x84 7032 1.1 riastrad 7033 1.1 riastrad typedef struct _ASIC_ENCODER_INFO 7034 1.1 riastrad { 7035 1.1 riastrad UCHAR ucEncoderID; 7036 1.1 riastrad UCHAR ucEncoderConfig; 7037 1.1 riastrad USHORT usEncoderCmdTblId; 7038 1.1 riastrad }ASIC_ENCODER_INFO; 7039 1.1 riastrad 7040 1.1 riastrad typedef struct _ATOM_DISP_OUT_INFO 7041 1.1 riastrad { 7042 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7043 1.1 riastrad USHORT ptrTransmitterInfo; 7044 1.1 riastrad USHORT ptrEncoderInfo; 7045 1.1 riastrad ASIC_TRANSMITTER_INFO asTransmitterInfo[1]; 7046 1.1 riastrad ASIC_ENCODER_INFO asEncoderInfo[1]; 7047 1.1 riastrad }ATOM_DISP_OUT_INFO; 7048 1.1 riastrad 7049 1.1 riastrad typedef struct _ATOM_DISP_OUT_INFO_V2 7050 1.1 riastrad { 7051 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7052 1.1 riastrad USHORT ptrTransmitterInfo; 7053 1.1 riastrad USHORT ptrEncoderInfo; 7054 1.1 riastrad USHORT ptrMainCallParserFar; // direct address of main parser call in VBIOS binary. 7055 1.1 riastrad ASIC_TRANSMITTER_INFO asTransmitterInfo[1]; 7056 1.1 riastrad ASIC_ENCODER_INFO asEncoderInfo[1]; 7057 1.1 riastrad }ATOM_DISP_OUT_INFO_V2; 7058 1.1 riastrad 7059 1.1 riastrad 7060 1.1 riastrad typedef struct _ATOM_DISP_CLOCK_ID { 7061 1.1 riastrad UCHAR ucPpllId; 7062 1.1 riastrad UCHAR ucPpllAttribute; 7063 1.1 riastrad }ATOM_DISP_CLOCK_ID; 7064 1.1 riastrad 7065 1.1 riastrad // ucPpllAttribute 7066 1.1 riastrad #define CLOCK_SOURCE_SHAREABLE 0x01 7067 1.1 riastrad #define CLOCK_SOURCE_DP_MODE 0x02 7068 1.1 riastrad #define CLOCK_SOURCE_NONE_DP_MODE 0x04 7069 1.1 riastrad 7070 1.1 riastrad //DispOutInfoTable 7071 1.1 riastrad typedef struct _ASIC_TRANSMITTER_INFO_V2 7072 1.1 riastrad { 7073 1.1 riastrad USHORT usTransmitterObjId; 7074 1.1 riastrad USHORT usDispClkIdOffset; // point to clock source id list supported by Encoder Object 7075 1.1 riastrad UCHAR ucTransmitterCmdTblId; 7076 1.1 riastrad UCHAR ucConfig; 7077 1.1 riastrad UCHAR ucEncoderID; // available 1st encoder ( default ) 7078 1.1 riastrad UCHAR ucOptionEncoderID; // available 2nd encoder ( optional ) 7079 1.1 riastrad UCHAR uc2ndEncoderID; 7080 1.1 riastrad UCHAR ucReserved; 7081 1.1 riastrad }ASIC_TRANSMITTER_INFO_V2; 7082 1.1 riastrad 7083 1.1 riastrad typedef struct _ATOM_DISP_OUT_INFO_V3 7084 1.1 riastrad { 7085 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7086 1.1 riastrad USHORT ptrTransmitterInfo; 7087 1.1 riastrad USHORT ptrEncoderInfo; 7088 1.1 riastrad USHORT ptrMainCallParserFar; // direct address of main parser call in VBIOS binary. 7089 1.1 riastrad USHORT usReserved; 7090 1.1 riastrad UCHAR ucDCERevision; 7091 1.1 riastrad UCHAR ucMaxDispEngineNum; 7092 1.1 riastrad UCHAR ucMaxActiveDispEngineNum; 7093 1.1 riastrad UCHAR ucMaxPPLLNum; 7094 1.1 riastrad UCHAR ucCoreRefClkSource; // value of CORE_REF_CLK_SOURCE 7095 1.1 riastrad UCHAR ucDispCaps; 7096 1.1 riastrad UCHAR ucReserved[2]; 7097 1.1 riastrad ASIC_TRANSMITTER_INFO_V2 asTransmitterInfo[1]; // for alligment only 7098 1.1 riastrad }ATOM_DISP_OUT_INFO_V3; 7099 1.1 riastrad 7100 1.1 riastrad //ucDispCaps 7101 1.1 riastrad #define DISPLAY_CAPS__DP_PCLK_FROM_PPLL 0x01 7102 1.1 riastrad #define DISPLAY_CAPS__FORCE_DISPDEV_CONNECTED 0x02 7103 1.1 riastrad 7104 1.1 riastrad typedef enum CORE_REF_CLK_SOURCE{ 7105 1.1 riastrad CLOCK_SRC_XTALIN=0, 7106 1.1 riastrad CLOCK_SRC_XO_IN=1, 7107 1.1 riastrad CLOCK_SRC_XO_IN2=2, 7108 1.1 riastrad }CORE_REF_CLK_SOURCE; 7109 1.1 riastrad 7110 1.1 riastrad // DispDevicePriorityInfo 7111 1.1 riastrad typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO 7112 1.1 riastrad { 7113 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7114 1.1 riastrad USHORT asDevicePriority[16]; 7115 1.1 riastrad }ATOM_DISPLAY_DEVICE_PRIORITY_INFO; 7116 1.1 riastrad 7117 1.1 riastrad //ProcessAuxChannelTransactionTable 7118 1.1 riastrad typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS 7119 1.1 riastrad { 7120 1.1 riastrad USHORT lpAuxRequest; 7121 1.1 riastrad USHORT lpDataOut; 7122 1.1 riastrad UCHAR ucChannelID; 7123 1.1 riastrad union 7124 1.1 riastrad { 7125 1.1 riastrad UCHAR ucReplyStatus; 7126 1.1 riastrad UCHAR ucDelay; 7127 1.1 riastrad }; 7128 1.1 riastrad UCHAR ucDataOutLen; 7129 1.1 riastrad UCHAR ucReserved; 7130 1.1 riastrad }PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS; 7131 1.1 riastrad 7132 1.1 riastrad //ProcessAuxChannelTransactionTable 7133 1.1 riastrad typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 7134 1.1 riastrad { 7135 1.1 riastrad USHORT lpAuxRequest; 7136 1.1 riastrad USHORT lpDataOut; 7137 1.1 riastrad UCHAR ucChannelID; 7138 1.1 riastrad union 7139 1.1 riastrad { 7140 1.1 riastrad UCHAR ucReplyStatus; 7141 1.1 riastrad UCHAR ucDelay; 7142 1.1 riastrad }; 7143 1.1 riastrad UCHAR ucDataOutLen; 7144 1.1 riastrad UCHAR ucHPD_ID; //=0: HPD1, =1: HPD2, =2: HPD3, =3: HPD4, =4: HPD5, =5: HPD6 7145 1.1 riastrad }PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2; 7146 1.1 riastrad 7147 1.1 riastrad #define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS 7148 1.1 riastrad 7149 1.1 riastrad //GetSinkType 7150 1.1 riastrad 7151 1.1 riastrad typedef struct _DP_ENCODER_SERVICE_PARAMETERS 7152 1.1 riastrad { 7153 1.1 riastrad USHORT ucLinkClock; 7154 1.1 riastrad union 7155 1.1 riastrad { 7156 1.1 riastrad UCHAR ucConfig; // for DP training command 7157 1.1 riastrad UCHAR ucI2cId; // use for GET_SINK_TYPE command 7158 1.1 riastrad }; 7159 1.1 riastrad UCHAR ucAction; 7160 1.1 riastrad UCHAR ucStatus; 7161 1.1 riastrad UCHAR ucLaneNum; 7162 1.1 riastrad UCHAR ucReserved[2]; 7163 1.1 riastrad }DP_ENCODER_SERVICE_PARAMETERS; 7164 1.1 riastrad 7165 1.1 riastrad // ucAction 7166 1.1 riastrad #define ATOM_DP_ACTION_GET_SINK_TYPE 0x01 7167 1.1 riastrad /* obselete */ 7168 1.1 riastrad #define ATOM_DP_ACTION_TRAINING_START 0x02 7169 1.1 riastrad #define ATOM_DP_ACTION_TRAINING_COMPLETE 0x03 7170 1.1 riastrad #define ATOM_DP_ACTION_TRAINING_PATTERN_SEL 0x04 7171 1.1 riastrad #define ATOM_DP_ACTION_SET_VSWING_PREEMP 0x05 7172 1.1 riastrad #define ATOM_DP_ACTION_GET_VSWING_PREEMP 0x06 7173 1.1 riastrad #define ATOM_DP_ACTION_BLANKING 0x07 7174 1.1 riastrad 7175 1.1 riastrad // ucConfig 7176 1.1 riastrad #define ATOM_DP_CONFIG_ENCODER_SEL_MASK 0x03 7177 1.1 riastrad #define ATOM_DP_CONFIG_DIG1_ENCODER 0x00 7178 1.1 riastrad #define ATOM_DP_CONFIG_DIG2_ENCODER 0x01 7179 1.1 riastrad #define ATOM_DP_CONFIG_EXTERNAL_ENCODER 0x02 7180 1.1 riastrad #define ATOM_DP_CONFIG_LINK_SEL_MASK 0x04 7181 1.1 riastrad #define ATOM_DP_CONFIG_LINK_A 0x00 7182 1.1 riastrad #define ATOM_DP_CONFIG_LINK_B 0x04 7183 1.1 riastrad /* /obselete */ 7184 1.1 riastrad #define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS 7185 1.1 riastrad 7186 1.1 riastrad 7187 1.1 riastrad typedef struct _DP_ENCODER_SERVICE_PARAMETERS_V2 7188 1.1 riastrad { 7189 1.1 riastrad USHORT usExtEncoderObjId; // External Encoder Object Id, output parameter only, use when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION 7190 1.1 riastrad UCHAR ucAuxId; 7191 1.1 riastrad UCHAR ucAction; 7192 1.1 riastrad UCHAR ucSinkType; // Iput and Output parameters. 7193 1.1 riastrad UCHAR ucHPDId; // Input parameter, used when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION 7194 1.1 riastrad UCHAR ucReserved[2]; 7195 1.1 riastrad }DP_ENCODER_SERVICE_PARAMETERS_V2; 7196 1.1 riastrad 7197 1.1 riastrad typedef struct _DP_ENCODER_SERVICE_PS_ALLOCATION_V2 7198 1.1 riastrad { 7199 1.1 riastrad DP_ENCODER_SERVICE_PARAMETERS_V2 asDPServiceParam; 7200 1.1 riastrad PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 asAuxParam; 7201 1.1 riastrad }DP_ENCODER_SERVICE_PS_ALLOCATION_V2; 7202 1.1 riastrad 7203 1.1 riastrad // ucAction 7204 1.1 riastrad #define DP_SERVICE_V2_ACTION_GET_SINK_TYPE 0x01 7205 1.1 riastrad #define DP_SERVICE_V2_ACTION_DET_LCD_CONNECTION 0x02 7206 1.1 riastrad 7207 1.1 riastrad 7208 1.1 riastrad // DP_TRAINING_TABLE 7209 1.1 riastrad #define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR 7210 1.1 riastrad #define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 ) 7211 1.1 riastrad #define DPCD_SET_LANE_VSWING_PREEMP_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 16 ) 7212 1.1 riastrad #define DPCD_SET_TRAINING_PATTERN0_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 24 ) 7213 1.1 riastrad #define DPCD_SET_TRAINING_PATTERN2_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 32) 7214 1.1 riastrad #define DPCD_GET_LINKRATE_LANENUM_SS_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 40) 7215 1.1 riastrad #define DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 48) 7216 1.1 riastrad #define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 60) 7217 1.1 riastrad #define DP_I2C_AUX_DDC_WRITE_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 64) 7218 1.1 riastrad #define DP_I2C_AUX_DDC_READ_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 72) 7219 1.1 riastrad #define DP_I2C_AUX_DDC_READ_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 76) 7220 1.1 riastrad #define DP_I2C_AUX_DDC_WRITE_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 80) 7221 1.1 riastrad #define DP_I2C_AUX_DDC_READ_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 84) 7222 1.1 riastrad 7223 1.1 riastrad typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS 7224 1.1 riastrad { 7225 1.1 riastrad UCHAR ucI2CSpeed; 7226 1.1 riastrad union 7227 1.1 riastrad { 7228 1.1 riastrad UCHAR ucRegIndex; 7229 1.1 riastrad UCHAR ucStatus; 7230 1.1 riastrad }; 7231 1.1 riastrad USHORT lpI2CDataOut; 7232 1.1 riastrad UCHAR ucFlag; 7233 1.1 riastrad UCHAR ucTransBytes; 7234 1.1 riastrad UCHAR ucSlaveAddr; 7235 1.1 riastrad UCHAR ucLineNumber; 7236 1.1 riastrad }PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS; 7237 1.1 riastrad 7238 1.1 riastrad #define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS 7239 1.1 riastrad 7240 1.1 riastrad //ucFlag 7241 1.1 riastrad #define HW_I2C_WRITE 1 7242 1.1 riastrad #define HW_I2C_READ 0 7243 1.1 riastrad #define I2C_2BYTE_ADDR 0x02 7244 1.1 riastrad 7245 1.1 riastrad /****************************************************************************/ 7246 1.1 riastrad // Structures used by HW_Misc_OperationTable 7247 1.1 riastrad /****************************************************************************/ 7248 1.1 riastrad typedef struct _ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 7249 1.1 riastrad { 7250 1.1 riastrad UCHAR ucCmd; // Input: To tell which action to take 7251 1.1 riastrad UCHAR ucReserved[3]; 7252 1.1 riastrad ULONG ulReserved; 7253 1.1 riastrad }ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1; 7254 1.1 riastrad 7255 1.1 riastrad typedef struct _ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1 7256 1.1 riastrad { 7257 1.1 riastrad UCHAR ucReturnCode; // Output: Return value base on action was taken 7258 1.1 riastrad UCHAR ucReserved[3]; 7259 1.1 riastrad ULONG ulReserved; 7260 1.1 riastrad }ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1; 7261 1.1 riastrad 7262 1.1 riastrad // Actions code 7263 1.1 riastrad #define ATOM_GET_SDI_SUPPORT 0xF0 7264 1.1 riastrad 7265 1.1 riastrad // Return code 7266 1.1 riastrad #define ATOM_UNKNOWN_CMD 0 7267 1.1 riastrad #define ATOM_FEATURE_NOT_SUPPORTED 1 7268 1.1 riastrad #define ATOM_FEATURE_SUPPORTED 2 7269 1.1 riastrad 7270 1.1 riastrad typedef struct _ATOM_HW_MISC_OPERATION_PS_ALLOCATION 7271 1.1 riastrad { 7272 1.1 riastrad ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 sInput_Output; 7273 1.1 riastrad PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS sReserved; 7274 1.1 riastrad }ATOM_HW_MISC_OPERATION_PS_ALLOCATION; 7275 1.1 riastrad 7276 1.1 riastrad /****************************************************************************/ 7277 1.1 riastrad 7278 1.1 riastrad typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2 7279 1.1 riastrad { 7280 1.1 riastrad UCHAR ucHWBlkInst; // HW block instance, 0, 1, 2, ... 7281 1.1 riastrad UCHAR ucReserved[3]; 7282 1.1 riastrad }SET_HWBLOCK_INSTANCE_PARAMETER_V2; 7283 1.1 riastrad 7284 1.1 riastrad #define HWBLKINST_INSTANCE_MASK 0x07 7285 1.1 riastrad #define HWBLKINST_HWBLK_MASK 0xF0 7286 1.1 riastrad #define HWBLKINST_HWBLK_SHIFT 0x04 7287 1.1 riastrad 7288 1.1 riastrad //ucHWBlock 7289 1.1 riastrad #define SELECT_DISP_ENGINE 0 7290 1.1 riastrad #define SELECT_DISP_PLL 1 7291 1.1 riastrad #define SELECT_DCIO_UNIPHY_LINK0 2 7292 1.1 riastrad #define SELECT_DCIO_UNIPHY_LINK1 3 7293 1.1 riastrad #define SELECT_DCIO_IMPCAL 4 7294 1.1 riastrad #define SELECT_DCIO_DIG 6 7295 1.1 riastrad #define SELECT_CRTC_PIXEL_RATE 7 7296 1.1 riastrad #define SELECT_VGA_BLK 8 7297 1.1 riastrad 7298 1.1 riastrad // DIGTransmitterInfoTable structure used to program UNIPHY settings 7299 1.1 riastrad typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_1{ 7300 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7301 1.1 riastrad USHORT usDPVsPreEmphSettingOffset; // offset of PHY_ANALOG_SETTING_INFO * with DP Voltage Swing and Pre-Emphasis for each Link clock 7302 1.1 riastrad USHORT usPhyAnalogRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with None-DP mode Analog Setting's register Info 7303 1.1 riastrad USHORT usPhyAnalogSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with None-DP mode Analog Setting for each link clock range 7304 1.1 riastrad USHORT usPhyPllRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy Pll register Info 7305 1.1 riastrad USHORT usPhyPllSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy Pll Settings 7306 1.1 riastrad }DIG_TRANSMITTER_INFO_HEADER_V3_1; 7307 1.1 riastrad 7308 1.1 riastrad typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_2{ 7309 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7310 1.1 riastrad USHORT usDPVsPreEmphSettingOffset; // offset of PHY_ANALOG_SETTING_INFO * with DP Voltage Swing and Pre-Emphasis for each Link clock 7311 1.1 riastrad USHORT usPhyAnalogRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with None-DP mode Analog Setting's register Info 7312 1.1 riastrad USHORT usPhyAnalogSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with None-DP mode Analog Setting for each link clock range 7313 1.1 riastrad USHORT usPhyPllRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy Pll register Info 7314 1.1 riastrad USHORT usPhyPllSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy Pll Settings 7315 1.1 riastrad USHORT usDPSSRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy SS Pll register Info 7316 1.1 riastrad USHORT usDPSSSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy SS Pll Settings 7317 1.1 riastrad }DIG_TRANSMITTER_INFO_HEADER_V3_2; 7318 1.1 riastrad 7319 1.1 riastrad typedef struct _CLOCK_CONDITION_REGESTER_INFO{ 7320 1.1 riastrad USHORT usRegisterIndex; 7321 1.1 riastrad UCHAR ucStartBit; 7322 1.1 riastrad UCHAR ucEndBit; 7323 1.1 riastrad }CLOCK_CONDITION_REGESTER_INFO; 7324 1.1 riastrad 7325 1.1 riastrad typedef struct _CLOCK_CONDITION_SETTING_ENTRY{ 7326 1.1 riastrad USHORT usMaxClockFreq; 7327 1.1 riastrad UCHAR ucEncodeMode; 7328 1.1 riastrad UCHAR ucPhySel; 7329 1.1 riastrad ULONG ulAnalogSetting[1]; 7330 1.1 riastrad }CLOCK_CONDITION_SETTING_ENTRY; 7331 1.1 riastrad 7332 1.1 riastrad typedef struct _CLOCK_CONDITION_SETTING_INFO{ 7333 1.1 riastrad USHORT usEntrySize; 7334 1.1 riastrad CLOCK_CONDITION_SETTING_ENTRY asClkCondSettingEntry[1]; 7335 1.1 riastrad }CLOCK_CONDITION_SETTING_INFO; 7336 1.1 riastrad 7337 1.1 riastrad typedef struct _PHY_CONDITION_REG_VAL{ 7338 1.1 riastrad ULONG ulCondition; 7339 1.1 riastrad ULONG ulRegVal; 7340 1.1 riastrad }PHY_CONDITION_REG_VAL; 7341 1.1 riastrad 7342 1.1 riastrad typedef struct _PHY_CONDITION_REG_VAL_V2{ 7343 1.1 riastrad ULONG ulCondition; 7344 1.1 riastrad UCHAR ucCondition2; 7345 1.1 riastrad ULONG ulRegVal; 7346 1.1 riastrad }PHY_CONDITION_REG_VAL_V2; 7347 1.1 riastrad 7348 1.1 riastrad typedef struct _PHY_CONDITION_REG_INFO{ 7349 1.1 riastrad USHORT usRegIndex; 7350 1.1 riastrad USHORT usSize; 7351 1.1 riastrad PHY_CONDITION_REG_VAL asRegVal[1]; 7352 1.1 riastrad }PHY_CONDITION_REG_INFO; 7353 1.1 riastrad 7354 1.1 riastrad typedef struct _PHY_CONDITION_REG_INFO_V2{ 7355 1.1 riastrad USHORT usRegIndex; 7356 1.1 riastrad USHORT usSize; 7357 1.1 riastrad PHY_CONDITION_REG_VAL_V2 asRegVal[1]; 7358 1.1 riastrad }PHY_CONDITION_REG_INFO_V2; 7359 1.1 riastrad 7360 1.1 riastrad typedef struct _PHY_ANALOG_SETTING_INFO{ 7361 1.1 riastrad UCHAR ucEncodeMode; 7362 1.1 riastrad UCHAR ucPhySel; 7363 1.1 riastrad USHORT usSize; 7364 1.1 riastrad PHY_CONDITION_REG_INFO asAnalogSetting[1]; 7365 1.1 riastrad }PHY_ANALOG_SETTING_INFO; 7366 1.1 riastrad 7367 1.1 riastrad typedef struct _PHY_ANALOG_SETTING_INFO_V2{ 7368 1.1 riastrad UCHAR ucEncodeMode; 7369 1.1 riastrad UCHAR ucPhySel; 7370 1.1 riastrad USHORT usSize; 7371 1.1 riastrad PHY_CONDITION_REG_INFO_V2 asAnalogSetting[1]; 7372 1.1 riastrad }PHY_ANALOG_SETTING_INFO_V2; 7373 1.1 riastrad 7374 1.1 riastrad typedef struct _GFX_HAVESTING_PARAMETERS { 7375 1.1 riastrad UCHAR ucGfxBlkId; //GFX blk id to be harvested, like CU, RB or PRIM 7376 1.1 riastrad UCHAR ucReserved; //reserved 7377 1.1 riastrad UCHAR ucActiveUnitNumPerSH; //requested active CU/RB/PRIM number per shader array 7378 1.1 riastrad UCHAR ucMaxUnitNumPerSH; //max CU/RB/PRIM number per shader array 7379 1.1 riastrad } GFX_HAVESTING_PARAMETERS; 7380 1.1 riastrad 7381 1.1 riastrad //ucGfxBlkId 7382 1.1 riastrad #define GFX_HARVESTING_CU_ID 0 7383 1.1 riastrad #define GFX_HARVESTING_RB_ID 1 7384 1.1 riastrad #define GFX_HARVESTING_PRIM_ID 2 7385 1.1 riastrad 7386 1.1 riastrad /****************************************************************************/ 7387 1.1 riastrad //Portion VI: Definitinos for vbios MC scratch registers that driver used 7388 1.1 riastrad /****************************************************************************/ 7389 1.1 riastrad 7390 1.1 riastrad #define MC_MISC0__MEMORY_TYPE_MASK 0xF0000000 7391 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__GDDR1 0x10000000 7392 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__DDR2 0x20000000 7393 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__GDDR3 0x30000000 7394 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__GDDR4 0x40000000 7395 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__GDDR5 0x50000000 7396 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__HBM 0x60000000 7397 1.1 riastrad #define MC_MISC0__MEMORY_TYPE__DDR3 0xB0000000 7398 1.1 riastrad 7399 1.1 riastrad #define ATOM_MEM_TYPE_DDR_STRING "DDR" 7400 1.1 riastrad #define ATOM_MEM_TYPE_DDR2_STRING "DDR2" 7401 1.1 riastrad #define ATOM_MEM_TYPE_GDDR3_STRING "GDDR3" 7402 1.1 riastrad #define ATOM_MEM_TYPE_GDDR4_STRING "GDDR4" 7403 1.1 riastrad #define ATOM_MEM_TYPE_GDDR5_STRING "GDDR5" 7404 1.1 riastrad #define ATOM_MEM_TYPE_HBM_STRING "HBM" 7405 1.1 riastrad #define ATOM_MEM_TYPE_DDR3_STRING "DDR3" 7406 1.1 riastrad 7407 1.1 riastrad /****************************************************************************/ 7408 1.1 riastrad //Portion VI: Definitinos being oboselete 7409 1.1 riastrad /****************************************************************************/ 7410 1.1 riastrad 7411 1.1 riastrad //========================================================================================== 7412 1.1 riastrad //Remove the definitions below when driver is ready! 7413 1.1 riastrad typedef struct _ATOM_DAC_INFO 7414 1.1 riastrad { 7415 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7416 1.1 riastrad USHORT usMaxFrequency; // in 10kHz unit 7417 1.1 riastrad USHORT usReserved; 7418 1.1 riastrad }ATOM_DAC_INFO; 7419 1.1 riastrad 7420 1.1 riastrad 7421 1.1 riastrad typedef struct _COMPASSIONATE_DATA 7422 1.1 riastrad { 7423 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7424 1.1 riastrad 7425 1.1 riastrad //============================== DAC1 portion 7426 1.1 riastrad UCHAR ucDAC1_BG_Adjustment; 7427 1.1 riastrad UCHAR ucDAC1_DAC_Adjustment; 7428 1.1 riastrad USHORT usDAC1_FORCE_Data; 7429 1.1 riastrad //============================== DAC2 portion 7430 1.1 riastrad UCHAR ucDAC2_CRT2_BG_Adjustment; 7431 1.1 riastrad UCHAR ucDAC2_CRT2_DAC_Adjustment; 7432 1.1 riastrad USHORT usDAC2_CRT2_FORCE_Data; 7433 1.1 riastrad USHORT usDAC2_CRT2_MUX_RegisterIndex; 7434 1.1 riastrad UCHAR ucDAC2_CRT2_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low 7435 1.1 riastrad UCHAR ucDAC2_NTSC_BG_Adjustment; 7436 1.1 riastrad UCHAR ucDAC2_NTSC_DAC_Adjustment; 7437 1.1 riastrad USHORT usDAC2_TV1_FORCE_Data; 7438 1.1 riastrad USHORT usDAC2_TV1_MUX_RegisterIndex; 7439 1.1 riastrad UCHAR ucDAC2_TV1_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low 7440 1.1 riastrad UCHAR ucDAC2_CV_BG_Adjustment; 7441 1.1 riastrad UCHAR ucDAC2_CV_DAC_Adjustment; 7442 1.1 riastrad USHORT usDAC2_CV_FORCE_Data; 7443 1.1 riastrad USHORT usDAC2_CV_MUX_RegisterIndex; 7444 1.1 riastrad UCHAR ucDAC2_CV_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low 7445 1.1 riastrad UCHAR ucDAC2_PAL_BG_Adjustment; 7446 1.1 riastrad UCHAR ucDAC2_PAL_DAC_Adjustment; 7447 1.1 riastrad USHORT usDAC2_TV2_FORCE_Data; 7448 1.1 riastrad }COMPASSIONATE_DATA; 7449 1.1 riastrad 7450 1.1 riastrad /****************************Supported Device Info Table Definitions**********************/ 7451 1.1 riastrad // ucConnectInfo: 7452 1.1 riastrad // [7:4] - connector type 7453 1.1 riastrad // = 1 - VGA connector 7454 1.1 riastrad // = 2 - DVI-I 7455 1.1 riastrad // = 3 - DVI-D 7456 1.1 riastrad // = 4 - DVI-A 7457 1.1 riastrad // = 5 - SVIDEO 7458 1.1 riastrad // = 6 - COMPOSITE 7459 1.1 riastrad // = 7 - LVDS 7460 1.1 riastrad // = 8 - DIGITAL LINK 7461 1.1 riastrad // = 9 - SCART 7462 1.1 riastrad // = 0xA - HDMI_type A 7463 1.1 riastrad // = 0xB - HDMI_type B 7464 1.1 riastrad // = 0xE - Special case1 (DVI+DIN) 7465 1.1 riastrad // Others=TBD 7466 1.1 riastrad // [3:0] - DAC Associated 7467 1.1 riastrad // = 0 - no DAC 7468 1.1 riastrad // = 1 - DACA 7469 1.1 riastrad // = 2 - DACB 7470 1.1 riastrad // = 3 - External DAC 7471 1.1 riastrad // Others=TBD 7472 1.1 riastrad // 7473 1.1 riastrad 7474 1.1 riastrad typedef struct _ATOM_CONNECTOR_INFO 7475 1.1 riastrad { 7476 1.1 riastrad #if ATOM_BIG_ENDIAN 7477 1.1 riastrad UCHAR bfConnectorType:4; 7478 1.1 riastrad UCHAR bfAssociatedDAC:4; 7479 1.1 riastrad #else 7480 1.1 riastrad UCHAR bfAssociatedDAC:4; 7481 1.1 riastrad UCHAR bfConnectorType:4; 7482 1.1 riastrad #endif 7483 1.1 riastrad }ATOM_CONNECTOR_INFO; 7484 1.1 riastrad 7485 1.1 riastrad typedef union _ATOM_CONNECTOR_INFO_ACCESS 7486 1.1 riastrad { 7487 1.1 riastrad ATOM_CONNECTOR_INFO sbfAccess; 7488 1.1 riastrad UCHAR ucAccess; 7489 1.1 riastrad }ATOM_CONNECTOR_INFO_ACCESS; 7490 1.1 riastrad 7491 1.1 riastrad typedef struct _ATOM_CONNECTOR_INFO_I2C 7492 1.1 riastrad { 7493 1.1 riastrad ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo; 7494 1.1 riastrad ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; 7495 1.1 riastrad }ATOM_CONNECTOR_INFO_I2C; 7496 1.1 riastrad 7497 1.1 riastrad 7498 1.1 riastrad typedef struct _ATOM_SUPPORTED_DEVICES_INFO 7499 1.1 riastrad { 7500 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7501 1.1 riastrad USHORT usDeviceSupport; 7502 1.1 riastrad ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO]; 7503 1.1 riastrad }ATOM_SUPPORTED_DEVICES_INFO; 7504 1.1 riastrad 7505 1.1 riastrad #define NO_INT_SRC_MAPPED 0xFF 7506 1.1 riastrad 7507 1.1 riastrad typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP 7508 1.1 riastrad { 7509 1.1 riastrad UCHAR ucIntSrcBitmap; 7510 1.1 riastrad }ATOM_CONNECTOR_INC_SRC_BITMAP; 7511 1.1 riastrad 7512 1.1 riastrad typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2 7513 1.1 riastrad { 7514 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7515 1.1 riastrad USHORT usDeviceSupport; 7516 1.1 riastrad ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2]; 7517 1.1 riastrad ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2]; 7518 1.1 riastrad }ATOM_SUPPORTED_DEVICES_INFO_2; 7519 1.1 riastrad 7520 1.1 riastrad typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1 7521 1.1 riastrad { 7522 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7523 1.1 riastrad USHORT usDeviceSupport; 7524 1.1 riastrad ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE]; 7525 1.1 riastrad ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE]; 7526 1.1 riastrad }ATOM_SUPPORTED_DEVICES_INFO_2d1; 7527 1.1 riastrad 7528 1.1 riastrad #define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1 7529 1.1 riastrad 7530 1.1 riastrad 7531 1.1 riastrad 7532 1.1 riastrad typedef struct _ATOM_MISC_CONTROL_INFO 7533 1.1 riastrad { 7534 1.1 riastrad USHORT usFrequency; 7535 1.1 riastrad UCHAR ucPLL_ChargePump; // PLL charge-pump gain control 7536 1.1 riastrad UCHAR ucPLL_DutyCycle; // PLL duty cycle control 7537 1.1 riastrad UCHAR ucPLL_VCO_Gain; // PLL VCO gain control 7538 1.1 riastrad UCHAR ucPLL_VoltageSwing; // PLL driver voltage swing control 7539 1.1 riastrad }ATOM_MISC_CONTROL_INFO; 7540 1.1 riastrad 7541 1.1 riastrad 7542 1.1 riastrad #define ATOM_MAX_MISC_INFO 4 7543 1.1 riastrad 7544 1.1 riastrad typedef struct _ATOM_TMDS_INFO 7545 1.1 riastrad { 7546 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7547 1.1 riastrad USHORT usMaxFrequency; // in 10Khz 7548 1.1 riastrad ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO]; 7549 1.1 riastrad }ATOM_TMDS_INFO; 7550 1.1 riastrad 7551 1.1 riastrad 7552 1.1 riastrad typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE 7553 1.1 riastrad { 7554 1.1 riastrad UCHAR ucTVStandard; //Same as TV standards defined above, 7555 1.1 riastrad UCHAR ucPadding[1]; 7556 1.1 riastrad }ATOM_ENCODER_ANALOG_ATTRIBUTE; 7557 1.1 riastrad 7558 1.1 riastrad typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE 7559 1.1 riastrad { 7560 1.1 riastrad UCHAR ucAttribute; //Same as other digital encoder attributes defined above 7561 1.1 riastrad UCHAR ucPadding[1]; 7562 1.1 riastrad }ATOM_ENCODER_DIGITAL_ATTRIBUTE; 7563 1.1 riastrad 7564 1.1 riastrad typedef union _ATOM_ENCODER_ATTRIBUTE 7565 1.1 riastrad { 7566 1.1 riastrad ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib; 7567 1.1 riastrad ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib; 7568 1.1 riastrad }ATOM_ENCODER_ATTRIBUTE; 7569 1.1 riastrad 7570 1.1 riastrad 7571 1.1 riastrad typedef struct _DVO_ENCODER_CONTROL_PARAMETERS 7572 1.1 riastrad { 7573 1.1 riastrad USHORT usPixelClock; 7574 1.1 riastrad USHORT usEncoderID; 7575 1.1 riastrad UCHAR ucDeviceType; //Use ATOM_DEVICE_xxx1_Index to indicate device type only. 7576 1.1 riastrad UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT 7577 1.1 riastrad ATOM_ENCODER_ATTRIBUTE usDevAttr; 7578 1.1 riastrad }DVO_ENCODER_CONTROL_PARAMETERS; 7579 1.1 riastrad 7580 1.1 riastrad typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION 7581 1.1 riastrad { 7582 1.1 riastrad DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder; 7583 1.1 riastrad WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion 7584 1.1 riastrad }DVO_ENCODER_CONTROL_PS_ALLOCATION; 7585 1.1 riastrad 7586 1.1 riastrad 7587 1.1 riastrad #define ATOM_XTMDS_ASIC_SI164_ID 1 7588 1.1 riastrad #define ATOM_XTMDS_ASIC_SI178_ID 2 7589 1.1 riastrad #define ATOM_XTMDS_ASIC_TFP513_ID 3 7590 1.1 riastrad #define ATOM_XTMDS_SUPPORTED_SINGLELINK 0x00000001 7591 1.1 riastrad #define ATOM_XTMDS_SUPPORTED_DUALLINK 0x00000002 7592 1.1 riastrad #define ATOM_XTMDS_MVPU_FPGA 0x00000004 7593 1.1 riastrad 7594 1.1 riastrad 7595 1.1 riastrad typedef struct _ATOM_XTMDS_INFO 7596 1.1 riastrad { 7597 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7598 1.1 riastrad USHORT usSingleLinkMaxFrequency; 7599 1.1 riastrad ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; //Point the ID on which I2C is used to control external chip 7600 1.1 riastrad UCHAR ucXtransimitterID; 7601 1.1 riastrad UCHAR ucSupportedLink; // Bit field, bit0=1, single link supported;bit1=1,dual link supported 7602 1.1 riastrad UCHAR ucSequnceAlterID; // Even with the same external TMDS asic, it's possible that the program seqence alters 7603 1.1 riastrad // due to design. This ID is used to alert driver that the sequence is not "standard"! 7604 1.1 riastrad UCHAR ucMasterAddress; // Address to control Master xTMDS Chip 7605 1.1 riastrad UCHAR ucSlaveAddress; // Address to control Slave xTMDS Chip 7606 1.1 riastrad }ATOM_XTMDS_INFO; 7607 1.1 riastrad 7608 1.1 riastrad typedef struct _DFP_DPMS_STATUS_CHANGE_PARAMETERS 7609 1.1 riastrad { 7610 1.1 riastrad UCHAR ucEnable; // ATOM_ENABLE=On or ATOM_DISABLE=Off 7611 1.1 riastrad UCHAR ucDevice; // ATOM_DEVICE_DFP1_INDEX.... 7612 1.1 riastrad UCHAR ucPadding[2]; 7613 1.1 riastrad }DFP_DPMS_STATUS_CHANGE_PARAMETERS; 7614 1.1 riastrad 7615 1.1 riastrad /****************************Legacy Power Play Table Definitions **********************/ 7616 1.1 riastrad 7617 1.1 riastrad //Definitions for ulPowerPlayMiscInfo 7618 1.1 riastrad #define ATOM_PM_MISCINFO_SPLIT_CLOCK 0x00000000L 7619 1.1 riastrad #define ATOM_PM_MISCINFO_USING_MCLK_SRC 0x00000001L 7620 1.1 riastrad #define ATOM_PM_MISCINFO_USING_SCLK_SRC 0x00000002L 7621 1.1 riastrad 7622 1.1 riastrad #define ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT 0x00000004L 7623 1.1 riastrad #define ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH 0x00000008L 7624 1.1 riastrad 7625 1.1 riastrad #define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN 0x00000010L 7626 1.1 riastrad 7627 1.1 riastrad #define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN 0x00000020L 7628 1.1 riastrad #define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN 0x00000040L 7629 1.1 riastrad #define ATOM_PM_MISCINFO_PROGRAM_VOLTAGE 0x00000080L //When this bit set, ucVoltageDropIndex is not an index for GPIO pin, but a voltage ID that SW needs program 7630 1.1 riastrad 7631 1.1 riastrad #define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN 0x00000100L 7632 1.1 riastrad #define ATOM_PM_MISCINFO_ASIC_DYNAMIC_VOLTAGE_EN 0x00000200L 7633 1.1 riastrad #define ATOM_PM_MISCINFO_ASIC_SLEEP_MODE_EN 0x00000400L 7634 1.1 riastrad #define ATOM_PM_MISCINFO_LOAD_BALANCE_EN 0x00000800L 7635 1.1 riastrad #define ATOM_PM_MISCINFO_DEFAULT_DC_STATE_ENTRY_TRUE 0x00001000L 7636 1.1 riastrad #define ATOM_PM_MISCINFO_DEFAULT_LOW_DC_STATE_ENTRY_TRUE 0x00002000L 7637 1.1 riastrad #define ATOM_PM_MISCINFO_LOW_LCD_REFRESH_RATE 0x00004000L 7638 1.1 riastrad 7639 1.1 riastrad #define ATOM_PM_MISCINFO_DRIVER_DEFAULT_MODE 0x00008000L 7640 1.1 riastrad #define ATOM_PM_MISCINFO_OVER_CLOCK_MODE 0x00010000L 7641 1.1 riastrad #define ATOM_PM_MISCINFO_OVER_DRIVE_MODE 0x00020000L 7642 1.1 riastrad #define ATOM_PM_MISCINFO_POWER_SAVING_MODE 0x00040000L 7643 1.1 riastrad #define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE 0x00080000L 7644 1.1 riastrad 7645 1.1 riastrad #define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK 0x00300000L //0-FM Disable, 1-2 level FM, 2-4 level FM, 3-Reserved 7646 1.1 riastrad #define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT 20 7647 1.1 riastrad 7648 1.1 riastrad #define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE 0x00400000L 7649 1.1 riastrad #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2 0x00800000L 7650 1.1 riastrad #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4 0x01000000L 7651 1.1 riastrad #define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN 0x02000000L //When set, Dynamic 7652 1.1 riastrad #define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN 0x04000000L //When set, Dynamic 7653 1.1 riastrad #define ATOM_PM_MISCINFO_3D_ACCELERATION_EN 0x08000000L //When set, This mode is for acceleated 3D mode 7654 1.1 riastrad 7655 1.1 riastrad #define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_MASK 0x70000000L //1-Optimal Battery Life Group, 2-High Battery, 3-Balanced, 4-High Performance, 5- Optimal Performance (Default state with Default clocks) 7656 1.1 riastrad #define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT 28 7657 1.1 riastrad #define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS 0x80000000L 7658 1.1 riastrad 7659 1.1 riastrad #define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE 0x00000001L 7660 1.1 riastrad #define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT 0x00000002L 7661 1.1 riastrad #define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN 0x00000004L 7662 1.1 riastrad #define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO 0x00000008L 7663 1.1 riastrad #define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE 0x00000010L 7664 1.1 riastrad #define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN 0x00000020L 7665 1.1 riastrad #define ATOM_PM_MISCINFO2_VIDEO_PLAYBACK_CAPABLE 0x00000040L //If this bit is set in multi-pp mode, then driver will pack up one with the minior power consumption. 7666 1.1 riastrad //If it's not set in any pp mode, driver will use its default logic to pick a pp mode in video playback 7667 1.1 riastrad #define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC 0x00000080L 7668 1.1 riastrad #define ATOM_PM_MISCINFO2_STUTTER_MODE_EN 0x00000100L 7669 1.1 riastrad #define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE 0x00000200L 7670 1.1 riastrad 7671 1.1 riastrad //ucTableFormatRevision=1 7672 1.1 riastrad //ucTableContentRevision=1 7673 1.1 riastrad typedef struct _ATOM_POWERMODE_INFO 7674 1.1 riastrad { 7675 1.1 riastrad ULONG ulMiscInfo; //The power level should be arranged in ascending order 7676 1.1 riastrad ULONG ulReserved1; // must set to 0 7677 1.1 riastrad ULONG ulReserved2; // must set to 0 7678 1.1 riastrad USHORT usEngineClock; 7679 1.1 riastrad USHORT usMemoryClock; 7680 1.1 riastrad UCHAR ucVoltageDropIndex; // index to GPIO table 7681 1.1 riastrad UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate 7682 1.1 riastrad UCHAR ucMinTemperature; 7683 1.1 riastrad UCHAR ucMaxTemperature; 7684 1.1 riastrad UCHAR ucNumPciELanes; // number of PCIE lanes 7685 1.1 riastrad }ATOM_POWERMODE_INFO; 7686 1.1 riastrad 7687 1.1 riastrad //ucTableFormatRevision=2 7688 1.1 riastrad //ucTableContentRevision=1 7689 1.1 riastrad typedef struct _ATOM_POWERMODE_INFO_V2 7690 1.1 riastrad { 7691 1.1 riastrad ULONG ulMiscInfo; //The power level should be arranged in ascending order 7692 1.1 riastrad ULONG ulMiscInfo2; 7693 1.1 riastrad ULONG ulEngineClock; 7694 1.1 riastrad ULONG ulMemoryClock; 7695 1.1 riastrad UCHAR ucVoltageDropIndex; // index to GPIO table 7696 1.1 riastrad UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate 7697 1.1 riastrad UCHAR ucMinTemperature; 7698 1.1 riastrad UCHAR ucMaxTemperature; 7699 1.1 riastrad UCHAR ucNumPciELanes; // number of PCIE lanes 7700 1.1 riastrad }ATOM_POWERMODE_INFO_V2; 7701 1.1 riastrad 7702 1.1 riastrad //ucTableFormatRevision=2 7703 1.1 riastrad //ucTableContentRevision=2 7704 1.1 riastrad typedef struct _ATOM_POWERMODE_INFO_V3 7705 1.1 riastrad { 7706 1.1 riastrad ULONG ulMiscInfo; //The power level should be arranged in ascending order 7707 1.1 riastrad ULONG ulMiscInfo2; 7708 1.1 riastrad ULONG ulEngineClock; 7709 1.1 riastrad ULONG ulMemoryClock; 7710 1.1 riastrad UCHAR ucVoltageDropIndex; // index to Core (VDDC) votage table 7711 1.1 riastrad UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate 7712 1.1 riastrad UCHAR ucMinTemperature; 7713 1.1 riastrad UCHAR ucMaxTemperature; 7714 1.1 riastrad UCHAR ucNumPciELanes; // number of PCIE lanes 7715 1.1 riastrad UCHAR ucVDDCI_VoltageDropIndex; // index to VDDCI votage table 7716 1.1 riastrad }ATOM_POWERMODE_INFO_V3; 7717 1.1 riastrad 7718 1.1 riastrad 7719 1.1 riastrad #define ATOM_MAX_NUMBEROF_POWER_BLOCK 8 7720 1.1 riastrad 7721 1.1 riastrad #define ATOM_PP_OVERDRIVE_INTBITMAP_AUXWIN 0x01 7722 1.1 riastrad #define ATOM_PP_OVERDRIVE_INTBITMAP_OVERDRIVE 0x02 7723 1.1 riastrad 7724 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM63 0x01 7725 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032 0x02 7726 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030 0x03 7727 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649 0x04 7728 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64 0x05 7729 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375 0x06 7730 1.1 riastrad #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512 0x07 // Andigilog 7731 1.1 riastrad 7732 1.1 riastrad 7733 1.1 riastrad typedef struct _ATOM_POWERPLAY_INFO 7734 1.1 riastrad { 7735 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7736 1.1 riastrad UCHAR ucOverdriveThermalController; 7737 1.1 riastrad UCHAR ucOverdriveI2cLine; 7738 1.1 riastrad UCHAR ucOverdriveIntBitmap; 7739 1.1 riastrad UCHAR ucOverdriveControllerAddress; 7740 1.1 riastrad UCHAR ucSizeOfPowerModeEntry; 7741 1.1 riastrad UCHAR ucNumOfPowerModeEntries; 7742 1.1 riastrad ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; 7743 1.1 riastrad }ATOM_POWERPLAY_INFO; 7744 1.1 riastrad 7745 1.1 riastrad typedef struct _ATOM_POWERPLAY_INFO_V2 7746 1.1 riastrad { 7747 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7748 1.1 riastrad UCHAR ucOverdriveThermalController; 7749 1.1 riastrad UCHAR ucOverdriveI2cLine; 7750 1.1 riastrad UCHAR ucOverdriveIntBitmap; 7751 1.1 riastrad UCHAR ucOverdriveControllerAddress; 7752 1.1 riastrad UCHAR ucSizeOfPowerModeEntry; 7753 1.1 riastrad UCHAR ucNumOfPowerModeEntries; 7754 1.1 riastrad ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; 7755 1.1 riastrad }ATOM_POWERPLAY_INFO_V2; 7756 1.1 riastrad 7757 1.1 riastrad typedef struct _ATOM_POWERPLAY_INFO_V3 7758 1.1 riastrad { 7759 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 7760 1.1 riastrad UCHAR ucOverdriveThermalController; 7761 1.1 riastrad UCHAR ucOverdriveI2cLine; 7762 1.1 riastrad UCHAR ucOverdriveIntBitmap; 7763 1.1 riastrad UCHAR ucOverdriveControllerAddress; 7764 1.1 riastrad UCHAR ucSizeOfPowerModeEntry; 7765 1.1 riastrad UCHAR ucNumOfPowerModeEntries; 7766 1.1 riastrad ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; 7767 1.1 riastrad }ATOM_POWERPLAY_INFO_V3; 7768 1.1 riastrad 7769 1.1 riastrad 7770 1.1 riastrad // Following definitions are for compatibility issue in different SW components. 7771 1.1 riastrad #define ATOM_MASTER_DATA_TABLE_REVISION 0x01 7772 1.1 riastrad #define Object_Info Object_Header 7773 1.1 riastrad #define AdjustARB_SEQ MC_InitParameter 7774 1.1 riastrad #define VRAM_GPIO_DetectionInfo VoltageObjectInfo 7775 1.1 riastrad #define ASIC_VDDCI_Info ASIC_ProfilingInfo 7776 1.1 riastrad #define ASIC_MVDDQ_Info MemoryTrainingInfo 7777 1.1 riastrad #define SS_Info PPLL_SS_Info 7778 1.1 riastrad #define ASIC_MVDDC_Info ASIC_InternalSS_Info 7779 1.1 riastrad #define DispDevicePriorityInfo SaveRestoreInfo 7780 1.1 riastrad #define DispOutInfo TV_VideoMode 7781 1.1 riastrad 7782 1.1 riastrad 7783 1.1 riastrad #define ATOM_ENCODER_OBJECT_TABLE ATOM_OBJECT_TABLE 7784 1.1 riastrad #define ATOM_CONNECTOR_OBJECT_TABLE ATOM_OBJECT_TABLE 7785 1.1 riastrad 7786 1.1 riastrad //New device naming, remove them when both DAL/VBIOS is ready 7787 1.1 riastrad #define DFP2I_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS 7788 1.1 riastrad #define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS 7789 1.1 riastrad 7790 1.1 riastrad #define DFP1X_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS 7791 1.1 riastrad #define DFP1X_OUTPUT_CONTROL_PS_ALLOCATION DFP1X_OUTPUT_CONTROL_PARAMETERS 7792 1.1 riastrad 7793 1.1 riastrad #define DFP1I_OUTPUT_CONTROL_PARAMETERS DFP1_OUTPUT_CONTROL_PARAMETERS 7794 1.1 riastrad #define DFP1I_OUTPUT_CONTROL_PS_ALLOCATION DFP1_OUTPUT_CONTROL_PS_ALLOCATION 7795 1.1 riastrad 7796 1.1 riastrad #define ATOM_DEVICE_DFP1I_SUPPORT ATOM_DEVICE_DFP1_SUPPORT 7797 1.1 riastrad #define ATOM_DEVICE_DFP1X_SUPPORT ATOM_DEVICE_DFP2_SUPPORT 7798 1.1 riastrad 7799 1.1 riastrad #define ATOM_DEVICE_DFP1I_INDEX ATOM_DEVICE_DFP1_INDEX 7800 1.1 riastrad #define ATOM_DEVICE_DFP1X_INDEX ATOM_DEVICE_DFP2_INDEX 7801 1.1 riastrad 7802 1.1 riastrad #define ATOM_DEVICE_DFP2I_INDEX 0x00000009 7803 1.1 riastrad #define ATOM_DEVICE_DFP2I_SUPPORT (0x1L << ATOM_DEVICE_DFP2I_INDEX) 7804 1.1 riastrad 7805 1.1 riastrad #define ATOM_S0_DFP1I ATOM_S0_DFP1 7806 1.1 riastrad #define ATOM_S0_DFP1X ATOM_S0_DFP2 7807 1.1 riastrad 7808 1.1 riastrad #define ATOM_S0_DFP2I 0x00200000L 7809 1.1 riastrad #define ATOM_S0_DFP2Ib2 0x20 7810 1.1 riastrad 7811 1.1 riastrad #define ATOM_S2_DFP1I_DPMS_STATE ATOM_S2_DFP1_DPMS_STATE 7812 1.1 riastrad #define ATOM_S2_DFP1X_DPMS_STATE ATOM_S2_DFP2_DPMS_STATE 7813 1.1 riastrad 7814 1.1 riastrad #define ATOM_S2_DFP2I_DPMS_STATE 0x02000000L 7815 1.1 riastrad #define ATOM_S2_DFP2I_DPMS_STATEb3 0x02 7816 1.1 riastrad 7817 1.1 riastrad #define ATOM_S3_DFP2I_ACTIVEb1 0x02 7818 1.1 riastrad 7819 1.1 riastrad #define ATOM_S3_DFP1I_ACTIVE ATOM_S3_DFP1_ACTIVE 7820 1.1 riastrad #define ATOM_S3_DFP1X_ACTIVE ATOM_S3_DFP2_ACTIVE 7821 1.1 riastrad 7822 1.1 riastrad #define ATOM_S3_DFP2I_ACTIVE 0x00000200L 7823 1.1 riastrad 7824 1.1 riastrad #define ATOM_S3_DFP1I_CRTC_ACTIVE ATOM_S3_DFP1_CRTC_ACTIVE 7825 1.1 riastrad #define ATOM_S3_DFP1X_CRTC_ACTIVE ATOM_S3_DFP2_CRTC_ACTIVE 7826 1.1 riastrad #define ATOM_S3_DFP2I_CRTC_ACTIVE 0x02000000L 7827 1.1 riastrad 7828 1.1 riastrad #define ATOM_S3_DFP2I_CRTC_ACTIVEb3 0x02 7829 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP2Ib1 0x02 7830 1.1 riastrad 7831 1.1 riastrad #define ATOM_S5_DOS_REQ_DFP2I 0x0200 7832 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP1I ATOM_S6_ACC_REQ_DFP1 7833 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP1X ATOM_S6_ACC_REQ_DFP2 7834 1.1 riastrad 7835 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP2Ib3 0x02 7836 1.1 riastrad #define ATOM_S6_ACC_REQ_DFP2I 0x02000000L 7837 1.1 riastrad 7838 1.1 riastrad #define TMDS1XEncoderControl DVOEncoderControl 7839 1.1 riastrad #define DFP1XOutputControl DVOOutputControl 7840 1.1 riastrad 7841 1.1 riastrad #define ExternalDFPOutputControl DFP1XOutputControl 7842 1.1 riastrad #define EnableExternalTMDS_Encoder TMDS1XEncoderControl 7843 1.1 riastrad 7844 1.1 riastrad #define DFP1IOutputControl TMDSAOutputControl 7845 1.1 riastrad #define DFP2IOutputControl LVTMAOutputControl 7846 1.1 riastrad 7847 1.1 riastrad #define DAC1_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS 7848 1.1 riastrad #define DAC1_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION 7849 1.1 riastrad 7850 1.1 riastrad #define DAC2_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS 7851 1.1 riastrad #define DAC2_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION 7852 1.1 riastrad 7853 1.1 riastrad #define ucDac1Standard ucDacStandard 7854 1.1 riastrad #define ucDac2Standard ucDacStandard 7855 1.1 riastrad 7856 1.1 riastrad #define TMDS1EncoderControl TMDSAEncoderControl 7857 1.1 riastrad #define TMDS2EncoderControl LVTMAEncoderControl 7858 1.1 riastrad 7859 1.1 riastrad #define DFP1OutputControl TMDSAOutputControl 7860 1.1 riastrad #define DFP2OutputControl LVTMAOutputControl 7861 1.1 riastrad #define CRT1OutputControl DAC1OutputControl 7862 1.1 riastrad #define CRT2OutputControl DAC2OutputControl 7863 1.1 riastrad 7864 1.1 riastrad //These two lines will be removed for sure in a few days, will follow up with Michael V. 7865 1.1 riastrad #define EnableLVDS_SS EnableSpreadSpectrumOnPPLL 7866 1.1 riastrad #define ENABLE_LVDS_SS_PARAMETERS_V3 ENABLE_SPREAD_SPECTRUM_ON_PPLL 7867 1.1 riastrad 7868 1.1 riastrad //#define ATOM_S2_CRT1_DPMS_STATE 0x00010000L 7869 1.1 riastrad //#define ATOM_S2_LCD1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE 7870 1.1 riastrad //#define ATOM_S2_TV1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE 7871 1.1 riastrad //#define ATOM_S2_DFP1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE 7872 1.1 riastrad //#define ATOM_S2_CRT2_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE 7873 1.1 riastrad 7874 1.1 riastrad #define ATOM_S6_ACC_REQ_TV2 0x00400000L 7875 1.1 riastrad #define ATOM_DEVICE_TV2_INDEX 0x00000006 7876 1.1 riastrad #define ATOM_DEVICE_TV2_SUPPORT (0x1L << ATOM_DEVICE_TV2_INDEX) 7877 1.1 riastrad #define ATOM_S0_TV2 0x00100000L 7878 1.1 riastrad #define ATOM_S3_TV2_ACTIVE ATOM_S3_DFP6_ACTIVE 7879 1.1 riastrad #define ATOM_S3_TV2_CRTC_ACTIVE ATOM_S3_DFP6_CRTC_ACTIVE 7880 1.1 riastrad 7881 1.1 riastrad // 7882 1.1 riastrad #define ATOM_S2_CRT1_DPMS_STATE 0x00010000L 7883 1.1 riastrad #define ATOM_S2_LCD1_DPMS_STATE 0x00020000L 7884 1.1 riastrad #define ATOM_S2_TV1_DPMS_STATE 0x00040000L 7885 1.1 riastrad #define ATOM_S2_DFP1_DPMS_STATE 0x00080000L 7886 1.1 riastrad #define ATOM_S2_CRT2_DPMS_STATE 0x00100000L 7887 1.1 riastrad #define ATOM_S2_LCD2_DPMS_STATE 0x00200000L 7888 1.1 riastrad #define ATOM_S2_TV2_DPMS_STATE 0x00400000L 7889 1.1 riastrad #define ATOM_S2_DFP2_DPMS_STATE 0x00800000L 7890 1.1 riastrad #define ATOM_S2_CV_DPMS_STATE 0x01000000L 7891 1.1 riastrad #define ATOM_S2_DFP3_DPMS_STATE 0x02000000L 7892 1.1 riastrad #define ATOM_S2_DFP4_DPMS_STATE 0x04000000L 7893 1.1 riastrad #define ATOM_S2_DFP5_DPMS_STATE 0x08000000L 7894 1.1 riastrad 7895 1.1 riastrad #define ATOM_S2_CRT1_DPMS_STATEb2 0x01 7896 1.1 riastrad #define ATOM_S2_LCD1_DPMS_STATEb2 0x02 7897 1.1 riastrad #define ATOM_S2_TV1_DPMS_STATEb2 0x04 7898 1.1 riastrad #define ATOM_S2_DFP1_DPMS_STATEb2 0x08 7899 1.1 riastrad #define ATOM_S2_CRT2_DPMS_STATEb2 0x10 7900 1.1 riastrad #define ATOM_S2_LCD2_DPMS_STATEb2 0x20 7901 1.1 riastrad #define ATOM_S2_TV2_DPMS_STATEb2 0x40 7902 1.1 riastrad #define ATOM_S2_DFP2_DPMS_STATEb2 0x80 7903 1.1 riastrad #define ATOM_S2_CV_DPMS_STATEb3 0x01 7904 1.1 riastrad #define ATOM_S2_DFP3_DPMS_STATEb3 0x02 7905 1.1 riastrad #define ATOM_S2_DFP4_DPMS_STATEb3 0x04 7906 1.1 riastrad #define ATOM_S2_DFP5_DPMS_STATEb3 0x08 7907 1.1 riastrad 7908 1.1 riastrad #define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3 0x20 7909 1.1 riastrad #define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40 7910 1.1 riastrad #define ATOM_S3_RQST_GPU_USE_MIN_PWRb3 0x80 7911 1.1 riastrad 7912 1.1 riastrad /*********************************************************************************/ 7913 1.1 riastrad 7914 1.5 riastrad #pragma pack() // BIOS data must use byte alignment 7915 1.1 riastrad 7916 1.1 riastrad // 7917 1.1 riastrad // AMD ACPI Table 7918 1.1 riastrad // 7919 1.1 riastrad #pragma pack(1) 7920 1.1 riastrad 7921 1.1 riastrad typedef struct { 7922 1.1 riastrad ULONG Signature; 7923 1.1 riastrad ULONG TableLength; //Length 7924 1.1 riastrad UCHAR Revision; 7925 1.1 riastrad UCHAR Checksum; 7926 1.1 riastrad UCHAR OemId[6]; 7927 1.1 riastrad UCHAR OemTableId[8]; //UINT64 OemTableId; 7928 1.1 riastrad ULONG OemRevision; 7929 1.1 riastrad ULONG CreatorId; 7930 1.1 riastrad ULONG CreatorRevision; 7931 1.1 riastrad } AMD_ACPI_DESCRIPTION_HEADER; 7932 1.1 riastrad /* 7933 1.1 riastrad //EFI_ACPI_DESCRIPTION_HEADER from AcpiCommon.h 7934 1.1 riastrad typedef struct { 7935 1.1 riastrad UINT32 Signature; //0x0 7936 1.1 riastrad UINT32 Length; //0x4 7937 1.1 riastrad UINT8 Revision; //0x8 7938 1.1 riastrad UINT8 Checksum; //0x9 7939 1.1 riastrad UINT8 OemId[6]; //0xA 7940 1.1 riastrad UINT64 OemTableId; //0x10 7941 1.1 riastrad UINT32 OemRevision; //0x18 7942 1.1 riastrad UINT32 CreatorId; //0x1C 7943 1.1 riastrad UINT32 CreatorRevision; //0x20 7944 1.1 riastrad }EFI_ACPI_DESCRIPTION_HEADER; 7945 1.1 riastrad */ 7946 1.1 riastrad typedef struct { 7947 1.1 riastrad AMD_ACPI_DESCRIPTION_HEADER SHeader; 7948 1.1 riastrad UCHAR TableUUID[16]; //0x24 7949 1.3 riastrad ULONG VBIOSImageOffset; //0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the structure. 7950 1.3 riastrad ULONG Lib1ImageOffset; //0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the structure. 7951 1.1 riastrad ULONG Reserved[4]; //0x3C 7952 1.1 riastrad }UEFI_ACPI_VFCT; 7953 1.1 riastrad 7954 1.1 riastrad typedef struct { 7955 1.1 riastrad ULONG PCIBus; //0x4C 7956 1.1 riastrad ULONG PCIDevice; //0x50 7957 1.1 riastrad ULONG PCIFunction; //0x54 7958 1.1 riastrad USHORT VendorID; //0x58 7959 1.1 riastrad USHORT DeviceID; //0x5A 7960 1.1 riastrad USHORT SSVID; //0x5C 7961 1.1 riastrad USHORT SSID; //0x5E 7962 1.1 riastrad ULONG Revision; //0x60 7963 1.1 riastrad ULONG ImageLength; //0x64 7964 1.1 riastrad }VFCT_IMAGE_HEADER; 7965 1.1 riastrad 7966 1.1 riastrad 7967 1.1 riastrad typedef struct { 7968 1.1 riastrad VFCT_IMAGE_HEADER VbiosHeader; 7969 1.1 riastrad UCHAR VbiosContent[1]; 7970 1.1 riastrad }GOP_VBIOS_CONTENT; 7971 1.1 riastrad 7972 1.1 riastrad typedef struct { 7973 1.1 riastrad VFCT_IMAGE_HEADER Lib1Header; 7974 1.1 riastrad UCHAR Lib1Content[1]; 7975 1.1 riastrad }GOP_LIB1_CONTENT; 7976 1.1 riastrad 7977 1.1 riastrad #pragma pack() 7978 1.1 riastrad 7979 1.1 riastrad 7980 1.1 riastrad #endif /* _ATOMBIOS_H */ 7981 1.1 riastrad 7982 1.1 riastrad #include "pptable.h" 7983 1.1 riastrad 7984