2 * Copyright 2006-2007 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
23 /****************************************************************************/
24 /*Portion I: Definitions shared between VBIOS and Driver */
25 /****************************************************************************/
30 #define ATOM_VERSION_MAJOR 0x00020000
31 #define ATOM_VERSION_MINOR 0x00000002
33 #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)
35 /* Endianness should be specified before inclusion,
36 * default to little endian
38 #ifndef ATOM_BIG_ENDIAN
39 #error Endian not specified
44 typedef unsigned long ULONG;
48 typedef unsigned char UCHAR;
52 typedef unsigned short USHORT;
58 #define ATOM_EXT_DAC 2
69 #define ATOM_SCALER1 0
70 #define ATOM_SCALER2 1
72 #define ATOM_SCALER_DISABLE 0
73 #define ATOM_SCALER_CENTER 1
74 #define ATOM_SCALER_EXPANSION 2
75 #define ATOM_SCALER_MULTI_EX 3
77 #define ATOM_DISABLE 0
79 #define ATOM_LCD_BLOFF (ATOM_DISABLE+2)
80 #define ATOM_LCD_BLON (ATOM_ENABLE+2)
81 #define ATOM_LCD_BL_BRIGHTNESS_CONTROL (ATOM_ENABLE+3)
82 #define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5)
83 #define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5)
84 #define ATOM_ENCODER_INIT (ATOM_DISABLE+7)
86 #define ATOM_BLANKING 1
87 #define ATOM_BLANKING_OFF 0
89 #define ATOM_CURSOR1 0
90 #define ATOM_CURSOR2 1
98 #define ATOM_TV_NTSC 1
99 #define ATOM_TV_NTSCJ 2
100 #define ATOM_TV_PAL 3
101 #define ATOM_TV_PALM 4
102 #define ATOM_TV_PALCN 5
103 #define ATOM_TV_PALN 6
104 #define ATOM_TV_PAL60 7
105 #define ATOM_TV_SECAM 8
106 #define ATOM_TV_CV 16
108 #define ATOM_DAC1_PS2 1
109 #define ATOM_DAC1_CV 2
110 #define ATOM_DAC1_NTSC 3
111 #define ATOM_DAC1_PAL 4
113 #define ATOM_DAC2_PS2 ATOM_DAC1_PS2
114 #define ATOM_DAC2_CV ATOM_DAC1_CV
115 #define ATOM_DAC2_NTSC ATOM_DAC1_NTSC
116 #define ATOM_DAC2_PAL ATOM_DAC1_PAL
119 #define ATOM_PM_STANDBY 1
120 #define ATOM_PM_SUSPEND 2
121 #define ATOM_PM_OFF 3
123 /* Bit0:{=0:single, =1:dual},
124 Bit1 {=0:666RGB, =1:888RGB},
126 Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}*/
128 #define ATOM_PANEL_MISC_DUAL 0x00000001
129 #define ATOM_PANEL_MISC_888RGB 0x00000002
130 #define ATOM_PANEL_MISC_GREY_LEVEL 0x0000000C
131 #define ATOM_PANEL_MISC_FPDI 0x00000010
132 #define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT 2
133 #define ATOM_PANEL_MISC_SPATIAL 0x00000020
134 #define ATOM_PANEL_MISC_TEMPORAL 0x00000040
135 #define ATOM_PANEL_MISC_API_ENABLED 0x00000080
137 #define MEMTYPE_DDR1 "DDR1"
138 #define MEMTYPE_DDR2 "DDR2"
139 #define MEMTYPE_DDR3 "DDR3"
140 #define MEMTYPE_DDR4 "DDR4"
142 #define ASIC_BUS_TYPE_PCI "PCI"
143 #define ASIC_BUS_TYPE_AGP "AGP"
144 #define ASIC_BUS_TYPE_PCIE "PCI_EXPRESS"
146 /* Maximum size of that FireGL flag string */
148 #define ATOM_FIREGL_FLAG_STRING "FGL" /* Flag used to enable FireGL Support */
149 #define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 3 /* sizeof( ATOM_FIREGL_FLAG_STRING ) */
151 #define ATOM_FAKE_DESKTOP_STRING "DSK" /* Flag used to enable mobile ASIC on Desktop */
152 #define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING
154 #define ATOM_M54T_FLAG_STRING "M54T" /* Flag used to enable M54T Support */
155 #define ATOM_MAX_SIZE_OF_M54T_FLAG_STRING 4 /* sizeof( ATOM_M54T_FLAG_STRING ) */
157 #define HW_ASSISTED_I2C_STATUS_FAILURE 2
158 #define HW_ASSISTED_I2C_STATUS_SUCCESS 1
160 #pragma pack(1) /* BIOS data must use byte aligment */
162 /* Define offset to location of ROM header. */
164 #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L
165 #define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L
167 #define OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE 0x94
168 #define MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE 20 /* including the terminator 0x0! */
169 #define OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f
170 #define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x006e
172 /* Common header for all ROM Data tables.
173 Every table pointed _ATOM_MASTER_DATA_TABLE has this common header.
174 And the pointer actually points to this header. */
176 typedef struct _ATOM_COMMON_TABLE_HEADER {
177 USHORT usStructureSize;
178 UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */
179 UCHAR ucTableContentRevision; /*Change it only when the table needs to change but the firmware */
180 /*Image can't be updated, while Driver needs to carry the new table! */
181 } ATOM_COMMON_TABLE_HEADER;
183 typedef struct _ATOM_ROM_HEADER {
184 ATOM_COMMON_TABLE_HEADER sHeader;
185 UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios,
186 atombios should init it as "ATOM", don't change the position */
187 USHORT usBiosRuntimeSegmentAddress;
188 USHORT usProtectedModeInfoOffset;
189 USHORT usConfigFilenameOffset;
190 USHORT usCRC_BlockOffset;
191 USHORT usBIOS_BootupMessageOffset;
192 USHORT usInt10Offset;
193 USHORT usPciBusDevInitCode;
194 USHORT usIoBaseAddress;
195 USHORT usSubsystemVendorID;
196 USHORT usSubsystemID;
197 USHORT usPCI_InfoOffset;
198 USHORT usMasterCommandTableOffset; /*Offset for SW to get all command table offsets, Don't change the position */
199 USHORT usMasterDataTableOffset; /*Offset for SW to get all data table offsets, Don't change the position */
200 UCHAR ucExtendedFunctionCode;
204 /*==============================Command Table Portion==================================== */
211 typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES {
212 USHORT ASIC_Init; /* Function Table, used by various SW components,latest version 1.1 */
213 USHORT GetDisplaySurfaceSize; /* Atomic Table, Used by Bios when enabling HW ICON */
214 USHORT ASIC_RegistersInit; /* Atomic Table, indirectly used by various SW components,called from ASIC_Init */
215 USHORT VRAM_BlockVenderDetection; /* Atomic Table, used only by Bios */
216 USHORT DIGxEncoderControl; /* Only used by Bios */
217 USHORT MemoryControllerInit; /* Atomic Table, indirectly used by various SW components,called from ASIC_Init */
218 USHORT EnableCRTCMemReq; /* Function Table,directly used by various SW components,latest version 2.1 */
219 USHORT MemoryParamAdjust; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock if needed */
220 USHORT DVOEncoderControl; /* Function Table,directly used by various SW components,latest version 1.2 */
221 USHORT GPIOPinControl; /* Atomic Table, only used by Bios */
222 USHORT SetEngineClock; /*Function Table,directly used by various SW components,latest version 1.1 */
223 USHORT SetMemoryClock; /* Function Table,directly used by various SW components,latest version 1.1 */
224 USHORT SetPixelClock; /*Function Table,directly used by various SW components,latest version 1.2 */
225 USHORT DynamicClockGating; /* Atomic Table, indirectly used by various SW components,called from ASIC_Init */
226 USHORT ResetMemoryDLL; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
227 USHORT ResetMemoryDevice; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
228 USHORT MemoryPLLInit;
229 USHORT AdjustDisplayPll; /* only used by Bios */
230 USHORT AdjustMemoryController; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
231 USHORT EnableASIC_StaticPwrMgt; /* Atomic Table, only used by Bios */
232 USHORT ASIC_StaticPwrMgtStatusChange; /* Obsolete, only used by Bios */
233 USHORT DAC_LoadDetection; /* Atomic Table, directly used by various SW components,latest version 1.2 */
234 USHORT LVTMAEncoderControl; /* Atomic Table,directly used by various SW components,latest version 1.3 */
235 USHORT LCD1OutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
236 USHORT DAC1EncoderControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
237 USHORT DAC2EncoderControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
238 USHORT DVOOutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
239 USHORT CV1OutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
240 USHORT GetConditionalGoldenSetting; /* only used by Bios */
241 USHORT TVEncoderControl; /* Function Table,directly used by various SW components,latest version 1.1 */
242 USHORT TMDSAEncoderControl; /* Atomic Table, directly used by various SW components,latest version 1.3 */
243 USHORT LVDSEncoderControl; /* Atomic Table, directly used by various SW components,latest version 1.3 */
244 USHORT TV1OutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
245 USHORT EnableScaler; /* Atomic Table, used only by Bios */
246 USHORT BlankCRTC; /* Atomic Table, directly used by various SW components,latest version 1.1 */
247 USHORT EnableCRTC; /* Atomic Table, directly used by various SW components,latest version 1.1 */
248 USHORT GetPixelClock; /* Atomic Table, directly used by various SW components,latest version 1.1 */
249 USHORT EnableVGA_Render; /* Function Table,directly used by various SW components,latest version 1.1 */
250 USHORT EnableVGA_Access; /* Obsolete , only used by Bios */
251 USHORT SetCRTC_Timing; /* Atomic Table, directly used by various SW components,latest version 1.1 */
252 USHORT SetCRTC_OverScan; /* Atomic Table, used by various SW components,latest version 1.1 */
253 USHORT SetCRTC_Replication; /* Atomic Table, used only by Bios */
254 USHORT SelectCRTC_Source; /* Atomic Table, directly used by various SW components,latest version 1.1 */
255 USHORT EnableGraphSurfaces; /* Atomic Table, used only by Bios */
256 USHORT UpdateCRTC_DoubleBufferRegisters;
257 USHORT LUT_AutoFill; /* Atomic Table, only used by Bios */
258 USHORT EnableHW_IconCursor; /* Atomic Table, only used by Bios */
259 USHORT GetMemoryClock; /* Atomic Table, directly used by various SW components,latest version 1.1 */
260 USHORT GetEngineClock; /* Atomic Table, directly used by various SW components,latest version 1.1 */
261 USHORT SetCRTC_UsingDTDTiming; /* Atomic Table, directly used by various SW components,latest version 1.1 */
262 USHORT ExternalEncoderControl; /* Atomic Table, directly used by various SW components,latest version 2.1 */
263 USHORT LVTMAOutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
264 USHORT VRAM_BlockDetectionByStrap; /* Atomic Table, used only by Bios */
265 USHORT MemoryCleanUp; /* Atomic Table, only used by Bios */
266 USHORT ProcessI2cChannelTransaction; /* Function Table,only used by Bios */
267 USHORT WriteOneByteToHWAssistedI2C; /* Function Table,indirectly used by various SW components */
268 USHORT ReadHWAssistedI2CStatus; /* Atomic Table, indirectly used by various SW components */
269 USHORT SpeedFanControl; /* Function Table,indirectly used by various SW components,called from ASIC_Init */
270 USHORT PowerConnectorDetection; /* Atomic Table, directly used by various SW components,latest version 1.1 */
271 USHORT MC_Synchronization; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
272 USHORT ComputeMemoryEnginePLL; /* Atomic Table, indirectly used by various SW components,called from SetMemory/EngineClock */
273 USHORT MemoryRefreshConversion; /* Atomic Table, indirectly used by various SW components,called from SetMemory or SetEngineClock */
274 USHORT VRAM_GetCurrentInfoBlock; /* Atomic Table, used only by Bios */
275 USHORT DynamicMemorySettings; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
276 USHORT MemoryTraining; /* Atomic Table, used only by Bios */
277 USHORT EnableSpreadSpectrumOnPPLL; /* Atomic Table, directly used by various SW components,latest version 1.2 */
278 USHORT TMDSAOutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
279 USHORT SetVoltage; /* Function Table,directly and/or indirectly used by various SW components,latest version 1.1 */
280 USHORT DAC1OutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
281 USHORT DAC2OutputControl; /* Atomic Table, directly used by various SW components,latest version 1.1 */
282 USHORT SetupHWAssistedI2CStatus; /* Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C" */
283 USHORT ClockSource; /* Atomic Table, indirectly used by various SW components,called from ASIC_Init */
284 USHORT MemoryDeviceInit; /* Atomic Table, indirectly used by various SW components,called from SetMemoryClock */
285 USHORT EnableYUV; /* Atomic Table, indirectly used by various SW components,called from EnableVGARender */
286 USHORT DIG1EncoderControl; /* Atomic Table,directly used by various SW components,latest version 1.1 */
287 USHORT DIG2EncoderControl; /* Atomic Table,directly used by various SW components,latest version 1.1 */
288 USHORT DIG1TransmitterControl; /* Atomic Table,directly used by various SW components,latest version 1.1 */
289 USHORT DIG2TransmitterControl; /* Atomic Table,directly used by various SW components,latest version 1.1 */
290 USHORT ProcessAuxChannelTransaction; /* Function Table,only used by Bios */
291 USHORT DPEncoderService; /* Function Table,only used by Bios */
292 } ATOM_MASTER_LIST_OF_COMMAND_TABLES;
294 /* For backward compatible */
295 #define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction
296 #define UNIPHYTransmitterControl DIG1TransmitterControl
297 #define LVTMATransmitterControl DIG2TransmitterControl
298 #define SetCRTC_DPM_State GetConditionalGoldenSetting
299 #define SetUniphyInstance ASIC_StaticPwrMgtStatusChange
301 typedef struct _ATOM_MASTER_COMMAND_TABLE {
302 ATOM_COMMON_TABLE_HEADER sHeader;
303 ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables;
304 } ATOM_MASTER_COMMAND_TABLE;
306 /****************************************************************************/
307 /* Structures used in every command table */
308 /****************************************************************************/
309 typedef struct _ATOM_TABLE_ATTRIBUTE {
311 USHORT UpdatedByUtility:1; /* [15]=Table updated by utility flag */
312 USHORT PS_SizeInBytes:7; /* [14:8]=Size of parameter space in Bytes (multiple of a dword), */
313 USHORT WS_SizeInBytes:8; /* [7:0]=Size of workspace in Bytes (in multiple of a dword), */
315 USHORT WS_SizeInBytes:8; /* [7:0]=Size of workspace in Bytes (in multiple of a dword), */
316 USHORT PS_SizeInBytes:7; /* [14:8]=Size of parameter space in Bytes (multiple of a dword), */
317 USHORT UpdatedByUtility:1; /* [15]=Table updated by utility flag */
319 } ATOM_TABLE_ATTRIBUTE;
321 typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS {
322 ATOM_TABLE_ATTRIBUTE sbfAccess;
324 } ATOM_TABLE_ATTRIBUTE_ACCESS;
326 /****************************************************************************/
327 /* Common header for all command tables. */
328 /* Every table pointed by _ATOM_MASTER_COMMAND_TABLE has this common header. */
329 /* And the pointer actually points to this header. */
330 /****************************************************************************/
331 typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER {
332 ATOM_COMMON_TABLE_HEADER CommonHeader;
333 ATOM_TABLE_ATTRIBUTE TableAttribute;
334 } ATOM_COMMON_ROM_COMMAND_TABLE_HEADER;
336 /****************************************************************************/
337 /* Structures used by ComputeMemoryEnginePLLTable */
338 /****************************************************************************/
339 #define COMPUTE_MEMORY_PLL_PARAM 1
340 #define COMPUTE_ENGINE_PLL_PARAM 2
342 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS {
343 ULONG ulClock; /* When returen, it's the re-calculated clock based on given Fb_div Post_Div and ref_div */
344 UCHAR ucAction; /* 0:reserved //1:Memory //2:Engine */
345 UCHAR ucReserved; /* may expand to return larger Fbdiv later */
346 UCHAR ucFbDiv; /* return value */
347 UCHAR ucPostDiv; /* return value */
348 } COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS;
350 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2 {
351 ULONG ulClock; /* When return, [23:0] return real clock */
352 UCHAR ucAction; /* 0:reserved;COMPUTE_MEMORY_PLL_PARAM:Memory;COMPUTE_ENGINE_PLL_PARAM:Engine. it return ref_div to be written to register */
353 USHORT usFbDiv; /* return Feedback value to be written to register */
354 UCHAR ucPostDiv; /* return post div to be written to register */
355 } COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2;
356 #define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
358 #define SET_CLOCK_FREQ_MASK 0x00FFFFFF /* Clock change tables only take bit [23:0] as the requested clock value */
359 #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) */
360 #define USE_MEMORY_SELF_REFRESH_MASK 0x02000000 /* Only applicable to memory clock change, when set, using memory self refresh during clock transition */
361 #define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04000000 /* Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change */
362 #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 */
363 #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 */
364 #define USE_SS_ENABLED_PIXEL_CLOCK USE_NON_BUS_CLOCK_MASK
366 #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) */
367 #define b3USE_MEMORY_SELF_REFRESH 0x02 /* Only applicable to memory clock change, when set, using memory self refresh during clock transition */
368 #define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04 /* Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change */
369 #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 */
370 #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 */
372 typedef struct _ATOM_COMPUTE_CLOCK_FREQ {
374 ULONG ulComputeClockFlag:8; /* =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM */
375 ULONG ulClockFreq:24; /* in unit of 10kHz */
377 ULONG ulClockFreq:24; /* in unit of 10kHz */
378 ULONG ulComputeClockFlag:8; /* =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM */
380 } ATOM_COMPUTE_CLOCK_FREQ;
382 typedef struct _ATOM_S_MPLL_FB_DIVIDER {
385 } ATOM_S_MPLL_FB_DIVIDER;
387 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 {
389 ATOM_COMPUTE_CLOCK_FREQ ulClock; /* Input Parameter */
390 ATOM_S_MPLL_FB_DIVIDER ulFbDiv; /* Output Parameter */
392 UCHAR ucRefDiv; /* Output Parameter */
393 UCHAR ucPostDiv; /* Output Parameter */
394 UCHAR ucCntlFlag; /* Output Parameter */
396 } COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3;
399 #define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN 1
400 #define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE 2
401 #define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE 4
403 typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER {
404 ATOM_COMPUTE_CLOCK_FREQ ulClock;
406 } DYNAMICE_MEMORY_SETTINGS_PARAMETER;
408 typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER {
409 ATOM_COMPUTE_CLOCK_FREQ ulClock;
412 } DYNAMICE_ENGINE_SETTINGS_PARAMETER;
414 /****************************************************************************/
415 /* Structures used by SetEngineClockTable */
416 /****************************************************************************/
417 typedef struct _SET_ENGINE_CLOCK_PARAMETERS {
418 ULONG ulTargetEngineClock; /* In 10Khz unit */
419 } SET_ENGINE_CLOCK_PARAMETERS;
421 typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION {
422 ULONG ulTargetEngineClock; /* In 10Khz unit */
423 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
424 } SET_ENGINE_CLOCK_PS_ALLOCATION;
426 /****************************************************************************/
427 /* Structures used by SetMemoryClockTable */
428 /****************************************************************************/
429 typedef struct _SET_MEMORY_CLOCK_PARAMETERS {
430 ULONG ulTargetMemoryClock; /* In 10Khz unit */
431 } SET_MEMORY_CLOCK_PARAMETERS;
433 typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION {
434 ULONG ulTargetMemoryClock; /* In 10Khz unit */
435 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
436 } SET_MEMORY_CLOCK_PS_ALLOCATION;
438 /****************************************************************************/
439 /* Structures used by ASIC_Init.ctb */
440 /****************************************************************************/
441 typedef struct _ASIC_INIT_PARAMETERS {
442 ULONG ulDefaultEngineClock; /* In 10Khz unit */
443 ULONG ulDefaultMemoryClock; /* In 10Khz unit */
444 } ASIC_INIT_PARAMETERS;
446 typedef struct _ASIC_INIT_PS_ALLOCATION {
447 ASIC_INIT_PARAMETERS sASICInitClocks;
448 SET_ENGINE_CLOCK_PS_ALLOCATION sReserved; /* Caller doesn't need to init this structure */
449 } ASIC_INIT_PS_ALLOCATION;
451 /****************************************************************************/
452 /* Structure used by DynamicClockGatingTable.ctb */
453 /****************************************************************************/
454 typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS {
455 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
457 } DYNAMIC_CLOCK_GATING_PARAMETERS;
458 #define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS
460 /****************************************************************************/
461 /* Structure used by EnableASIC_StaticPwrMgtTable.ctb */
462 /****************************************************************************/
463 typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS {
464 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
466 } ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS;
467 #define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
469 /****************************************************************************/
470 /* Structures used by DAC_LoadDetectionTable.ctb */
471 /****************************************************************************/
472 typedef struct _DAC_LOAD_DETECTION_PARAMETERS {
473 USHORT usDeviceID; /* {ATOM_DEVICE_CRTx_SUPPORT,ATOM_DEVICE_TVx_SUPPORT,ATOM_DEVICE_CVx_SUPPORT} */
474 UCHAR ucDacType; /* {ATOM_DAC_A,ATOM_DAC_B, ATOM_EXT_DAC} */
475 UCHAR ucMisc; /* Valid only when table revision =1.3 and above */
476 } DAC_LOAD_DETECTION_PARAMETERS;
478 /* DAC_LOAD_DETECTION_PARAMETERS.ucMisc */
479 #define DAC_LOAD_MISC_YPrPb 0x01
481 typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION {
482 DAC_LOAD_DETECTION_PARAMETERS sDacload;
483 ULONG Reserved[2]; /* Don't set this one, allocation for EXT DAC */
484 } DAC_LOAD_DETECTION_PS_ALLOCATION;
486 /****************************************************************************/
487 /* Structures used by DAC1EncoderControlTable.ctb and DAC2EncoderControlTable.ctb */
488 /****************************************************************************/
489 typedef struct _DAC_ENCODER_CONTROL_PARAMETERS {
490 USHORT usPixelClock; /* in 10KHz; for bios convenient */
491 UCHAR ucDacStandard; /* See definition of ATOM_DACx_xxx, For DEC3.0, bit 7 used as internal flag to indicate DAC2 (==1) or DAC1 (==0) */
492 UCHAR ucAction; /* 0: turn off encoder */
493 /* 1: setup and turn on encoder */
494 /* 7: ATOM_ENCODER_INIT Initialize DAC */
495 } DAC_ENCODER_CONTROL_PARAMETERS;
497 #define DAC_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PARAMETERS
499 /****************************************************************************/
500 /* Structures used by DIG1EncoderControlTable */
501 /* DIG2EncoderControlTable */
502 /* ExternalEncoderControlTable */
503 /****************************************************************************/
504 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS {
505 USHORT usPixelClock; /* in 10KHz; for bios convenient */
507 /* [2] Link Select: */
508 /* =0: PHY linkA if bfLane<3 */
509 /* =1: PHY linkB if bfLanes<3 */
510 /* =0: PHY linkA+B if bfLanes=3 */
511 /* [3] Transmitter Sel */
512 /* =0: UNIPHY or PCIEPHY */
514 UCHAR ucAction; /* =0: turn off encoder */
515 /* =1: turn on encoder */
518 /* =1: LVDS encoder */
519 /* =2: DVI encoder */
520 /* =3: HDMI encoder */
521 /* =4: SDVO encoder */
522 UCHAR ucLaneNum; /* how many lanes to enable */
524 } DIG_ENCODER_CONTROL_PARAMETERS;
525 #define DIG_ENCODER_CONTROL_PS_ALLOCATION DIG_ENCODER_CONTROL_PARAMETERS
526 #define EXTERNAL_ENCODER_CONTROL_PARAMETER DIG_ENCODER_CONTROL_PARAMETERS
529 #define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01
530 #define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00
531 #define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01
532 #define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04
533 #define ATOM_ENCODER_CONFIG_LINKA 0x00
534 #define ATOM_ENCODER_CONFIG_LINKB 0x04
535 #define ATOM_ENCODER_CONFIG_LINKA_B ATOM_TRANSMITTER_CONFIG_LINKA
536 #define ATOM_ENCODER_CONFIG_LINKB_A ATOM_ENCODER_CONFIG_LINKB
537 #define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK 0x08
538 #define ATOM_ENCODER_CONFIG_UNIPHY 0x00
539 #define ATOM_ENCODER_CONFIG_LVTMA 0x08
540 #define ATOM_ENCODER_CONFIG_TRANSMITTER1 0x00
541 #define ATOM_ENCODER_CONFIG_TRANSMITTER2 0x08
542 #define ATOM_ENCODER_CONFIG_DIGB 0x80 /* VBIOS Internal use, outside SW should set this bit=0 */
544 /* ATOM_ENABLE: Enable Encoder */
545 /* ATOM_DISABLE: Disable Encoder */
548 #define ATOM_ENCODER_MODE_DP 0
549 #define ATOM_ENCODER_MODE_LVDS 1
550 #define ATOM_ENCODER_MODE_DVI 2
551 #define ATOM_ENCODER_MODE_HDMI 3
552 #define ATOM_ENCODER_MODE_SDVO 4
553 #define ATOM_ENCODER_MODE_TV 13
554 #define ATOM_ENCODER_MODE_CV 14
555 #define ATOM_ENCODER_MODE_CRT 15
557 typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 {
560 UCHAR ucTransmitterSel:2; /* =0: UniphyAB, =1: UniphyCD =2: UniphyEF */
561 UCHAR ucLinkSel:1; /* =0: linkA/C/E =1: linkB/D/F */
563 UCHAR ucDPLinkRate:1; /* =0: 1.62Ghz, =1: 2.7Ghz */
565 UCHAR ucDPLinkRate:1; /* =0: 1.62Ghz, =1: 2.7Ghz */
567 UCHAR ucLinkSel:1; /* =0: linkA/C/E =1: linkB/D/F */
568 UCHAR ucTransmitterSel:2; /* =0: UniphyAB, =1: UniphyCD =2: UniphyEF */
571 } ATOM_DIG_ENCODER_CONFIG_V2;
573 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2 {
574 USHORT usPixelClock; /* in 10KHz; for bios convenient */
575 ATOM_DIG_ENCODER_CONFIG_V2 acConfig;
579 /* =1: LVDS encoder */
580 /* =2: DVI encoder */
581 /* =3: HDMI encoder */
582 /* =4: SDVO encoder */
583 UCHAR ucLaneNum; /* how many lanes to enable */
585 } DIG_ENCODER_CONTROL_PARAMETERS_V2;
588 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK 0x01
589 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_1_62GHZ 0x00
590 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_2_70GHZ 0x01
591 #define ATOM_ENCODER_CONFIG_V2_LINK_SEL_MASK 0x04
592 #define ATOM_ENCODER_CONFIG_V2_LINKA 0x00
593 #define ATOM_ENCODER_CONFIG_V2_LINKB 0x04
594 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK 0x18
595 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1 0x00
596 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2 0x08
597 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3 0x10
599 /****************************************************************************/
600 /* Structures used by UNIPHYTransmitterControlTable */
601 /* LVTMATransmitterControlTable */
602 /* DVOOutputControlTable */
603 /****************************************************************************/
604 typedef struct _ATOM_DP_VS_MODE {
609 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS {
611 USHORT usPixelClock; /* in 10KHz; for bios convenient */
612 USHORT usInitInfo; /* when init uniphy,lower 8bit is used for connector type defined in objectid.h */
613 ATOM_DP_VS_MODE asMode; /* DP Voltage swing mode */
616 /* [0]=0: 4 lane Link, */
617 /* =1: 8 lane Link ( Dual Links TMDS ) */
618 /* [1]=0: InCoherent mode */
619 /* =1: Coherent Mode */
620 /* [2] Link Select: */
621 /* =0: PHY linkA if bfLane<3 */
622 /* =1: PHY linkB if bfLanes<3 */
623 /* =0: PHY linkA+B if bfLanes=3 */
624 /* [5:4]PCIE lane Sel */
625 /* =0: lane 0~3 or 0~7 */
627 /* =2: lane 8~11 or 8~15 */
629 UCHAR ucAction; /* =0: turn off encoder */
630 /* =1: turn on encoder */
632 } DIG_TRANSMITTER_CONTROL_PARAMETERS;
634 #define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PARAMETERS
637 #define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK 0x00ff
640 #define ATOM_TRANSMITTER_CONFIG_8LANE_LINK 0x01
641 #define ATOM_TRANSMITTER_CONFIG_COHERENT 0x02
642 #define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK 0x04
643 #define ATOM_TRANSMITTER_CONFIG_LINKA 0x00
644 #define ATOM_TRANSMITTER_CONFIG_LINKB 0x04
645 #define ATOM_TRANSMITTER_CONFIG_LINKA_B 0x00
646 #define ATOM_TRANSMITTER_CONFIG_LINKB_A 0x04
648 #define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK 0x08 /* only used when ATOM_TRANSMITTER_ACTION_ENABLE */
649 #define ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER 0x00 /* only used when ATOM_TRANSMITTER_ACTION_ENABLE */
650 #define ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER 0x08 /* only used when ATOM_TRANSMITTER_ACTION_ENABLE */
652 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_MASK 0x30
653 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL 0x00
654 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PCIE 0x20
655 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_XTALIN 0x30
656 #define ATOM_TRANSMITTER_CONFIG_LANE_SEL_MASK 0xc0
657 #define ATOM_TRANSMITTER_CONFIG_LANE_0_3 0x00
658 #define ATOM_TRANSMITTER_CONFIG_LANE_0_7 0x00
659 #define ATOM_TRANSMITTER_CONFIG_LANE_4_7 0x40
660 #define ATOM_TRANSMITTER_CONFIG_LANE_8_11 0x80
661 #define ATOM_TRANSMITTER_CONFIG_LANE_8_15 0x80
662 #define ATOM_TRANSMITTER_CONFIG_LANE_12_15 0xc0
665 #define ATOM_TRANSMITTER_ACTION_DISABLE 0
666 #define ATOM_TRANSMITTER_ACTION_ENABLE 1
667 #define ATOM_TRANSMITTER_ACTION_LCD_BLOFF 2
668 #define ATOM_TRANSMITTER_ACTION_LCD_BLON 3
669 #define ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL 4
670 #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_START 5
671 #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_STOP 6
672 #define ATOM_TRANSMITTER_ACTION_INIT 7
673 #define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT 8
674 #define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT 9
675 #define ATOM_TRANSMITTER_ACTION_SETUP 10
676 #define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH 11
678 /* Following are used for DigTransmitterControlTable ver1.2 */
679 typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2 {
681 UCHAR ucTransmitterSel:2; /* bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) */
682 /* =1 Dig Transmitter 2 ( Uniphy CD ) */
683 /* =2 Dig Transmitter 3 ( Uniphy EF ) */
685 UCHAR fDPConnector:1; /* bit4=0: DP connector =1: None DP connector */
686 UCHAR ucEncoderSel:1; /* bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) */
687 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 */
688 /* =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 */
690 UCHAR fCoherentMode:1; /* bit1=1: Coherent Mode ( for DVI/HDMI mode ) */
691 UCHAR fDualLinkConnector:1; /* bit0=1: Dual Link DVI connector */
693 UCHAR fDualLinkConnector:1; /* bit0=1: Dual Link DVI connector */
694 UCHAR fCoherentMode:1; /* bit1=1: Coherent Mode ( for DVI/HDMI mode ) */
695 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 */
696 /* =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 */
697 UCHAR ucEncoderSel:1; /* bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) */
698 UCHAR fDPConnector:1; /* bit4=0: DP connector =1: None DP connector */
700 UCHAR ucTransmitterSel:2; /* bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) */
701 /* =1 Dig Transmitter 2 ( Uniphy CD ) */
702 /* =2 Dig Transmitter 3 ( Uniphy EF ) */
704 } ATOM_DIG_TRANSMITTER_CONFIG_V2;
708 #define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR 0x01
711 #define ATOM_TRANSMITTER_CONFIG_V2_COHERENT 0x02
714 #define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK 0x04
715 #define ATOM_TRANSMITTER_CONFIG_V2_LINKA 0x00
716 #define ATOM_TRANSMITTER_CONFIG_V2_LINKB 0x04
719 #define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK 0x08
720 #define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER 0x00 /* only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP */
721 #define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER 0x08 /* only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP */
724 #define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR 0x10
727 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK 0xC0
728 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1 0x00 /* AB */
729 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2 0x40 /* CD */
730 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3 0x80 /* EF */
732 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2 {
734 USHORT usPixelClock; /* in 10KHz; for bios convenient */
735 USHORT usInitInfo; /* when init uniphy,lower 8bit is used for connector type defined in objectid.h */
736 ATOM_DP_VS_MODE asMode; /* DP Voltage swing mode */
738 ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig;
739 UCHAR ucAction; /* define as ATOM_TRANSMITER_ACTION_XXX */
741 } DIG_TRANSMITTER_CONTROL_PARAMETERS_V2;
743 /****************************************************************************/
744 /* Structures used by DAC1OuputControlTable */
745 /* DAC2OuputControlTable */
746 /* LVTMAOutputControlTable (Before DEC30) */
747 /* TMDSAOutputControlTable (Before DEC30) */
748 /****************************************************************************/
749 typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS {
750 UCHAR ucAction; /* Possible input:ATOM_ENABLE||ATOMDISABLE */
751 /* When the display is LCD, in addition to above: */
752 /* ATOM_LCD_BLOFF|| ATOM_LCD_BLON ||ATOM_LCD_BL_BRIGHTNESS_CONTROL||ATOM_LCD_SELFTEST_START|| */
753 /* ATOM_LCD_SELFTEST_STOP */
755 UCHAR aucPadding[3]; /* padding to DWORD aligned */
756 } DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS;
758 #define DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
760 #define CRT1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
761 #define CRT1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
763 #define CRT2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
764 #define CRT2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
766 #define CV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
767 #define CV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
769 #define TV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
770 #define TV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
772 #define DFP1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
773 #define DFP1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
775 #define DFP2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
776 #define DFP2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
778 #define LCD1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
779 #define LCD1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
781 #define DVO_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
782 #define DVO_OUTPUT_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PS_ALLOCATION
783 #define DVO_OUTPUT_CONTROL_PARAMETERS_V3 DIG_TRANSMITTER_CONTROL_PARAMETERS
785 /****************************************************************************/
786 /* Structures used by BlankCRTCTable */
787 /****************************************************************************/
788 typedef struct _BLANK_CRTC_PARAMETERS {
789 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
790 UCHAR ucBlanking; /* ATOM_BLANKING or ATOM_BLANKINGOFF */
791 USHORT usBlackColorRCr;
792 USHORT usBlackColorGY;
793 USHORT usBlackColorBCb;
794 } BLANK_CRTC_PARAMETERS;
795 #define BLANK_CRTC_PS_ALLOCATION BLANK_CRTC_PARAMETERS
797 /****************************************************************************/
798 /* Structures used by EnableCRTCTable */
799 /* EnableCRTCMemReqTable */
800 /* UpdateCRTC_DoubleBufferRegistersTable */
801 /****************************************************************************/
802 typedef struct _ENABLE_CRTC_PARAMETERS {
803 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
804 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
806 } ENABLE_CRTC_PARAMETERS;
807 #define ENABLE_CRTC_PS_ALLOCATION ENABLE_CRTC_PARAMETERS
809 /****************************************************************************/
810 /* Structures used by SetCRTC_OverScanTable */
811 /****************************************************************************/
812 typedef struct _SET_CRTC_OVERSCAN_PARAMETERS {
813 USHORT usOverscanRight; /* right */
814 USHORT usOverscanLeft; /* left */
815 USHORT usOverscanBottom; /* bottom */
816 USHORT usOverscanTop; /* top */
817 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
819 } SET_CRTC_OVERSCAN_PARAMETERS;
820 #define SET_CRTC_OVERSCAN_PS_ALLOCATION SET_CRTC_OVERSCAN_PARAMETERS
822 /****************************************************************************/
823 /* Structures used by SetCRTC_ReplicationTable */
824 /****************************************************************************/
825 typedef struct _SET_CRTC_REPLICATION_PARAMETERS {
826 UCHAR ucH_Replication; /* horizontal replication */
827 UCHAR ucV_Replication; /* vertical replication */
828 UCHAR usCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
830 } SET_CRTC_REPLICATION_PARAMETERS;
831 #define SET_CRTC_REPLICATION_PS_ALLOCATION SET_CRTC_REPLICATION_PARAMETERS
833 /****************************************************************************/
834 /* Structures used by SelectCRTC_SourceTable */
835 /****************************************************************************/
836 typedef struct _SELECT_CRTC_SOURCE_PARAMETERS {
837 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
838 UCHAR ucDevice; /* ATOM_DEVICE_CRT1|ATOM_DEVICE_CRT2|.... */
840 } SELECT_CRTC_SOURCE_PARAMETERS;
841 #define SELECT_CRTC_SOURCE_PS_ALLOCATION SELECT_CRTC_SOURCE_PARAMETERS
843 typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2 {
844 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
845 UCHAR ucEncoderID; /* DAC1/DAC2/TVOUT/DIG1/DIG2/DVO */
846 UCHAR ucEncodeMode; /* Encoding mode, only valid when using DIG1/DIG2/DVO */
848 } SELECT_CRTC_SOURCE_PARAMETERS_V2;
851 /* #define ASIC_INT_DAC1_ENCODER_ID 0x00 */
852 /* #define ASIC_INT_TV_ENCODER_ID 0x02 */
853 /* #define ASIC_INT_DIG1_ENCODER_ID 0x03 */
854 /* #define ASIC_INT_DAC2_ENCODER_ID 0x04 */
855 /* #define ASIC_EXT_TV_ENCODER_ID 0x06 */
856 /* #define ASIC_INT_DVO_ENCODER_ID 0x07 */
857 /* #define ASIC_INT_DIG2_ENCODER_ID 0x09 */
858 /* #define ASIC_EXT_DIG_ENCODER_ID 0x05 */
861 /* #define ATOM_ENCODER_MODE_DP 0 */
862 /* #define ATOM_ENCODER_MODE_LVDS 1 */
863 /* #define ATOM_ENCODER_MODE_DVI 2 */
864 /* #define ATOM_ENCODER_MODE_HDMI 3 */
865 /* #define ATOM_ENCODER_MODE_SDVO 4 */
866 /* #define ATOM_ENCODER_MODE_TV 13 */
867 /* #define ATOM_ENCODER_MODE_CV 14 */
868 /* #define ATOM_ENCODER_MODE_CRT 15 */
870 /****************************************************************************/
871 /* Structures used by SetPixelClockTable */
872 /* GetPixelClockTable */
873 /****************************************************************************/
874 /* Major revision=1., Minor revision=1 */
875 typedef struct _PIXEL_CLOCK_PARAMETERS {
876 USHORT usPixelClock; /* in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
877 /* 0 means disable PPLL */
878 USHORT usRefDiv; /* Reference divider */
879 USHORT usFbDiv; /* feedback divider */
880 UCHAR ucPostDiv; /* post divider */
881 UCHAR ucFracFbDiv; /* fractional feedback divider */
882 UCHAR ucPpll; /* ATOM_PPLL1 or ATOM_PPL2 */
883 UCHAR ucRefDivSrc; /* ATOM_PJITTER or ATO_NONPJITTER */
884 UCHAR ucCRTC; /* Which CRTC uses this Ppll */
886 } PIXEL_CLOCK_PARAMETERS;
888 /* Major revision=1., Minor revision=2, add ucMiscIfno */
890 #define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1
891 #define MISC_DEVICE_INDEX_MASK 0xF0
892 #define MISC_DEVICE_INDEX_SHIFT 4
894 typedef struct _PIXEL_CLOCK_PARAMETERS_V2 {
895 USHORT usPixelClock; /* in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
896 /* 0 means disable PPLL */
897 USHORT usRefDiv; /* Reference divider */
898 USHORT usFbDiv; /* feedback divider */
899 UCHAR ucPostDiv; /* post divider */
900 UCHAR ucFracFbDiv; /* fractional feedback divider */
901 UCHAR ucPpll; /* ATOM_PPLL1 or ATOM_PPL2 */
902 UCHAR ucRefDivSrc; /* ATOM_PJITTER or ATO_NONPJITTER */
903 UCHAR ucCRTC; /* Which CRTC uses this Ppll */
904 UCHAR ucMiscInfo; /* Different bits for different purpose, bit [7:4] as device index, bit[0]=Force prog */
905 } PIXEL_CLOCK_PARAMETERS_V2;
907 /* Major revision=1., Minor revision=3, structure/definition change */
909 /* ATOM_ENCODER_MODE_DP */
910 /* ATOM_ENOCDER_MODE_LVDS */
911 /* ATOM_ENOCDER_MODE_DVI */
912 /* ATOM_ENOCDER_MODE_HDMI */
913 /* ATOM_ENOCDER_MODE_SDVO */
914 /* ATOM_ENCODER_MODE_TV 13 */
915 /* ATOM_ENCODER_MODE_CV 14 */
916 /* ATOM_ENCODER_MODE_CRT 15 */
919 /* #define DVO_ENCODER_CONFIG_RATE_SEL 0x01 */
920 /* #define DVO_ENCODER_CONFIG_DDR_SPEED 0x00 */
921 /* #define DVO_ENCODER_CONFIG_SDR_SPEED 0x01 */
922 /* #define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c */
923 /* #define DVO_ENCODER_CONFIG_LOW12BIT 0x00 */
924 /* #define DVO_ENCODER_CONFIG_UPPER12BIT 0x04 */
925 /* #define DVO_ENCODER_CONFIG_24BIT 0x08 */
927 /* ucMiscInfo: also changed, see below */
928 #define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL 0x01
929 #define PIXEL_CLOCK_MISC_VGA_MODE 0x02
930 #define PIXEL_CLOCK_MISC_CRTC_SEL_MASK 0x04
931 #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1 0x00
932 #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2 0x04
933 #define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK 0x08
935 typedef struct _PIXEL_CLOCK_PARAMETERS_V3 {
936 USHORT usPixelClock; /* in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
937 /* 0 means disable PPLL. For VGA PPLL,make sure this value is not 0. */
938 USHORT usRefDiv; /* Reference divider */
939 USHORT usFbDiv; /* feedback divider */
940 UCHAR ucPostDiv; /* post divider */
941 UCHAR ucFracFbDiv; /* fractional feedback divider */
942 UCHAR ucPpll; /* ATOM_PPLL1 or ATOM_PPL2 */
943 UCHAR ucTransmitterId; /* graphic encoder id defined in objectId.h */
945 UCHAR ucEncoderMode; /* encoder type defined as ATOM_ENCODER_MODE_DP/DVI/HDMI/ */
946 UCHAR ucDVOConfig; /* when use DVO, need to know SDR/DDR, 12bit or 24bit */
948 UCHAR ucMiscInfo; /* bit[0]=Force program, bit[1]= set pclk for VGA, b[2]= CRTC sel */
949 /* bit[3]=0:use PPLL for dispclk source, =1: use engine clock for dispclock source */
950 } PIXEL_CLOCK_PARAMETERS_V3;
952 #define PIXEL_CLOCK_PARAMETERS_LAST PIXEL_CLOCK_PARAMETERS_V2
953 #define GET_PIXEL_CLOCK_PS_ALLOCATION PIXEL_CLOCK_PARAMETERS_LAST
955 /****************************************************************************/
956 /* Structures used by AdjustDisplayPllTable */
957 /****************************************************************************/
958 typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS {
960 UCHAR ucTransmitterID;
963 UCHAR ucDVOConfig; /* if DVO, need passing link rate and output 12bitlow or 24bit */
964 UCHAR ucConfig; /* if none DVO, not defined yet */
967 } ADJUST_DISPLAY_PLL_PARAMETERS;
969 #define ADJUST_DISPLAY_CONFIG_SS_ENABLE 0x10
971 #define ADJUST_DISPLAY_PLL_PS_ALLOCATION ADJUST_DISPLAY_PLL_PARAMETERS
973 /****************************************************************************/
974 /* Structures used by EnableYUVTable */
975 /****************************************************************************/
976 typedef struct _ENABLE_YUV_PARAMETERS {
977 UCHAR ucEnable; /* ATOM_ENABLE:Enable YUV or ATOM_DISABLE:Disable YUV (RGB) */
978 UCHAR ucCRTC; /* Which CRTC needs this YUV or RGB format */
980 } ENABLE_YUV_PARAMETERS;
981 #define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS
983 /****************************************************************************/
984 /* Structures used by GetMemoryClockTable */
985 /****************************************************************************/
986 typedef struct _GET_MEMORY_CLOCK_PARAMETERS {
987 ULONG ulReturnMemoryClock; /* current memory speed in 10KHz unit */
988 } GET_MEMORY_CLOCK_PARAMETERS;
989 #define GET_MEMORY_CLOCK_PS_ALLOCATION GET_MEMORY_CLOCK_PARAMETERS
991 /****************************************************************************/
992 /* Structures used by GetEngineClockTable */
993 /****************************************************************************/
994 typedef struct _GET_ENGINE_CLOCK_PARAMETERS {
995 ULONG ulReturnEngineClock; /* current engine speed in 10KHz unit */
996 } GET_ENGINE_CLOCK_PARAMETERS;
997 #define GET_ENGINE_CLOCK_PS_ALLOCATION GET_ENGINE_CLOCK_PARAMETERS
999 /****************************************************************************/
1000 /* Following Structures and constant may be obsolete */
1001 /****************************************************************************/
1002 /* Maxium 8 bytes,the data read in will be placed in the parameter space. */
1003 /* Read operaion successeful when the paramter space is non-zero, otherwise read operation failed */
1004 typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS {
1005 USHORT usPrescale; /* Ratio between Engine clock and I2C clock */
1006 USHORT usVRAMAddress; /* Adress in Frame Buffer where to pace raw EDID */
1007 USHORT usStatus; /* When use output: lower byte EDID checksum, high byte hardware status */
1008 /* WHen use input: lower byte as 'byte to read':currently limited to 128byte or 1byte */
1009 UCHAR ucSlaveAddr; /* Read from which slave */
1010 UCHAR ucLineNumber; /* Read from which HW assisted line */
1011 } READ_EDID_FROM_HW_I2C_DATA_PARAMETERS;
1012 #define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1014 #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE 0
1015 #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES 1
1016 #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK 2
1017 #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK 3
1018 #define ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK 4
1020 typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS {
1021 USHORT usPrescale; /* Ratio between Engine clock and I2C clock */
1022 USHORT usByteOffset; /* Write to which byte */
1023 /* Upper portion of usByteOffset is Format of data */
1024 /* 1bytePS+offsetPS */
1025 /* 2bytesPS+offsetPS */
1026 /* blockID+offsetPS */
1027 /* blockID+offsetID */
1028 /* blockID+counterID+offsetID */
1029 UCHAR ucData; /* PS data1 */
1030 UCHAR ucStatus; /* Status byte 1=success, 2=failure, Also is used as PS data2 */
1031 UCHAR ucSlaveAddr; /* Write to which slave */
1032 UCHAR ucLineNumber; /* Write from which HW assisted line */
1033 } WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS;
1035 #define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1037 typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS {
1038 USHORT usPrescale; /* Ratio between Engine clock and I2C clock */
1039 UCHAR ucSlaveAddr; /* Write to which slave */
1040 UCHAR ucLineNumber; /* Write from which HW assisted line */
1041 } SET_UP_HW_I2C_DATA_PARAMETERS;
1043 /**************************************************************************/
1044 #define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1046 /****************************************************************************/
1047 /* Structures used by PowerConnectorDetectionTable */
1048 /****************************************************************************/
1049 typedef struct _POWER_CONNECTOR_DETECTION_PARAMETERS {
1050 UCHAR ucPowerConnectorStatus; /* Used for return value 0: detected, 1:not detected */
1051 UCHAR ucPwrBehaviorId;
1052 USHORT usPwrBudget; /* how much power currently boot to in unit of watt */
1053 } POWER_CONNECTOR_DETECTION_PARAMETERS;
1055 typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION {
1056 UCHAR ucPowerConnectorStatus; /* Used for return value 0: detected, 1:not detected */
1058 USHORT usPwrBudget; /* how much power currently boot to in unit of watt */
1059 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1060 } POWER_CONNECTOR_DETECTION_PS_ALLOCATION;
1062 /****************************LVDS SS Command Table Definitions**********************/
1064 /****************************************************************************/
1065 /* Structures used by EnableSpreadSpectrumOnPPLLTable */
1066 /****************************************************************************/
1067 typedef struct _ENABLE_LVDS_SS_PARAMETERS {
1068 USHORT usSpreadSpectrumPercentage;
1069 UCHAR ucSpreadSpectrumType; /* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1070 UCHAR ucSpreadSpectrumStepSize_Delay; /* bits3:2 SS_STEP_SIZE; bit 6:4 SS_DELAY */
1071 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
1073 } ENABLE_LVDS_SS_PARAMETERS;
1075 /* ucTableFormatRevision=1,ucTableContentRevision=2 */
1076 typedef struct _ENABLE_LVDS_SS_PARAMETERS_V2 {
1077 USHORT usSpreadSpectrumPercentage;
1078 UCHAR ucSpreadSpectrumType; /* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1079 UCHAR ucSpreadSpectrumStep; /* */
1080 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
1081 UCHAR ucSpreadSpectrumDelay;
1082 UCHAR ucSpreadSpectrumRange;
1084 } ENABLE_LVDS_SS_PARAMETERS_V2;
1086 /* This new structure is based on ENABLE_LVDS_SS_PARAMETERS but expands to SS on PPLL, so other devices can use SS. */
1087 typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL {
1088 USHORT usSpreadSpectrumPercentage;
1089 UCHAR ucSpreadSpectrumType; /* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1090 UCHAR ucSpreadSpectrumStep; /* */
1091 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
1092 UCHAR ucSpreadSpectrumDelay;
1093 UCHAR ucSpreadSpectrumRange;
1094 UCHAR ucPpll; /* ATOM_PPLL1/ATOM_PPLL2 */
1095 } ENABLE_SPREAD_SPECTRUM_ON_PPLL;
1097 #define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL
1099 /**************************************************************************/
1101 typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION {
1102 PIXEL_CLOCK_PARAMETERS sPCLKInput;
1103 ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved; /* Caller doesn't need to init this portion */
1104 } SET_PIXEL_CLOCK_PS_ALLOCATION;
1106 #define ENABLE_VGA_RENDER_PS_ALLOCATION SET_PIXEL_CLOCK_PS_ALLOCATION
1108 /****************************************************************************/
1109 /* Structures used by ### */
1110 /****************************************************************************/
1111 typedef struct _MEMORY_TRAINING_PARAMETERS {
1112 ULONG ulTargetMemoryClock; /* In 10Khz unit */
1113 } MEMORY_TRAINING_PARAMETERS;
1114 #define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS
1116 /****************************LVDS and other encoder command table definitions **********************/
1118 /****************************************************************************/
1119 /* Structures used by LVDSEncoderControlTable (Before DCE30) */
1120 /* LVTMAEncoderControlTable (Before DCE30) */
1121 /* TMDSAEncoderControlTable (Before DCE30) */
1122 /****************************************************************************/
1123 typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS {
1124 USHORT usPixelClock; /* in 10KHz; for bios convenient */
1125 UCHAR ucMisc; /* bit0=0: Enable single link */
1126 /* =1: Enable dual link */
1127 /* Bit1=0: 666RGB */
1129 UCHAR ucAction; /* 0: turn off encoder */
1130 /* 1: setup and turn on encoder */
1131 } LVDS_ENCODER_CONTROL_PARAMETERS;
1133 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION LVDS_ENCODER_CONTROL_PARAMETERS
1135 #define TMDS1_ENCODER_CONTROL_PARAMETERS LVDS_ENCODER_CONTROL_PARAMETERS
1136 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION TMDS1_ENCODER_CONTROL_PARAMETERS
1138 #define TMDS2_ENCODER_CONTROL_PARAMETERS TMDS1_ENCODER_CONTROL_PARAMETERS
1139 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION TMDS2_ENCODER_CONTROL_PARAMETERS
1141 /* ucTableFormatRevision=1,ucTableContentRevision=2 */
1142 typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS_V2 {
1143 USHORT usPixelClock; /* in 10KHz; for bios convenient */
1144 UCHAR ucMisc; /* see PANEL_ENCODER_MISC_xx defintions below */
1145 UCHAR ucAction; /* 0: turn off encoder */
1146 /* 1: setup and turn on encoder */
1147 UCHAR ucTruncate; /* bit0=0: Disable truncate */
1148 /* =1: Enable truncate */
1149 /* bit4=0: 666RGB */
1151 UCHAR ucSpatial; /* bit0=0: Disable spatial dithering */
1152 /* =1: Enable spatial dithering */
1153 /* bit4=0: 666RGB */
1155 UCHAR ucTemporal; /* bit0=0: Disable temporal dithering */
1156 /* =1: Enable temporal dithering */
1157 /* bit4=0: 666RGB */
1159 /* bit5=0: Gray level 2 */
1160 /* =1: Gray level 4 */
1161 UCHAR ucFRC; /* bit4=0: 25FRC_SEL pattern E */
1162 /* =1: 25FRC_SEL pattern F */
1163 /* bit6:5=0: 50FRC_SEL pattern A */
1164 /* =1: 50FRC_SEL pattern B */
1165 /* =2: 50FRC_SEL pattern C */
1166 /* =3: 50FRC_SEL pattern D */
1167 /* bit7=0: 75FRC_SEL pattern E */
1168 /* =1: 75FRC_SEL pattern F */
1169 } LVDS_ENCODER_CONTROL_PARAMETERS_V2;
1171 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
1173 #define TMDS1_ENCODER_CONTROL_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
1174 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2
1176 #define TMDS2_ENCODER_CONTROL_PARAMETERS_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2
1177 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS2_ENCODER_CONTROL_PARAMETERS_V2
1179 #define LVDS_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V2
1180 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
1182 #define TMDS1_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
1183 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS1_ENCODER_CONTROL_PARAMETERS_V3
1185 #define TMDS2_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
1186 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3
1188 /****************************************************************************/
1189 /* Structures used by ### */
1190 /****************************************************************************/
1191 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS {
1192 UCHAR ucEnable; /* Enable or Disable External TMDS encoder */
1193 UCHAR ucMisc; /* Bit0=0:Enable Single link;=1:Enable Dual link;Bit1 {=0:666RGB, =1:888RGB} */
1195 } ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS;
1197 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION {
1198 ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder;
1199 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; /* Caller doesn't need to init this portion */
1200 } ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION;
1202 #define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
1204 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2 {
1205 ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder;
1206 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; /* Caller doesn't need to init this portion */
1207 } ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2;
1209 typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION {
1210 DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder;
1211 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1212 } EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION;
1214 /****************************************************************************/
1215 /* Structures used by DVOEncoderControlTable */
1216 /****************************************************************************/
1217 /* ucTableFormatRevision=1,ucTableContentRevision=3 */
1220 #define DVO_ENCODER_CONFIG_RATE_SEL 0x01
1221 #define DVO_ENCODER_CONFIG_DDR_SPEED 0x00
1222 #define DVO_ENCODER_CONFIG_SDR_SPEED 0x01
1223 #define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c
1224 #define DVO_ENCODER_CONFIG_LOW12BIT 0x00
1225 #define DVO_ENCODER_CONFIG_UPPER12BIT 0x04
1226 #define DVO_ENCODER_CONFIG_24BIT 0x08
1228 typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3 {
1229 USHORT usPixelClock;
1231 UCHAR ucAction; /* ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT */
1233 } DVO_ENCODER_CONTROL_PARAMETERS_V3;
1234 #define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3 DVO_ENCODER_CONTROL_PARAMETERS_V3
1236 /* ucTableFormatRevision=1 */
1237 /* ucTableContentRevision=3 structure is not changed but usMisc add bit 1 as another input for */
1238 /* bit1=0: non-coherent mode */
1239 /* =1: coherent mode */
1241 /* ========================================================================================== */
1242 /* Only change is here next time when changing encoder parameter definitions again! */
1243 #define LVDS_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
1244 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_LAST LVDS_ENCODER_CONTROL_PARAMETERS_LAST
1246 #define TMDS1_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
1247 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS1_ENCODER_CONTROL_PARAMETERS_LAST
1249 #define TMDS2_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
1250 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST
1252 #define DVO_ENCODER_CONTROL_PARAMETERS_LAST DVO_ENCODER_CONTROL_PARAMETERS
1253 #define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST DVO_ENCODER_CONTROL_PS_ALLOCATION
1255 /* ========================================================================================== */
1256 #define PANEL_ENCODER_MISC_DUAL 0x01
1257 #define PANEL_ENCODER_MISC_COHERENT 0x02
1258 #define PANEL_ENCODER_MISC_TMDS_LINKB 0x04
1259 #define PANEL_ENCODER_MISC_HDMI_TYPE 0x08
1261 #define PANEL_ENCODER_ACTION_DISABLE ATOM_DISABLE
1262 #define PANEL_ENCODER_ACTION_ENABLE ATOM_ENABLE
1263 #define PANEL_ENCODER_ACTION_COHERENTSEQ (ATOM_ENABLE+1)
1265 #define PANEL_ENCODER_TRUNCATE_EN 0x01
1266 #define PANEL_ENCODER_TRUNCATE_DEPTH 0x10
1267 #define PANEL_ENCODER_SPATIAL_DITHER_EN 0x01
1268 #define PANEL_ENCODER_SPATIAL_DITHER_DEPTH 0x10
1269 #define PANEL_ENCODER_TEMPORAL_DITHER_EN 0x01
1270 #define PANEL_ENCODER_TEMPORAL_DITHER_DEPTH 0x10
1271 #define PANEL_ENCODER_TEMPORAL_LEVEL_4 0x20
1272 #define PANEL_ENCODER_25FRC_MASK 0x10
1273 #define PANEL_ENCODER_25FRC_E 0x00
1274 #define PANEL_ENCODER_25FRC_F 0x10
1275 #define PANEL_ENCODER_50FRC_MASK 0x60
1276 #define PANEL_ENCODER_50FRC_A 0x00
1277 #define PANEL_ENCODER_50FRC_B 0x20
1278 #define PANEL_ENCODER_50FRC_C 0x40
1279 #define PANEL_ENCODER_50FRC_D 0x60
1280 #define PANEL_ENCODER_75FRC_MASK 0x80
1281 #define PANEL_ENCODER_75FRC_E 0x00
1282 #define PANEL_ENCODER_75FRC_F 0x80
1284 /****************************************************************************/
1285 /* Structures used by SetVoltageTable */
1286 /****************************************************************************/
1287 #define SET_VOLTAGE_TYPE_ASIC_VDDC 1
1288 #define SET_VOLTAGE_TYPE_ASIC_MVDDC 2
1289 #define SET_VOLTAGE_TYPE_ASIC_MVDDQ 3
1290 #define SET_VOLTAGE_TYPE_ASIC_VDDCI 4
1291 #define SET_VOLTAGE_INIT_MODE 5
1292 #define SET_VOLTAGE_GET_MAX_VOLTAGE 6 /* Gets the Max. voltage for the soldered Asic */
1294 #define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE 0x1
1295 #define SET_ASIC_VOLTAGE_MODE_SOURCE_A 0x2
1296 #define SET_ASIC_VOLTAGE_MODE_SOURCE_B 0x4
1298 #define SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE 0x0
1299 #define SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL 0x1
1300 #define SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK 0x2
1302 typedef struct _SET_VOLTAGE_PARAMETERS {
1303 UCHAR ucVoltageType; /* To tell which voltage to set up, VDDC/MVDDC/MVDDQ */
1304 UCHAR ucVoltageMode; /* To set all, to set source A or source B or ... */
1305 UCHAR ucVoltageIndex; /* An index to tell which voltage level */
1307 } SET_VOLTAGE_PARAMETERS;
1309 typedef struct _SET_VOLTAGE_PARAMETERS_V2 {
1310 UCHAR ucVoltageType; /* To tell which voltage to set up, VDDC/MVDDC/MVDDQ */
1311 UCHAR ucVoltageMode; /* Not used, maybe use for state machine for differen power mode */
1312 USHORT usVoltageLevel; /* real voltage level */
1313 } SET_VOLTAGE_PARAMETERS_V2;
1315 typedef struct _SET_VOLTAGE_PS_ALLOCATION {
1316 SET_VOLTAGE_PARAMETERS sASICSetVoltage;
1317 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1318 } SET_VOLTAGE_PS_ALLOCATION;
1320 /****************************************************************************/
1321 /* Structures used by TVEncoderControlTable */
1322 /****************************************************************************/
1323 typedef struct _TV_ENCODER_CONTROL_PARAMETERS {
1324 USHORT usPixelClock; /* in 10KHz; for bios convenient */
1325 UCHAR ucTvStandard; /* See definition "ATOM_TV_NTSC ..." */
1326 UCHAR ucAction; /* 0: turn off encoder */
1327 /* 1: setup and turn on encoder */
1328 } TV_ENCODER_CONTROL_PARAMETERS;
1330 typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION {
1331 TV_ENCODER_CONTROL_PARAMETERS sTVEncoder;
1332 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; /* Don't set this one */
1333 } TV_ENCODER_CONTROL_PS_ALLOCATION;
1335 /* ==============================Data Table Portion==================================== */
1338 #define UTEMP USHORT
1339 #define USHORT void*
1342 /****************************************************************************/
1343 /* Structure used in Data.mtb */
1344 /****************************************************************************/
1345 typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES {
1346 USHORT UtilityPipeLine; /* Offest for the utility to get parser info,Don't change this position! */
1347 USHORT MultimediaCapabilityInfo; /* Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios */
1348 USHORT MultimediaConfigInfo; /* Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios */
1349 USHORT StandardVESA_Timing; /* Only used by Bios */
1350 USHORT FirmwareInfo; /* Shared by various SW components,latest version 1.4 */
1351 USHORT DAC_Info; /* Will be obsolete from R600 */
1352 USHORT LVDS_Info; /* Shared by various SW components,latest version 1.1 */
1353 USHORT TMDS_Info; /* Will be obsolete from R600 */
1354 USHORT AnalogTV_Info; /* Shared by various SW components,latest version 1.1 */
1355 USHORT SupportedDevicesInfo; /* Will be obsolete from R600 */
1356 USHORT GPIO_I2C_Info; /* Shared by various SW components,latest version 1.2 will be used from R600 */
1357 USHORT VRAM_UsageByFirmware; /* Shared by various SW components,latest version 1.3 will be used from R600 */
1358 USHORT GPIO_Pin_LUT; /* Shared by various SW components,latest version 1.1 */
1359 USHORT VESA_ToInternalModeLUT; /* Only used by Bios */
1360 USHORT ComponentVideoInfo; /* Shared by various SW components,latest version 2.1 will be used from R600 */
1361 USHORT PowerPlayInfo; /* Shared by various SW components,latest version 2.1,new design from R600 */
1362 USHORT CompassionateData; /* Will be obsolete from R600 */
1363 USHORT SaveRestoreInfo; /* Only used by Bios */
1364 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 */
1365 USHORT OemInfo; /* Defined and used by external SW, should be obsolete soon */
1366 USHORT XTMDS_Info; /* Will be obsolete from R600 */
1367 USHORT MclkSS_Info; /* Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used */
1368 USHORT Object_Header; /* Shared by various SW components,latest version 1.1 */
1369 USHORT IndirectIOAccess; /* Only used by Bios,this table position can't change at all!! */
1370 USHORT MC_InitParameter; /* Only used by command table */
1371 USHORT ASIC_VDDC_Info; /* Will be obsolete from R600 */
1372 USHORT ASIC_InternalSS_Info; /* New tabel name from R600, used to be called "ASIC_MVDDC_Info" */
1373 USHORT TV_VideoMode; /* Only used by command table */
1374 USHORT VRAM_Info; /* Only used by command table, latest version 1.3 */
1375 USHORT MemoryTrainingInfo; /* Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1 */
1376 USHORT IntegratedSystemInfo; /* Shared by various SW components */
1377 USHORT ASIC_ProfilingInfo; /* New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600 */
1378 USHORT VoltageObjectInfo; /* Shared by various SW components, latest version 1.1 */
1379 USHORT PowerSourceInfo; /* Shared by various SW components, latest versoin 1.1 */
1380 } ATOM_MASTER_LIST_OF_DATA_TABLES;
1383 #define USHORT UTEMP
1386 typedef struct _ATOM_MASTER_DATA_TABLE {
1387 ATOM_COMMON_TABLE_HEADER sHeader;
1388 ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
1389 } ATOM_MASTER_DATA_TABLE;
1391 /****************************************************************************/
1392 /* Structure used in MultimediaCapabilityInfoTable */
1393 /****************************************************************************/
1394 typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO {
1395 ATOM_COMMON_TABLE_HEADER sHeader;
1396 ULONG ulSignature; /* HW info table signature string "$ATI" */
1397 UCHAR ucI2C_Type; /* I2C type (normal GP_IO, ImpactTV GP_IO, Dedicated I2C pin, etc) */
1398 UCHAR ucTV_OutInfo; /* Type of TV out supported (3:0) and video out crystal frequency (6:4) and TV data port (7) */
1399 UCHAR ucVideoPortInfo; /* Provides the video port capabilities */
1400 UCHAR ucHostPortInfo; /* Provides host port configuration information */
1401 } ATOM_MULTIMEDIA_CAPABILITY_INFO;
1403 /****************************************************************************/
1404 /* Structure used in MultimediaConfigInfoTable */
1405 /****************************************************************************/
1406 typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO {
1407 ATOM_COMMON_TABLE_HEADER sHeader;
1408 ULONG ulSignature; /* MM info table signature sting "$MMT" */
1409 UCHAR ucTunerInfo; /* Type of tuner installed on the adapter (4:0) and video input for tuner (7:5) */
1410 UCHAR ucAudioChipInfo; /* List the audio chip type (3:0) product type (4) and OEM revision (7:5) */
1411 UCHAR ucProductID; /* Defines as OEM ID or ATI board ID dependent on product type setting */
1412 UCHAR ucMiscInfo1; /* Tuner voltage (1:0) HW teletext support (3:2) FM audio decoder (5:4) reserved (6) audio scrambling (7) */
1413 UCHAR ucMiscInfo2; /* I2S input config (0) I2S output config (1) I2S Audio Chip (4:2) SPDIF Output Config (5) reserved (7:6) */
1414 UCHAR ucMiscInfo3; /* Video Decoder Type (3:0) Video In Standard/Crystal (7:4) */
1415 UCHAR ucMiscInfo4; /* Video Decoder Host Config (2:0) reserved (7:3) */
1416 UCHAR ucVideoInput0Info; /* Video Input 0 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1417 UCHAR ucVideoInput1Info; /* Video Input 1 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1418 UCHAR ucVideoInput2Info; /* Video Input 2 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1419 UCHAR ucVideoInput3Info; /* Video Input 3 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1420 UCHAR ucVideoInput4Info; /* Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1421 } ATOM_MULTIMEDIA_CONFIG_INFO;
1423 /****************************************************************************/
1424 /* Structures used in FirmwareInfoTable */
1425 /****************************************************************************/
1427 /* usBIOSCapability Defintion: */
1428 /* Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; */
1429 /* Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; */
1430 /* Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; */
1431 /* Others: Reserved */
1432 #define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED 0x0001
1433 #define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT 0x0002
1434 #define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT 0x0004
1435 #define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT 0x0008
1436 #define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT 0x0010
1437 #define ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU 0x0020
1438 #define ATOM_BIOS_INFO_WMI_SUPPORT 0x0040
1439 #define ATOM_BIOS_INFO_PPMODE_ASSIGNGED_BY_SYSTEM 0x0080
1440 #define ATOM_BIOS_INFO_HYPERMEMORY_SUPPORT 0x0100
1441 #define ATOM_BIOS_INFO_HYPERMEMORY_SIZE_MASK 0x1E00
1442 #define ATOM_BIOS_INFO_VPOST_WITHOUT_FIRST_MODE_SET 0x2000
1443 #define ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE 0x4000
1447 /* Please don't add or expand this bitfield structure below, this one will retire soon.! */
1448 typedef struct _ATOM_FIRMWARE_CAPABILITY {
1451 USHORT HyperMemory_Size:4;
1452 USHORT HyperMemory_Support:1;
1453 USHORT PPMode_Assigned:1;
1454 USHORT WMI_SUPPORT:1;
1455 USHORT GPUControlsBL:1;
1456 USHORT EngineClockSS_Support:1;
1457 USHORT MemoryClockSS_Support:1;
1458 USHORT ExtendedDesktopSupport:1;
1459 USHORT DualCRTC_Support:1;
1460 USHORT FirmwarePosted:1;
1462 USHORT FirmwarePosted:1;
1463 USHORT DualCRTC_Support:1;
1464 USHORT ExtendedDesktopSupport:1;
1465 USHORT MemoryClockSS_Support:1;
1466 USHORT EngineClockSS_Support:1;
1467 USHORT GPUControlsBL:1;
1468 USHORT WMI_SUPPORT:1;
1469 USHORT PPMode_Assigned:1;
1470 USHORT HyperMemory_Support:1;
1471 USHORT HyperMemory_Size:4;
1474 } ATOM_FIRMWARE_CAPABILITY;
1476 typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS {
1477 ATOM_FIRMWARE_CAPABILITY sbfAccess;
1479 } ATOM_FIRMWARE_CAPABILITY_ACCESS;
1483 typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS {
1485 } ATOM_FIRMWARE_CAPABILITY_ACCESS;
1489 typedef struct _ATOM_FIRMWARE_INFO {
1490 ATOM_COMMON_TABLE_HEADER sHeader;
1491 ULONG ulFirmwareRevision;
1492 ULONG ulDefaultEngineClock; /* In 10Khz unit */
1493 ULONG ulDefaultMemoryClock; /* In 10Khz unit */
1494 ULONG ulDriverTargetEngineClock; /* In 10Khz unit */
1495 ULONG ulDriverTargetMemoryClock; /* In 10Khz unit */
1496 ULONG ulMaxEngineClockPLL_Output; /* In 10Khz unit */
1497 ULONG ulMaxMemoryClockPLL_Output; /* In 10Khz unit */
1498 ULONG ulMaxPixelClockPLL_Output; /* In 10Khz unit */
1499 ULONG ulASICMaxEngineClock; /* In 10Khz unit */
1500 ULONG ulASICMaxMemoryClock; /* In 10Khz unit */
1501 UCHAR ucASICMaxTemperature;
1502 UCHAR ucPadding[3]; /* Don't use them */
1503 ULONG aulReservedForBIOS[3]; /* Don't use them */
1504 USHORT usMinEngineClockPLL_Input; /* In 10Khz unit */
1505 USHORT usMaxEngineClockPLL_Input; /* In 10Khz unit */
1506 USHORT usMinEngineClockPLL_Output; /* In 10Khz unit */
1507 USHORT usMinMemoryClockPLL_Input; /* In 10Khz unit */
1508 USHORT usMaxMemoryClockPLL_Input; /* In 10Khz unit */
1509 USHORT usMinMemoryClockPLL_Output; /* In 10Khz unit */
1510 USHORT usMaxPixelClock; /* In 10Khz unit, Max. Pclk */
1511 USHORT usMinPixelClockPLL_Input; /* In 10Khz unit */
1512 USHORT usMaxPixelClockPLL_Input; /* In 10Khz unit */
1513 USHORT usMinPixelClockPLL_Output; /* In 10Khz unit, the definitions above can't change!!! */
1514 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1515 USHORT usReferenceClock; /* In 10Khz unit */
1516 USHORT usPM_RTS_Location; /* RTS PM4 starting location in ROM in 1Kb unit */
1517 UCHAR ucPM_RTS_StreamSize; /* RTS PM4 packets in Kb unit */
1518 UCHAR ucDesign_ID; /* Indicate what is the board design */
1519 UCHAR ucMemoryModule_ID; /* Indicate what is the board design */
1520 } ATOM_FIRMWARE_INFO;
1522 typedef struct _ATOM_FIRMWARE_INFO_V1_2 {
1523 ATOM_COMMON_TABLE_HEADER sHeader;
1524 ULONG ulFirmwareRevision;
1525 ULONG ulDefaultEngineClock; /* In 10Khz unit */
1526 ULONG ulDefaultMemoryClock; /* In 10Khz unit */
1527 ULONG ulDriverTargetEngineClock; /* In 10Khz unit */
1528 ULONG ulDriverTargetMemoryClock; /* In 10Khz unit */
1529 ULONG ulMaxEngineClockPLL_Output; /* In 10Khz unit */
1530 ULONG ulMaxMemoryClockPLL_Output; /* In 10Khz unit */
1531 ULONG ulMaxPixelClockPLL_Output; /* In 10Khz unit */
1532 ULONG ulASICMaxEngineClock; /* In 10Khz unit */
1533 ULONG ulASICMaxMemoryClock; /* In 10Khz unit */
1534 UCHAR ucASICMaxTemperature;
1535 UCHAR ucMinAllowedBL_Level;
1536 UCHAR ucPadding[2]; /* Don't use them */
1537 ULONG aulReservedForBIOS[2]; /* Don't use them */
1538 ULONG ulMinPixelClockPLL_Output; /* In 10Khz unit */
1539 USHORT usMinEngineClockPLL_Input; /* In 10Khz unit */
1540 USHORT usMaxEngineClockPLL_Input; /* In 10Khz unit */
1541 USHORT usMinEngineClockPLL_Output; /* In 10Khz unit */
1542 USHORT usMinMemoryClockPLL_Input; /* In 10Khz unit */
1543 USHORT usMaxMemoryClockPLL_Input; /* In 10Khz unit */
1544 USHORT usMinMemoryClockPLL_Output; /* In 10Khz unit */
1545 USHORT usMaxPixelClock; /* In 10Khz unit, Max. Pclk */
1546 USHORT usMinPixelClockPLL_Input; /* In 10Khz unit */
1547 USHORT usMaxPixelClockPLL_Input; /* In 10Khz unit */
1548 USHORT usMinPixelClockPLL_Output; /* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
1549 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1550 USHORT usReferenceClock; /* In 10Khz unit */
1551 USHORT usPM_RTS_Location; /* RTS PM4 starting location in ROM in 1Kb unit */
1552 UCHAR ucPM_RTS_StreamSize; /* RTS PM4 packets in Kb unit */
1553 UCHAR ucDesign_ID; /* Indicate what is the board design */
1554 UCHAR ucMemoryModule_ID; /* Indicate what is the board design */
1555 } ATOM_FIRMWARE_INFO_V1_2;
1557 typedef struct _ATOM_FIRMWARE_INFO_V1_3 {
1558 ATOM_COMMON_TABLE_HEADER sHeader;
1559 ULONG ulFirmwareRevision;
1560 ULONG ulDefaultEngineClock; /* In 10Khz unit */
1561 ULONG ulDefaultMemoryClock; /* In 10Khz unit */
1562 ULONG ulDriverTargetEngineClock; /* In 10Khz unit */
1563 ULONG ulDriverTargetMemoryClock; /* In 10Khz unit */
1564 ULONG ulMaxEngineClockPLL_Output; /* In 10Khz unit */
1565 ULONG ulMaxMemoryClockPLL_Output; /* In 10Khz unit */
1566 ULONG ulMaxPixelClockPLL_Output; /* In 10Khz unit */
1567 ULONG ulASICMaxEngineClock; /* In 10Khz unit */
1568 ULONG ulASICMaxMemoryClock; /* In 10Khz unit */
1569 UCHAR ucASICMaxTemperature;
1570 UCHAR ucMinAllowedBL_Level;
1571 UCHAR ucPadding[2]; /* Don't use them */
1572 ULONG aulReservedForBIOS; /* Don't use them */
1573 ULONG ul3DAccelerationEngineClock; /* In 10Khz unit */
1574 ULONG ulMinPixelClockPLL_Output; /* In 10Khz unit */
1575 USHORT usMinEngineClockPLL_Input; /* In 10Khz unit */
1576 USHORT usMaxEngineClockPLL_Input; /* In 10Khz unit */
1577 USHORT usMinEngineClockPLL_Output; /* In 10Khz unit */
1578 USHORT usMinMemoryClockPLL_Input; /* In 10Khz unit */
1579 USHORT usMaxMemoryClockPLL_Input; /* In 10Khz unit */
1580 USHORT usMinMemoryClockPLL_Output; /* In 10Khz unit */
1581 USHORT usMaxPixelClock; /* In 10Khz unit, Max. Pclk */
1582 USHORT usMinPixelClockPLL_Input; /* In 10Khz unit */
1583 USHORT usMaxPixelClockPLL_Input; /* In 10Khz unit */
1584 USHORT usMinPixelClockPLL_Output; /* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
1585 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1586 USHORT usReferenceClock; /* In 10Khz unit */
1587 USHORT usPM_RTS_Location; /* RTS PM4 starting location in ROM in 1Kb unit */
1588 UCHAR ucPM_RTS_StreamSize; /* RTS PM4 packets in Kb unit */
1589 UCHAR ucDesign_ID; /* Indicate what is the board design */
1590 UCHAR ucMemoryModule_ID; /* Indicate what is the board design */
1591 } ATOM_FIRMWARE_INFO_V1_3;
1593 typedef struct _ATOM_FIRMWARE_INFO_V1_4 {
1594 ATOM_COMMON_TABLE_HEADER sHeader;
1595 ULONG ulFirmwareRevision;
1596 ULONG ulDefaultEngineClock; /* In 10Khz unit */
1597 ULONG ulDefaultMemoryClock; /* In 10Khz unit */
1598 ULONG ulDriverTargetEngineClock; /* In 10Khz unit */
1599 ULONG ulDriverTargetMemoryClock; /* In 10Khz unit */
1600 ULONG ulMaxEngineClockPLL_Output; /* In 10Khz unit */
1601 ULONG ulMaxMemoryClockPLL_Output; /* In 10Khz unit */
1602 ULONG ulMaxPixelClockPLL_Output; /* In 10Khz unit */
1603 ULONG ulASICMaxEngineClock; /* In 10Khz unit */
1604 ULONG ulASICMaxMemoryClock; /* In 10Khz unit */
1605 UCHAR ucASICMaxTemperature;
1606 UCHAR ucMinAllowedBL_Level;
1607 USHORT usBootUpVDDCVoltage; /* In MV unit */
1608 USHORT usLcdMinPixelClockPLL_Output; /* In MHz unit */
1609 USHORT usLcdMaxPixelClockPLL_Output; /* In MHz unit */
1610 ULONG ul3DAccelerationEngineClock; /* In 10Khz unit */
1611 ULONG ulMinPixelClockPLL_Output; /* In 10Khz unit */
1612 USHORT usMinEngineClockPLL_Input; /* In 10Khz unit */
1613 USHORT usMaxEngineClockPLL_Input; /* In 10Khz unit */
1614 USHORT usMinEngineClockPLL_Output; /* In 10Khz unit */
1615 USHORT usMinMemoryClockPLL_Input; /* In 10Khz unit */
1616 USHORT usMaxMemoryClockPLL_Input; /* In 10Khz unit */
1617 USHORT usMinMemoryClockPLL_Output; /* In 10Khz unit */
1618 USHORT usMaxPixelClock; /* In 10Khz unit, Max. Pclk */
1619 USHORT usMinPixelClockPLL_Input; /* In 10Khz unit */
1620 USHORT usMaxPixelClockPLL_Input; /* In 10Khz unit */
1621 USHORT usMinPixelClockPLL_Output; /* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
1622 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1623 USHORT usReferenceClock; /* In 10Khz unit */
1624 USHORT usPM_RTS_Location; /* RTS PM4 starting location in ROM in 1Kb unit */
1625 UCHAR ucPM_RTS_StreamSize; /* RTS PM4 packets in Kb unit */
1626 UCHAR ucDesign_ID; /* Indicate what is the board design */
1627 UCHAR ucMemoryModule_ID; /* Indicate what is the board design */
1628 } ATOM_FIRMWARE_INFO_V1_4;
1630 #define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V1_4
1632 /****************************************************************************/
1633 /* Structures used in IntegratedSystemInfoTable */
1634 /****************************************************************************/
1635 #define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN 0x2
1636 #define IGP_CAP_FLAG_AC_CARD 0x4
1637 #define IGP_CAP_FLAG_SDVO_CARD 0x8
1638 #define IGP_CAP_FLAG_POSTDIV_BY_2_MODE 0x10
1640 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO {
1641 ATOM_COMMON_TABLE_HEADER sHeader;
1642 ULONG ulBootUpEngineClock; /* in 10kHz unit */
1643 ULONG ulBootUpMemoryClock; /* in 10kHz unit */
1644 ULONG ulMaxSystemMemoryClock; /* in 10kHz unit */
1645 ULONG ulMinSystemMemoryClock; /* in 10kHz unit */
1646 UCHAR ucNumberOfCyclesInPeriodHi;
1647 UCHAR ucLCDTimingSel; /* =0:not valid.!=0 sel this timing descriptor from LCD EDID. */
1649 USHORT usInterNBVoltageLow; /* An intermidiate PMW value to set the voltage */
1650 USHORT usInterNBVoltageHigh; /* Another intermidiate PMW value to set the voltage */
1651 ULONG ulReserved[2];
1653 USHORT usFSBClock; /* In MHz unit */
1654 USHORT usCapabilityFlag; /* Bit0=1 indicates the fake HDMI support,Bit1=0/1 for Dynamic clocking dis/enable */
1655 /* Bit[3:2]== 0:No PCIE card, 1:AC card, 2:SDVO card */
1656 /* Bit[4]==1: P/2 mode, ==0: P/1 mode */
1657 USHORT usPCIENBCfgReg7; /* bit[7:0]=MUX_Sel, bit[9:8]=MUX_SEL_LEVEL2, bit[10]=Lane_Reversal */
1658 USHORT usK8MemoryClock; /* in MHz unit */
1659 USHORT usK8SyncStartDelay; /* in 0.01 us unit */
1660 USHORT usK8DataReturnTime; /* in 0.01 us unit */
1661 UCHAR ucMaxNBVoltage;
1662 UCHAR ucMinNBVoltage;
1663 UCHAR ucMemoryType; /* [7:4]=1:DDR1;=2:DDR2;=3:DDR3.[3:0] is reserved */
1664 UCHAR ucNumberOfCyclesInPeriod; /* CG.FVTHROT_PWM_CTRL_REG0.NumberOfCyclesInPeriod */
1665 UCHAR ucStartingPWM_HighTime; /* CG.FVTHROT_PWM_CTRL_REG0.StartingPWM_HighTime */
1666 UCHAR ucHTLinkWidth; /* 16 bit vs. 8 bit */
1667 UCHAR ucMaxNBVoltageHigh;
1668 UCHAR ucMinNBVoltageHigh;
1669 } ATOM_INTEGRATED_SYSTEM_INFO;
1671 /* Explanation on entries in ATOM_INTEGRATED_SYSTEM_INFO
1672 ulBootUpMemoryClock: For Intel IGP,it's the UMA system memory clock
1673 For AMD IGP,it's 0 if no SidePort memory installed or it's the boot-up SidePort memory clock
1674 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
1675 For AMD IGP,for now this can be 0
1676 ulMinSystemMemoryClock: For Intel IGP,it's 133MHz if memory runs in ASYNC mode or otherwise (SYNC mode) it's 0
1677 For AMD IGP,for now this can be 0
1679 usFSBClock: For Intel IGP,it's FSB Freq
1680 For AMD IGP,it's HT Link Speed
1682 usK8MemoryClock: For AMD IGP only. For RevF CPU, set it to 200
1683 usK8SyncStartDelay: For AMD IGP only. Memory access latency in K8, required for watermark calculation
1684 usK8DataReturnTime: For AMD IGP only. Memory access latency in K8, required for watermark calculation
1687 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.
1688 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.
1690 ucNumberOfCyclesInPeriod: Indicate how many cycles when PWM duty is 100%. low 8 bits of the value.
1691 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
1693 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.
1694 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.
1696 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.
1697 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.
1701 The following IGP table is introduced from RS780, which is supposed to be put by SBIOS in FB before IGP VBIOS starts VPOST;
1702 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.
1703 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.
1705 SW components can access the IGP system infor structure in the same way as before
1708 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 {
1709 ATOM_COMMON_TABLE_HEADER sHeader;
1710 ULONG ulBootUpEngineClock; /* in 10kHz unit */
1711 ULONG ulReserved1[2]; /* must be 0x0 for the reserved */
1712 ULONG ulBootUpUMAClock; /* in 10kHz unit */
1713 ULONG ulBootUpSidePortClock; /* in 10kHz unit */
1714 ULONG ulMinSidePortClock; /* in 10kHz unit */
1715 ULONG ulReserved2[6]; /* must be 0x0 for the reserved */
1716 ULONG ulSystemConfig; /* see explanation below */
1717 ULONG ulBootUpReqDisplayVector;
1718 ULONG ulOtherDisplayMisc;
1719 ULONG ulDDISlot1Config;
1720 ULONG ulDDISlot2Config;
1721 UCHAR ucMemoryType; /* [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved */
1722 UCHAR ucUMAChannelNumber;
1723 UCHAR ucDockingPinBit;
1724 UCHAR ucDockingPinPolarity;
1725 ULONG ulDockingPinCFGInfo;
1727 USHORT usNumberOfCyclesInPeriod;
1728 USHORT usMaxNBVoltage;
1729 USHORT usMinNBVoltage;
1730 USHORT usBootUpNBVoltage;
1731 ULONG ulHTLinkFreq; /* in 10Khz */
1732 USHORT usMinHTLinkWidth;
1733 USHORT usMaxHTLinkWidth;
1734 USHORT usUMASyncStartDelay;
1735 USHORT usUMADataReturnTime;
1736 USHORT usLinkStatusZeroTime;
1738 ULONG ulHighVoltageHTLinkFreq; /* in 10Khz */
1739 ULONG ulLowVoltageHTLinkFreq; /* in 10Khz */
1740 USHORT usMaxUpStreamHTLinkWidth;
1741 USHORT usMaxDownStreamHTLinkWidth;
1742 USHORT usMinUpStreamHTLinkWidth;
1743 USHORT usMinDownStreamHTLinkWidth;
1744 ULONG ulReserved3[97]; /* must be 0x0 */
1745 } ATOM_INTEGRATED_SYSTEM_INFO_V2;
1748 ulBootUpEngineClock: Boot-up Engine Clock in 10Khz;
1749 ulBootUpUMAClock: Boot-up UMA Clock in 10Khz; it must be 0x0 when UMA is not present
1750 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
1753 Bit[0]=1: PowerExpress mode =0 Non-PowerExpress mode;
1754 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
1755 =0: system boots up at driver control state. Power state depends on PowerPlay table.
1756 Bit[2]=1: PWM method is used on NB voltage control. =0: GPIO method is used.
1757 Bit[3]=1: Only one power state(Performance) will be supported.
1758 =0: Multiple power states supported from PowerPlay table.
1759 Bit[4]=1: CLMC is supported and enabled on current system.
1760 =0: CLMC is not supported or enabled on current system. SBIOS need to support HT link/freq change through ATIF interface.
1761 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.
1762 =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.
1763 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.
1764 =0: Voltage settings is determined by powerplay table.
1765 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.
1766 =0: Enable CLMC as regular mode, CDLD and CILR will be enabled.
1768 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.
1770 ulOtherDisplayMisc: [15:8]- Bootup LCD Expansion selection; 0-center, 1-full panel size expansion;
1771 [7:0] - BootupTV standard selection; This is a bit vector to indicate what TV standards are supported by the system. Refer to ucTVSuppportedStd definition;
1773 ulDDISlot1Config: Describes the PCIE lane configuration on this DDI PCIE slot (ADD2 card) or connector (Mobile design).
1774 [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)
1775 [7:4] - Bit vector to indicate PCIE lane config of the same DDI slot/connector on docking station (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12)
1776 [15:8] - Lane configuration attribute;
1777 [23:16]- Connector type, possible value:
1778 CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D
1779 CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
1780 CONNECTOR_OBJECT_ID_HDMI_TYPE_A
1781 CONNECTOR_OBJECT_ID_DISPLAYPORT
1784 ulDDISlot2Config: Same as Slot1.
1785 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.
1786 For IGP, Hypermemory is the only memory type showed in CCC.
1788 ucUMAChannelNumber: how many channels for the UMA;
1790 ulDockingPinCFGInfo: [15:0]-Bus/Device/Function # to CFG to read this Docking Pin; [31:16]-reg offset in CFG to read this pin
1791 ucDockingPinBit: which bit in this register to read the pin status;
1792 ucDockingPinPolarity:Polarity of the pin when docked;
1794 ulCPUCapInfo: [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, other bits reserved for now and must be 0x0
1796 usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%.
1797 usMaxNBVoltage:Max. voltage control value in either PWM or GPIO mode.
1798 usMinNBVoltage:Min. voltage control value in either PWM or GPIO mode.
1799 GPIO mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=0
1800 PWM mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=1
1801 GPU SW don't control mode: usMaxNBVoltage & usMinNBVoltage=0 and no care about ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE
1802 usBootUpNBVoltage:Boot-up voltage regulator dependent PWM value.
1804 ulHTLinkFreq: Bootup HT link Frequency in 10Khz.
1805 usMinHTLinkWidth: Bootup minimum HT link width. If CDLW disabled, this is equal to usMaxHTLinkWidth.
1806 If CDLW enabled, both upstream and downstream width should be the same during bootup.
1807 usMaxHTLinkWidth: Bootup maximum HT link width. If CDLW disabled, this is equal to usMinHTLinkWidth.
1808 If CDLW enabled, both upstream and downstream width should be the same during bootup.
1810 usUMASyncStartDelay: Memory access latency, required for watermark calculation
1811 usUMADataReturnTime: Memory access latency, required for watermark calculation
1812 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
1813 for Griffin or Greyhound. SBIOS needs to convert to actual time by:
1814 if T0Ttime [5:4]=00b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.1us (0.0 to 1.5us)
1815 if T0Ttime [5:4]=01b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.5us (0.0 to 7.5us)
1816 if T0Ttime [5:4]=10b, then usLinkStatusZeroTime=T0Ttime [3:0]*2.0us (0.0 to 30us)
1817 if T0Ttime [5:4]=11b, and T0Ttime [3:0]=0x0 to 0xa, then usLinkStatusZeroTime=T0Ttime [3:0]*20us (0.0 to 200us)
1819 ulHighVoltageHTLinkFreq: HT link frequency for power state with low voltage. If boot up runs in HT1, this must be 0.
1820 This must be less than or equal to ulHTLinkFreq(bootup frequency).
1821 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.
1822 This must be less than or equal to ulHighVoltageHTLinkFreq.
1824 usMaxUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMaxHTLinkWidth. Not used for now.
1825 usMaxDownStreamHTLinkWidth: same as above.
1826 usMinUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMinHTLinkWidth. Not used for now.
1827 usMinDownStreamHTLinkWidth: same as above.
1830 #define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001
1831 #define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002
1832 #define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE 0x00000004
1833 #define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY 0x00000008
1834 #define SYSTEM_CONFIG_CLMC_ENABLED 0x00000010
1835 #define SYSTEM_CONFIG_CDLW_ENABLED 0x00000020
1836 #define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED 0x00000040
1837 #define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED 0x00000080
1839 #define IGP_DDI_SLOT_LANE_CONFIG_MASK 0x000000FF
1841 #define b0IGP_DDI_SLOT_LANE_MAP_MASK 0x0F
1842 #define b0IGP_DDI_SLOT_DOCKING_LANE_MAP_MASK 0xF0
1843 #define b0IGP_DDI_SLOT_CONFIG_LANE_0_3 0x01
1844 #define b0IGP_DDI_SLOT_CONFIG_LANE_4_7 0x02
1845 #define b0IGP_DDI_SLOT_CONFIG_LANE_8_11 0x04
1846 #define b0IGP_DDI_SLOT_CONFIG_LANE_12_15 0x08
1848 #define IGP_DDI_SLOT_ATTRIBUTE_MASK 0x0000FF00
1849 #define IGP_DDI_SLOT_CONFIG_REVERSED 0x00000100
1850 #define b1IGP_DDI_SLOT_CONFIG_REVERSED 0x01
1852 #define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK 0x00FF0000
1854 #define ATOM_CRT_INT_ENCODER1_INDEX 0x00000000
1855 #define ATOM_LCD_INT_ENCODER1_INDEX 0x00000001
1856 #define ATOM_TV_INT_ENCODER1_INDEX 0x00000002
1857 #define ATOM_DFP_INT_ENCODER1_INDEX 0x00000003
1858 #define ATOM_CRT_INT_ENCODER2_INDEX 0x00000004
1859 #define ATOM_LCD_EXT_ENCODER1_INDEX 0x00000005
1860 #define ATOM_TV_EXT_ENCODER1_INDEX 0x00000006
1861 #define ATOM_DFP_EXT_ENCODER1_INDEX 0x00000007
1862 #define ATOM_CV_INT_ENCODER1_INDEX 0x00000008
1863 #define ATOM_DFP_INT_ENCODER2_INDEX 0x00000009
1864 #define ATOM_CRT_EXT_ENCODER1_INDEX 0x0000000A
1865 #define ATOM_CV_EXT_ENCODER1_INDEX 0x0000000B
1866 #define ATOM_DFP_INT_ENCODER3_INDEX 0x0000000C
1867 #define ATOM_DFP_INT_ENCODER4_INDEX 0x0000000D
1869 /* define ASIC internal encoder id ( bit vector ) */
1870 #define ASIC_INT_DAC1_ENCODER_ID 0x00
1871 #define ASIC_INT_TV_ENCODER_ID 0x02
1872 #define ASIC_INT_DIG1_ENCODER_ID 0x03
1873 #define ASIC_INT_DAC2_ENCODER_ID 0x04
1874 #define ASIC_EXT_TV_ENCODER_ID 0x06
1875 #define ASIC_INT_DVO_ENCODER_ID 0x07
1876 #define ASIC_INT_DIG2_ENCODER_ID 0x09
1877 #define ASIC_EXT_DIG_ENCODER_ID 0x05
1879 /* define Encoder attribute */
1880 #define ATOM_ANALOG_ENCODER 0
1881 #define ATOM_DIGITAL_ENCODER 1
1883 #define ATOM_DEVICE_CRT1_INDEX 0x00000000
1884 #define ATOM_DEVICE_LCD1_INDEX 0x00000001
1885 #define ATOM_DEVICE_TV1_INDEX 0x00000002
1886 #define ATOM_DEVICE_DFP1_INDEX 0x00000003
1887 #define ATOM_DEVICE_CRT2_INDEX 0x00000004
1888 #define ATOM_DEVICE_LCD2_INDEX 0x00000005
1889 #define ATOM_DEVICE_TV2_INDEX 0x00000006
1890 #define ATOM_DEVICE_DFP2_INDEX 0x00000007
1891 #define ATOM_DEVICE_CV_INDEX 0x00000008
1892 #define ATOM_DEVICE_DFP3_INDEX 0x00000009
1893 #define ATOM_DEVICE_DFP4_INDEX 0x0000000A
1894 #define ATOM_DEVICE_DFP5_INDEX 0x0000000B
1895 #define ATOM_DEVICE_RESERVEDC_INDEX 0x0000000C
1896 #define ATOM_DEVICE_RESERVEDD_INDEX 0x0000000D
1897 #define ATOM_DEVICE_RESERVEDE_INDEX 0x0000000E
1898 #define ATOM_DEVICE_RESERVEDF_INDEX 0x0000000F
1899 #define ATOM_MAX_SUPPORTED_DEVICE_INFO (ATOM_DEVICE_DFP3_INDEX+1)
1900 #define ATOM_MAX_SUPPORTED_DEVICE_INFO_2 ATOM_MAX_SUPPORTED_DEVICE_INFO
1901 #define ATOM_MAX_SUPPORTED_DEVICE_INFO_3 (ATOM_DEVICE_DFP5_INDEX + 1)
1903 #define ATOM_MAX_SUPPORTED_DEVICE (ATOM_DEVICE_RESERVEDF_INDEX+1)
1905 #define ATOM_DEVICE_CRT1_SUPPORT (0x1L << ATOM_DEVICE_CRT1_INDEX)
1906 #define ATOM_DEVICE_LCD1_SUPPORT (0x1L << ATOM_DEVICE_LCD1_INDEX)
1907 #define ATOM_DEVICE_TV1_SUPPORT (0x1L << ATOM_DEVICE_TV1_INDEX)
1908 #define ATOM_DEVICE_DFP1_SUPPORT (0x1L << ATOM_DEVICE_DFP1_INDEX)
1909 #define ATOM_DEVICE_CRT2_SUPPORT (0x1L << ATOM_DEVICE_CRT2_INDEX)
1910 #define ATOM_DEVICE_LCD2_SUPPORT (0x1L << ATOM_DEVICE_LCD2_INDEX)
1911 #define ATOM_DEVICE_TV2_SUPPORT (0x1L << ATOM_DEVICE_TV2_INDEX)
1912 #define ATOM_DEVICE_DFP2_SUPPORT (0x1L << ATOM_DEVICE_DFP2_INDEX)
1913 #define ATOM_DEVICE_CV_SUPPORT (0x1L << ATOM_DEVICE_CV_INDEX)
1914 #define ATOM_DEVICE_DFP3_SUPPORT (0x1L << ATOM_DEVICE_DFP3_INDEX)
1915 #define ATOM_DEVICE_DFP4_SUPPORT (0x1L << ATOM_DEVICE_DFP4_INDEX )
1916 #define ATOM_DEVICE_DFP5_SUPPORT (0x1L << ATOM_DEVICE_DFP5_INDEX)
1918 #define ATOM_DEVICE_CRT_SUPPORT \
1919 (ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT)
1920 #define ATOM_DEVICE_DFP_SUPPORT \
1921 (ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT | \
1922 ATOM_DEVICE_DFP3_SUPPORT | ATOM_DEVICE_DFP4_SUPPORT | \
1923 ATOM_DEVICE_DFP5_SUPPORT)
1924 #define ATOM_DEVICE_TV_SUPPORT \
1925 (ATOM_DEVICE_TV1_SUPPORT | ATOM_DEVICE_TV2_SUPPORT)
1926 #define ATOM_DEVICE_LCD_SUPPORT \
1927 (ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT)
1929 #define ATOM_DEVICE_CONNECTOR_TYPE_MASK 0x000000F0
1930 #define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT 0x00000004
1931 #define ATOM_DEVICE_CONNECTOR_VGA 0x00000001
1932 #define ATOM_DEVICE_CONNECTOR_DVI_I 0x00000002
1933 #define ATOM_DEVICE_CONNECTOR_DVI_D 0x00000003
1934 #define ATOM_DEVICE_CONNECTOR_DVI_A 0x00000004
1935 #define ATOM_DEVICE_CONNECTOR_SVIDEO 0x00000005
1936 #define ATOM_DEVICE_CONNECTOR_COMPOSITE 0x00000006
1937 #define ATOM_DEVICE_CONNECTOR_LVDS 0x00000007
1938 #define ATOM_DEVICE_CONNECTOR_DIGI_LINK 0x00000008
1939 #define ATOM_DEVICE_CONNECTOR_SCART 0x00000009
1940 #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A 0x0000000A
1941 #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B 0x0000000B
1942 #define ATOM_DEVICE_CONNECTOR_CASE_1 0x0000000E
1943 #define ATOM_DEVICE_CONNECTOR_DISPLAYPORT 0x0000000F
1945 #define ATOM_DEVICE_DAC_INFO_MASK 0x0000000F
1946 #define ATOM_DEVICE_DAC_INFO_SHIFT 0x00000000
1947 #define ATOM_DEVICE_DAC_INFO_NODAC 0x00000000
1948 #define ATOM_DEVICE_DAC_INFO_DACA 0x00000001
1949 #define ATOM_DEVICE_DAC_INFO_DACB 0x00000002
1950 #define ATOM_DEVICE_DAC_INFO_EXDAC 0x00000003
1952 #define ATOM_DEVICE_I2C_ID_NOI2C 0x00000000
1954 #define ATOM_DEVICE_I2C_LINEMUX_MASK 0x0000000F
1955 #define ATOM_DEVICE_I2C_LINEMUX_SHIFT 0x00000000
1957 #define ATOM_DEVICE_I2C_ID_MASK 0x00000070
1958 #define ATOM_DEVICE_I2C_ID_SHIFT 0x00000004
1959 #define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE 0x00000001
1960 #define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE 0x00000002
1961 #define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE 0x00000003 /* For IGP RS600 */
1962 #define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL 0x00000004 /* For IGP RS690 */
1964 #define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK 0x00000080
1965 #define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT 0x00000007
1966 #define ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C 0x00000000
1967 #define ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C 0x00000001
1969 /* usDeviceSupport: */
1970 /* Bits0 = 0 - no CRT1 support= 1- CRT1 is supported */
1971 /* Bit 1 = 0 - no LCD1 support= 1- LCD1 is supported */
1972 /* Bit 2 = 0 - no TV1 support= 1- TV1 is supported */
1973 /* Bit 3 = 0 - no DFP1 support= 1- DFP1 is supported */
1974 /* Bit 4 = 0 - no CRT2 support= 1- CRT2 is supported */
1975 /* Bit 5 = 0 - no LCD2 support= 1- LCD2 is supported */
1976 /* Bit 6 = 0 - no TV2 support= 1- TV2 is supported */
1977 /* Bit 7 = 0 - no DFP2 support= 1- DFP2 is supported */
1978 /* Bit 8 = 0 - no CV support= 1- CV is supported */
1979 /* Bit 9 = 0 - no DFP3 support= 1- DFP3 is supported */
1980 /* Byte1 (Supported Device Info) */
1981 /* Bit 0 = = 0 - no CV support= 1- CV is supported */
1985 /* ucI2C_ConfigID */
1986 /* [7:0] - I2C LINE Associate ID */
1988 /* [7] - HW_Cap = 1, [6:0]=HW assisted I2C ID(HW line selection) */
1989 /* = 0, [6:0]=SW assisted I2C ID */
1990 /* [6-4] - HW_ENGINE_ID = 1, HW engine for NON multimedia use */
1991 /* = 2, HW engine for Multimedia use */
1992 /* = 3-7 Reserved for future I2C engines */
1993 /* [3-0] - I2C_LINE_MUX = A Mux number when it's HW assisted I2C or GPIO ID when it's SW I2C */
1995 typedef struct _ATOM_I2C_ID_CONFIG {
1997 UCHAR bfHW_Capable:1;
1998 UCHAR bfHW_EngineID:3;
1999 UCHAR bfI2C_LineMux:4;
2001 UCHAR bfI2C_LineMux:4;
2002 UCHAR bfHW_EngineID:3;
2003 UCHAR bfHW_Capable:1;
2005 } ATOM_I2C_ID_CONFIG;
2007 typedef union _ATOM_I2C_ID_CONFIG_ACCESS {
2008 ATOM_I2C_ID_CONFIG sbfAccess;
2010 } ATOM_I2C_ID_CONFIG_ACCESS;
2012 /****************************************************************************/
2013 /* Structure used in GPIO_I2C_InfoTable */
2014 /****************************************************************************/
2015 typedef struct _ATOM_GPIO_I2C_ASSIGMENT {
2016 USHORT usClkMaskRegisterIndex;
2017 USHORT usClkEnRegisterIndex;
2018 USHORT usClkY_RegisterIndex;
2019 USHORT usClkA_RegisterIndex;
2020 USHORT usDataMaskRegisterIndex;
2021 USHORT usDataEnRegisterIndex;
2022 USHORT usDataY_RegisterIndex;
2023 USHORT usDataA_RegisterIndex;
2024 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
2025 UCHAR ucClkMaskShift;
2029 UCHAR ucDataMaskShift;
2030 UCHAR ucDataEnShift;
2031 UCHAR ucDataY_Shift;
2032 UCHAR ucDataA_Shift;
2035 } ATOM_GPIO_I2C_ASSIGMENT;
2037 typedef struct _ATOM_GPIO_I2C_INFO {
2038 ATOM_COMMON_TABLE_HEADER sHeader;
2039 ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE];
2040 } ATOM_GPIO_I2C_INFO;
2042 /****************************************************************************/
2043 /* Common Structure used in other structures */
2044 /****************************************************************************/
2048 /* Please don't add or expand this bitfield structure below, this one will retire soon.! */
2049 typedef struct _ATOM_MODE_MISC_INFO {
2053 USHORT DoubleClock:1;
2055 USHORT CompositeSync:1;
2056 USHORT V_ReplicationBy2:1;
2057 USHORT H_ReplicationBy2:1;
2058 USHORT VerticalCutOff:1;
2059 USHORT VSyncPolarity:1; /* 0=Active High, 1=Active Low */
2060 USHORT HSyncPolarity:1; /* 0=Active High, 1=Active Low */
2061 USHORT HorizontalCutOff:1;
2063 USHORT HorizontalCutOff:1;
2064 USHORT HSyncPolarity:1; /* 0=Active High, 1=Active Low */
2065 USHORT VSyncPolarity:1; /* 0=Active High, 1=Active Low */
2066 USHORT VerticalCutOff:1;
2067 USHORT H_ReplicationBy2:1;
2068 USHORT V_ReplicationBy2:1;
2069 USHORT CompositeSync:1;
2071 USHORT DoubleClock:1;
2075 } ATOM_MODE_MISC_INFO;
2077 typedef union _ATOM_MODE_MISC_INFO_ACCESS {
2078 ATOM_MODE_MISC_INFO sbfAccess;
2080 } ATOM_MODE_MISC_INFO_ACCESS;
2084 typedef union _ATOM_MODE_MISC_INFO_ACCESS {
2086 } ATOM_MODE_MISC_INFO_ACCESS;
2090 /* usModeMiscInfo- */
2091 #define ATOM_H_CUTOFF 0x01
2092 #define ATOM_HSYNC_POLARITY 0x02 /* 0=Active High, 1=Active Low */
2093 #define ATOM_VSYNC_POLARITY 0x04 /* 0=Active High, 1=Active Low */
2094 #define ATOM_V_CUTOFF 0x08
2095 #define ATOM_H_REPLICATIONBY2 0x10
2096 #define ATOM_V_REPLICATIONBY2 0x20
2097 #define ATOM_COMPOSITESYNC 0x40
2098 #define ATOM_INTERLACE 0x80
2099 #define ATOM_DOUBLE_CLOCK_MODE 0x100
2100 #define ATOM_RGB888_MODE 0x200
2102 /* usRefreshRate- */
2103 #define ATOM_REFRESH_43 43
2104 #define ATOM_REFRESH_47 47
2105 #define ATOM_REFRESH_56 56
2106 #define ATOM_REFRESH_60 60
2107 #define ATOM_REFRESH_65 65
2108 #define ATOM_REFRESH_70 70
2109 #define ATOM_REFRESH_72 72
2110 #define ATOM_REFRESH_75 75
2111 #define ATOM_REFRESH_85 85
2113 /* ATOM_MODE_TIMING data are exactly the same as VESA timing data. */
2114 /* Translation from EDID to ATOM_MODE_TIMING, use the following formula. */
2116 /* VESA_HTOTAL = VESA_ACTIVE + 2* VESA_BORDER + VESA_BLANK */
2117 /* = EDID_HA + EDID_HBL */
2118 /* VESA_HDISP = VESA_ACTIVE = EDID_HA */
2119 /* VESA_HSYNC_START = VESA_ACTIVE + VESA_BORDER + VESA_FRONT_PORCH */
2120 /* = EDID_HA + EDID_HSO */
2121 /* VESA_HSYNC_WIDTH = VESA_HSYNC_TIME = EDID_HSPW */
2122 /* VESA_BORDER = EDID_BORDER */
2124 /****************************************************************************/
2125 /* Structure used in SetCRTC_UsingDTDTimingTable */
2126 /****************************************************************************/
2127 typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS {
2129 USHORT usH_Blanking_Time;
2131 USHORT usV_Blanking_Time;
2132 USHORT usH_SyncOffset;
2133 USHORT usH_SyncWidth;
2134 USHORT usV_SyncOffset;
2135 USHORT usV_SyncWidth;
2136 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2137 UCHAR ucH_Border; /* From DFP EDID */
2139 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
2141 } SET_CRTC_USING_DTD_TIMING_PARAMETERS;
2143 /****************************************************************************/
2144 /* Structure used in SetCRTC_TimingTable */
2145 /****************************************************************************/
2146 typedef struct _SET_CRTC_TIMING_PARAMETERS {
2147 USHORT usH_Total; /* horizontal total */
2148 USHORT usH_Disp; /* horizontal display */
2149 USHORT usH_SyncStart; /* horozontal Sync start */
2150 USHORT usH_SyncWidth; /* horizontal Sync width */
2151 USHORT usV_Total; /* vertical total */
2152 USHORT usV_Disp; /* vertical display */
2153 USHORT usV_SyncStart; /* vertical Sync start */
2154 USHORT usV_SyncWidth; /* vertical Sync width */
2155 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2156 UCHAR ucCRTC; /* ATOM_CRTC1 or ATOM_CRTC2 */
2157 UCHAR ucOverscanRight; /* right */
2158 UCHAR ucOverscanLeft; /* left */
2159 UCHAR ucOverscanBottom; /* bottom */
2160 UCHAR ucOverscanTop; /* top */
2162 } SET_CRTC_TIMING_PARAMETERS;
2163 #define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS
2165 /****************************************************************************/
2166 /* Structure used in StandardVESA_TimingTable */
2167 /* AnalogTV_InfoTable */
2168 /* ComponentVideoInfoTable */
2169 /****************************************************************************/
2170 typedef struct _ATOM_MODE_TIMING {
2171 USHORT usCRTC_H_Total;
2172 USHORT usCRTC_H_Disp;
2173 USHORT usCRTC_H_SyncStart;
2174 USHORT usCRTC_H_SyncWidth;
2175 USHORT usCRTC_V_Total;
2176 USHORT usCRTC_V_Disp;
2177 USHORT usCRTC_V_SyncStart;
2178 USHORT usCRTC_V_SyncWidth;
2179 USHORT usPixelClock; /* in 10Khz unit */
2180 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2181 USHORT usCRTC_OverscanRight;
2182 USHORT usCRTC_OverscanLeft;
2183 USHORT usCRTC_OverscanBottom;
2184 USHORT usCRTC_OverscanTop;
2186 UCHAR ucInternalModeNumber;
2187 UCHAR ucRefreshRate;
2190 typedef struct _ATOM_DTD_FORMAT {
2193 USHORT usHBlanking_Time;
2195 USHORT usVBlanking_Time;
2196 USHORT usHSyncOffset;
2197 USHORT usHSyncWidth;
2198 USHORT usVSyncOffset;
2199 USHORT usVSyncWidth;
2200 USHORT usImageHSize;
2201 USHORT usImageVSize;
2204 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2205 UCHAR ucInternalModeNumber;
2206 UCHAR ucRefreshRate;
2209 /****************************************************************************/
2210 /* Structure used in LVDS_InfoTable */
2211 /* * Need a document to describe this table */
2212 /****************************************************************************/
2213 #define SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004
2214 #define SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008
2215 #define SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010
2216 #define SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020
2218 /* 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. */
2219 /* Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL */
2220 #define LCDPANEL_CAP_READ_EDID 0x1
2222 /* ucTableFormatRevision=1 */
2223 /* ucTableContentRevision=1 */
2224 typedef struct _ATOM_LVDS_INFO {
2225 ATOM_COMMON_TABLE_HEADER sHeader;
2226 ATOM_DTD_FORMAT sLCDTiming;
2227 USHORT usModePatchTableOffset;
2228 USHORT usSupportedRefreshRate; /* Refer to panel info table in ATOMBIOS extension Spec. */
2229 USHORT usOffDelayInMs;
2230 UCHAR ucPowerSequenceDigOntoDEin10Ms;
2231 UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2232 UCHAR ucLVDS_Misc; /* Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} */
2233 /* Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} */
2234 /* Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} */
2235 /* Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} */
2236 UCHAR ucPanelDefaultRefreshRate;
2237 UCHAR ucPanelIdentification;
2241 /* ucTableFormatRevision=1 */
2242 /* ucTableContentRevision=2 */
2243 typedef struct _ATOM_LVDS_INFO_V12 {
2244 ATOM_COMMON_TABLE_HEADER sHeader;
2245 ATOM_DTD_FORMAT sLCDTiming;
2246 USHORT usExtInfoTableOffset;
2247 USHORT usSupportedRefreshRate; /* Refer to panel info table in ATOMBIOS extension Spec. */
2248 USHORT usOffDelayInMs;
2249 UCHAR ucPowerSequenceDigOntoDEin10Ms;
2250 UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2251 UCHAR ucLVDS_Misc; /* Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} */
2252 /* Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} */
2253 /* Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} */
2254 /* Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} */
2255 UCHAR ucPanelDefaultRefreshRate;
2256 UCHAR ucPanelIdentification;
2258 USHORT usLCDVenderID;
2259 USHORT usLCDProductID;
2260 UCHAR ucLCDPanel_SpecialHandlingCap;
2261 UCHAR ucPanelInfoSize; /* start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable */
2262 UCHAR ucReserved[2];
2263 } ATOM_LVDS_INFO_V12;
2265 #define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12
2267 typedef struct _ATOM_PATCH_RECORD_MODE {
2271 } ATOM_PATCH_RECORD_MODE;
2273 typedef struct _ATOM_LCD_RTS_RECORD {
2276 } ATOM_LCD_RTS_RECORD;
2278 /* !! If the record below exits, it shoud always be the first record for easy use in command table!!! */
2279 typedef struct _ATOM_LCD_MODE_CONTROL_CAP {
2282 } ATOM_LCD_MODE_CONTROL_CAP;
2284 #define LCD_MODE_CAP_BL_OFF 1
2285 #define LCD_MODE_CAP_CRTC_OFF 2
2286 #define LCD_MODE_CAP_PANEL_OFF 4
2288 typedef struct _ATOM_FAKE_EDID_PATCH_RECORD {
2290 UCHAR ucFakeEDIDLength;
2291 UCHAR ucFakeEDIDString[1]; /* This actually has ucFakeEdidLength elements. */
2292 } ATOM_FAKE_EDID_PATCH_RECORD;
2294 typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD {
2298 } ATOM_PANEL_RESOLUTION_PATCH_RECORD;
2300 #define LCD_MODE_PATCH_RECORD_MODE_TYPE 1
2301 #define LCD_RTS_RECORD_TYPE 2
2302 #define LCD_CAP_RECORD_TYPE 3
2303 #define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4
2304 #define LCD_PANEL_RESOLUTION_RECORD_TYPE 5
2305 #define ATOM_RECORD_END_TYPE 0xFF
2307 /****************************Spread Spectrum Info Table Definitions **********************/
2309 /* ucTableFormatRevision=1 */
2310 /* ucTableContentRevision=2 */
2311 typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT {
2312 USHORT usSpreadSpectrumPercentage;
2313 UCHAR ucSpreadSpectrumType; /* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
2317 UCHAR ucRecommandedRef_Div;
2318 UCHAR ucSS_Range; /* it was reserved for V11 */
2319 } ATOM_SPREAD_SPECTRUM_ASSIGNMENT;
2321 #define ATOM_MAX_SS_ENTRY 16
2322 #define ATOM_DP_SS_ID1 0x0f1 /* SS modulation freq=30k */
2323 #define ATOM_DP_SS_ID2 0x0f2 /* SS modulation freq=33k */
2325 #define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000
2326 #define ATOM_SS_DOWN_SPREAD_MODE 0x00000000
2327 #define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001
2328 #define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001
2329 #define ATOM_INTERNAL_SS_MASK 0x00000000
2330 #define ATOM_EXTERNAL_SS_MASK 0x00000002
2331 #define EXEC_SS_STEP_SIZE_SHIFT 2
2332 #define EXEC_SS_DELAY_SHIFT 4
2333 #define ACTIVEDATA_TO_BLON_DELAY_SHIFT 4
2335 typedef struct _ATOM_SPREAD_SPECTRUM_INFO {
2336 ATOM_COMMON_TABLE_HEADER sHeader;
2337 ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY];
2338 } ATOM_SPREAD_SPECTRUM_INFO;
2340 /****************************************************************************/
2341 /* Structure used in AnalogTV_InfoTable (Top level) */
2342 /****************************************************************************/
2343 /* ucTVBootUpDefaultStd definiton: */
2345 /* ATOM_TV_NTSC 1 */
2346 /* ATOM_TV_NTSCJ 2 */
2348 /* ATOM_TV_PALM 4 */
2349 /* ATOM_TV_PALCN 5 */
2350 /* ATOM_TV_PALN 6 */
2351 /* ATOM_TV_PAL60 7 */
2352 /* ATOM_TV_SECAM 8 */
2354 /* ucTVSuppportedStd definition: */
2355 #define NTSC_SUPPORT 0x1
2356 #define NTSCJ_SUPPORT 0x2
2358 #define PAL_SUPPORT 0x4
2359 #define PALM_SUPPORT 0x8
2360 #define PALCN_SUPPORT 0x10
2361 #define PALN_SUPPORT 0x20
2362 #define PAL60_SUPPORT 0x40
2363 #define SECAM_SUPPORT 0x80
2365 #define MAX_SUPPORTED_TV_TIMING 2
2367 typedef struct _ATOM_ANALOG_TV_INFO {
2368 ATOM_COMMON_TABLE_HEADER sHeader;
2369 UCHAR ucTV_SupportedStandard;
2370 UCHAR ucTV_BootUpDefaultStandard;
2371 UCHAR ucExt_TV_ASIC_ID;
2372 UCHAR ucExt_TV_ASIC_SlaveAddr;
2373 /*ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING]; */
2374 ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING];
2375 } ATOM_ANALOG_TV_INFO;
2377 /**************************************************************************/
2378 /* VRAM usage and their defintions */
2380 /* One chunk of VRAM used by Bios are for HWICON surfaces,EDID data. */
2381 /* Current Mode timing and Dail Timing and/or STD timing data EACH device. They can be broken down as below. */
2382 /* All the addresses below are the offsets from the frame buffer start.They all MUST be Dword aligned! */
2383 /* To driver: The physical address of this memory portion=mmFB_START(4K aligned)+ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR */
2384 /* To Bios: ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR->MM_INDEX */
2386 #ifndef VESA_MEMORY_IN_64K_BLOCK
2387 #define VESA_MEMORY_IN_64K_BLOCK 0x100 /* 256*64K=16Mb (Max. VESA memory is 16Mb!) */
2390 #define ATOM_EDID_RAW_DATASIZE 256 /* In Bytes */
2391 #define ATOM_HWICON_SURFACE_SIZE 4096 /* In Bytes */
2392 #define ATOM_HWICON_INFOTABLE_SIZE 32
2393 #define MAX_DTD_MODE_IN_VRAM 6
2394 #define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28) /* 28= (SIZEOF ATOM_DTD_FORMAT) */
2395 #define ATOM_STD_MODE_SUPPORT_TBL_SIZE (32*8) /* 32 is a predefined number,8= (SIZEOF ATOM_STD_FORMAT) */
2396 #define DFP_ENCODER_TYPE_OFFSET 0x80
2397 #define DP_ENCODER_LANE_NUM_OFFSET 0x84
2398 #define DP_ENCODER_LINK_RATE_OFFSET 0x88
2400 #define ATOM_HWICON1_SURFACE_ADDR 0
2401 #define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE)
2402 #define ATOM_HWICON_INFOTABLE_ADDR (ATOM_HWICON2_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE)
2403 #define ATOM_CRT1_EDID_ADDR (ATOM_HWICON_INFOTABLE_ADDR + ATOM_HWICON_INFOTABLE_SIZE)
2404 #define ATOM_CRT1_DTD_MODE_TBL_ADDR (ATOM_CRT1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2405 #define ATOM_CRT1_STD_MODE_TBL_ADDR (ATOM_CRT1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2407 #define ATOM_LCD1_EDID_ADDR (ATOM_CRT1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2408 #define ATOM_LCD1_DTD_MODE_TBL_ADDR (ATOM_LCD1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2409 #define ATOM_LCD1_STD_MODE_TBL_ADDR (ATOM_LCD1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2411 #define ATOM_TV1_DTD_MODE_TBL_ADDR (ATOM_LCD1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2413 #define ATOM_DFP1_EDID_ADDR (ATOM_TV1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2414 #define ATOM_DFP1_DTD_MODE_TBL_ADDR (ATOM_DFP1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2415 #define ATOM_DFP1_STD_MODE_TBL_ADDR (ATOM_DFP1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2417 #define ATOM_CRT2_EDID_ADDR (ATOM_DFP1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2418 #define ATOM_CRT2_DTD_MODE_TBL_ADDR (ATOM_CRT2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2419 #define ATOM_CRT2_STD_MODE_TBL_ADDR (ATOM_CRT2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2421 #define ATOM_LCD2_EDID_ADDR (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2422 #define ATOM_LCD2_DTD_MODE_TBL_ADDR (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2423 #define ATOM_LCD2_STD_MODE_TBL_ADDR (ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2425 #define ATOM_TV2_EDID_ADDR (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2426 #define ATOM_TV2_DTD_MODE_TBL_ADDR (ATOM_TV2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2427 #define ATOM_TV2_STD_MODE_TBL_ADDR (ATOM_TV2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2429 #define ATOM_DFP2_EDID_ADDR (ATOM_TV2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2430 #define ATOM_DFP2_DTD_MODE_TBL_ADDR (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2431 #define ATOM_DFP2_STD_MODE_TBL_ADDR (ATOM_DFP2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2433 #define ATOM_CV_EDID_ADDR (ATOM_DFP2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2434 #define ATOM_CV_DTD_MODE_TBL_ADDR (ATOM_CV_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2435 #define ATOM_CV_STD_MODE_TBL_ADDR (ATOM_CV_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2437 #define ATOM_DFP3_EDID_ADDR (ATOM_CV_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2438 #define ATOM_DFP3_DTD_MODE_TBL_ADDR (ATOM_DFP3_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2439 #define ATOM_DFP3_STD_MODE_TBL_ADDR (ATOM_DFP3_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2441 #define ATOM_DFP4_EDID_ADDR (ATOM_DFP3_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2442 #define ATOM_DFP4_DTD_MODE_TBL_ADDR (ATOM_DFP4_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2443 #define ATOM_DFP4_STD_MODE_TBL_ADDR (ATOM_DFP4_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2445 #define ATOM_DFP5_EDID_ADDR (ATOM_DFP4_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2446 #define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2447 #define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2449 #define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR+ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2451 #define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR + 256)
2452 #define ATOM_STACK_STORAGE_END (ATOM_STACK_STORAGE_START + 512)
2454 /* The size below is in Kb! */
2455 #define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC)
2457 #define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L
2458 #define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30
2459 #define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1
2460 #define ATOM_VRAM_BLOCK_NEEDS_RESERVATION 0x0
2462 /***********************************************************************************/
2463 /* Structure used in VRAM_UsageByFirmwareTable */
2464 /* Note1: This table is filled by SetBiosReservationStartInFB in CoreCommSubs.asm */
2465 /* at running time. */
2466 /* note2: From RV770, the memory is more than 32bit addressable, so we will change */
2467 /* ucTableFormatRevision=1,ucTableContentRevision=4, the strcuture remains */
2468 /* exactly same as 1.1 and 1.2 (1.3 is never in use), but ulStartAddrUsedByFirmware */
2469 /* (in offset to start of memory address) is KB aligned instead of byte aligend. */
2470 /***********************************************************************************/
2471 #define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1
2473 typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO {
2474 ULONG ulStartAddrUsedByFirmware;
2475 USHORT usFirmwareUseInKb;
2477 } ATOM_FIRMWARE_VRAM_RESERVE_INFO;
2479 typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE {
2480 ATOM_COMMON_TABLE_HEADER sHeader;
2481 ATOM_FIRMWARE_VRAM_RESERVE_INFO
2482 asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
2483 } ATOM_VRAM_USAGE_BY_FIRMWARE;
2485 /****************************************************************************/
2486 /* Structure used in GPIO_Pin_LUTTable */
2487 /****************************************************************************/
2488 typedef struct _ATOM_GPIO_PIN_ASSIGNMENT {
2489 USHORT usGpioPin_AIndex;
2490 UCHAR ucGpioPinBitShift;
2492 } ATOM_GPIO_PIN_ASSIGNMENT;
2494 typedef struct _ATOM_GPIO_PIN_LUT {
2495 ATOM_COMMON_TABLE_HEADER sHeader;
2496 ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1];
2497 } ATOM_GPIO_PIN_LUT;
2499 /****************************************************************************/
2500 /* Structure used in ComponentVideoInfoTable */
2501 /****************************************************************************/
2502 #define GPIO_PIN_ACTIVE_HIGH 0x1
2504 #define MAX_SUPPORTED_CV_STANDARDS 5
2506 /* definitions for ATOM_D_INFO.ucSettings */
2507 #define ATOM_GPIO_SETTINGS_BITSHIFT_MASK 0x1F /* [4:0] */
2508 #define ATOM_GPIO_SETTINGS_RESERVED_MASK 0x60 /* [6:5] = must be zeroed out */
2509 #define ATOM_GPIO_SETTINGS_ACTIVE_MASK 0x80 /* [7] */
2511 typedef struct _ATOM_GPIO_INFO {
2517 /* definitions for ATOM_COMPONENT_VIDEO_INFO.ucMiscInfo (bit vector) */
2518 #define ATOM_CV_RESTRICT_FORMAT_SELECTION 0x2
2520 /* definitions for ATOM_COMPONENT_VIDEO_INFO.uc480i/uc480p/uc720p/uc1080i */
2521 #define ATOM_GPIO_DEFAULT_MODE_EN 0x80 /* [7]; */
2522 #define ATOM_GPIO_SETTING_PERMODE_MASK 0x7F /* [6:0] */
2524 /* definitions for ATOM_COMPONENT_VIDEO_INFO.ucLetterBoxMode */
2525 /* Line 3 out put 5V. */
2526 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A 0x01 /* represent gpio 3 state for 16:9 */
2527 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B 0x02 /* represent gpio 4 state for 16:9 */
2528 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT 0x0
2530 /* Line 3 out put 2.2V */
2531 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04 /* represent gpio 3 state for 4:3 Letter box */
2532 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08 /* represent gpio 4 state for 4:3 Letter box */
2533 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2
2535 /* Line 3 out put 0V */
2536 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A 0x10 /* represent gpio 3 state for 4:3 */
2537 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B 0x20 /* represent gpio 4 state for 4:3 */
2538 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT 0x4
2540 #define ATOM_CV_LINE3_ASPECTRATIO_MASK 0x3F /* bit [5:0] */
2542 #define ATOM_CV_LINE3_ASPECTRATIO_EXIST 0x80 /* bit 7 */
2544 /* GPIO bit index in gpio setting per mode value, also represend the block no. in gpio blocks. */
2545 #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. */
2546 #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. */
2548 typedef struct _ATOM_COMPONENT_VIDEO_INFO {
2549 ATOM_COMMON_TABLE_HEADER sHeader;
2550 USHORT usMask_PinRegisterIndex;
2551 USHORT usEN_PinRegisterIndex;
2552 USHORT usY_PinRegisterIndex;
2553 USHORT usA_PinRegisterIndex;
2555 UCHAR ucPinActiveState; /* ucPinActiveState: Bit0=1 active high, =0 active low */
2556 ATOM_DTD_FORMAT sReserved; /* must be zeroed out */
2562 UCHAR ucLetterBoxMode;
2563 UCHAR ucReserved[3];
2564 UCHAR ucNumOfWbGpioBlocks; /* For Component video D-Connector support. If zere, NTSC type connector */
2565 ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
2566 ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
2567 } ATOM_COMPONENT_VIDEO_INFO;
2569 /* ucTableFormatRevision=2 */
2570 /* ucTableContentRevision=1 */
2571 typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21 {
2572 ATOM_COMMON_TABLE_HEADER sHeader;
2579 UCHAR ucLetterBoxMode;
2580 UCHAR ucNumOfWbGpioBlocks; /* For Component video D-Connector support. If zere, NTSC type connector */
2581 ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
2582 ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
2583 } ATOM_COMPONENT_VIDEO_INFO_V21;
2585 #define ATOM_COMPONENT_VIDEO_INFO_LAST ATOM_COMPONENT_VIDEO_INFO_V21
2587 /****************************************************************************/
2588 /* Structure used in object_InfoTable */
2589 /****************************************************************************/
2590 typedef struct _ATOM_OBJECT_HEADER {
2591 ATOM_COMMON_TABLE_HEADER sHeader;
2592 USHORT usDeviceSupport;
2593 USHORT usConnectorObjectTableOffset;
2594 USHORT usRouterObjectTableOffset;
2595 USHORT usEncoderObjectTableOffset;
2596 USHORT usProtectionObjectTableOffset; /* only available when Protection block is independent. */
2597 USHORT usDisplayPathTableOffset;
2598 } ATOM_OBJECT_HEADER;
2600 typedef struct _ATOM_DISPLAY_OBJECT_PATH {
2601 USHORT usDeviceTag; /* supported device */
2602 USHORT usSize; /* the size of ATOM_DISPLAY_OBJECT_PATH */
2603 USHORT usConnObjectId; /* Connector Object ID */
2604 USHORT usGPUObjectId; /* GPU ID */
2605 USHORT usGraphicObjIds[1]; /* 1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. */
2606 } ATOM_DISPLAY_OBJECT_PATH;
2608 typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE {
2609 UCHAR ucNumOfDispPath;
2612 ATOM_DISPLAY_OBJECT_PATH asDispPath[1];
2613 } ATOM_DISPLAY_OBJECT_PATH_TABLE;
2615 typedef struct _ATOM_OBJECT /* each object has this structure */
2618 USHORT usSrcDstTableOffset;
2619 USHORT usRecordOffset; /* this pointing to a bunch of records defined below */
2623 typedef struct _ATOM_OBJECT_TABLE /* Above 4 object table offset pointing to a bunch of objects all have this structure */
2625 UCHAR ucNumberOfObjects;
2627 ATOM_OBJECT asObjects[1];
2628 } ATOM_OBJECT_TABLE;
2630 typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT /* usSrcDstTableOffset pointing to this structure */
2632 UCHAR ucNumberOfSrc;
2633 USHORT usSrcObjectID[1];
2634 UCHAR ucNumberOfDst;
2635 USHORT usDstObjectID[1];
2636 } ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT;
2638 /* Related definitions, all records are differnt but they have a commond header */
2639 typedef struct _ATOM_COMMON_RECORD_HEADER {
2640 UCHAR ucRecordType; /* An emun to indicate the record type */
2641 UCHAR ucRecordSize; /* The size of the whole record in byte */
2642 } ATOM_COMMON_RECORD_HEADER;
2644 #define ATOM_I2C_RECORD_TYPE 1
2645 #define ATOM_HPD_INT_RECORD_TYPE 2
2646 #define ATOM_OUTPUT_PROTECTION_RECORD_TYPE 3
2647 #define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE 4
2648 #define ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE 5 /* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
2649 #define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE 6 /* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
2650 #define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE 7
2651 #define ATOM_JTAG_RECORD_TYPE 8 /* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
2652 #define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE 9
2653 #define ATOM_ENCODER_DVO_CF_RECORD_TYPE 10
2654 #define ATOM_CONNECTOR_CF_RECORD_TYPE 11
2655 #define ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE 12
2656 #define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE 13
2657 #define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE 14
2658 #define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE 15
2660 /* Must be updated when new record type is added,equal to that record definition! */
2661 #define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_CONNECTOR_CF_RECORD_TYPE
2663 typedef struct _ATOM_I2C_RECORD {
2664 ATOM_COMMON_RECORD_HEADER sheader;
2665 ATOM_I2C_ID_CONFIG sucI2cId;
2666 UCHAR ucI2CAddr; /* The slave address, it's 0 when the record is attached to connector for DDC */
2669 typedef struct _ATOM_HPD_INT_RECORD {
2670 ATOM_COMMON_RECORD_HEADER sheader;
2671 UCHAR ucHPDIntGPIOID; /* Corresponding block in GPIO_PIN_INFO table gives the pin info */
2672 UCHAR ucPluggged_PinState;
2673 } ATOM_HPD_INT_RECORD;
2675 typedef struct _ATOM_OUTPUT_PROTECTION_RECORD {
2676 ATOM_COMMON_RECORD_HEADER sheader;
2677 UCHAR ucProtectionFlag;
2679 } ATOM_OUTPUT_PROTECTION_RECORD;
2681 typedef struct _ATOM_CONNECTOR_DEVICE_TAG {
2682 ULONG ulACPIDeviceEnum; /* Reserved for now */
2683 USHORT usDeviceID; /* This Id is same as "ATOM_DEVICE_XXX_SUPPORT" */
2685 } ATOM_CONNECTOR_DEVICE_TAG;
2687 typedef struct _ATOM_CONNECTOR_DEVICE_TAG_RECORD {
2688 ATOM_COMMON_RECORD_HEADER sheader;
2689 UCHAR ucNumberOfDevice;
2691 ATOM_CONNECTOR_DEVICE_TAG asDeviceTag[1]; /* This Id is same as "ATOM_DEVICE_XXX_SUPPORT", 1 is only for allocation */
2692 } ATOM_CONNECTOR_DEVICE_TAG_RECORD;
2694 typedef struct _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD {
2695 ATOM_COMMON_RECORD_HEADER sheader;
2696 UCHAR ucConfigGPIOID;
2697 UCHAR ucConfigGPIOState; /* Set to 1 when it's active high to enable external flow in */
2698 UCHAR ucFlowinGPIPID;
2699 UCHAR ucExtInGPIPID;
2700 } ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD;
2702 typedef struct _ATOM_ENCODER_FPGA_CONTROL_RECORD {
2703 ATOM_COMMON_RECORD_HEADER sheader;
2704 UCHAR ucCTL1GPIO_ID;
2705 UCHAR ucCTL1GPIOState; /* Set to 1 when it's active high */
2706 UCHAR ucCTL2GPIO_ID;
2707 UCHAR ucCTL2GPIOState; /* Set to 1 when it's active high */
2708 UCHAR ucCTL3GPIO_ID;
2709 UCHAR ucCTL3GPIOState; /* Set to 1 when it's active high */
2710 UCHAR ucCTLFPGA_IN_ID;
2712 } ATOM_ENCODER_FPGA_CONTROL_RECORD;
2714 typedef struct _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD {
2715 ATOM_COMMON_RECORD_HEADER sheader;
2716 UCHAR ucGPIOID; /* Corresponding block in GPIO_PIN_INFO table gives the pin info */
2717 UCHAR ucTVActiveState; /* Indicating when the pin==0 or 1 when TV is connected */
2718 } ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD;
2720 typedef struct _ATOM_JTAG_RECORD {
2721 ATOM_COMMON_RECORD_HEADER sheader;
2723 UCHAR ucTMSGPIOState; /* Set to 1 when it's active high */
2725 UCHAR ucTCKGPIOState; /* Set to 1 when it's active high */
2727 UCHAR ucTDOGPIOState; /* Set to 1 when it's active high */
2729 UCHAR ucTDIGPIOState; /* Set to 1 when it's active high */
2733 /* The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually */
2734 typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR {
2735 UCHAR ucGPIOID; /* GPIO_ID, find the corresponding ID in GPIO_LUT table */
2736 UCHAR ucGPIO_PinState; /* Pin state showing how to set-up the pin */
2737 } ATOM_GPIO_PIN_CONTROL_PAIR;
2739 typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD {
2740 ATOM_COMMON_RECORD_HEADER sheader;
2741 UCHAR ucFlags; /* Future expnadibility */
2742 UCHAR ucNumberOfPins; /* Number of GPIO pins used to control the object */
2743 ATOM_GPIO_PIN_CONTROL_PAIR asGpio[1]; /* the real gpio pin pair determined by number of pins ucNumberOfPins */
2744 } ATOM_OBJECT_GPIO_CNTL_RECORD;
2746 /* Definitions for GPIO pin state */
2747 #define GPIO_PIN_TYPE_INPUT 0x00
2748 #define GPIO_PIN_TYPE_OUTPUT 0x10
2749 #define GPIO_PIN_TYPE_HW_CONTROL 0x20
2751 /* For GPIO_PIN_TYPE_OUTPUT the following is defined */
2752 #define GPIO_PIN_OUTPUT_STATE_MASK 0x01
2753 #define GPIO_PIN_OUTPUT_STATE_SHIFT 0
2754 #define GPIO_PIN_STATE_ACTIVE_LOW 0x0
2755 #define GPIO_PIN_STATE_ACTIVE_HIGH 0x1
2757 typedef struct _ATOM_ENCODER_DVO_CF_RECORD {
2758 ATOM_COMMON_RECORD_HEADER sheader;
2759 ULONG ulStrengthControl; /* DVOA strength control for CF */
2761 } ATOM_ENCODER_DVO_CF_RECORD;
2763 /* value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle */
2764 #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1
2765 #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2
2767 typedef struct _ATOM_CONNECTOR_CF_RECORD {
2768 ATOM_COMMON_RECORD_HEADER sheader;
2770 UCHAR ucFlowCntlGpioId;
2771 UCHAR ucSwapCntlGpioId;
2772 UCHAR ucConnectedDvoBundle;
2774 } ATOM_CONNECTOR_CF_RECORD;
2776 typedef struct _ATOM_CONNECTOR_HARDCODE_DTD_RECORD {
2777 ATOM_COMMON_RECORD_HEADER sheader;
2778 ATOM_DTD_FORMAT asTiming;
2779 } ATOM_CONNECTOR_HARDCODE_DTD_RECORD;
2781 typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD {
2782 ATOM_COMMON_RECORD_HEADER sheader; /* ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE */
2783 UCHAR ucSubConnectorType; /* CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D|X_ID_DUAL_LINK_DVI_D|HDMI_TYPE_A */
2785 } ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD;
2787 typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD {
2788 ATOM_COMMON_RECORD_HEADER sheader;
2789 UCHAR ucMuxType; /* decide the number of ucMuxState, =0, no pin state, =1: single state with complement, >1: multiple state */
2790 UCHAR ucMuxControlPin;
2791 UCHAR ucMuxState[2]; /* for alligment purpose */
2792 } ATOM_ROUTER_DDC_PATH_SELECT_RECORD;
2794 typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD {
2795 ATOM_COMMON_RECORD_HEADER sheader;
2797 UCHAR ucMuxControlPin;
2798 UCHAR ucMuxState[2]; /* for alligment purpose */
2799 } ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD;
2801 /* define ucMuxType */
2802 #define ATOM_ROUTER_MUX_PIN_STATE_MASK 0x0f
2803 #define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT 0x01
2805 /****************************************************************************/
2806 /* ASIC voltage data table */
2807 /****************************************************************************/
2808 typedef struct _ATOM_VOLTAGE_INFO_HEADER {
2809 USHORT usVDDCBaseLevel; /* In number of 50mv unit */
2810 USHORT usReserved; /* For possible extension table offset */
2811 UCHAR ucNumOfVoltageEntries;
2812 UCHAR ucBytesPerVoltageEntry;
2813 UCHAR ucVoltageStep; /* Indicating in how many mv increament is one step, 0.5mv unit */
2814 UCHAR ucDefaultVoltageEntry;
2815 UCHAR ucVoltageControlI2cLine;
2816 UCHAR ucVoltageControlAddress;
2817 UCHAR ucVoltageControlOffset;
2818 } ATOM_VOLTAGE_INFO_HEADER;
2820 typedef struct _ATOM_VOLTAGE_INFO {
2821 ATOM_COMMON_TABLE_HEADER sHeader;
2822 ATOM_VOLTAGE_INFO_HEADER viHeader;
2823 UCHAR ucVoltageEntries[64]; /* 64 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries*ucBytesPerVoltageEntry */
2824 } ATOM_VOLTAGE_INFO;
2826 typedef struct _ATOM_VOLTAGE_FORMULA {
2827 USHORT usVoltageBaseLevel; /* In number of 1mv unit */
2828 USHORT usVoltageStep; /* Indicating in how many mv increament is one step, 1mv unit */
2829 UCHAR ucNumOfVoltageEntries; /* Number of Voltage Entry, which indicate max Voltage */
2830 UCHAR ucFlag; /* bit0=0 :step is 1mv =1 0.5mv */
2831 UCHAR ucBaseVID; /* if there is no lookup table, VID= BaseVID + ( Vol - BaseLevle ) /VoltageStep */
2833 UCHAR ucVIDAdjustEntries[32]; /* 32 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries */
2834 } ATOM_VOLTAGE_FORMULA;
2836 typedef struct _ATOM_VOLTAGE_CONTROL {
2837 UCHAR ucVoltageControlId; /* Indicate it is controlled by I2C or GPIO or HW state machine */
2838 UCHAR ucVoltageControlI2cLine;
2839 UCHAR ucVoltageControlAddress;
2840 UCHAR ucVoltageControlOffset;
2841 USHORT usGpioPin_AIndex; /* GPIO_PAD register index */
2842 UCHAR ucGpioPinBitShift[9]; /* at most 8 pin support 255 VIDs, termintate with 0xff */
2844 } ATOM_VOLTAGE_CONTROL;
2846 /* Define ucVoltageControlId */
2847 #define VOLTAGE_CONTROLLED_BY_HW 0x00
2848 #define VOLTAGE_CONTROLLED_BY_I2C_MASK 0x7F
2849 #define VOLTAGE_CONTROLLED_BY_GPIO 0x80
2850 #define VOLTAGE_CONTROL_ID_LM64 0x01 /* I2C control, used for R5xx Core Voltage */
2851 #define VOLTAGE_CONTROL_ID_DAC 0x02 /* I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI */
2852 #define VOLTAGE_CONTROL_ID_VT116xM 0x03 /* I2C control, used for R6xx Core Voltage */
2853 #define VOLTAGE_CONTROL_ID_DS4402 0x04
2855 typedef struct _ATOM_VOLTAGE_OBJECT {
2856 UCHAR ucVoltageType; /* Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI */
2857 UCHAR ucSize; /* Size of Object */
2858 ATOM_VOLTAGE_CONTROL asControl; /* describ how to control */
2859 ATOM_VOLTAGE_FORMULA asFormula; /* Indicate How to convert real Voltage to VID */
2860 } ATOM_VOLTAGE_OBJECT;
2862 typedef struct _ATOM_VOLTAGE_OBJECT_INFO {
2863 ATOM_COMMON_TABLE_HEADER sHeader;
2864 ATOM_VOLTAGE_OBJECT asVoltageObj[3]; /* Info for Voltage control */
2865 } ATOM_VOLTAGE_OBJECT_INFO;
2867 typedef struct _ATOM_LEAKID_VOLTAGE {
2871 } ATOM_LEAKID_VOLTAGE;
2873 typedef struct _ATOM_ASIC_PROFILE_VOLTAGE {
2877 USHORT usEfuseSpareStartAddr;
2878 USHORT usFuseIndex[8]; /* from LSB to MSB, Max 8bit,end of 0xffff if less than 8 efuse id, */
2879 ATOM_LEAKID_VOLTAGE asLeakVol[2]; /* Leakid and relatd voltage */
2880 } ATOM_ASIC_PROFILE_VOLTAGE;
2883 #define ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE 1
2884 #define ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE 1
2885 #define ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE 2
2887 typedef struct _ATOM_ASIC_PROFILING_INFO {
2888 ATOM_COMMON_TABLE_HEADER asHeader;
2889 ATOM_ASIC_PROFILE_VOLTAGE asVoltage;
2890 } ATOM_ASIC_PROFILING_INFO;
2892 typedef struct _ATOM_POWER_SOURCE_OBJECT {
2893 UCHAR ucPwrSrcId; /* Power source */
2894 UCHAR ucPwrSensorType; /* GPIO, I2C or none */
2895 UCHAR ucPwrSensId; /* if GPIO detect, it is GPIO id, if I2C detect, it is I2C id */
2896 UCHAR ucPwrSensSlaveAddr; /* Slave address if I2C detect */
2897 UCHAR ucPwrSensRegIndex; /* I2C register Index if I2C detect */
2898 UCHAR ucPwrSensRegBitMask; /* detect which bit is used if I2C detect */
2899 UCHAR ucPwrSensActiveState; /* high active or low active */
2900 UCHAR ucReserve[3]; /* reserve */
2901 USHORT usSensPwr; /* in unit of watt */
2902 } ATOM_POWER_SOURCE_OBJECT;
2904 typedef struct _ATOM_POWER_SOURCE_INFO {
2905 ATOM_COMMON_TABLE_HEADER asHeader;
2906 UCHAR asPwrbehave[16];
2907 ATOM_POWER_SOURCE_OBJECT asPwrObj[1];
2908 } ATOM_POWER_SOURCE_INFO;
2910 /* Define ucPwrSrcId */
2911 #define POWERSOURCE_PCIE_ID1 0x00
2912 #define POWERSOURCE_6PIN_CONNECTOR_ID1 0x01
2913 #define POWERSOURCE_8PIN_CONNECTOR_ID1 0x02
2914 #define POWERSOURCE_6PIN_CONNECTOR_ID2 0x04
2915 #define POWERSOURCE_8PIN_CONNECTOR_ID2 0x08
2917 /* define ucPwrSensorId */
2918 #define POWER_SENSOR_ALWAYS 0x00
2919 #define POWER_SENSOR_GPIO 0x01
2920 #define POWER_SENSOR_I2C 0x02
2922 /**************************************************************************/
2923 /* This portion is only used when ext thermal chip or engine/memory clock SS chip is populated on a design */
2924 /* Memory SS Info Table */
2925 /* Define Memory Clock SS chip ID */
2929 /* Define one structure to inform SW a "block of data" writing to external SS chip via I2C protocol */
2930 typedef struct _ATOM_I2C_DATA_RECORD {
2931 UCHAR ucNunberOfBytes; /* Indicates how many bytes SW needs to write to the external ASIC for one block, besides to "Start" and "Stop" */
2932 UCHAR ucI2CData[1]; /* I2C data in bytes, should be less than 16 bytes usually */
2933 } ATOM_I2C_DATA_RECORD;
2935 /* Define one structure to inform SW how many blocks of data writing to external SS chip via I2C protocol, in addition to other information */
2936 typedef struct _ATOM_I2C_DEVICE_SETUP_INFO {
2937 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; /* I2C line and HW/SW assisted cap. */
2938 UCHAR ucSSChipID; /* SS chip being used */
2939 UCHAR ucSSChipSlaveAddr; /* Slave Address to set up this SS chip */
2940 UCHAR ucNumOfI2CDataRecords; /* number of data block */
2941 ATOM_I2C_DATA_RECORD asI2CData[1];
2942 } ATOM_I2C_DEVICE_SETUP_INFO;
2944 /* ========================================================================================== */
2945 typedef struct _ATOM_ASIC_MVDD_INFO {
2946 ATOM_COMMON_TABLE_HEADER sHeader;
2947 ATOM_I2C_DEVICE_SETUP_INFO asI2CSetup[1];
2948 } ATOM_ASIC_MVDD_INFO;
2950 /* ========================================================================================== */
2951 #define ATOM_MCLK_SS_INFO ATOM_ASIC_MVDD_INFO
2953 /* ========================================================================================== */
2954 /**************************************************************************/
2956 typedef struct _ATOM_ASIC_SS_ASSIGNMENT {
2957 ULONG ulTargetClockRange; /* Clock Out frequence (VCO ), in unit of 10Khz */
2958 USHORT usSpreadSpectrumPercentage; /* in unit of 0.01% */
2959 USHORT usSpreadRateInKhz; /* in unit of kHz, modulation freq */
2960 UCHAR ucClockIndication; /* Indicate which clock source needs SS */
2961 UCHAR ucSpreadSpectrumMode; /* Bit1=0 Down Spread,=1 Center Spread. */
2962 UCHAR ucReserved[2];
2963 } ATOM_ASIC_SS_ASSIGNMENT;
2965 /* Define ucSpreadSpectrumType */
2966 #define ASIC_INTERNAL_MEMORY_SS 1
2967 #define ASIC_INTERNAL_ENGINE_SS 2
2968 #define ASIC_INTERNAL_UVD_SS 3
2970 typedef struct _ATOM_ASIC_INTERNAL_SS_INFO {
2971 ATOM_COMMON_TABLE_HEADER sHeader;
2972 ATOM_ASIC_SS_ASSIGNMENT asSpreadSpectrum[4];
2973 } ATOM_ASIC_INTERNAL_SS_INFO;
2975 /* ==============================Scratch Pad Definition Portion=============================== */
2976 #define ATOM_DEVICE_CONNECT_INFO_DEF 0
2977 #define ATOM_ROM_LOCATION_DEF 1
2978 #define ATOM_TV_STANDARD_DEF 2
2979 #define ATOM_ACTIVE_INFO_DEF 3
2980 #define ATOM_LCD_INFO_DEF 4
2981 #define ATOM_DOS_REQ_INFO_DEF 5
2982 #define ATOM_ACC_CHANGE_INFO_DEF 6
2983 #define ATOM_DOS_MODE_INFO_DEF 7
2984 #define ATOM_I2C_CHANNEL_STATUS_DEF 8
2985 #define ATOM_I2C_CHANNEL_STATUS1_DEF 9
2987 /* BIOS_0_SCRATCH Definition */
2988 #define ATOM_S0_CRT1_MONO 0x00000001L
2989 #define ATOM_S0_CRT1_COLOR 0x00000002L
2990 #define ATOM_S0_CRT1_MASK (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR)
2992 #define ATOM_S0_TV1_COMPOSITE_A 0x00000004L
2993 #define ATOM_S0_TV1_SVIDEO_A 0x00000008L
2994 #define ATOM_S0_TV1_MASK_A (ATOM_S0_TV1_COMPOSITE_A+ATOM_S0_TV1_SVIDEO_A)
2996 #define ATOM_S0_CV_A 0x00000010L
2997 #define ATOM_S0_CV_DIN_A 0x00000020L
2998 #define ATOM_S0_CV_MASK_A (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A)
3000 #define ATOM_S0_CRT2_MONO 0x00000100L
3001 #define ATOM_S0_CRT2_COLOR 0x00000200L
3002 #define ATOM_S0_CRT2_MASK (ATOM_S0_CRT2_MONO+ATOM_S0_CRT2_COLOR)
3004 #define ATOM_S0_TV1_COMPOSITE 0x00000400L
3005 #define ATOM_S0_TV1_SVIDEO 0x00000800L
3006 #define ATOM_S0_TV1_SCART 0x00004000L
3007 #define ATOM_S0_TV1_MASK (ATOM_S0_TV1_COMPOSITE+ATOM_S0_TV1_SVIDEO+ATOM_S0_TV1_SCART)
3009 #define ATOM_S0_CV 0x00001000L
3010 #define ATOM_S0_CV_DIN 0x00002000L
3011 #define ATOM_S0_CV_MASK (ATOM_S0_CV+ATOM_S0_CV_DIN)
3013 #define ATOM_S0_DFP1 0x00010000L
3014 #define ATOM_S0_DFP2 0x00020000L
3015 #define ATOM_S0_LCD1 0x00040000L
3016 #define ATOM_S0_LCD2 0x00080000L
3017 #define ATOM_S0_TV2 0x00100000L
3018 #define ATOM_S0_DFP3 0x00200000L
3019 #define ATOM_S0_DFP4 0x00400000L
3020 #define ATOM_S0_DFP5 0x00800000L
3022 #define ATOM_S0_DFP_MASK \
3023 (ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5)
3025 #define ATOM_S0_FAD_REGISTER_BUG 0x02000000L /* If set, indicates we are running a PCIE asic with */
3026 /* the FAD/HDP reg access bug. Bit is read by DAL */
3028 #define ATOM_S0_THERMAL_STATE_MASK 0x1C000000L
3029 #define ATOM_S0_THERMAL_STATE_SHIFT 26
3031 #define ATOM_S0_SYSTEM_POWER_STATE_MASK 0xE0000000L
3032 #define ATOM_S0_SYSTEM_POWER_STATE_SHIFT 29
3034 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1
3035 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2
3036 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3
3038 /* Byte aligned defintion for BIOS usage */
3039 #define ATOM_S0_CRT1_MONOb0 0x01
3040 #define ATOM_S0_CRT1_COLORb0 0x02
3041 #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0)
3043 #define ATOM_S0_TV1_COMPOSITEb0 0x04
3044 #define ATOM_S0_TV1_SVIDEOb0 0x08
3045 #define ATOM_S0_TV1_MASKb0 (ATOM_S0_TV1_COMPOSITEb0+ATOM_S0_TV1_SVIDEOb0)
3047 #define ATOM_S0_CVb0 0x10
3048 #define ATOM_S0_CV_DINb0 0x20
3049 #define ATOM_S0_CV_MASKb0 (ATOM_S0_CVb0+ATOM_S0_CV_DINb0)
3051 #define ATOM_S0_CRT2_MONOb1 0x01
3052 #define ATOM_S0_CRT2_COLORb1 0x02
3053 #define ATOM_S0_CRT2_MASKb1 (ATOM_S0_CRT2_MONOb1+ATOM_S0_CRT2_COLORb1)
3055 #define ATOM_S0_TV1_COMPOSITEb1 0x04
3056 #define ATOM_S0_TV1_SVIDEOb1 0x08
3057 #define ATOM_S0_TV1_SCARTb1 0x40
3058 #define ATOM_S0_TV1_MASKb1 (ATOM_S0_TV1_COMPOSITEb1+ATOM_S0_TV1_SVIDEOb1+ATOM_S0_TV1_SCARTb1)
3060 #define ATOM_S0_CVb1 0x10
3061 #define ATOM_S0_CV_DINb1 0x20
3062 #define ATOM_S0_CV_MASKb1 (ATOM_S0_CVb1+ATOM_S0_CV_DINb1)
3064 #define ATOM_S0_DFP1b2 0x01
3065 #define ATOM_S0_DFP2b2 0x02
3066 #define ATOM_S0_LCD1b2 0x04
3067 #define ATOM_S0_LCD2b2 0x08
3068 #define ATOM_S0_TV2b2 0x10
3069 #define ATOM_S0_DFP3b2 0x20
3071 #define ATOM_S0_THERMAL_STATE_MASKb3 0x1C
3072 #define ATOM_S0_THERMAL_STATE_SHIFTb3 2
3074 #define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0
3075 #define ATOM_S0_LCD1_SHIFT 18
3077 /* BIOS_1_SCRATCH Definition */
3078 #define ATOM_S1_ROM_LOCATION_MASK 0x0000FFFFL
3079 #define ATOM_S1_PCI_BUS_DEV_MASK 0xFFFF0000L
3081 /* BIOS_2_SCRATCH Definition */
3082 #define ATOM_S2_TV1_STANDARD_MASK 0x0000000FL
3083 #define ATOM_S2_CURRENT_BL_LEVEL_MASK 0x0000FF00L
3084 #define ATOM_S2_CURRENT_BL_LEVEL_SHIFT 8
3086 #define ATOM_S2_CRT1_DPMS_STATE 0x00010000L
3087 #define ATOM_S2_LCD1_DPMS_STATE 0x00020000L
3088 #define ATOM_S2_TV1_DPMS_STATE 0x00040000L
3089 #define ATOM_S2_DFP1_DPMS_STATE 0x00080000L
3090 #define ATOM_S2_CRT2_DPMS_STATE 0x00100000L
3091 #define ATOM_S2_LCD2_DPMS_STATE 0x00200000L
3092 #define ATOM_S2_TV2_DPMS_STATE 0x00400000L
3093 #define ATOM_S2_DFP2_DPMS_STATE 0x00800000L
3094 #define ATOM_S2_CV_DPMS_STATE 0x01000000L
3095 #define ATOM_S2_DFP3_DPMS_STATE 0x02000000L
3096 #define ATOM_S2_DFP4_DPMS_STATE 0x04000000L
3097 #define ATOM_S2_DFP5_DPMS_STATE 0x08000000L
3099 #define ATOM_S2_DFP_DPM_STATE \
3100 (ATOM_S2_DFP1_DPMS_STATE | ATOM_S2_DFP2_DPMS_STATE | \
3101 ATOM_S2_DFP3_DPMS_STATE | ATOM_S2_DFP4_DPMS_STATE | \
3102 ATOM_S2_DFP5_DPMS_STATE)
3104 #define ATOM_S2_DEVICE_DPMS_STATE \
3105 (ATOM_S2_CRT1_DPMS_STATE + ATOM_S2_LCD1_DPMS_STATE + \
3106 ATOM_S2_TV1_DPMS_STATE + ATOM_S2_DFP_DPMS_STATE + \
3107 ATOM_S2_CRT2_DPMS_STATE + ATOM_S2_LCD2_DPMS_STATE + \
3108 ATOM_S2_TV2_DPMS_STATE + ATOM_S2_CV_DPMS_STATE)
3110 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK 0x0C000000L
3111 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26
3112 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE 0x10000000L
3114 #define ATOM_S2_VRI_BRIGHT_ENABLE 0x20000000L
3116 #define ATOM_S2_DISPLAY_ROTATION_0_DEGREE 0x0
3117 #define ATOM_S2_DISPLAY_ROTATION_90_DEGREE 0x1
3118 #define ATOM_S2_DISPLAY_ROTATION_180_DEGREE 0x2
3119 #define ATOM_S2_DISPLAY_ROTATION_270_DEGREE 0x3
3120 #define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30
3121 #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L
3123 /* Byte aligned defintion for BIOS usage */
3124 #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F
3125 #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF
3126 #define ATOM_S2_CRT1_DPMS_STATEb2 0x01
3127 #define ATOM_S2_LCD1_DPMS_STATEb2 0x02
3128 #define ATOM_S2_TV1_DPMS_STATEb2 0x04
3129 #define ATOM_S2_DFP1_DPMS_STATEb2 0x08
3130 #define ATOM_S2_CRT2_DPMS_STATEb2 0x10
3131 #define ATOM_S2_LCD2_DPMS_STATEb2 0x20
3132 #define ATOM_S2_TV2_DPMS_STATEb2 0x40
3133 #define ATOM_S2_DFP2_DPMS_STATEb2 0x80
3134 #define ATOM_S2_CV_DPMS_STATEb3 0x01
3135 #define ATOM_S2_DFP3_DPMS_STATEb3 0x02
3136 #define ATOM_S2_DFP4_DPMS_STATEb3 0x04
3137 #define ATOM_S2_DFP5_DPMS_STATEb3 0x08
3139 #define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF
3140 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C
3141 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10
3142 #define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20
3143 #define ATOM_S2_ROTATION_STATE_MASKb3 0xC0
3145 /* BIOS_3_SCRATCH Definition */
3146 #define ATOM_S3_CRT1_ACTIVE 0x00000001L
3147 #define ATOM_S3_LCD1_ACTIVE 0x00000002L
3148 #define ATOM_S3_TV1_ACTIVE 0x00000004L
3149 #define ATOM_S3_DFP1_ACTIVE 0x00000008L
3150 #define ATOM_S3_CRT2_ACTIVE 0x00000010L
3151 #define ATOM_S3_LCD2_ACTIVE 0x00000020L
3152 #define ATOM_S3_TV2_ACTIVE 0x00000040L
3153 #define ATOM_S3_DFP2_ACTIVE 0x00000080L
3154 #define ATOM_S3_CV_ACTIVE 0x00000100L
3155 #define ATOM_S3_DFP3_ACTIVE 0x00000200L
3156 #define ATOM_S3_DFP4_ACTIVE 0x00000400L
3157 #define ATOM_S3_DFP5_ACTIVE 0x00000800L
3159 #define ATOM_S3_DEVICE_ACTIVE_MASK 0x000003FFL
3161 #define ATOM_S3_LCD_FULLEXPANSION_ACTIVE 0x00001000L
3162 #define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L
3164 #define ATOM_S3_CRT1_CRTC_ACTIVE 0x00010000L
3165 #define ATOM_S3_LCD1_CRTC_ACTIVE 0x00020000L
3166 #define ATOM_S3_TV1_CRTC_ACTIVE 0x00040000L
3167 #define ATOM_S3_DFP1_CRTC_ACTIVE 0x00080000L
3168 #define ATOM_S3_CRT2_CRTC_ACTIVE 0x00100000L
3169 #define ATOM_S3_LCD2_CRTC_ACTIVE 0x00200000L
3170 #define ATOM_S3_TV2_CRTC_ACTIVE 0x00400000L
3171 #define ATOM_S3_DFP2_CRTC_ACTIVE 0x00800000L
3172 #define ATOM_S3_CV_CRTC_ACTIVE 0x01000000L
3173 #define ATOM_S3_DFP3_CRTC_ACTIVE 0x02000000L
3174 #define ATOM_S3_DFP4_CRTC_ACTIVE 0x04000000L
3175 #define ATOM_S3_DFP5_CRTC_ACTIVE 0x08000000L
3177 #define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L
3178 #define ATOM_S3_ASIC_GUI_ENGINE_HUNG 0x20000000L
3179 #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L
3180 #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L
3182 /* Byte aligned defintion for BIOS usage */
3183 #define ATOM_S3_CRT1_ACTIVEb0 0x01
3184 #define ATOM_S3_LCD1_ACTIVEb0 0x02
3185 #define ATOM_S3_TV1_ACTIVEb0 0x04
3186 #define ATOM_S3_DFP1_ACTIVEb0 0x08
3187 #define ATOM_S3_CRT2_ACTIVEb0 0x10
3188 #define ATOM_S3_LCD2_ACTIVEb0 0x20
3189 #define ATOM_S3_TV2_ACTIVEb0 0x40
3190 #define ATOM_S3_DFP2_ACTIVEb0 0x80
3191 #define ATOM_S3_CV_ACTIVEb1 0x01
3192 #define ATOM_S3_DFP3_ACTIVEb1 0x02
3193 #define ATOM_S3_DFP4_ACTIVEb1 0x04
3194 #define ATOM_S3_DFP5_ACTIVEb1 0x08
3196 #define ATOM_S3_ACTIVE_CRTC1w0 0xFFF
3198 #define ATOM_S3_CRT1_CRTC_ACTIVEb2 0x01
3199 #define ATOM_S3_LCD1_CRTC_ACTIVEb2 0x02
3200 #define ATOM_S3_TV1_CRTC_ACTIVEb2 0x04
3201 #define ATOM_S3_DFP1_CRTC_ACTIVEb2 0x08
3202 #define ATOM_S3_CRT2_CRTC_ACTIVEb2 0x10
3203 #define ATOM_S3_LCD2_CRTC_ACTIVEb2 0x20
3204 #define ATOM_S3_TV2_CRTC_ACTIVEb2 0x40
3205 #define ATOM_S3_DFP2_CRTC_ACTIVEb2 0x80
3206 #define ATOM_S3_CV_CRTC_ACTIVEb3 0x01
3207 #define ATOM_S3_DFP3_CRTC_ACTIVEb3 0x02
3208 #define ATOM_S3_DFP4_CRTC_ACTIVEb3 0x04
3209 #define ATOM_S3_DFP5_CRTC_ACTIVEb3 0x08
3211 #define ATOM_S3_ACTIVE_CRTC2w1 0xFFF
3213 #define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3 0x20
3214 #define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40
3215 #define ATOM_S3_RQST_GPU_USE_MIN_PWRb3 0x80
3217 /* BIOS_4_SCRATCH Definition */
3218 #define ATOM_S4_LCD1_PANEL_ID_MASK 0x000000FFL
3219 #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L
3220 #define ATOM_S4_LCD1_REFRESH_SHIFT 8
3222 /* Byte aligned defintion for BIOS usage */
3223 #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF
3224 #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0
3225 #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0
3227 /* BIOS_5_SCRATCH Definition, BIOS_5_SCRATCH is used by Firmware only !!!! */
3228 #define ATOM_S5_DOS_REQ_CRT1b0 0x01
3229 #define ATOM_S5_DOS_REQ_LCD1b0 0x02
3230 #define ATOM_S5_DOS_REQ_TV1b0 0x04
3231 #define ATOM_S5_DOS_REQ_DFP1b0 0x08
3232 #define ATOM_S5_DOS_REQ_CRT2b0 0x10
3233 #define ATOM_S5_DOS_REQ_LCD2b0 0x20
3234 #define ATOM_S5_DOS_REQ_TV2b0 0x40
3235 #define ATOM_S5_DOS_REQ_DFP2b0 0x80
3236 #define ATOM_S5_DOS_REQ_CVb1 0x01
3237 #define ATOM_S5_DOS_REQ_DFP3b1 0x02
3238 #define ATOM_S5_DOS_REQ_DFP4b1 0x04
3239 #define ATOM_S5_DOS_REQ_DFP5b1 0x08
3241 #define ATOM_S5_DOS_REQ_DEVICEw0 0x03FF
3243 #define ATOM_S5_DOS_REQ_CRT1 0x0001
3244 #define ATOM_S5_DOS_REQ_LCD1 0x0002
3245 #define ATOM_S5_DOS_REQ_TV1 0x0004
3246 #define ATOM_S5_DOS_REQ_DFP1 0x0008
3247 #define ATOM_S5_DOS_REQ_CRT2 0x0010
3248 #define ATOM_S5_DOS_REQ_LCD2 0x0020
3249 #define ATOM_S5_DOS_REQ_TV2 0x0040
3250 #define ATOM_S5_DOS_REQ_DFP2 0x0080
3251 #define ATOM_S5_DOS_REQ_CV 0x0100
3252 #define ATOM_S5_DOS_REQ_DFP3 0x0200
3253 #define ATOM_S5_DOS_REQ_DFP4 0x0400
3254 #define ATOM_S5_DOS_REQ_DFP5 0x0800
3256 #define ATOM_S5_DOS_FORCE_CRT1b2 ATOM_S5_DOS_REQ_CRT1b0
3257 #define ATOM_S5_DOS_FORCE_TV1b2 ATOM_S5_DOS_REQ_TV1b0
3258 #define ATOM_S5_DOS_FORCE_CRT2b2 ATOM_S5_DOS_REQ_CRT2b0
3259 #define ATOM_S5_DOS_FORCE_CVb3 ATOM_S5_DOS_REQ_CVb1
3260 #define ATOM_S5_DOS_FORCE_DEVICEw1 \
3261 (ATOM_S5_DOS_FORCE_CRT1b2 + ATOM_S5_DOS_FORCE_TV1b2 + \
3262 ATOM_S5_DOS_FORCE_CRT2b2 + (ATOM_S5_DOS_FORCE_CVb3 << 8))
3264 /* BIOS_6_SCRATCH Definition */
3265 #define ATOM_S6_DEVICE_CHANGE 0x00000001L
3266 #define ATOM_S6_SCALER_CHANGE 0x00000002L
3267 #define ATOM_S6_LID_CHANGE 0x00000004L
3268 #define ATOM_S6_DOCKING_CHANGE 0x00000008L
3269 #define ATOM_S6_ACC_MODE 0x00000010L
3270 #define ATOM_S6_EXT_DESKTOP_MODE 0x00000020L
3271 #define ATOM_S6_LID_STATE 0x00000040L
3272 #define ATOM_S6_DOCK_STATE 0x00000080L
3273 #define ATOM_S6_CRITICAL_STATE 0x00000100L
3274 #define ATOM_S6_HW_I2C_BUSY_STATE 0x00000200L
3275 #define ATOM_S6_THERMAL_STATE_CHANGE 0x00000400L
3276 #define ATOM_S6_INTERRUPT_SET_BY_BIOS 0x00000800L
3277 #define ATOM_S6_REQ_LCD_EXPANSION_FULL 0x00001000L /* Normal expansion Request bit for LCD */
3278 #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO 0x00002000L /* Aspect ratio expansion Request bit for LCD */
3280 #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 */
3281 #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 */
3283 #define ATOM_S6_ACC_REQ_CRT1 0x00010000L
3284 #define ATOM_S6_ACC_REQ_LCD1 0x00020000L
3285 #define ATOM_S6_ACC_REQ_TV1 0x00040000L
3286 #define ATOM_S6_ACC_REQ_DFP1 0x00080000L
3287 #define ATOM_S6_ACC_REQ_CRT2 0x00100000L
3288 #define ATOM_S6_ACC_REQ_LCD2 0x00200000L
3289 #define ATOM_S6_ACC_REQ_TV2 0x00400000L
3290 #define ATOM_S6_ACC_REQ_DFP2 0x00800000L
3291 #define ATOM_S6_ACC_REQ_CV 0x01000000L
3292 #define ATOM_S6_ACC_REQ_DFP3 0x02000000L
3293 #define ATOM_S6_ACC_REQ_DFP4 0x04000000L
3294 #define ATOM_S6_ACC_REQ_DFP5 0x08000000L
3296 #define ATOM_S6_ACC_REQ_MASK 0x0FFF0000L
3297 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE 0x10000000L
3298 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH 0x20000000L
3299 #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L
3300 #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L
3302 /* Byte aligned defintion for BIOS usage */
3303 #define ATOM_S6_DEVICE_CHANGEb0 0x01
3304 #define ATOM_S6_SCALER_CHANGEb0 0x02
3305 #define ATOM_S6_LID_CHANGEb0 0x04
3306 #define ATOM_S6_DOCKING_CHANGEb0 0x08
3307 #define ATOM_S6_ACC_MODEb0 0x10
3308 #define ATOM_S6_EXT_DESKTOP_MODEb0 0x20
3309 #define ATOM_S6_LID_STATEb0 0x40
3310 #define ATOM_S6_DOCK_STATEb0 0x80
3311 #define ATOM_S6_CRITICAL_STATEb1 0x01
3312 #define ATOM_S6_HW_I2C_BUSY_STATEb1 0x02
3313 #define ATOM_S6_THERMAL_STATE_CHANGEb1 0x04
3314 #define ATOM_S6_INTERRUPT_SET_BY_BIOSb1 0x08
3315 #define ATOM_S6_REQ_LCD_EXPANSION_FULLb1 0x10
3316 #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIOb1 0x20
3318 #define ATOM_S6_ACC_REQ_CRT1b2 0x01
3319 #define ATOM_S6_ACC_REQ_LCD1b2 0x02
3320 #define ATOM_S6_ACC_REQ_TV1b2 0x04
3321 #define ATOM_S6_ACC_REQ_DFP1b2 0x08
3322 #define ATOM_S6_ACC_REQ_CRT2b2 0x10
3323 #define ATOM_S6_ACC_REQ_LCD2b2 0x20
3324 #define ATOM_S6_ACC_REQ_TV2b2 0x40
3325 #define ATOM_S6_ACC_REQ_DFP2b2 0x80
3326 #define ATOM_S6_ACC_REQ_CVb3 0x01
3327 #define ATOM_S6_ACC_REQ_DFP3b3 0x02
3328 #define ATOM_S6_ACC_REQ_DFP4b3 0x04
3329 #define ATOM_S6_ACC_REQ_DFP5b3 0x08
3331 #define ATOM_S6_ACC_REQ_DEVICEw1 ATOM_S5_DOS_REQ_DEVICEw0
3332 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGEb3 0x10
3333 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCHb3 0x20
3334 #define ATOM_S6_VRI_BRIGHTNESS_CHANGEb3 0x40
3335 #define ATOM_S6_CONFIG_DISPLAY_CHANGEb3 0x80
3337 #define ATOM_S6_DEVICE_CHANGE_SHIFT 0
3338 #define ATOM_S6_SCALER_CHANGE_SHIFT 1
3339 #define ATOM_S6_LID_CHANGE_SHIFT 2
3340 #define ATOM_S6_DOCKING_CHANGE_SHIFT 3
3341 #define ATOM_S6_ACC_MODE_SHIFT 4
3342 #define ATOM_S6_EXT_DESKTOP_MODE_SHIFT 5
3343 #define ATOM_S6_LID_STATE_SHIFT 6
3344 #define ATOM_S6_DOCK_STATE_SHIFT 7
3345 #define ATOM_S6_CRITICAL_STATE_SHIFT 8
3346 #define ATOM_S6_HW_I2C_BUSY_STATE_SHIFT 9
3347 #define ATOM_S6_THERMAL_STATE_CHANGE_SHIFT 10
3348 #define ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT 11
3349 #define ATOM_S6_REQ_SCALER_SHIFT 12
3350 #define ATOM_S6_REQ_SCALER_ARATIO_SHIFT 13
3351 #define ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT 14
3352 #define ATOM_S6_I2C_STATE_CHANGE_SHIFT 15
3353 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT 28
3354 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT 29
3355 #define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT 30
3356 #define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT 31
3358 /* BIOS_7_SCRATCH Definition, BIOS_7_SCRATCH is used by Firmware only !!!! */
3359 #define ATOM_S7_DOS_MODE_TYPEb0 0x03
3360 #define ATOM_S7_DOS_MODE_VGAb0 0x00
3361 #define ATOM_S7_DOS_MODE_VESAb0 0x01
3362 #define ATOM_S7_DOS_MODE_EXTb0 0x02
3363 #define ATOM_S7_DOS_MODE_PIXEL_DEPTHb0 0x0C
3364 #define ATOM_S7_DOS_MODE_PIXEL_FORMATb0 0xF0
3365 #define ATOM_S7_DOS_8BIT_DAC_ENb1 0x01
3366 #define ATOM_S7_DOS_MODE_NUMBERw1 0x0FFFF
3368 #define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT 8
3370 /* BIOS_8_SCRATCH Definition */
3371 #define ATOM_S8_I2C_CHANNEL_BUSY_MASK 0x00000FFFF
3372 #define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK 0x0FFFF0000
3374 #define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT 0
3375 #define ATOM_S8_I2C_ENGINE_BUSY_SHIFT 16
3377 /* BIOS_9_SCRATCH Definition */
3378 #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK
3379 #define ATOM_S9_I2C_CHANNEL_COMPLETED_MASK 0x0000FFFF
3381 #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_MASK
3382 #define ATOM_S9_I2C_CHANNEL_ABORTED_MASK 0xFFFF0000
3384 #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT
3385 #define ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT 0
3387 #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT
3388 #define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT 16
3391 #define ATOM_FLAG_SET 0x20
3392 #define ATOM_FLAG_CLEAR 0
3393 #define CLEAR_ATOM_S6_ACC_MODE \
3394 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3395 ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR)
3396 #define SET_ATOM_S6_DEVICE_CHANGE \
3397 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3398 ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET)
3399 #define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE \
3400 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3401 ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET)
3402 #define SET_ATOM_S6_SCALER_CHANGE \
3403 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3404 ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET)
3405 #define SET_ATOM_S6_LID_CHANGE \
3406 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3407 ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET)
3409 #define SET_ATOM_S6_LID_STATE \
3410 ((ATOM_ACC_CHANGE_INFO_DEF << 8) |\
3411 ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET)
3412 #define CLEAR_ATOM_S6_LID_STATE \
3413 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3414 ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR)
3416 #define SET_ATOM_S6_DOCK_CHANGE \
3417 ((ATOM_ACC_CHANGE_INFO_DEF << 8)| \
3418 ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET)
3419 #define SET_ATOM_S6_DOCK_STATE \
3420 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3421 ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET)
3422 #define CLEAR_ATOM_S6_DOCK_STATE \
3423 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3424 ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR)
3426 #define SET_ATOM_S6_THERMAL_STATE_CHANGE \
3427 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3428 ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET)
3429 #define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE \
3430 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3431 ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET)
3432 #define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS \
3433 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3434 ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET)
3436 #define SET_ATOM_S6_CRITICAL_STATE \
3437 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3438 ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET)
3439 #define CLEAR_ATOM_S6_CRITICAL_STATE \
3440 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3441 ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR)
3443 #define SET_ATOM_S6_REQ_SCALER \
3444 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3445 ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET)
3446 #define CLEAR_ATOM_S6_REQ_SCALER \
3447 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3448 ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR )
3450 #define SET_ATOM_S6_REQ_SCALER_ARATIO \
3451 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3452 ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET )
3453 #define CLEAR_ATOM_S6_REQ_SCALER_ARATIO \
3454 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3455 ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR )
3457 #define SET_ATOM_S6_I2C_STATE_CHANGE \
3458 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3459 ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
3461 #define SET_ATOM_S6_DISPLAY_STATE_CHANGE \
3462 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3463 ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
3465 #define SET_ATOM_S6_DEVICE_RECONFIG \
3466 ((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
3467 ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET)
3468 #define CLEAR_ATOM_S0_LCD1 \
3469 ((ATOM_DEVICE_CONNECT_INFO_DEF << 8 ) | \
3470 ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR )
3471 #define SET_ATOM_S7_DOS_8BIT_DAC_EN \
3472 ((ATOM_DOS_MODE_INFO_DEF << 8) | \
3473 ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET )
3474 #define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN \
3475 ((ATOM_DOS_MODE_INFO_DEF << 8) | \
3476 ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR )
3478 /****************************************************************************/
3479 /* Portion II: Definitinos only used in Driver */
3480 /****************************************************************************/
3482 /* Macros used by driver */
3484 #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char *)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES *)0)->FieldName)-(char *)0)/sizeof(USHORT))
3486 #define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F)
3487 #define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F)
3489 #define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION
3490 #define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION
3492 /****************************************************************************/
3493 /* Portion III: Definitinos only used in VBIOS */
3494 /****************************************************************************/
3495 #define ATOM_DAC_SRC 0x80
3496 #define ATOM_SRC_DAC1 0
3497 #define ATOM_SRC_DAC2 0x80
3500 #define USHORT UTEMP
3503 typedef struct _MEMORY_PLLINIT_PARAMETERS {
3504 ULONG ulTargetMemoryClock; /* In 10Khz unit */
3505 UCHAR ucAction; /* not define yet */
3506 UCHAR ucFbDiv_Hi; /* Fbdiv Hi byte */
3507 UCHAR ucFbDiv; /* FB value */
3508 UCHAR ucPostDiv; /* Post div */
3509 } MEMORY_PLLINIT_PARAMETERS;
3511 #define MEMORY_PLLINIT_PS_ALLOCATION MEMORY_PLLINIT_PARAMETERS
3513 #define GPIO_PIN_WRITE 0x01
3514 #define GPIO_PIN_READ 0x00
3516 typedef struct _GPIO_PIN_CONTROL_PARAMETERS {
3517 UCHAR ucGPIO_ID; /* return value, read from GPIO pins */
3518 UCHAR ucGPIOBitShift; /* define which bit in uGPIOBitVal need to be update */
3519 UCHAR ucGPIOBitVal; /* Set/Reset corresponding bit defined in ucGPIOBitMask */
3520 UCHAR ucAction; /* =GPIO_PIN_WRITE: Read; =GPIO_PIN_READ: Write */
3521 } GPIO_PIN_CONTROL_PARAMETERS;
3523 typedef struct _ENABLE_SCALER_PARAMETERS {
3524 UCHAR ucScaler; /* ATOM_SCALER1, ATOM_SCALER2 */
3525 UCHAR ucEnable; /* ATOM_SCALER_DISABLE or ATOM_SCALER_CENTER or ATOM_SCALER_EXPANSION */
3526 UCHAR ucTVStandard; /* */
3528 } ENABLE_SCALER_PARAMETERS;
3529 #define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS
3532 #define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION 0
3533 #define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION 1
3534 #define SCALER_ENABLE_2TAP_ALPHA_MODE 2
3535 #define SCALER_ENABLE_MULTITAP_MODE 3
3537 typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS {
3538 ULONG usHWIconHorzVertPosn; /* Hardware Icon Vertical position */
3539 UCHAR ucHWIconVertOffset; /* Hardware Icon Vertical offset */
3540 UCHAR ucHWIconHorzOffset; /* Hardware Icon Horizontal offset */
3541 UCHAR ucSelection; /* ATOM_CURSOR1 or ATOM_ICON1 or ATOM_CURSOR2 or ATOM_ICON2 */
3542 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
3543 } ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS;
3545 typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION {
3546 ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon;
3547 ENABLE_CRTC_PARAMETERS sReserved;
3548 } ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION;
3550 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS {
3551 USHORT usHight; /* Image Hight */
3552 USHORT usWidth; /* Image Width */
3553 UCHAR ucSurface; /* Surface 1 or 2 */
3555 } ENABLE_GRAPH_SURFACE_PARAMETERS;
3557 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2 {
3558 USHORT usHight; /* Image Hight */
3559 USHORT usWidth; /* Image Width */
3560 UCHAR ucSurface; /* Surface 1 or 2 */
3561 UCHAR ucEnable; /* ATOM_ENABLE or ATOM_DISABLE */
3563 } ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2;
3565 typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION {
3566 ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface;
3567 ENABLE_YUV_PS_ALLOCATION sReserved; /* Don't set this one */
3568 } ENABLE_GRAPH_SURFACE_PS_ALLOCATION;
3570 typedef struct _MEMORY_CLEAN_UP_PARAMETERS {
3571 USHORT usMemoryStart; /* in 8Kb boundry, offset from memory base address */
3572 USHORT usMemorySize; /* 8Kb blocks aligned */
3573 } MEMORY_CLEAN_UP_PARAMETERS;
3574 #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS
3576 typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS {
3577 USHORT usX_Size; /* When use as input parameter, usX_Size indicates which CRTC */
3579 } GET_DISPLAY_SURFACE_SIZE_PARAMETERS;
3581 typedef struct _INDIRECT_IO_ACCESS {
3582 ATOM_COMMON_TABLE_HEADER sHeader;
3583 UCHAR IOAccessSequence[256];
3584 } INDIRECT_IO_ACCESS;
3586 #define INDIRECT_READ 0x00
3587 #define INDIRECT_WRITE 0x80
3589 #define INDIRECT_IO_MM 0
3590 #define INDIRECT_IO_PLL 1
3591 #define INDIRECT_IO_MC 2
3592 #define INDIRECT_IO_PCIE 3
3593 #define INDIRECT_IO_PCIEP 4
3594 #define INDIRECT_IO_NBMISC 5
3596 #define INDIRECT_IO_PLL_READ INDIRECT_IO_PLL | INDIRECT_READ
3597 #define INDIRECT_IO_PLL_WRITE INDIRECT_IO_PLL | INDIRECT_WRITE
3598 #define INDIRECT_IO_MC_READ INDIRECT_IO_MC | INDIRECT_READ
3599 #define INDIRECT_IO_MC_WRITE INDIRECT_IO_MC | INDIRECT_WRITE
3600 #define INDIRECT_IO_PCIE_READ INDIRECT_IO_PCIE | INDIRECT_READ
3601 #define INDIRECT_IO_PCIE_WRITE INDIRECT_IO_PCIE | INDIRECT_WRITE
3602 #define INDIRECT_IO_PCIEP_READ INDIRECT_IO_PCIEP | INDIRECT_READ
3603 #define INDIRECT_IO_PCIEP_WRITE INDIRECT_IO_PCIEP | INDIRECT_WRITE
3604 #define INDIRECT_IO_NBMISC_READ INDIRECT_IO_NBMISC | INDIRECT_READ
3605 #define INDIRECT_IO_NBMISC_WRITE INDIRECT_IO_NBMISC | INDIRECT_WRITE
3607 typedef struct _ATOM_OEM_INFO {
3608 ATOM_COMMON_TABLE_HEADER sHeader;
3609 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
3612 typedef struct _ATOM_TV_MODE {
3613 UCHAR ucVMode_Num; /* Video mode number */
3614 UCHAR ucTV_Mode_Num; /* Internal TV mode number */
3617 typedef struct _ATOM_BIOS_INT_TVSTD_MODE {
3618 ATOM_COMMON_TABLE_HEADER sHeader;
3619 USHORT usTV_Mode_LUT_Offset; /* Pointer to standard to internal number conversion table */
3620 USHORT usTV_FIFO_Offset; /* Pointer to FIFO entry table */
3621 USHORT usNTSC_Tbl_Offset; /* Pointer to SDTV_Mode_NTSC table */
3622 USHORT usPAL_Tbl_Offset; /* Pointer to SDTV_Mode_PAL table */
3623 USHORT usCV_Tbl_Offset; /* Pointer to SDTV_Mode_PAL table */
3624 } ATOM_BIOS_INT_TVSTD_MODE;
3626 typedef struct _ATOM_TV_MODE_SCALER_PTR {
3627 USHORT ucFilter0_Offset; /* Pointer to filter format 0 coefficients */
3628 USHORT usFilter1_Offset; /* Pointer to filter format 0 coefficients */
3629 UCHAR ucTV_Mode_Num;
3630 } ATOM_TV_MODE_SCALER_PTR;
3632 typedef struct _ATOM_STANDARD_VESA_TIMING {
3633 ATOM_COMMON_TABLE_HEADER sHeader;
3634 ATOM_DTD_FORMAT aModeTimings[16]; /* 16 is not the real array number, just for initial allocation */
3635 } ATOM_STANDARD_VESA_TIMING;
3637 typedef struct _ATOM_STD_FORMAT {
3640 USHORT usSTD_RefreshRate;
3644 typedef struct _ATOM_VESA_TO_EXTENDED_MODE {
3645 USHORT usVESA_ModeNumber;
3646 USHORT usExtendedModeNumber;
3647 } ATOM_VESA_TO_EXTENDED_MODE;
3649 typedef struct _ATOM_VESA_TO_INTENAL_MODE_LUT {
3650 ATOM_COMMON_TABLE_HEADER sHeader;
3651 ATOM_VESA_TO_EXTENDED_MODE asVESA_ToExtendedModeInfo[76];
3652 } ATOM_VESA_TO_INTENAL_MODE_LUT;
3654 /*************** ATOM Memory Related Data Structure ***********************/
3655 typedef struct _ATOM_MEMORY_VENDOR_BLOCK {
3657 UCHAR ucMemoryVendor;
3660 ULONG ulDllResetClkRange;
3661 } ATOM_MEMORY_VENDOR_BLOCK;
3663 typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG {
3666 ULONG ulMemClockRange:24;
3668 ULONG ulMemClockRange:24;
3671 } ATOM_MEMORY_SETTING_ID_CONFIG;
3673 typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS {
3674 ATOM_MEMORY_SETTING_ID_CONFIG slAccess;
3676 } ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS;
3678 typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK {
3679 ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID;
3680 ULONG aulMemData[1];
3681 } ATOM_MEMORY_SETTING_DATA_BLOCK;
3683 typedef struct _ATOM_INIT_REG_INDEX_FORMAT {
3684 USHORT usRegIndex; /* MC register index */
3685 UCHAR ucPreRegDataLength; /* offset in ATOM_INIT_REG_DATA_BLOCK.saRegDataBuf */
3686 } ATOM_INIT_REG_INDEX_FORMAT;
3688 typedef struct _ATOM_INIT_REG_BLOCK {
3689 USHORT usRegIndexTblSize; /* size of asRegIndexBuf */
3690 USHORT usRegDataBlkSize; /* size of ATOM_MEMORY_SETTING_DATA_BLOCK */
3691 ATOM_INIT_REG_INDEX_FORMAT asRegIndexBuf[1];
3692 ATOM_MEMORY_SETTING_DATA_BLOCK asRegDataBuf[1];
3693 } ATOM_INIT_REG_BLOCK;
3695 #define END_OF_REG_INDEX_BLOCK 0x0ffff
3696 #define END_OF_REG_DATA_BLOCK 0x00000000
3697 #define ATOM_INIT_REG_MASK_FLAG 0x80
3698 #define CLOCK_RANGE_HIGHEST 0x00ffffff
3700 #define VALUE_DWORD SIZEOF ULONG
3701 #define VALUE_SAME_AS_ABOVE 0
3702 #define VALUE_MASK_DWORD 0x84
3704 #define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1)
3705 #define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1)
3706 #define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1)
3708 typedef struct _ATOM_MC_INIT_PARAM_TABLE {
3709 ATOM_COMMON_TABLE_HEADER sHeader;
3710 USHORT usAdjustARB_SEQDataOffset;
3711 USHORT usMCInitMemTypeTblOffset;
3712 USHORT usMCInitCommonTblOffset;
3713 USHORT usMCInitPowerDownTblOffset;
3714 ULONG ulARB_SEQDataBuf[32];
3715 ATOM_INIT_REG_BLOCK asMCInitMemType;
3716 ATOM_INIT_REG_BLOCK asMCInitCommon;
3717 } ATOM_MC_INIT_PARAM_TABLE;
3723 #define _16Mx16 0x22
3724 #define _16Mx32 0x23
3725 #define _32Mx16 0x32
3726 #define _32Mx32 0x33
3728 #define _64Mx16 0x42
3731 #define INFINEON 0x2
3741 #define QIMONDA INFINEON
3742 #define PROMOS MOSEL
3744 /* ///////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// */
3746 #define UCODE_ROM_START_ADDRESS 0x1c000
3747 #define UCODE_SIGNATURE 0x4375434d /* 'MCuC' - MC uCode */
3749 /* uCode block header for reference */
3751 typedef struct _MCuCodeHeader {
3757 USHORT usParametersLength;
3758 USHORT usUCodeLength;
3763 /* //////////////////////////////////////////////////////////////////////////////// */
3765 #define ATOM_MAX_NUMBER_OF_VRAM_MODULE 16
3767 #define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK 0xF
3768 typedef struct _ATOM_VRAM_MODULE_V1 {
3773 UCHAR ucExtMemoryID; /* An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
3774 UCHAR ucMemoryType; /* [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] reserved; */
3775 UCHAR ucMemoryVenderID; /* Predefined,never change across designs or memory type/vender */
3776 UCHAR ucMemoryDeviceCfg; /* [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... */
3777 UCHAR ucRow; /* Number of Row,in power of 2; */
3778 UCHAR ucColumn; /* Number of Column,in power of 2; */
3779 UCHAR ucBank; /* Nunber of Bank; */
3780 UCHAR ucRank; /* Number of Rank, in power of 2 */
3781 UCHAR ucChannelNum; /* Number of channel; */
3782 UCHAR ucChannelConfig; /* [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 */
3783 UCHAR ucDefaultMVDDQ_ID; /* Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; */
3784 UCHAR ucDefaultMVDDC_ID; /* Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; */
3785 UCHAR ucReserved[2];
3786 } ATOM_VRAM_MODULE_V1;
3788 typedef struct _ATOM_VRAM_MODULE_V2 {
3790 ULONG ulFlags; /* To enable/disable functionalities based on memory type */
3791 ULONG ulEngineClock; /* Override of default engine clock for particular memory type */
3792 ULONG ulMemoryClock; /* Override of default memory clock for particular memory type */
3793 USHORT usEMRS2Value; /* EMRS2 Value is used for GDDR2 and GDDR4 memory type */
3794 USHORT usEMRS3Value; /* EMRS3 Value is used for GDDR2 and GDDR4 memory type */
3798 UCHAR ucExtMemoryID; /* An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
3799 UCHAR ucMemoryType; /* [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; */
3800 UCHAR ucMemoryVenderID; /* Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed */
3801 UCHAR ucMemoryDeviceCfg; /* [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... */
3802 UCHAR ucRow; /* Number of Row,in power of 2; */
3803 UCHAR ucColumn; /* Number of Column,in power of 2; */
3804 UCHAR ucBank; /* Nunber of Bank; */
3805 UCHAR ucRank; /* Number of Rank, in power of 2 */
3806 UCHAR ucChannelNum; /* Number of channel; */
3807 UCHAR ucChannelConfig; /* [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 */
3808 UCHAR ucDefaultMVDDQ_ID; /* Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; */
3809 UCHAR ucDefaultMVDDC_ID; /* Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; */
3810 UCHAR ucRefreshRateFactor;
3811 UCHAR ucReserved[3];
3812 } ATOM_VRAM_MODULE_V2;
3814 typedef struct _ATOM_MEMORY_TIMING_FORMAT {
3815 ULONG ulClkRange; /* memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing */
3817 USHORT usMRS; /* mode register */
3821 USHORT usEMRS; /* extended mode register */
3824 UCHAR ucCL; /* CAS latency */
3825 UCHAR ucWL; /* WRITE Latency */
3826 UCHAR uctRAS; /* tRAS */
3827 UCHAR uctRC; /* tRC */
3828 UCHAR uctRFC; /* tRFC */
3829 UCHAR uctRCDR; /* tRCDR */
3830 UCHAR uctRCDW; /* tRCDW */
3831 UCHAR uctRP; /* tRP */
3832 UCHAR uctRRD; /* tRRD */
3833 UCHAR uctWR; /* tWR */
3834 UCHAR uctWTR; /* tWTR */
3835 UCHAR uctPDIX; /* tPDIX */
3836 UCHAR uctFAW; /* tFAW */
3837 UCHAR uctAOND; /* tAOND */
3840 UCHAR ucflag; /* flag to control memory timing calculation. bit0= control EMRS2 Infineon */
3845 } ATOM_MEMORY_TIMING_FORMAT;
3847 typedef struct _ATOM_MEMORY_TIMING_FORMAT_V1 {
3848 ULONG ulClkRange; /* memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing */
3849 USHORT usMRS; /* mode register */
3850 USHORT usEMRS; /* extended mode register */
3851 UCHAR ucCL; /* CAS latency */
3852 UCHAR ucWL; /* WRITE Latency */
3853 UCHAR uctRAS; /* tRAS */
3854 UCHAR uctRC; /* tRC */
3855 UCHAR uctRFC; /* tRFC */
3856 UCHAR uctRCDR; /* tRCDR */
3857 UCHAR uctRCDW; /* tRCDW */
3858 UCHAR uctRP; /* tRP */
3859 UCHAR uctRRD; /* tRRD */
3860 UCHAR uctWR; /* tWR */
3861 UCHAR uctWTR; /* tWTR */
3862 UCHAR uctPDIX; /* tPDIX */
3863 UCHAR uctFAW; /* tFAW */
3864 UCHAR uctAOND; /* tAOND */
3865 UCHAR ucflag; /* flag to control memory timing calculation. bit0= control EMRS2 Infineon */
3866 /* ///////////////////////GDDR parameters/////////////////////////////////// */
3867 UCHAR uctCCDL; /* */
3868 UCHAR uctCRCRL; /* */
3869 UCHAR uctCRCWL; /* */
3871 UCHAR uctCKRSE; /* */
3872 UCHAR uctCKRSX; /* */
3873 UCHAR uctFAW32; /* */
3874 UCHAR ucReserved1; /* */
3875 UCHAR ucReserved2; /* */
3877 } ATOM_MEMORY_TIMING_FORMAT_V1;
3879 typedef struct _ATOM_MEMORY_FORMAT {
3880 ULONG ulDllDisClock; /* memory DLL will be disable when target memory clock is below this clock */
3882 USHORT usEMRS2Value; /* EMRS2 Value is used for GDDR2 and GDDR4 memory type */
3883 USHORT usDDR3_Reserved; /* Not used for DDR3 memory */
3886 USHORT usEMRS3Value; /* EMRS3 Value is used for GDDR2 and GDDR4 memory type */
3887 USHORT usDDR3_MR3; /* Used for DDR3 memory */
3889 UCHAR ucMemoryType; /* [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; */
3890 UCHAR ucMemoryVenderID; /* Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed */
3891 UCHAR ucRow; /* Number of Row,in power of 2; */
3892 UCHAR ucColumn; /* Number of Column,in power of 2; */
3893 UCHAR ucBank; /* Nunber of Bank; */
3894 UCHAR ucRank; /* Number of Rank, in power of 2 */
3895 UCHAR ucBurstSize; /* burst size, 0= burst size=4 1= burst size=8 */
3896 UCHAR ucDllDisBit; /* position of DLL Enable/Disable bit in EMRS ( Extended Mode Register ) */
3897 UCHAR ucRefreshRateFactor; /* memory refresh rate in unit of ms */
3898 UCHAR ucDensity; /* _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
3899 UCHAR ucPreamble; /* [7:4] Write Preamble, [3:0] Read Preamble */
3900 UCHAR ucMemAttrib; /* Memory Device Addribute, like RDBI/WDBI etc */
3901 ATOM_MEMORY_TIMING_FORMAT asMemTiming[5]; /* Memory Timing block sort from lower clock to higher clock */
3902 } ATOM_MEMORY_FORMAT;
3904 typedef struct _ATOM_VRAM_MODULE_V3 {
3905 ULONG ulChannelMapCfg; /* board dependent paramenter:Channel combination */
3906 USHORT usSize; /* size of ATOM_VRAM_MODULE_V3 */
3907 USHORT usDefaultMVDDQ; /* board dependent parameter:Default Memory Core Voltage */
3908 USHORT usDefaultMVDDC; /* board dependent parameter:Default Memory IO Voltage */
3909 UCHAR ucExtMemoryID; /* An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
3910 UCHAR ucChannelNum; /* board dependent parameter:Number of channel; */
3911 UCHAR ucChannelSize; /* board dependent parameter:32bit or 64bit */
3912 UCHAR ucVREFI; /* board dependnt parameter: EXT or INT +160mv to -140mv */
3913 UCHAR ucNPL_RT; /* board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
3914 UCHAR ucFlag; /* To enable/disable functionalities based on memory type */
3915 ATOM_MEMORY_FORMAT asMemory; /* describ all of video memory parameters from memory spec */
3916 } ATOM_VRAM_MODULE_V3;
3918 /* ATOM_VRAM_MODULE_V3.ucNPL_RT */
3919 #define NPL_RT_MASK 0x0f
3920 #define BATTERY_ODT_MASK 0xc0
3922 #define ATOM_VRAM_MODULE ATOM_VRAM_MODULE_V3
3924 typedef struct _ATOM_VRAM_MODULE_V4 {
3925 ULONG ulChannelMapCfg; /* board dependent parameter: Channel combination */
3926 USHORT usModuleSize; /* size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE */
3927 USHORT usPrivateReserved; /* BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
3928 /* MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) */
3930 UCHAR ucExtMemoryID; /* An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
3931 UCHAR ucMemoryType; /* [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; */
3932 UCHAR ucChannelNum; /* Number of channels present in this module config */
3933 UCHAR ucChannelWidth; /* 0 - 32 bits; 1 - 64 bits */
3934 UCHAR ucDensity; /* _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
3935 UCHAR ucFlag; /* To enable/disable functionalities based on memory type */
3936 UCHAR ucMisc; /* bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 */
3937 UCHAR ucVREFI; /* board dependent parameter */
3938 UCHAR ucNPL_RT; /* board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
3939 UCHAR ucPreamble; /* [7:4] Write Preamble, [3:0] Read Preamble */
3940 UCHAR ucMemorySize; /* BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
3941 /* Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros */
3942 UCHAR ucReserved[3];
3944 /* compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level */
3946 USHORT usEMRS2Value; /* EMRS2 Value is used for GDDR2 and GDDR4 memory type */
3947 USHORT usDDR3_Reserved;
3950 USHORT usEMRS3Value; /* EMRS3 Value is used for GDDR2 and GDDR4 memory type */
3951 USHORT usDDR3_MR3; /* Used for DDR3 memory */
3953 UCHAR ucMemoryVenderID; /* Predefined, If not predefined, vendor detection table gets executed */
3954 UCHAR ucRefreshRateFactor; /* [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) */
3955 UCHAR ucReserved2[2];
3956 ATOM_MEMORY_TIMING_FORMAT asMemTiming[5]; /* Memory Timing block sort from lower clock to higher clock */
3957 } ATOM_VRAM_MODULE_V4;
3959 #define VRAM_MODULE_V4_MISC_RANK_MASK 0x3
3960 #define VRAM_MODULE_V4_MISC_DUAL_RANK 0x1
3961 #define VRAM_MODULE_V4_MISC_BL_MASK 0x4
3962 #define VRAM_MODULE_V4_MISC_BL8 0x4
3963 #define VRAM_MODULE_V4_MISC_DUAL_CS 0x10
3965 typedef struct _ATOM_VRAM_MODULE_V5 {
3966 ULONG ulChannelMapCfg; /* board dependent parameter: Channel combination */
3967 USHORT usModuleSize; /* size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE */
3968 USHORT usPrivateReserved; /* BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
3969 /* MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) */
3971 UCHAR ucExtMemoryID; /* An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
3972 UCHAR ucMemoryType; /* [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; */
3973 UCHAR ucChannelNum; /* Number of channels present in this module config */
3974 UCHAR ucChannelWidth; /* 0 - 32 bits; 1 - 64 bits */
3975 UCHAR ucDensity; /* _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
3976 UCHAR ucFlag; /* To enable/disable functionalities based on memory type */
3977 UCHAR ucMisc; /* bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 */
3978 UCHAR ucVREFI; /* board dependent parameter */
3979 UCHAR ucNPL_RT; /* board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
3980 UCHAR ucPreamble; /* [7:4] Write Preamble, [3:0] Read Preamble */
3981 UCHAR ucMemorySize; /* BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
3982 /* Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros */
3983 UCHAR ucReserved[3];
3985 /* compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level */
3986 USHORT usEMRS2Value; /* EMRS2 Value is used for GDDR2 and GDDR4 memory type */
3987 USHORT usEMRS3Value; /* EMRS3 Value is used for GDDR2 and GDDR4 memory type */
3988 UCHAR ucMemoryVenderID; /* Predefined, If not predefined, vendor detection table gets executed */
3989 UCHAR ucRefreshRateFactor; /* [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) */
3990 UCHAR ucFIFODepth; /* FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth */
3991 UCHAR ucCDR_Bandwidth; /* [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth */
3992 ATOM_MEMORY_TIMING_FORMAT_V1 asMemTiming[5]; /* Memory Timing block sort from lower clock to higher clock */
3993 } ATOM_VRAM_MODULE_V5;
3995 typedef struct _ATOM_VRAM_INFO_V2 {
3996 ATOM_COMMON_TABLE_HEADER sHeader;
3997 UCHAR ucNumOfVRAMModule;
3998 ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; /* just for allocation, real number of blocks is in ucNumOfVRAMModule; */
3999 } ATOM_VRAM_INFO_V2;
4001 typedef struct _ATOM_VRAM_INFO_V3 {
4002 ATOM_COMMON_TABLE_HEADER sHeader;
4003 USHORT usMemAdjustTblOffset; /* offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting */
4004 USHORT usMemClkPatchTblOffset; /* offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting */
4006 UCHAR aVID_PinsShift[9]; /* 8 bit strap maximum+terminator */
4007 UCHAR ucNumOfVRAMModule;
4008 ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; /* just for allocation, real number of blocks is in ucNumOfVRAMModule; */
4009 ATOM_INIT_REG_BLOCK asMemPatch; /* for allocation */
4010 /* ATOM_INIT_REG_BLOCK aMemAdjust; */
4011 } ATOM_VRAM_INFO_V3;
4013 #define ATOM_VRAM_INFO_LAST ATOM_VRAM_INFO_V3
4015 typedef struct _ATOM_VRAM_INFO_V4 {
4016 ATOM_COMMON_TABLE_HEADER sHeader;
4017 USHORT usMemAdjustTblOffset; /* offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting */
4018 USHORT usMemClkPatchTblOffset; /* offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting */
4020 UCHAR ucMemDQ7_0ByteRemap; /* DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3 */
4021 ULONG ulMemDQ7_0BitRemap; /* each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21] */
4022 UCHAR ucReservde[4];
4023 UCHAR ucNumOfVRAMModule;
4024 ATOM_VRAM_MODULE_V4 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; /* just for allocation, real number of blocks is in ucNumOfVRAMModule; */
4025 ATOM_INIT_REG_BLOCK asMemPatch; /* for allocation */
4026 /* ATOM_INIT_REG_BLOCK aMemAdjust; */
4027 } ATOM_VRAM_INFO_V4;
4029 typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO {
4030 ATOM_COMMON_TABLE_HEADER sHeader;
4031 UCHAR aVID_PinsShift[9]; /* 8 bit strap maximum+terminator */
4032 } ATOM_VRAM_GPIO_DETECTION_INFO;
4034 typedef struct _ATOM_MEMORY_TRAINING_INFO {
4035 ATOM_COMMON_TABLE_HEADER sHeader;
4036 UCHAR ucTrainingLoop;
4037 UCHAR ucReserved[3];
4038 ATOM_INIT_REG_BLOCK asMemTrainingSetting;
4039 } ATOM_MEMORY_TRAINING_INFO;
4041 typedef struct SW_I2C_CNTL_DATA_PARAMETERS {
4046 } SW_I2C_CNTL_DATA_PARAMETERS;
4048 #define SW_I2C_CNTL_DATA_PS_ALLOCATION SW_I2C_CNTL_DATA_PARAMETERS
4050 typedef struct _SW_I2C_IO_DATA_PARAMETERS {
4054 } SW_I2C_IO_DATA_PARAMETERS;
4056 #define SW_I2C_IO_DATA_PS_ALLOCATION SW_I2C_IO_DATA_PARAMETERS
4058 /****************************SW I2C CNTL DEFINITIONS**********************/
4059 #define SW_I2C_IO_RESET 0
4060 #define SW_I2C_IO_GET 1
4061 #define SW_I2C_IO_DRIVE 2
4062 #define SW_I2C_IO_SET 3
4063 #define SW_I2C_IO_START 4
4065 #define SW_I2C_IO_CLOCK 0
4066 #define SW_I2C_IO_DATA 0x80
4068 #define SW_I2C_IO_ZERO 0
4069 #define SW_I2C_IO_ONE 0x100
4071 #define SW_I2C_CNTL_READ 0
4072 #define SW_I2C_CNTL_WRITE 1
4073 #define SW_I2C_CNTL_START 2
4074 #define SW_I2C_CNTL_STOP 3
4075 #define SW_I2C_CNTL_OPEN 4
4076 #define SW_I2C_CNTL_CLOSE 5
4077 #define SW_I2C_CNTL_WRITE1BIT 6
4079 /* ==============================VESA definition Portion=============================== */
4080 #define VESA_OEM_PRODUCT_REV '01.00'
4081 #define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB /* refer to VBE spec p.32, no TTY support */
4082 #define VESA_MODE_WIN_ATTRIBUTE 7
4083 #define VESA_WIN_SIZE 64
4085 typedef struct _PTR_32_BIT_STRUCTURE {
4088 } PTR_32_BIT_STRUCTURE;
4090 typedef union _PTR_32_BIT_UNION {
4091 PTR_32_BIT_STRUCTURE SegmentOffset;
4095 typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE {
4096 UCHAR VbeSignature[4];
4098 PTR_32_BIT_UNION OemStringPtr;
4099 UCHAR Capabilities[4];
4100 PTR_32_BIT_UNION VideoModePtr;
4102 } VBE_1_2_INFO_BLOCK_UPDATABLE;
4104 typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE {
4105 VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock;
4107 PTR_32_BIT_UNION OemVendorNamePtr;
4108 PTR_32_BIT_UNION OemProductNamePtr;
4109 PTR_32_BIT_UNION OemProductRevPtr;
4110 } VBE_2_0_INFO_BLOCK_UPDATABLE;
4112 typedef union _VBE_VERSION_UNION {
4113 VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock;
4114 VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock;
4115 } VBE_VERSION_UNION;
4117 typedef struct _VBE_INFO_BLOCK {
4118 VBE_VERSION_UNION UpdatableVBE_Info;
4119 UCHAR Reserved[222];
4123 typedef struct _VBE_FP_INFO {
4131 ULONG RsvdOffScrnMemSize;
4132 ULONG RsvdOffScrnMEmPtr;
4136 typedef struct _VESA_MODE_INFO_BLOCK {
4137 /* Mandatory information for all VBE revisions */
4138 USHORT ModeAttributes; /* dw ? ; mode attributes */
4139 UCHAR WinAAttributes; /* db ? ; window A attributes */
4140 UCHAR WinBAttributes; /* db ? ; window B attributes */
4141 USHORT WinGranularity; /* dw ? ; window granularity */
4142 USHORT WinSize; /* dw ? ; window size */
4143 USHORT WinASegment; /* dw ? ; window A start segment */
4144 USHORT WinBSegment; /* dw ? ; window B start segment */
4145 ULONG WinFuncPtr; /* dd ? ; real mode pointer to window function */
4146 USHORT BytesPerScanLine; /* dw ? ; bytes per scan line */
4148 /* ; Mandatory information for VBE 1.2 and above */
4149 USHORT XResolution; /* dw ? ; horizontal resolution in pixels or characters */
4150 USHORT YResolution; /* dw ? ; vertical resolution in pixels or characters */
4151 UCHAR XCharSize; /* db ? ; character cell width in pixels */
4152 UCHAR YCharSize; /* db ? ; character cell height in pixels */
4153 UCHAR NumberOfPlanes; /* db ? ; number of memory planes */
4154 UCHAR BitsPerPixel; /* db ? ; bits per pixel */
4155 UCHAR NumberOfBanks; /* db ? ; number of banks */
4156 UCHAR MemoryModel; /* db ? ; memory model type */
4157 UCHAR BankSize; /* db ? ; bank size in KB */
4158 UCHAR NumberOfImagePages; /* db ? ; number of images */
4159 UCHAR ReservedForPageFunction; /* db 1 ; reserved for page function */
4161 /* ; Direct Color fields(required for direct/6 and YUV/7 memory models) */
4162 UCHAR RedMaskSize; /* db ? ; size of direct color red mask in bits */
4163 UCHAR RedFieldPosition; /* db ? ; bit position of lsb of red mask */
4164 UCHAR GreenMaskSize; /* db ? ; size of direct color green mask in bits */
4165 UCHAR GreenFieldPosition; /* db ? ; bit position of lsb of green mask */
4166 UCHAR BlueMaskSize; /* db ? ; size of direct color blue mask in bits */
4167 UCHAR BlueFieldPosition; /* db ? ; bit position of lsb of blue mask */
4168 UCHAR RsvdMaskSize; /* db ? ; size of direct color reserved mask in bits */
4169 UCHAR RsvdFieldPosition; /* db ? ; bit position of lsb of reserved mask */
4170 UCHAR DirectColorModeInfo; /* db ? ; direct color mode attributes */
4172 /* ; Mandatory information for VBE 2.0 and above */
4173 ULONG PhysBasePtr; /* dd ? ; physical address for flat memory frame buffer */
4174 ULONG Reserved_1; /* dd 0 ; reserved - always set to 0 */
4175 USHORT Reserved_2; /* dw 0 ; reserved - always set to 0 */
4177 /* ; Mandatory information for VBE 3.0 and above */
4178 USHORT LinBytesPerScanLine; /* dw ? ; bytes per scan line for linear modes */
4179 UCHAR BnkNumberOfImagePages; /* db ? ; number of images for banked modes */
4180 UCHAR LinNumberOfImagPages; /* db ? ; number of images for linear modes */
4181 UCHAR LinRedMaskSize; /* db ? ; size of direct color red mask(linear modes) */
4182 UCHAR LinRedFieldPosition; /* db ? ; bit position of lsb of red mask(linear modes) */
4183 UCHAR LinGreenMaskSize; /* db ? ; size of direct color green mask(linear modes) */
4184 UCHAR LinGreenFieldPosition; /* db ? ; bit position of lsb of green mask(linear modes) */
4185 UCHAR LinBlueMaskSize; /* db ? ; size of direct color blue mask(linear modes) */
4186 UCHAR LinBlueFieldPosition; /* db ? ; bit position of lsb of blue mask(linear modes) */
4187 UCHAR LinRsvdMaskSize; /* db ? ; size of direct color reserved mask(linear modes) */
4188 UCHAR LinRsvdFieldPosition; /* db ? ; bit position of lsb of reserved mask(linear modes) */
4189 ULONG MaxPixelClock; /* dd ? ; maximum pixel clock(in Hz) for graphics mode */
4190 UCHAR Reserved; /* db 190 dup (0) */
4191 } VESA_MODE_INFO_BLOCK;
4193 /* BIOS function CALLS */
4194 #define ATOM_BIOS_EXTENDED_FUNCTION_CODE 0xA0 /* ATI Extended Function code */
4195 #define ATOM_BIOS_FUNCTION_COP_MODE 0x00
4196 #define ATOM_BIOS_FUNCTION_SHORT_QUERY1 0x04
4197 #define ATOM_BIOS_FUNCTION_SHORT_QUERY2 0x05
4198 #define ATOM_BIOS_FUNCTION_SHORT_QUERY3 0x06
4199 #define ATOM_BIOS_FUNCTION_GET_DDC 0x0B
4200 #define ATOM_BIOS_FUNCTION_ASIC_DSTATE 0x0E
4201 #define ATOM_BIOS_FUNCTION_DEBUG_PLAY 0x0F
4202 #define ATOM_BIOS_FUNCTION_STV_STD 0x16
4203 #define ATOM_BIOS_FUNCTION_DEVICE_DET 0x17
4204 #define ATOM_BIOS_FUNCTION_DEVICE_SWITCH 0x18
4206 #define ATOM_BIOS_FUNCTION_PANEL_CONTROL 0x82
4207 #define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET 0x83
4208 #define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH 0x84
4209 #define ATOM_BIOS_FUNCTION_HW_ICON 0x8A
4210 #define ATOM_BIOS_FUNCTION_SET_CMOS 0x8B
4211 #define SUB_FUNCTION_UPDATE_DISPLAY_INFO 0x8000 /* Sub function 80 */
4212 #define SUB_FUNCTION_UPDATE_EXPANSION_INFO 0x8100 /* Sub function 80 */
4214 #define ATOM_BIOS_FUNCTION_DISPLAY_INFO 0x8D
4215 #define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF 0x8E
4216 #define ATOM_BIOS_FUNCTION_VIDEO_STATE 0x8F
4217 #define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE 0x0300 /* Sub function 03 */
4218 #define ATOM_SUB_FUNCTION_GET_LIDSTATE 0x0700 /* Sub function 7 */
4219 #define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE 0x1400 /* Notify caller the current thermal state */
4220 #define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300 /* Notify caller the current critical state */
4221 #define ATOM_SUB_FUNCTION_SET_LIDSTATE 0x8500 /* Sub function 85 */
4222 #define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900 /* Sub function 89 */
4223 #define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT 0x9400 /* Notify caller that ADC is supported */
4225 #define ATOM_BIOS_FUNCTION_VESA_DPMS 0x4F10 /* Set DPMS */
4226 #define ATOM_SUB_FUNCTION_SET_DPMS 0x0001 /* BL: Sub function 01 */
4227 #define ATOM_SUB_FUNCTION_GET_DPMS 0x0002 /* BL: Sub function 02 */
4228 #define ATOM_PARAMETER_VESA_DPMS_ON 0x0000 /* BH Parameter for DPMS ON. */
4229 #define ATOM_PARAMETER_VESA_DPMS_STANDBY 0x0100 /* BH Parameter for DPMS STANDBY */
4230 #define ATOM_PARAMETER_VESA_DPMS_SUSPEND 0x0200 /* BH Parameter for DPMS SUSPEND */
4231 #define ATOM_PARAMETER_VESA_DPMS_OFF 0x0400 /* BH Parameter for DPMS OFF */
4232 #define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON 0x0800 /* BH Parameter for DPMS REDUCE ON (NOT SUPPORTED) */
4234 #define ATOM_BIOS_RETURN_CODE_MASK 0x0000FF00L
4235 #define ATOM_BIOS_REG_HIGH_MASK 0x0000FF00L
4236 #define ATOM_BIOS_REG_LOW_MASK 0x000000FFL
4238 /* structure used for VBIOS only */
4240 /* DispOutInfoTable */
4241 typedef struct _ASIC_TRANSMITTER_INFO {
4242 USHORT usTransmitterObjId;
4243 USHORT usSupportDevice;
4244 UCHAR ucTransmitterCmdTblId;
4246 UCHAR ucEncoderID; /* available 1st encoder ( default ) */
4247 UCHAR ucOptionEncoderID; /* available 2nd encoder ( optional ) */
4248 UCHAR uc2ndEncoderID;
4250 } ASIC_TRANSMITTER_INFO;
4252 typedef struct _ASIC_ENCODER_INFO {
4254 UCHAR ucEncoderConfig;
4255 USHORT usEncoderCmdTblId;
4256 } ASIC_ENCODER_INFO;
4258 typedef struct _ATOM_DISP_OUT_INFO {
4259 ATOM_COMMON_TABLE_HEADER sHeader;
4260 USHORT ptrTransmitterInfo;
4261 USHORT ptrEncoderInfo;
4262 ASIC_TRANSMITTER_INFO asTransmitterInfo[1];
4263 ASIC_ENCODER_INFO asEncoderInfo[1];
4264 } ATOM_DISP_OUT_INFO;
4266 /* DispDevicePriorityInfo */
4267 typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO {
4268 ATOM_COMMON_TABLE_HEADER sHeader;
4269 USHORT asDevicePriority[16];
4270 } ATOM_DISPLAY_DEVICE_PRIORITY_INFO;
4272 /* ProcessAuxChannelTransactionTable */
4273 typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS {
4274 USHORT lpAuxRequest;
4278 UCHAR ucReplyStatus;
4283 } PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS;
4285 #define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
4289 typedef struct _DP_ENCODER_SERVICE_PARAMETERS {
4292 UCHAR ucConfig; /* for DP training command */
4293 UCHAR ucI2cId; /* use for GET_SINK_TYPE command */
4298 UCHAR ucReserved[2];
4299 } DP_ENCODER_SERVICE_PARAMETERS;
4302 #define ATOM_DP_ACTION_GET_SINK_TYPE 0x01
4303 #define ATOM_DP_ACTION_TRAINING_START 0x02
4304 #define ATOM_DP_ACTION_TRAINING_COMPLETE 0x03
4305 #define ATOM_DP_ACTION_TRAINING_PATTERN_SEL 0x04
4306 #define ATOM_DP_ACTION_SET_VSWING_PREEMP 0x05
4307 #define ATOM_DP_ACTION_GET_VSWING_PREEMP 0x06
4308 #define ATOM_DP_ACTION_BLANKING 0x07
4311 #define ATOM_DP_CONFIG_ENCODER_SEL_MASK 0x03
4312 #define ATOM_DP_CONFIG_DIG1_ENCODER 0x00
4313 #define ATOM_DP_CONFIG_DIG2_ENCODER 0x01
4314 #define ATOM_DP_CONFIG_EXTERNAL_ENCODER 0x02
4315 #define ATOM_DP_CONFIG_LINK_SEL_MASK 0x04
4316 #define ATOM_DP_CONFIG_LINK_A 0x00
4317 #define ATOM_DP_CONFIG_LINK_B 0x04
4319 #define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
4321 /* DP_TRAINING_TABLE */
4322 #define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR
4323 #define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 )
4324 #define DPCD_SET_LANE_VSWING_PREEMP_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 16)
4325 #define DPCD_SET_TRAINING_PATTERN0_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 24)
4326 #define DPCD_SET_TRAINING_PATTERN2_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 32)
4327 #define DPCD_GET_LINKRATE_LANENUM_SS_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 40)
4328 #define DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 48)
4329 #define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 60)
4330 #define DP_I2C_AUX_DDC_WRITE_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 64)
4331 #define DP_I2C_AUX_DDC_READ_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 72)
4332 #define DP_I2C_AUX_DDC_READ_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 76)
4333 #define DP_I2C_AUX_DDC_READ_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 80)
4335 typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS {
4341 USHORT lpI2CDataOut;
4346 } PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;
4348 #define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
4351 #define HW_I2C_WRITE 1
4352 #define HW_I2C_READ 0
4354 /****************************************************************************/
4355 /* Portion VI: Definitinos being oboselete */
4356 /****************************************************************************/
4358 /* ========================================================================================== */
4359 /* Remove the definitions below when driver is ready! */
4360 typedef struct _ATOM_DAC_INFO {
4361 ATOM_COMMON_TABLE_HEADER sHeader;
4362 USHORT usMaxFrequency; /* in 10kHz unit */
4366 typedef struct _COMPASSIONATE_DATA {
4367 ATOM_COMMON_TABLE_HEADER sHeader;
4369 /* ============================== DAC1 portion */
4370 UCHAR ucDAC1_BG_Adjustment;
4371 UCHAR ucDAC1_DAC_Adjustment;
4372 USHORT usDAC1_FORCE_Data;
4373 /* ============================== DAC2 portion */
4374 UCHAR ucDAC2_CRT2_BG_Adjustment;
4375 UCHAR ucDAC2_CRT2_DAC_Adjustment;
4376 USHORT usDAC2_CRT2_FORCE_Data;
4377 USHORT usDAC2_CRT2_MUX_RegisterIndex;
4378 UCHAR ucDAC2_CRT2_MUX_RegisterInfo; /* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
4379 UCHAR ucDAC2_NTSC_BG_Adjustment;
4380 UCHAR ucDAC2_NTSC_DAC_Adjustment;
4381 USHORT usDAC2_TV1_FORCE_Data;
4382 USHORT usDAC2_TV1_MUX_RegisterIndex;
4383 UCHAR ucDAC2_TV1_MUX_RegisterInfo; /* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
4384 UCHAR ucDAC2_CV_BG_Adjustment;
4385 UCHAR ucDAC2_CV_DAC_Adjustment;
4386 USHORT usDAC2_CV_FORCE_Data;
4387 USHORT usDAC2_CV_MUX_RegisterIndex;
4388 UCHAR ucDAC2_CV_MUX_RegisterInfo; /* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
4389 UCHAR ucDAC2_PAL_BG_Adjustment;
4390 UCHAR ucDAC2_PAL_DAC_Adjustment;
4391 USHORT usDAC2_TV2_FORCE_Data;
4392 } COMPASSIONATE_DATA;
4394 /****************************Supported Device Info Table Definitions**********************/
4395 /* ucConnectInfo: */
4396 /* [7:4] - connector type */
4397 /* = 1 - VGA connector */
4402 /* = 6 - COMPOSITE */
4404 /* = 8 - DIGITAL LINK */
4406 /* = 0xA - HDMI_type A */
4407 /* = 0xB - HDMI_type B */
4408 /* = 0xE - Special case1 (DVI+DIN) */
4410 /* [3:0] - DAC Associated */
4414 /* = 3 - External DAC */
4418 typedef struct _ATOM_CONNECTOR_INFO {
4420 UCHAR bfConnectorType:4;
4421 UCHAR bfAssociatedDAC:4;
4423 UCHAR bfAssociatedDAC:4;
4424 UCHAR bfConnectorType:4;
4426 } ATOM_CONNECTOR_INFO;
4428 typedef union _ATOM_CONNECTOR_INFO_ACCESS {
4429 ATOM_CONNECTOR_INFO sbfAccess;
4431 } ATOM_CONNECTOR_INFO_ACCESS;
4433 typedef struct _ATOM_CONNECTOR_INFO_I2C {
4434 ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo;
4435 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
4436 } ATOM_CONNECTOR_INFO_I2C;
4438 typedef struct _ATOM_SUPPORTED_DEVICES_INFO {
4439 ATOM_COMMON_TABLE_HEADER sHeader;
4440 USHORT usDeviceSupport;
4441 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO];
4442 } ATOM_SUPPORTED_DEVICES_INFO;
4444 #define NO_INT_SRC_MAPPED 0xFF
4446 typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP {
4447 UCHAR ucIntSrcBitmap;
4448 } ATOM_CONNECTOR_INC_SRC_BITMAP;
4450 typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2 {
4451 ATOM_COMMON_TABLE_HEADER sHeader;
4452 USHORT usDeviceSupport;
4453 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
4454 ATOM_CONNECTOR_INC_SRC_BITMAP
4455 asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
4456 } ATOM_SUPPORTED_DEVICES_INFO_2;
4458 typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1 {
4459 ATOM_COMMON_TABLE_HEADER sHeader;
4460 USHORT usDeviceSupport;
4461 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE];
4462 ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE];
4463 } ATOM_SUPPORTED_DEVICES_INFO_2d1;
4465 #define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1
4467 typedef struct _ATOM_MISC_CONTROL_INFO {
4469 UCHAR ucPLL_ChargePump; /* PLL charge-pump gain control */
4470 UCHAR ucPLL_DutyCycle; /* PLL duty cycle control */
4471 UCHAR ucPLL_VCO_Gain; /* PLL VCO gain control */
4472 UCHAR ucPLL_VoltageSwing; /* PLL driver voltage swing control */
4473 } ATOM_MISC_CONTROL_INFO;
4475 #define ATOM_MAX_MISC_INFO 4
4477 typedef struct _ATOM_TMDS_INFO {
4478 ATOM_COMMON_TABLE_HEADER sHeader;
4479 USHORT usMaxFrequency; /* in 10Khz */
4480 ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO];
4483 typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE {
4484 UCHAR ucTVStandard; /* Same as TV standards defined above, */
4486 } ATOM_ENCODER_ANALOG_ATTRIBUTE;
4488 typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE {
4489 UCHAR ucAttribute; /* Same as other digital encoder attributes defined above */
4491 } ATOM_ENCODER_DIGITAL_ATTRIBUTE;
4493 typedef union _ATOM_ENCODER_ATTRIBUTE {
4494 ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib;
4495 ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib;
4496 } ATOM_ENCODER_ATTRIBUTE;
4498 typedef struct _DVO_ENCODER_CONTROL_PARAMETERS {
4499 USHORT usPixelClock;
4501 UCHAR ucDeviceType; /* Use ATOM_DEVICE_xxx1_Index to indicate device type only. */
4502 UCHAR ucAction; /* ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT */
4503 ATOM_ENCODER_ATTRIBUTE usDevAttr;
4504 } DVO_ENCODER_CONTROL_PARAMETERS;
4506 typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION {
4507 DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder;
4508 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; /* Caller doesn't need to init this portion */
4509 } DVO_ENCODER_CONTROL_PS_ALLOCATION;
4511 #define ATOM_XTMDS_ASIC_SI164_ID 1
4512 #define ATOM_XTMDS_ASIC_SI178_ID 2
4513 #define ATOM_XTMDS_ASIC_TFP513_ID 3
4514 #define ATOM_XTMDS_SUPPORTED_SINGLELINK 0x00000001
4515 #define ATOM_XTMDS_SUPPORTED_DUALLINK 0x00000002
4516 #define ATOM_XTMDS_MVPU_FPGA 0x00000004
4518 typedef struct _ATOM_XTMDS_INFO {
4519 ATOM_COMMON_TABLE_HEADER sHeader;
4520 USHORT usSingleLinkMaxFrequency;
4521 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; /* Point the ID on which I2C is used to control external chip */
4522 UCHAR ucXtransimitterID;
4523 UCHAR ucSupportedLink; /* Bit field, bit0=1, single link supported;bit1=1,dual link supported */
4524 UCHAR ucSequnceAlterID; /* Even with the same external TMDS asic, it's possible that the program seqence alters */
4525 /* due to design. This ID is used to alert driver that the sequence is not "standard"! */
4526 UCHAR ucMasterAddress; /* Address to control Master xTMDS Chip */
4527 UCHAR ucSlaveAddress; /* Address to control Slave xTMDS Chip */
4530 typedef struct _DFP_DPMS_STATUS_CHANGE_PARAMETERS {
4531 UCHAR ucEnable; /* ATOM_ENABLE=On or ATOM_DISABLE=Off */
4532 UCHAR ucDevice; /* ATOM_DEVICE_DFP1_INDEX.... */
4534 } DFP_DPMS_STATUS_CHANGE_PARAMETERS;
4536 /****************************Legacy Power Play Table Definitions **********************/
4538 /* Definitions for ulPowerPlayMiscInfo */
4539 #define ATOM_PM_MISCINFO_SPLIT_CLOCK 0x00000000L
4540 #define ATOM_PM_MISCINFO_USING_MCLK_SRC 0x00000001L
4541 #define ATOM_PM_MISCINFO_USING_SCLK_SRC 0x00000002L
4543 #define ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT 0x00000004L
4544 #define ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH 0x00000008L
4546 #define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN 0x00000010L
4548 #define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN 0x00000020L
4549 #define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN 0x00000040L
4550 #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 */
4552 #define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN 0x00000100L
4553 #define ATOM_PM_MISCINFO_ASIC_DYNAMIC_VOLTAGE_EN 0x00000200L
4554 #define ATOM_PM_MISCINFO_ASIC_SLEEP_MODE_EN 0x00000400L
4555 #define ATOM_PM_MISCINFO_LOAD_BALANCE_EN 0x00000800L
4556 #define ATOM_PM_MISCINFO_DEFAULT_DC_STATE_ENTRY_TRUE 0x00001000L
4557 #define ATOM_PM_MISCINFO_DEFAULT_LOW_DC_STATE_ENTRY_TRUE 0x00002000L
4558 #define ATOM_PM_MISCINFO_LOW_LCD_REFRESH_RATE 0x00004000L
4560 #define ATOM_PM_MISCINFO_DRIVER_DEFAULT_MODE 0x00008000L
4561 #define ATOM_PM_MISCINFO_OVER_CLOCK_MODE 0x00010000L
4562 #define ATOM_PM_MISCINFO_OVER_DRIVE_MODE 0x00020000L
4563 #define ATOM_PM_MISCINFO_POWER_SAVING_MODE 0x00040000L
4564 #define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE 0x00080000L
4566 #define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK 0x00300000L /* 0-FM Disable, 1-2 level FM, 2-4 level FM, 3-Reserved */
4567 #define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT 20
4569 #define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE 0x00400000L
4570 #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2 0x00800000L
4571 #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4 0x01000000L
4572 #define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN 0x02000000L /* When set, Dynamic */
4573 #define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN 0x04000000L /* When set, Dynamic */
4574 #define ATOM_PM_MISCINFO_3D_ACCELERATION_EN 0x08000000L /* When set, This mode is for acceleated 3D mode */
4576 #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) */
4577 #define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT 28
4578 #define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS 0x80000000L
4580 #define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE 0x00000001L
4581 #define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT 0x00000002L
4582 #define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN 0x00000004L
4583 #define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO 0x00000008L
4584 #define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE 0x00000010L
4585 #define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN 0x00000020L
4586 #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. */
4587 /* If it's not set in any pp mode, driver will use its default logic to pick a pp mode in video playback */
4588 #define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC 0x00000080L
4589 #define ATOM_PM_MISCINFO2_STUTTER_MODE_EN 0x00000100L
4590 #define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE 0x00000200L
4592 /* ucTableFormatRevision=1 */
4593 /* ucTableContentRevision=1 */
4594 typedef struct _ATOM_POWERMODE_INFO {
4595 ULONG ulMiscInfo; /* The power level should be arranged in ascending order */
4596 ULONG ulReserved1; /* must set to 0 */
4597 ULONG ulReserved2; /* must set to 0 */
4598 USHORT usEngineClock;
4599 USHORT usMemoryClock;
4600 UCHAR ucVoltageDropIndex; /* index to GPIO table */
4601 UCHAR ucSelectedPanel_RefreshRate; /* panel refresh rate */
4602 UCHAR ucMinTemperature;
4603 UCHAR ucMaxTemperature;
4604 UCHAR ucNumPciELanes; /* number of PCIE lanes */
4605 } ATOM_POWERMODE_INFO;
4607 /* ucTableFormatRevision=2 */
4608 /* ucTableContentRevision=1 */
4609 typedef struct _ATOM_POWERMODE_INFO_V2 {
4610 ULONG ulMiscInfo; /* The power level should be arranged in ascending order */
4612 ULONG ulEngineClock;
4613 ULONG ulMemoryClock;
4614 UCHAR ucVoltageDropIndex; /* index to GPIO table */
4615 UCHAR ucSelectedPanel_RefreshRate; /* panel refresh rate */
4616 UCHAR ucMinTemperature;
4617 UCHAR ucMaxTemperature;
4618 UCHAR ucNumPciELanes; /* number of PCIE lanes */
4619 } ATOM_POWERMODE_INFO_V2;
4621 /* ucTableFormatRevision=2 */
4622 /* ucTableContentRevision=2 */
4623 typedef struct _ATOM_POWERMODE_INFO_V3 {
4624 ULONG ulMiscInfo; /* The power level should be arranged in ascending order */
4626 ULONG ulEngineClock;
4627 ULONG ulMemoryClock;
4628 UCHAR ucVoltageDropIndex; /* index to Core (VDDC) votage table */
4629 UCHAR ucSelectedPanel_RefreshRate; /* panel refresh rate */
4630 UCHAR ucMinTemperature;
4631 UCHAR ucMaxTemperature;
4632 UCHAR ucNumPciELanes; /* number of PCIE lanes */
4633 UCHAR ucVDDCI_VoltageDropIndex; /* index to VDDCI votage table */
4634 } ATOM_POWERMODE_INFO_V3;
4636 #define ATOM_MAX_NUMBEROF_POWER_BLOCK 8
4638 #define ATOM_PP_OVERDRIVE_INTBITMAP_AUXWIN 0x01
4639 #define ATOM_PP_OVERDRIVE_INTBITMAP_OVERDRIVE 0x02
4641 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM63 0x01
4642 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032 0x02
4643 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030 0x03
4644 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649 0x04
4645 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64 0x05
4646 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375 0x06
4647 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512 0x07 /* Andigilog */
4649 typedef struct _ATOM_POWERPLAY_INFO {
4650 ATOM_COMMON_TABLE_HEADER sHeader;
4651 UCHAR ucOverdriveThermalController;
4652 UCHAR ucOverdriveI2cLine;
4653 UCHAR ucOverdriveIntBitmap;
4654 UCHAR ucOverdriveControllerAddress;
4655 UCHAR ucSizeOfPowerModeEntry;
4656 UCHAR ucNumOfPowerModeEntries;
4657 ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
4658 } ATOM_POWERPLAY_INFO;
4660 typedef struct _ATOM_POWERPLAY_INFO_V2 {
4661 ATOM_COMMON_TABLE_HEADER sHeader;
4662 UCHAR ucOverdriveThermalController;
4663 UCHAR ucOverdriveI2cLine;
4664 UCHAR ucOverdriveIntBitmap;
4665 UCHAR ucOverdriveControllerAddress;
4666 UCHAR ucSizeOfPowerModeEntry;
4667 UCHAR ucNumOfPowerModeEntries;
4668 ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
4669 } ATOM_POWERPLAY_INFO_V2;
4671 typedef struct _ATOM_POWERPLAY_INFO_V3 {
4672 ATOM_COMMON_TABLE_HEADER sHeader;
4673 UCHAR ucOverdriveThermalController;
4674 UCHAR ucOverdriveI2cLine;
4675 UCHAR ucOverdriveIntBitmap;
4676 UCHAR ucOverdriveControllerAddress;
4677 UCHAR ucSizeOfPowerModeEntry;
4678 UCHAR ucNumOfPowerModeEntries;
4679 ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
4680 } ATOM_POWERPLAY_INFO_V3;
4682 /**************************************************************************/
4684 /* Following definitions are for compatiblity issue in different SW components. */
4685 #define ATOM_MASTER_DATA_TABLE_REVISION 0x01
4686 #define Object_Info Object_Header
4687 #define AdjustARB_SEQ MC_InitParameter
4688 #define VRAM_GPIO_DetectionInfo VoltageObjectInfo
4689 #define ASIC_VDDCI_Info ASIC_ProfilingInfo
4690 #define ASIC_MVDDQ_Info MemoryTrainingInfo
4691 #define SS_Info PPLL_SS_Info
4692 #define ASIC_MVDDC_Info ASIC_InternalSS_Info
4693 #define DispDevicePriorityInfo SaveRestoreInfo
4694 #define DispOutInfo TV_VideoMode
4696 #define ATOM_ENCODER_OBJECT_TABLE ATOM_OBJECT_TABLE
4697 #define ATOM_CONNECTOR_OBJECT_TABLE ATOM_OBJECT_TABLE
4699 /* New device naming, remove them when both DAL/VBIOS is ready */
4700 #define DFP2I_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS
4701 #define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS
4703 #define DFP1X_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS
4704 #define DFP1X_OUTPUT_CONTROL_PS_ALLOCATION DFP1X_OUTPUT_CONTROL_PARAMETERS
4706 #define DFP1I_OUTPUT_CONTROL_PARAMETERS DFP1_OUTPUT_CONTROL_PARAMETERS
4707 #define DFP1I_OUTPUT_CONTROL_PS_ALLOCATION DFP1_OUTPUT_CONTROL_PS_ALLOCATION
4709 #define ATOM_DEVICE_DFP1I_SUPPORT ATOM_DEVICE_DFP1_SUPPORT
4710 #define ATOM_DEVICE_DFP1X_SUPPORT ATOM_DEVICE_DFP2_SUPPORT
4712 #define ATOM_DEVICE_DFP1I_INDEX ATOM_DEVICE_DFP1_INDEX
4713 #define ATOM_DEVICE_DFP1X_INDEX ATOM_DEVICE_DFP2_INDEX
4715 #define ATOM_DEVICE_DFP2I_INDEX 0x00000009
4716 #define ATOM_DEVICE_DFP2I_SUPPORT (0x1L << ATOM_DEVICE_DFP2I_INDEX)
4718 #define ATOM_S0_DFP1I ATOM_S0_DFP1
4719 #define ATOM_S0_DFP1X ATOM_S0_DFP2
4721 #define ATOM_S0_DFP2I 0x00200000L
4722 #define ATOM_S0_DFP2Ib2 0x20
4724 #define ATOM_S2_DFP1I_DPMS_STATE ATOM_S2_DFP1_DPMS_STATE
4725 #define ATOM_S2_DFP1X_DPMS_STATE ATOM_S2_DFP2_DPMS_STATE
4727 #define ATOM_S2_DFP2I_DPMS_STATE 0x02000000L
4728 #define ATOM_S2_DFP2I_DPMS_STATEb3 0x02
4730 #define ATOM_S3_DFP2I_ACTIVEb1 0x02
4732 #define ATOM_S3_DFP1I_ACTIVE ATOM_S3_DFP1_ACTIVE
4733 #define ATOM_S3_DFP1X_ACTIVE ATOM_S3_DFP2_ACTIVE
4735 #define ATOM_S3_DFP2I_ACTIVE 0x00000200L
4737 #define ATOM_S3_DFP1I_CRTC_ACTIVE ATOM_S3_DFP1_CRTC_ACTIVE
4738 #define ATOM_S3_DFP1X_CRTC_ACTIVE ATOM_S3_DFP2_CRTC_ACTIVE
4739 #define ATOM_S3_DFP2I_CRTC_ACTIVE 0x02000000L
4741 #define ATOM_S3_DFP2I_CRTC_ACTIVEb3 0x02
4742 #define ATOM_S5_DOS_REQ_DFP2Ib1 0x02
4744 #define ATOM_S5_DOS_REQ_DFP2I 0x0200
4745 #define ATOM_S6_ACC_REQ_DFP1I ATOM_S6_ACC_REQ_DFP1
4746 #define ATOM_S6_ACC_REQ_DFP1X ATOM_S6_ACC_REQ_DFP2
4748 #define ATOM_S6_ACC_REQ_DFP2Ib3 0x02
4749 #define ATOM_S6_ACC_REQ_DFP2I 0x02000000L
4751 #define TMDS1XEncoderControl DVOEncoderControl
4752 #define DFP1XOutputControl DVOOutputControl
4754 #define ExternalDFPOutputControl DFP1XOutputControl
4755 #define EnableExternalTMDS_Encoder TMDS1XEncoderControl
4757 #define DFP1IOutputControl TMDSAOutputControl
4758 #define DFP2IOutputControl LVTMAOutputControl
4760 #define DAC1_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS
4761 #define DAC1_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION
4763 #define DAC2_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS
4764 #define DAC2_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION
4766 #define ucDac1Standard ucDacStandard
4767 #define ucDac2Standard ucDacStandard
4769 #define TMDS1EncoderControl TMDSAEncoderControl
4770 #define TMDS2EncoderControl LVTMAEncoderControl
4772 #define DFP1OutputControl TMDSAOutputControl
4773 #define DFP2OutputControl LVTMAOutputControl
4774 #define CRT1OutputControl DAC1OutputControl
4775 #define CRT2OutputControl DAC2OutputControl
4777 /* These two lines will be removed for sure in a few days, will follow up with Michael V. */
4778 #define EnableLVDS_SS EnableSpreadSpectrumOnPPLL
4779 #define ENABLE_LVDS_SS_PARAMETERS_V3 ENABLE_SPREAD_SPECTRUM_ON_PPLL
4781 /*********************************************************************************/
4783 #pragma pack() /* BIOS data must use byte aligment */
4785 #endif /* _ATOMBIOS_H */