aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-03-20 17:17:57 -0400
committerDave Airlie <airlied@redhat.com>2012-03-21 02:55:49 -0400
commitbf68adb4df2ac27a8f1b24894c007c9ef1c4195a (patch)
treea0a87ceb940679f0d214f3675ec97267c806985a /drivers/gpu/drm/radeon/atombios.h
parentc67d8502d8b8038140efddf5ea93bc97258adc3c (diff)
drm/radeon/kms: upstream atombios.h updates
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios.h')
-rw-r--r--drivers/gpu/drm/radeon/atombios.h929
1 files changed, 883 insertions, 46 deletions
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h
index 1b50ad8919d5..47604665cc17 100644
--- a/drivers/gpu/drm/radeon/atombios.h
+++ b/drivers/gpu/drm/radeon/atombios.h
@@ -101,6 +101,7 @@
101#define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5) 101#define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5)
102#define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5) 102#define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5)
103#define ATOM_ENCODER_INIT (ATOM_DISABLE+7) 103#define ATOM_ENCODER_INIT (ATOM_DISABLE+7)
104#define ATOM_INIT (ATOM_DISABLE+7)
104#define ATOM_GET_STATUS (ATOM_DISABLE+8) 105#define ATOM_GET_STATUS (ATOM_DISABLE+8)
105 106
106#define ATOM_BLANKING 1 107#define ATOM_BLANKING 1
@@ -251,25 +252,25 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
251 USHORT SetEngineClock; //Function Table,directly used by various SW components,latest version 1.1 252 USHORT SetEngineClock; //Function Table,directly used by various SW components,latest version 1.1
252 USHORT SetMemoryClock; //Function Table,directly used by various SW components,latest version 1.1 253 USHORT SetMemoryClock; //Function Table,directly used by various SW components,latest version 1.1
253 USHORT SetPixelClock; //Function Table,directly used by various SW components,latest version 1.2 254 USHORT SetPixelClock; //Function Table,directly used by various SW components,latest version 1.2
254 USHORT DynamicClockGating; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 255 USHORT EnableDispPowerGating; //Atomic Table, indirectly used by various SW components,called from ASIC_Init
255 USHORT ResetMemoryDLL; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 256 USHORT ResetMemoryDLL; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
256 USHORT ResetMemoryDevice; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 257 USHORT ResetMemoryDevice; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
257 USHORT MemoryPLLInit; 258 USHORT MemoryPLLInit; //Atomic Table, used only by Bios
258 USHORT AdjustDisplayPll; //only used by Bios 259 USHORT AdjustDisplayPll; //Atomic Table, used by various SW componentes.
259 USHORT AdjustMemoryController; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 260 USHORT AdjustMemoryController; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
260 USHORT EnableASIC_StaticPwrMgt; //Atomic Table, only used by Bios 261 USHORT EnableASIC_StaticPwrMgt; //Atomic Table, only used by Bios
261 USHORT ASIC_StaticPwrMgtStatusChange; //Obsolete , only used by Bios 262 USHORT ASIC_StaticPwrMgtStatusChange; //Obsolete , only used by Bios
262 USHORT DAC_LoadDetection; //Atomic Table, directly used by various SW components,latest version 1.2 263 USHORT DAC_LoadDetection; //Atomic Table, directly used by various SW components,latest version 1.2
263 USHORT LVTMAEncoderControl; //Atomic Table,directly used by various SW components,latest version 1.3 264 USHORT LVTMAEncoderControl; //Atomic Table,directly used by various SW components,latest version 1.3
264 USHORT LCD1OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 265 USHORT HW_Misc_Operation; //Atomic Table, directly used by various SW components,latest version 1.1
265 USHORT DAC1EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 266 USHORT DAC1EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1
266 USHORT DAC2EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 267 USHORT DAC2EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1
267 USHORT DVOOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 268 USHORT DVOOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1
268 USHORT CV1OutputControl; //Atomic Table, Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead 269 USHORT CV1OutputControl; //Atomic Table, Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead
269 USHORT GetConditionalGoldenSetting; //only used by Bios 270 USHORT GetConditionalGoldenSetting; //Only used by Bios
270 USHORT TVEncoderControl; //Function Table,directly used by various SW components,latest version 1.1 271 USHORT TVEncoderControl; //Function Table,directly used by various SW components,latest version 1.1
271 USHORT TMDSAEncoderControl; //Atomic Table, directly used by various SW components,latest version 1.3 272 USHORT PatchMCSetting; //only used by BIOS
272 USHORT LVDSEncoderControl; //Atomic Table, directly used by various SW components,latest version 1.3 273 USHORT MC_SEQ_Control; //only used by BIOS
273 USHORT TV1OutputControl; //Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead 274 USHORT TV1OutputControl; //Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead
274 USHORT EnableScaler; //Atomic Table, used only by Bios 275 USHORT EnableScaler; //Atomic Table, used only by Bios
275 USHORT BlankCRTC; //Atomic Table, directly used by various SW components,latest version 1.1 276 USHORT BlankCRTC; //Atomic Table, directly used by various SW components,latest version 1.1
@@ -282,7 +283,7 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
282 USHORT SetCRTC_Replication; //Atomic Table, used only by Bios 283 USHORT SetCRTC_Replication; //Atomic Table, used only by Bios
283 USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1 284 USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1
284 USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios 285 USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios
285 USHORT UpdateCRTC_DoubleBufferRegisters; 286 USHORT UpdateCRTC_DoubleBufferRegisters; //Atomic Table, used only by Bios
286 USHORT LUT_AutoFill; //Atomic Table, only used by Bios 287 USHORT LUT_AutoFill; //Atomic Table, only used by Bios
287 USHORT EnableHW_IconCursor; //Atomic Table, only used by Bios 288 USHORT EnableHW_IconCursor; //Atomic Table, only used by Bios
288 USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1 289 USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1
@@ -308,27 +309,36 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
308 USHORT SetVoltage; //Function Table,directly and/or indirectly used by various SW components,latest version 1.1 309 USHORT SetVoltage; //Function Table,directly and/or indirectly used by various SW components,latest version 1.1
309 USHORT DAC1OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 310 USHORT DAC1OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1
310 USHORT DAC2OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 311 USHORT DAC2OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1
311 USHORT SetupHWAssistedI2CStatus; //Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C" 312 USHORT ComputeMemoryClockParam; //Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C"
312 USHORT ClockSource; //Atomic Table, indirectly used by various SW components,called from ASIC_Init 313 USHORT ClockSource; //Atomic Table, indirectly used by various SW components,called from ASIC_Init
313 USHORT MemoryDeviceInit; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 314 USHORT MemoryDeviceInit; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
314 USHORT EnableYUV; //Atomic Table, indirectly used by various SW components,called from EnableVGARender 315 USHORT GetDispObjectInfo; //Atomic Table, indirectly used by various SW components,called from EnableVGARender
315 USHORT DIG1EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 316 USHORT DIG1EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1
316 USHORT DIG2EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 317 USHORT DIG2EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1
317 USHORT DIG1TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 318 USHORT DIG1TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1
318 USHORT DIG2TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 319 USHORT DIG2TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1
319 USHORT ProcessAuxChannelTransaction; //Function Table,only used by Bios 320 USHORT ProcessAuxChannelTransaction; //Function Table,only used by Bios
320 USHORT DPEncoderService; //Function Table,only used by Bios 321 USHORT DPEncoderService; //Function Table,only used by Bios
322 USHORT GetVoltageInfo; //Function Table,only used by Bios since SI
321}ATOM_MASTER_LIST_OF_COMMAND_TABLES; 323}ATOM_MASTER_LIST_OF_COMMAND_TABLES;
322 324
323// For backward compatible 325// For backward compatible
324#define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction 326#define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction
325#define UNIPHYTransmitterControl DIG1TransmitterControl 327#define DPTranslatorControl DIG2EncoderControl
326#define LVTMATransmitterControl DIG2TransmitterControl 328#define UNIPHYTransmitterControl DIG1TransmitterControl
329#define LVTMATransmitterControl DIG2TransmitterControl
327#define SetCRTC_DPM_State GetConditionalGoldenSetting 330#define SetCRTC_DPM_State GetConditionalGoldenSetting
328#define SetUniphyInstance ASIC_StaticPwrMgtStatusChange 331#define SetUniphyInstance ASIC_StaticPwrMgtStatusChange
329#define HPDInterruptService ReadHWAssistedI2CStatus 332#define HPDInterruptService ReadHWAssistedI2CStatus
330#define EnableVGA_Access GetSCLKOverMCLKRatio 333#define EnableVGA_Access GetSCLKOverMCLKRatio
331#define GetDispObjectInfo EnableYUV 334#define EnableYUV GetDispObjectInfo
335#define DynamicClockGating EnableDispPowerGating
336#define SetupHWAssistedI2CStatus ComputeMemoryClockParam
337
338#define TMDSAEncoderControl PatchMCSetting
339#define LVDSEncoderControl MC_SEQ_Control
340#define LCD1OutputControl HW_Misc_Operation
341
332 342
333typedef struct _ATOM_MASTER_COMMAND_TABLE 343typedef struct _ATOM_MASTER_COMMAND_TABLE
334{ 344{
@@ -495,6 +505,34 @@ typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5
495// ucInputFlag 505// ucInputFlag
496#define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode 506#define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode
497 507
508// use for ComputeMemoryClockParamTable
509typedef struct _COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1
510{
511 union
512 {
513 ULONG ulClock;
514 ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output:UPPER_WORD=FB_DIV_INTEGER, LOWER_WORD=FB_DIV_FRAC shl (16-FB_FRACTION_BITS)
515 };
516 UCHAR ucDllSpeed; //Output
517 UCHAR ucPostDiv; //Output
518 union{
519 UCHAR ucInputFlag; //Input : ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN: 1-StrobeMode, 0-PerformanceMode
520 UCHAR ucPllCntlFlag; //Output:
521 };
522 UCHAR ucBWCntl;
523}COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1;
524
525// definition of ucInputFlag
526#define MPLL_INPUT_FLAG_STROBE_MODE_EN 0x01
527// definition of ucPllCntlFlag
528#define MPLL_CNTL_FLAG_VCO_MODE_MASK 0x03
529#define MPLL_CNTL_FLAG_BYPASS_DQ_PLL 0x04
530#define MPLL_CNTL_FLAG_QDR_ENABLE 0x08
531#define MPLL_CNTL_FLAG_AD_HALF_RATE 0x10
532
533//MPLL_CNTL_FLAG_BYPASS_AD_PLL has a wrong name, should be BYPASS_DQ_PLL
534#define MPLL_CNTL_FLAG_BYPASS_AD_PLL 0x04
535
498typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER 536typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER
499{ 537{
500 ATOM_COMPUTE_CLOCK_FREQ ulClock; 538 ATOM_COMPUTE_CLOCK_FREQ ulClock;
@@ -562,6 +600,16 @@ typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS
562#define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS 600#define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS
563 601
564/****************************************************************************/ 602/****************************************************************************/
603// Structure used by EnableDispPowerGatingTable.ctb
604/****************************************************************************/
605typedef struct _ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1
606{
607 UCHAR ucDispPipeId; // ATOM_CRTC1, ATOM_CRTC2, ...
608 UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE
609 UCHAR ucPadding[2];
610}ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1;
611
612/****************************************************************************/
565// Structure used by EnableASIC_StaticPwrMgtTable.ctb 613// Structure used by EnableASIC_StaticPwrMgtTable.ctb
566/****************************************************************************/ 614/****************************************************************************/
567typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS 615typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
@@ -807,6 +855,7 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V4
807#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00 855#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00
808#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01 856#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01
809#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02 857#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02
858#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_3_24GHZ 0x03
810#define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70 859#define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70
811#define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00 860#define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00
812#define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10 861#define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10
@@ -814,6 +863,7 @@ typedef struct _ATOM_DIG_ENCODER_CONFIG_V4
814#define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30 863#define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30
815#define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40 864#define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40
816#define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50 865#define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50
866#define ATOM_ENCODER_CONFIG_V4_DIG6_ENCODER 0x60
817 867
818typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4 868typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4
819{ 869{
@@ -1171,6 +1221,106 @@ typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V4
1171#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80 //EF 1221#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80 //EF
1172 1222
1173 1223
1224typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V5
1225{
1226#if ATOM_BIG_ENDIAN
1227 UCHAR ucReservd1:1;
1228 UCHAR ucHPDSel:3;
1229 UCHAR ucPhyClkSrcId:2;
1230 UCHAR ucCoherentMode:1;
1231 UCHAR ucReserved:1;
1232#else
1233 UCHAR ucReserved:1;
1234 UCHAR ucCoherentMode:1;
1235 UCHAR ucPhyClkSrcId:2;
1236 UCHAR ucHPDSel:3;
1237 UCHAR ucReservd1:1;
1238#endif
1239}ATOM_DIG_TRANSMITTER_CONFIG_V5;
1240
1241typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5
1242{
1243 USHORT usSymClock; // Encoder Clock in 10kHz,(DP mode)= linkclock/10, (TMDS/LVDS/HDMI)= pixel clock, (HDMI deep color), =pixel clock * deep_color_ratio
1244 UCHAR ucPhyId; // 0=UNIPHYA, 1=UNIPHYB, 2=UNIPHYC, 3=UNIPHYD, 4= UNIPHYE 5=UNIPHYF
1245 UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_xxx
1246 UCHAR ucLaneNum; // indicate lane number 1-8
1247 UCHAR ucConnObjId; // Connector Object Id defined in ObjectId.h
1248 UCHAR ucDigMode; // indicate DIG mode
1249 union{
1250 ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig;
1251 UCHAR ucConfig;
1252 };
1253 UCHAR ucDigEncoderSel; // indicate DIG front end encoder
1254 UCHAR ucDPLaneSet;
1255 UCHAR ucReserved;
1256 UCHAR ucReserved1;
1257}DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5;
1258
1259//ucPhyId
1260#define ATOM_PHY_ID_UNIPHYA 0
1261#define ATOM_PHY_ID_UNIPHYB 1
1262#define ATOM_PHY_ID_UNIPHYC 2
1263#define ATOM_PHY_ID_UNIPHYD 3
1264#define ATOM_PHY_ID_UNIPHYE 4
1265#define ATOM_PHY_ID_UNIPHYF 5
1266#define ATOM_PHY_ID_UNIPHYG 6
1267
1268// ucDigEncoderSel
1269#define ATOM_TRANMSITTER_V5__DIGA_SEL 0x01
1270#define ATOM_TRANMSITTER_V5__DIGB_SEL 0x02
1271#define ATOM_TRANMSITTER_V5__DIGC_SEL 0x04
1272#define ATOM_TRANMSITTER_V5__DIGD_SEL 0x08
1273#define ATOM_TRANMSITTER_V5__DIGE_SEL 0x10
1274#define ATOM_TRANMSITTER_V5__DIGF_SEL 0x20
1275#define ATOM_TRANMSITTER_V5__DIGG_SEL 0x40
1276
1277// ucDigMode
1278#define ATOM_TRANSMITTER_DIGMODE_V5_DP 0
1279#define ATOM_TRANSMITTER_DIGMODE_V5_LVDS 1
1280#define ATOM_TRANSMITTER_DIGMODE_V5_DVI 2
1281#define ATOM_TRANSMITTER_DIGMODE_V5_HDMI 3
1282#define ATOM_TRANSMITTER_DIGMODE_V5_SDVO 4
1283#define ATOM_TRANSMITTER_DIGMODE_V5_DP_MST 5
1284
1285// ucDPLaneSet
1286#define DP_LANE_SET__0DB_0_4V 0x00
1287#define DP_LANE_SET__0DB_0_6V 0x01
1288#define DP_LANE_SET__0DB_0_8V 0x02
1289#define DP_LANE_SET__0DB_1_2V 0x03
1290#define DP_LANE_SET__3_5DB_0_4V 0x08
1291#define DP_LANE_SET__3_5DB_0_6V 0x09
1292#define DP_LANE_SET__3_5DB_0_8V 0x0a
1293#define DP_LANE_SET__6DB_0_4V 0x10
1294#define DP_LANE_SET__6DB_0_6V 0x11
1295#define DP_LANE_SET__9_5DB_0_4V 0x18
1296
1297// ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig;
1298// Bit1
1299#define ATOM_TRANSMITTER_CONFIG_V5_COHERENT 0x02
1300
1301// Bit3:2
1302#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_MASK 0x0c
1303#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_SHIFT 0x02
1304
1305#define ATOM_TRANSMITTER_CONFIG_V5_P1PLL 0x00
1306#define ATOM_TRANSMITTER_CONFIG_V5_P2PLL 0x04
1307#define ATOM_TRANSMITTER_CONFIG_V5_P0PLL 0x08
1308#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SRC_EXT 0x0c
1309// Bit6:4
1310#define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_MASK 0x70
1311#define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_SHIFT 0x04
1312
1313#define ATOM_TRANSMITTER_CONFIG_V5_NO_HPD_SEL 0x00
1314#define ATOM_TRANSMITTER_CONFIG_V5_HPD1_SEL 0x10
1315#define ATOM_TRANSMITTER_CONFIG_V5_HPD2_SEL 0x20
1316#define ATOM_TRANSMITTER_CONFIG_V5_HPD3_SEL 0x30
1317#define ATOM_TRANSMITTER_CONFIG_V5_HPD4_SEL 0x40
1318#define ATOM_TRANSMITTER_CONFIG_V5_HPD5_SEL 0x50
1319#define ATOM_TRANSMITTER_CONFIG_V5_HPD6_SEL 0x60
1320
1321#define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION_V1_5 DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5
1322
1323
1174/****************************************************************************/ 1324/****************************************************************************/
1175// Structures used by ExternalEncoderControlTable V1.3 1325// Structures used by ExternalEncoderControlTable V1.3
1176// ASIC Families: Evergreen, Llano, NI 1326// ASIC Families: Evergreen, Llano, NI
@@ -1793,6 +1943,7 @@ typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2
1793#define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00 1943#define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00
1794#define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04 1944#define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04
1795#define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08 1945#define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08
1946#define ATOM_PPLL_SS_TYPE_V3_P0PLL ATOM_PPLL_SS_TYPE_V3_DCPLL
1796#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF 1947#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF
1797#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0 1948#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0
1798#define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00 1949#define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00
@@ -2030,12 +2181,77 @@ typedef struct _SET_VOLTAGE_PARAMETERS_V2
2030 USHORT usVoltageLevel; // real voltage level 2181 USHORT usVoltageLevel; // real voltage level
2031}SET_VOLTAGE_PARAMETERS_V2; 2182}SET_VOLTAGE_PARAMETERS_V2;
2032 2183
2184
2185typedef struct _SET_VOLTAGE_PARAMETERS_V1_3
2186{
2187 UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI
2188 UCHAR ucVoltageMode; // Indicate action: Set voltage level
2189 USHORT usVoltageLevel; // real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. )
2190}SET_VOLTAGE_PARAMETERS_V1_3;
2191
2192//ucVoltageType
2193#define VOLTAGE_TYPE_VDDC 1
2194#define VOLTAGE_TYPE_MVDDC 2
2195#define VOLTAGE_TYPE_MVDDQ 3
2196#define VOLTAGE_TYPE_VDDCI 4
2197
2198//SET_VOLTAGE_PARAMETERS_V3.ucVoltageMode
2199#define ATOM_SET_VOLTAGE 0 //Set voltage Level
2200#define ATOM_INIT_VOLTAGE_REGULATOR 3 //Init Regulator
2201#define ATOM_SET_VOLTAGE_PHASE 4 //Set Vregulator Phase
2202#define ATOM_GET_MAX_VOLTAGE 6 //Get Max Voltage, not used in SetVoltageTable v1.3
2203#define ATOM_GET_VOLTAGE_LEVEL 6 //Get Voltage level from vitual voltage ID
2204
2205// define vitual voltage id in usVoltageLevel
2206#define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01
2207#define ATOM_VIRTUAL_VOLTAGE_ID1 0xff02
2208#define ATOM_VIRTUAL_VOLTAGE_ID2 0xff03
2209#define ATOM_VIRTUAL_VOLTAGE_ID3 0xff04
2210
2033typedef struct _SET_VOLTAGE_PS_ALLOCATION 2211typedef struct _SET_VOLTAGE_PS_ALLOCATION
2034{ 2212{
2035 SET_VOLTAGE_PARAMETERS sASICSetVoltage; 2213 SET_VOLTAGE_PARAMETERS sASICSetVoltage;
2036 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; 2214 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2037}SET_VOLTAGE_PS_ALLOCATION; 2215}SET_VOLTAGE_PS_ALLOCATION;
2038 2216
2217// New Added from SI for GetVoltageInfoTable, input parameter structure
2218typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1
2219{
2220 UCHAR ucVoltageType; // Input: To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI
2221 UCHAR ucVoltageMode; // Input: Indicate action: Get voltage info
2222 USHORT usVoltageLevel; // Input: real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) or Leakage Id
2223 ULONG ulReserved;
2224}GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1;
2225
2226// New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_VID
2227typedef struct _GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1
2228{
2229 ULONG ulVotlageGpioState;
2230 ULONG ulVoltageGPioMask;
2231}GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1;
2232
2233// New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_STATEx_LEAKAGE_VID
2234typedef struct _GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1
2235{
2236 USHORT usVoltageLevel;
2237 USHORT usVoltageId; // Voltage Id programmed in Voltage Regulator
2238 ULONG ulReseved;
2239}GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1;
2240
2241
2242// GetVoltageInfo v1.1 ucVoltageMode
2243#define ATOM_GET_VOLTAGE_VID 0x00
2244#define ATOM_GET_VOTLAGE_INIT_SEQ 0x03
2245#define ATOM_GET_VOLTTAGE_PHASE_PHASE_VID 0x04
2246// for SI, this state map to 0xff02 voltage state in Power Play table, which is power boost state
2247#define ATOM_GET_VOLTAGE_STATE0_LEAKAGE_VID 0x10
2248
2249// for SI, this state map to 0xff01 voltage state in Power Play table, which is performance state
2250#define ATOM_GET_VOLTAGE_STATE1_LEAKAGE_VID 0x11
2251// undefined power state
2252#define ATOM_GET_VOLTAGE_STATE2_LEAKAGE_VID 0x12
2253#define ATOM_GET_VOLTAGE_STATE3_LEAKAGE_VID 0x13
2254
2039/****************************************************************************/ 2255/****************************************************************************/
2040// Structures used by TVEncoderControlTable 2256// Structures used by TVEncoderControlTable
2041/****************************************************************************/ 2257/****************************************************************************/
@@ -2065,9 +2281,9 @@ typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES
2065 USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios 2281 USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios
2066 USHORT StandardVESA_Timing; // Only used by Bios 2282 USHORT StandardVESA_Timing; // Only used by Bios
2067 USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4 2283 USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4
2068 USHORT DAC_Info; // Will be obsolete from R600 2284 USHORT PaletteData; // Only used by BIOS
2069 USHORT LCD_Info; // Shared by various SW components,latest version 1.3, was called LVDS_Info 2285 USHORT LCD_Info; // Shared by various SW components,latest version 1.3, was called LVDS_Info
2070 USHORT TMDS_Info; // Will be obsolete from R600 2286 USHORT DIGTransmitterInfo; // Internal used by VBIOS only version 3.1
2071 USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 2287 USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1
2072 USHORT SupportedDevicesInfo; // Will be obsolete from R600 2288 USHORT SupportedDevicesInfo; // Will be obsolete from R600
2073 USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600 2289 USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600
@@ -2096,15 +2312,16 @@ typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES
2096 USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1 2312 USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1
2097}ATOM_MASTER_LIST_OF_DATA_TABLES; 2313}ATOM_MASTER_LIST_OF_DATA_TABLES;
2098 2314
2099// For backward compatible
2100#define LVDS_Info LCD_Info
2101
2102typedef struct _ATOM_MASTER_DATA_TABLE 2315typedef struct _ATOM_MASTER_DATA_TABLE
2103{ 2316{
2104 ATOM_COMMON_TABLE_HEADER sHeader; 2317 ATOM_COMMON_TABLE_HEADER sHeader;
2105 ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables; 2318 ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
2106}ATOM_MASTER_DATA_TABLE; 2319}ATOM_MASTER_DATA_TABLE;
2107 2320
2321// For backward compatible
2322#define LVDS_Info LCD_Info
2323#define DAC_Info PaletteData
2324#define TMDS_Info DIGTransmitterInfo
2108 2325
2109/****************************************************************************/ 2326/****************************************************************************/
2110// Structure used in MultimediaCapabilityInfoTable 2327// Structure used in MultimediaCapabilityInfoTable
@@ -2171,7 +2388,9 @@ typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO
2171typedef struct _ATOM_FIRMWARE_CAPABILITY 2388typedef struct _ATOM_FIRMWARE_CAPABILITY
2172{ 2389{
2173#if ATOM_BIG_ENDIAN 2390#if ATOM_BIG_ENDIAN
2174 USHORT Reserved:3; 2391 USHORT Reserved:1;
2392 USHORT SCL2Redefined:1;
2393 USHORT PostWithoutModeSet:1;
2175 USHORT HyperMemory_Size:4; 2394 USHORT HyperMemory_Size:4;
2176 USHORT HyperMemory_Support:1; 2395 USHORT HyperMemory_Support:1;
2177 USHORT PPMode_Assigned:1; 2396 USHORT PPMode_Assigned:1;
@@ -2193,7 +2412,9 @@ typedef struct _ATOM_FIRMWARE_CAPABILITY
2193 USHORT PPMode_Assigned:1; 2412 USHORT PPMode_Assigned:1;
2194 USHORT HyperMemory_Support:1; 2413 USHORT HyperMemory_Support:1;
2195 USHORT HyperMemory_Size:4; 2414 USHORT HyperMemory_Size:4;
2196 USHORT Reserved:3; 2415 USHORT PostWithoutModeSet:1;
2416 USHORT SCL2Redefined:1;
2417 USHORT Reserved:1;
2197#endif 2418#endif
2198}ATOM_FIRMWARE_CAPABILITY; 2419}ATOM_FIRMWARE_CAPABILITY;
2199 2420
@@ -2418,7 +2639,8 @@ typedef struct _ATOM_FIRMWARE_INFO_V2_2
2418 USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit 2639 USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit
2419 ULONG ulReserved4; //Was ulAsicMaximumVoltage 2640 ULONG ulReserved4; //Was ulAsicMaximumVoltage
2420 ULONG ulMinPixelClockPLL_Output; //In 10Khz unit 2641 ULONG ulMinPixelClockPLL_Output; //In 10Khz unit
2421 ULONG ulReserved5; //Was usMinEngineClockPLL_Input and usMaxEngineClockPLL_Input 2642 UCHAR ucRemoteDisplayConfig;
2643 UCHAR ucReserved5[3]; //Was usMinEngineClockPLL_Input and usMaxEngineClockPLL_Input
2422 ULONG ulReserved6; //Was usMinEngineClockPLL_Output and usMinMemoryClockPLL_Input 2644 ULONG ulReserved6; //Was usMinEngineClockPLL_Output and usMinMemoryClockPLL_Input
2423 ULONG ulReserved7; //Was usMaxMemoryClockPLL_Input and usMinMemoryClockPLL_Output 2645 ULONG ulReserved7; //Was usMaxMemoryClockPLL_Input and usMinMemoryClockPLL_Output
2424 USHORT usReserved11; //Was usMaxPixelClock; //In 10Khz unit, Max. Pclk used only for DAC 2646 USHORT usReserved11; //Was usMaxPixelClock; //In 10Khz unit, Max. Pclk used only for DAC
@@ -2438,6 +2660,11 @@ typedef struct _ATOM_FIRMWARE_INFO_V2_2
2438 2660
2439#define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2 2661#define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2
2440 2662
2663
2664// definition of ucRemoteDisplayConfig
2665#define REMOTE_DISPLAY_DISABLE 0x00
2666#define REMOTE_DISPLAY_ENABLE 0x01
2667
2441/****************************************************************************/ 2668/****************************************************************************/
2442// Structures used in IntegratedSystemInfoTable 2669// Structures used in IntegratedSystemInfoTable
2443/****************************************************************************/ 2670/****************************************************************************/
@@ -2660,8 +2887,9 @@ usMinDownStreamHTLinkWidth: same as above.
2660#define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2 2887#define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2
2661#define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3 2888#define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3
2662#define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4 2889#define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4
2890#define INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI 5
2663 2891
2664#define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH // this deff reflects max defined CPU code 2892#define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI // this deff reflects max defined CPU code
2665 2893
2666#define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001 2894#define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001
2667#define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002 2895#define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002
@@ -2753,6 +2981,7 @@ typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V5
2753#define ASIC_INT_DIG4_ENCODER_ID 0x0b 2981#define ASIC_INT_DIG4_ENCODER_ID 0x0b
2754#define ASIC_INT_DIG5_ENCODER_ID 0x0c 2982#define ASIC_INT_DIG5_ENCODER_ID 0x0c
2755#define ASIC_INT_DIG6_ENCODER_ID 0x0d 2983#define ASIC_INT_DIG6_ENCODER_ID 0x0d
2984#define ASIC_INT_DIG7_ENCODER_ID 0x0e
2756 2985
2757//define Encoder attribute 2986//define Encoder attribute
2758#define ATOM_ANALOG_ENCODER 0 2987#define ATOM_ANALOG_ENCODER 0
@@ -3226,15 +3455,23 @@ typedef struct _ATOM_LCD_INFO_V13
3226 3455
3227 UCHAR ucPowerSequenceDIGONtoDE_in4Ms; 3456 UCHAR ucPowerSequenceDIGONtoDE_in4Ms;
3228 UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms; 3457 UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms;
3229 UCHAR ucPowerSequenceDEtoDIGON_in4Ms;
3230 UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms; 3458 UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms;
3459 UCHAR ucPowerSequenceDEtoDIGON_in4Ms;
3231 3460
3232 UCHAR ucOffDelay_in4Ms; 3461 UCHAR ucOffDelay_in4Ms;
3233 UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms; 3462 UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms;
3234 UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms; 3463 UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms;
3235 UCHAR ucReserved1; 3464 UCHAR ucReserved1;
3236 3465
3237 ULONG ulReserved[4]; 3466 UCHAR ucDPCD_eDP_CONFIGURATION_CAP; // dpcd 0dh
3467 UCHAR ucDPCD_MAX_LINK_RATE; // dpcd 01h
3468 UCHAR ucDPCD_MAX_LANE_COUNT; // dpcd 02h
3469 UCHAR ucDPCD_MAX_DOWNSPREAD; // dpcd 03h
3470
3471 USHORT usMaxPclkFreqInSingleLink; // Max PixelClock frequency in single link mode.
3472 UCHAR uceDPToLVDSRxId;
3473 UCHAR ucLcdReservd;
3474 ULONG ulReserved[2];
3238}ATOM_LCD_INFO_V13; 3475}ATOM_LCD_INFO_V13;
3239 3476
3240#define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13 3477#define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13
@@ -3273,6 +3510,11 @@ typedef struct _ATOM_LCD_INFO_V13
3273//Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. 3510//Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP.
3274#define LCDPANEL_CAP_V13_eDP 0x4 // = LCDPANEL_CAP_eDP no change comparing to previous version 3511#define LCDPANEL_CAP_V13_eDP 0x4 // = LCDPANEL_CAP_eDP no change comparing to previous version
3275 3512
3513//uceDPToLVDSRxId
3514#define eDP_TO_LVDS_RX_DISABLE 0x00 // no eDP->LVDS translator chip
3515#define eDP_TO_LVDS_COMMON_ID 0x01 // common eDP->LVDS translator chip without AMD SW init
3516#define eDP_TO_LVDS_RT_ID 0x02 // RT tanslator which require AMD SW init
3517
3276typedef struct _ATOM_PATCH_RECORD_MODE 3518typedef struct _ATOM_PATCH_RECORD_MODE
3277{ 3519{
3278 UCHAR ucRecordType; 3520 UCHAR ucRecordType;
@@ -3317,6 +3559,7 @@ typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD
3317#define LCD_CAP_RECORD_TYPE 3 3559#define LCD_CAP_RECORD_TYPE 3
3318#define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4 3560#define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4
3319#define LCD_PANEL_RESOLUTION_RECORD_TYPE 5 3561#define LCD_PANEL_RESOLUTION_RECORD_TYPE 5
3562#define LCD_EDID_OFFSET_PATCH_RECORD_TYPE 6
3320#define ATOM_RECORD_END_TYPE 0xFF 3563#define ATOM_RECORD_END_TYPE 0xFF
3321 3564
3322/****************************Spread Spectrum Info Table Definitions **********************/ 3565/****************************Spread Spectrum Info Table Definitions **********************/
@@ -3528,6 +3771,7 @@ else //Non VGA case
3528 3771
3529CAIL needs to claim an reserved area defined by FBAccessAreaOffset and usFBUsedbyDrvInKB in non VGA case.*/ 3772CAIL needs to claim an reserved area defined by FBAccessAreaOffset and usFBUsedbyDrvInKB in non VGA case.*/
3530 3773
3774/***********************************************************************************/
3531#define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1 3775#define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1
3532 3776
3533typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO 3777typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO
@@ -3818,13 +4062,17 @@ typedef struct _EXT_DISPLAY_PATH
3818 ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping; 4062 ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping;
3819 ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping; 4063 ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping;
3820 }; 4064 };
3821 UCHAR ucReserved; 4065 UCHAR ucChPNInvert; // bit vector for up to 8 lanes, =0: P and N is not invert, =1 P and N is inverted
3822 USHORT usReserved[2]; 4066 USHORT usCaps;
4067 USHORT usReserved;
3823}EXT_DISPLAY_PATH; 4068}EXT_DISPLAY_PATH;
3824 4069
3825#define NUMBER_OF_UCHAR_FOR_GUID 16 4070#define NUMBER_OF_UCHAR_FOR_GUID 16
3826#define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7 4071#define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7
3827 4072
4073//usCaps
4074#define EXT_DISPLAY_PATH_CAPS__HBR2_DISABLE 0x01
4075
3828typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO 4076typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO
3829{ 4077{
3830 ATOM_COMMON_TABLE_HEADER sHeader; 4078 ATOM_COMMON_TABLE_HEADER sHeader;
@@ -3832,7 +4080,9 @@ typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO
3832 EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries. 4080 EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries.
3833 UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0. 4081 UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0.
3834 UCHAR uc3DStereoPinId; // use for eDP panel 4082 UCHAR uc3DStereoPinId; // use for eDP panel
3835 UCHAR Reserved [6]; // for potential expansion 4083 UCHAR ucRemoteDisplayConfig;
4084 UCHAR uceDPToLVDSRxId;
4085 UCHAR Reserved[4]; // for potential expansion
3836}ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; 4086}ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO;
3837 4087
3838//Related definitions, all records are different but they have a commond header 4088//Related definitions, all records are different but they have a commond header
@@ -3977,6 +4227,7 @@ typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD
3977#define GPIO_PIN_STATE_ACTIVE_HIGH 0x1 4227#define GPIO_PIN_STATE_ACTIVE_HIGH 0x1
3978 4228
3979// Indexes to GPIO array in GLSync record 4229// Indexes to GPIO array in GLSync record
4230// GLSync record is for Frame Lock/Gen Lock feature.
3980#define ATOM_GPIO_INDEX_GLSYNC_REFCLK 0 4231#define ATOM_GPIO_INDEX_GLSYNC_REFCLK 0
3981#define ATOM_GPIO_INDEX_GLSYNC_HSYNC 1 4232#define ATOM_GPIO_INDEX_GLSYNC_HSYNC 1
3982#define ATOM_GPIO_INDEX_GLSYNC_VSYNC 2 4233#define ATOM_GPIO_INDEX_GLSYNC_VSYNC 2
@@ -3984,7 +4235,9 @@ typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD
3984#define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT 4 4235#define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT 4
3985#define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5 4236#define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5
3986#define ATOM_GPIO_INDEX_GLSYNC_V_RESET 6 4237#define ATOM_GPIO_INDEX_GLSYNC_V_RESET 6
3987#define ATOM_GPIO_INDEX_GLSYNC_MAX 7 4238#define ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL 7
4239#define ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL 8
4240#define ATOM_GPIO_INDEX_GLSYNC_MAX 9
3988 4241
3989typedef struct _ATOM_ENCODER_DVO_CF_RECORD 4242typedef struct _ATOM_ENCODER_DVO_CF_RECORD
3990{ 4243{
@@ -3994,7 +4247,8 @@ typedef struct _ATOM_ENCODER_DVO_CF_RECORD
3994}ATOM_ENCODER_DVO_CF_RECORD; 4247}ATOM_ENCODER_DVO_CF_RECORD;
3995 4248
3996// Bit maps for ATOM_ENCODER_CAP_RECORD.ucEncoderCap 4249// Bit maps for ATOM_ENCODER_CAP_RECORD.ucEncoderCap
3997#define ATOM_ENCODER_CAP_RECORD_HBR2 0x01 // DP1.2 HBR2 is supported by this path 4250#define ATOM_ENCODER_CAP_RECORD_HBR2 0x01 // DP1.2 HBR2 is supported by HW encoder
4251#define ATOM_ENCODER_CAP_RECORD_HBR2_EN 0x02 // DP1.2 HBR2 setting is qualified and HBR2 can be enabled
3998 4252
3999typedef struct _ATOM_ENCODER_CAP_RECORD 4253typedef struct _ATOM_ENCODER_CAP_RECORD
4000{ 4254{
@@ -4003,11 +4257,13 @@ typedef struct _ATOM_ENCODER_CAP_RECORD
4003 USHORT usEncoderCap; 4257 USHORT usEncoderCap;
4004 struct { 4258 struct {
4005#if ATOM_BIG_ENDIAN 4259#if ATOM_BIG_ENDIAN
4006 USHORT usReserved:15; // Bit1-15 may be defined for other capability in future 4260 USHORT usReserved:14; // Bit1-15 may be defined for other capability in future
4261 USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable
4007 USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. 4262 USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability.
4008#else 4263#else
4009 USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. 4264 USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability.
4010 USHORT usReserved:15; // Bit1-15 may be defined for other capability in future 4265 USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable
4266 USHORT usReserved:14; // Bit1-15 may be defined for other capability in future
4011#endif 4267#endif
4012 }; 4268 };
4013 }; 4269 };
@@ -4157,6 +4413,7 @@ typedef struct _ATOM_VOLTAGE_CONTROL
4157#define VOLTAGE_CONTROL_ID_VT1556M 0x07 4413#define VOLTAGE_CONTROL_ID_VT1556M 0x07
4158#define VOLTAGE_CONTROL_ID_CHL822x 0x08 4414#define VOLTAGE_CONTROL_ID_CHL822x 0x08
4159#define VOLTAGE_CONTROL_ID_VT1586M 0x09 4415#define VOLTAGE_CONTROL_ID_VT1586M 0x09
4416#define VOLTAGE_CONTROL_ID_UP1637 0x0A
4160 4417
4161typedef struct _ATOM_VOLTAGE_OBJECT 4418typedef struct _ATOM_VOLTAGE_OBJECT
4162{ 4419{
@@ -4193,6 +4450,69 @@ typedef struct _ATOM_LEAKID_VOLTAGE
4193 USHORT usVoltage; 4450 USHORT usVoltage;
4194}ATOM_LEAKID_VOLTAGE; 4451}ATOM_LEAKID_VOLTAGE;
4195 4452
4453typedef struct _ATOM_VOLTAGE_OBJECT_HEADER_V3{
4454 UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI
4455 UCHAR ucVoltageMode; //Indicate voltage control mode: Init/Set/Leakage/Set phase
4456 USHORT usSize; //Size of Object
4457}ATOM_VOLTAGE_OBJECT_HEADER_V3;
4458
4459typedef struct _VOLTAGE_LUT_ENTRY_V2
4460{
4461 ULONG ulVoltageId; // The Voltage ID which is used to program GPIO register
4462 USHORT usVoltageValue; // The corresponding Voltage Value, in mV
4463}VOLTAGE_LUT_ENTRY_V2;
4464
4465typedef struct _LEAKAGE_VOLTAGE_LUT_ENTRY_V2
4466{
4467 USHORT usVoltageLevel; // The Voltage ID which is used to program GPIO register
4468 USHORT usVoltageId;
4469 USHORT usLeakageId; // The corresponding Voltage Value, in mV
4470}LEAKAGE_VOLTAGE_LUT_ENTRY_V2;
4471
4472typedef struct _ATOM_I2C_VOLTAGE_OBJECT_V3
4473{
4474 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4475 UCHAR ucVoltageRegulatorId; //Indicate Voltage Regulator Id
4476 UCHAR ucVoltageControlI2cLine;
4477 UCHAR ucVoltageControlAddress;
4478 UCHAR ucVoltageControlOffset;
4479 ULONG ulReserved;
4480 VOLTAGE_LUT_ENTRY asVolI2cLut[1]; // end with 0xff
4481}ATOM_I2C_VOLTAGE_OBJECT_V3;
4482
4483typedef struct _ATOM_GPIO_VOLTAGE_OBJECT_V3
4484{
4485 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4486 UCHAR ucVoltageGpioCntlId; // default is 0 which indicate control through CG VID mode
4487 UCHAR ucGpioEntryNum; // indiate the entry numbers of Votlage/Gpio value Look up table
4488 UCHAR ucPhaseDelay; // phase delay in unit of micro second
4489 UCHAR ucReserved;
4490 ULONG ulGpioMaskVal; // GPIO Mask value
4491 VOLTAGE_LUT_ENTRY_V2 asVolGpioLut[1];
4492}ATOM_GPIO_VOLTAGE_OBJECT_V3;
4493
4494typedef struct _ATOM_LEAKAGE_VOLTAGE_OBJECT_V3
4495{
4496 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4497 UCHAR ucLeakageCntlId; // default is 0
4498 UCHAR ucLeakageEntryNum; // indicate the entry number of LeakageId/Voltage Lut table
4499 UCHAR ucReserved[2];
4500 ULONG ulMaxVoltageLevel;
4501 LEAKAGE_VOLTAGE_LUT_ENTRY_V2 asLeakageIdLut[1];
4502}ATOM_LEAKAGE_VOLTAGE_OBJECT_V3;
4503
4504typedef union _ATOM_VOLTAGE_OBJECT_V3{
4505 ATOM_GPIO_VOLTAGE_OBJECT_V3 asGpioVoltageObj;
4506 ATOM_I2C_VOLTAGE_OBJECT_V3 asI2cVoltageObj;
4507 ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 asLeakageObj;
4508}ATOM_VOLTAGE_OBJECT_V3;
4509
4510typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V3_1
4511{
4512 ATOM_COMMON_TABLE_HEADER sHeader;
4513 ATOM_VOLTAGE_OBJECT_V3 asVoltageObj[3]; //Info for Voltage control
4514}ATOM_VOLTAGE_OBJECT_INFO_V3_1;
4515
4196typedef struct _ATOM_ASIC_PROFILE_VOLTAGE 4516typedef struct _ATOM_ASIC_PROFILE_VOLTAGE
4197{ 4517{
4198 UCHAR ucProfileId; 4518 UCHAR ucProfileId;
@@ -4305,7 +4625,18 @@ typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6
4305 USHORT usHDMISSpreadRateIn10Hz; 4625 USHORT usHDMISSpreadRateIn10Hz;
4306 USHORT usDVISSPercentage; 4626 USHORT usDVISSPercentage;
4307 USHORT usDVISSpreadRateIn10Hz; 4627 USHORT usDVISSpreadRateIn10Hz;
4308 ULONG ulReserved3[21]; 4628 ULONG SclkDpmBoostMargin;
4629 ULONG SclkDpmThrottleMargin;
4630 USHORT SclkDpmTdpLimitPG;
4631 USHORT SclkDpmTdpLimitBoost;
4632 ULONG ulBoostEngineCLock;
4633 UCHAR ulBoostVid_2bit;
4634 UCHAR EnableBoost;
4635 USHORT GnbTdpLimit;
4636 USHORT usMaxLVDSPclkFreqInSingleLink;
4637 UCHAR ucLvdsMisc;
4638 UCHAR ucLVDSReserved;
4639 ULONG ulReserved3[15];
4309 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; 4640 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;
4310}ATOM_INTEGRATED_SYSTEM_INFO_V6; 4641}ATOM_INTEGRATED_SYSTEM_INFO_V6;
4311 4642
@@ -4313,9 +4644,16 @@ typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6
4313#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 4644#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01
4314#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08 4645#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08
4315 4646
4316// ulOtherDisplayMisc 4647//ucLVDSMisc:
4317#define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01 4648#define SYS_INFO_LVDSMISC__888_FPDI_MODE 0x01
4649#define SYS_INFO_LVDSMISC__DL_CH_SWAP 0x02
4650#define SYS_INFO_LVDSMISC__888_BPC 0x04
4651#define SYS_INFO_LVDSMISC__OVERRIDE_EN 0x08
4652#define SYS_INFO_LVDSMISC__BLON_ACTIVE_LOW 0x10
4318 4653
4654// not used any more
4655#define SYS_INFO_LVDSMISC__VSYNC_ACTIVE_LOW 0x04
4656#define SYS_INFO_LVDSMISC__HSYNC_ACTIVE_LOW 0x08
4319 4657
4320/********************************************************************************************************************** 4658/**********************************************************************************************************************
4321 ATOM_INTEGRATED_SYSTEM_INFO_V6 Description 4659 ATOM_INTEGRATED_SYSTEM_INFO_V6 Description
@@ -4384,7 +4722,208 @@ ucUMAChannelNumber: System memory channel numbers.
4384ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default 4722ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default
4385ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. 4723ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback.
4386ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. 4724ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications.
4387sAvail_SCLK[5]: Arrays to provide available list of SLCK and corresponding voltage, order from low to high 4725sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high
4726ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns.
4727ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz.
4728ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz.
4729ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns.
4730ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns.
4731usPCIEClkSSPercentage: PCIE Clock Spred Spectrum Percentage in unit 0.01%; 100 mean 1%.
4732usPCIEClkSSType: PCIE Clock Spred Spectrum Type. 0 for Down spread(default); 1 for Center spread.
4733usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting.
4734usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting.
4735usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting.
4736usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting.
4737usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting.
4738usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting.
4739usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz
4740ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode
4741 [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped
4742 [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color
4743 [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used
4744 [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low )
4745**********************************************************************************************************************/
4746
4747// this Table is used for Liano/Ontario APU
4748typedef struct _ATOM_FUSION_SYSTEM_INFO_V1
4749{
4750 ATOM_INTEGRATED_SYSTEM_INFO_V6 sIntegratedSysInfo;
4751 ULONG ulPowerplayTable[128];
4752}ATOM_FUSION_SYSTEM_INFO_V1;
4753/**********************************************************************************************************************
4754 ATOM_FUSION_SYSTEM_INFO_V1 Description
4755sIntegratedSysInfo: refer to ATOM_INTEGRATED_SYSTEM_INFO_V6 definition.
4756ulPowerplayTable[128]: This 512 bytes memory is used to save ATOM_PPLIB_POWERPLAYTABLE3, starting form ulPowerplayTable[0]
4757**********************************************************************************************************************/
4758
4759// this IntegrateSystemInfoTable is used for Trinity APU
4760typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_7
4761{
4762 ATOM_COMMON_TABLE_HEADER sHeader;
4763 ULONG ulBootUpEngineClock;
4764 ULONG ulDentistVCOFreq;
4765 ULONG ulBootUpUMAClock;
4766 ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4];
4767 ULONG ulBootUpReqDisplayVector;
4768 ULONG ulOtherDisplayMisc;
4769 ULONG ulGPUCapInfo;
4770 ULONG ulSB_MMIO_Base_Addr;
4771 USHORT usRequestedPWMFreqInHz;
4772 UCHAR ucHtcTmpLmt;
4773 UCHAR ucHtcHystLmt;
4774 ULONG ulMinEngineClock;
4775 ULONG ulSystemConfig;
4776 ULONG ulCPUCapInfo;
4777 USHORT usNBP0Voltage;
4778 USHORT usNBP1Voltage;
4779 USHORT usBootUpNBVoltage;
4780 USHORT usExtDispConnInfoOffset;
4781 USHORT usPanelRefreshRateRange;
4782 UCHAR ucMemoryType;
4783 UCHAR ucUMAChannelNumber;
4784 UCHAR strVBIOSMsg[40];
4785 ULONG ulReserved[20];
4786 ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5];
4787 ULONG ulGMCRestoreResetTime;
4788 ULONG ulMinimumNClk;
4789 ULONG ulIdleNClk;
4790 ULONG ulDDR_DLL_PowerUpTime;
4791 ULONG ulDDR_PLL_PowerUpTime;
4792 USHORT usPCIEClkSSPercentage;
4793 USHORT usPCIEClkSSType;
4794 USHORT usLvdsSSPercentage;
4795 USHORT usLvdsSSpreadRateIn10Hz;
4796 USHORT usHDMISSPercentage;
4797 USHORT usHDMISSpreadRateIn10Hz;
4798 USHORT usDVISSPercentage;
4799 USHORT usDVISSpreadRateIn10Hz;
4800 ULONG SclkDpmBoostMargin;
4801 ULONG SclkDpmThrottleMargin;
4802 USHORT SclkDpmTdpLimitPG;
4803 USHORT SclkDpmTdpLimitBoost;
4804 ULONG ulBoostEngineCLock;
4805 UCHAR ulBoostVid_2bit;
4806 UCHAR EnableBoost;
4807 USHORT GnbTdpLimit;
4808 USHORT usMaxLVDSPclkFreqInSingleLink;
4809 UCHAR ucLvdsMisc;
4810 UCHAR ucLVDSReserved;
4811 UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms;
4812 UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms;
4813 UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms;
4814 UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms;
4815 UCHAR ucLVDSOffToOnDelay_in4Ms;
4816 UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms;
4817 UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms;
4818 UCHAR ucLVDSReserved1;
4819 ULONG ulLCDBitDepthControlVal;
4820 ULONG ulNbpStateMemclkFreq[4];
4821 USHORT usNBP2Voltage;
4822 USHORT usNBP3Voltage;
4823 ULONG ulNbpStateNClkFreq[4];
4824 UCHAR ucNBDPMEnable;
4825 UCHAR ucReserved[3];
4826 UCHAR ucDPMState0VclkFid;
4827 UCHAR ucDPMState0DclkFid;
4828 UCHAR ucDPMState1VclkFid;
4829 UCHAR ucDPMState1DclkFid;
4830 UCHAR ucDPMState2VclkFid;
4831 UCHAR ucDPMState2DclkFid;
4832 UCHAR ucDPMState3VclkFid;
4833 UCHAR ucDPMState3DclkFid;
4834 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;
4835}ATOM_INTEGRATED_SYSTEM_INFO_V1_7;
4836
4837// ulOtherDisplayMisc
4838#define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01
4839#define INTEGRATED_SYSTEM_INFO__GET_BOOTUP_DISPLAY_CALLBACK_FUNC_SUPPORT 0x02
4840#define INTEGRATED_SYSTEM_INFO__GET_EXPANSION_CALLBACK_FUNC_SUPPORT 0x04
4841#define INTEGRATED_SYSTEM_INFO__FAST_BOOT_SUPPORT 0x08
4842
4843// ulGPUCapInfo
4844#define SYS_INFO_GPUCAPS__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01
4845#define SYS_INFO_GPUCAPS__DP_SINGLEPLL_MODE 0x02
4846#define SYS_INFO_GPUCAPS__DISABLE_AUX_MODE_DETECT 0x08
4847
4848/**********************************************************************************************************************
4849 ATOM_INTEGRATED_SYSTEM_INFO_V1_7 Description
4850ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock
4851ulDentistVCOFreq: Dentist VCO clock in 10kHz unit.
4852ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit.
4853sDISPCLK_Voltage: Report Display clock voltage requirement.
4854
4855ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Trinity projects:
4856 ATOM_DEVICE_CRT1_SUPPORT 0x0001
4857 ATOM_DEVICE_DFP1_SUPPORT 0x0008
4858 ATOM_DEVICE_DFP6_SUPPORT 0x0040
4859 ATOM_DEVICE_DFP2_SUPPORT 0x0080
4860 ATOM_DEVICE_DFP3_SUPPORT 0x0200
4861 ATOM_DEVICE_DFP4_SUPPORT 0x0400
4862 ATOM_DEVICE_DFP5_SUPPORT 0x0800
4863 ATOM_DEVICE_LCD1_SUPPORT 0x0002
4864ulOtherDisplayMisc: bit[0]=0: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is not supported by SBIOS.
4865 =1: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is supported by SBIOS.
4866 bit[1]=0: INT15 callback function Get boot display( ax=4e08, bl=01h) is not supported by SBIOS
4867 =1: INT15 callback function Get boot display( ax=4e08, bl=01h) is supported by SBIOS
4868 bit[2]=0: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is not supported by SBIOS
4869 =1: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is supported by SBIOS
4870 bit[3]=0: VBIOS fast boot is disable
4871 =1: VBIOS fast boot is enable. ( VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open)
4872ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode.
4873 =1: TMDS/HDMI Coherent Mode use signel PLL mode.
4874 bit[1]=0: DP mode use cascade PLL mode ( New for Trinity )
4875 =1: DP mode use single PLL mode
4876 bit[3]=0: Enable AUX HW mode detection logic
4877 =1: Disable AUX HW mode detection logic
4878
4879ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage.
4880
4881usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW).
4882 Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0;
4883
4884 When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below:
4885 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use;
4886 VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result,
4887 Changing BL using VBIOS function is functional in both driver and non-driver present environment;
4888 and enabling VariBri under the driver environment from PP table is optional.
4889
4890 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating
4891 that BL control from GPU is expected.
4892 VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1
4893 Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but
4894 it's per platform
4895 and enabling VariBri under the driver environment from PP table is optional.
4896
4897ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt.
4898 Threshold on value to enter HTC_active state.
4899ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt.
4900 To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt.
4901ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings.
4902ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled
4903 =1: PCIE Power Gating Enabled
4904 Bit[1]=0: DDR-DLL shut-down feature disabled.
4905 1: DDR-DLL shut-down feature enabled.
4906 Bit[2]=0: DDR-PLL Power down feature disabled.
4907 1: DDR-PLL Power down feature enabled.
4908ulCPUCapInfo: TBD
4909usNBP0Voltage: VID for voltage on NB P0 State
4910usNBP1Voltage: VID for voltage on NB P1 State
4911usNBP2Voltage: VID for voltage on NB P2 State
4912usNBP3Voltage: VID for voltage on NB P3 State
4913usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement.
4914usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure
4915usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set
4916 to indicate a range.
4917 SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004
4918 SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008
4919 SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010
4920 SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020
4921ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved.
4922ucUMAChannelNumber: System memory channel numbers.
4923ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default
4924ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback.
4925ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications.
4926sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high
4388ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. 4927ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns.
4389ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. 4928ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz.
4390ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. 4929ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz.
@@ -4398,6 +4937,41 @@ usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%;
4398usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 4937usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting.
4399usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. 4938usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting.
4400usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. 4939usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting.
4940usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz
4941ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode
4942 [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped
4943 [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color
4944 [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used
4945 [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low )
4946ucLVDSPwrOnSeqDIGONtoDE_in4Ms: LVDS power up sequence time in unit of 4ms, time delay from DIGON signal active to data enable signal active( DE ).
4947 =0 mean use VBIOS default which is 8 ( 32ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON.
4948 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4949ucLVDSPwrOnDEtoVARY_BL_in4Ms: LVDS power up sequence time in unit of 4ms., time delay from DE( data enable ) active to Vary Brightness enable signal active( VARY_BL ).
4950 =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON.
4951 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4952
4953ucLVDSPwrOffVARY_BLtoDE_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from data enable ( DE ) signal off to LCDVCC (DIGON) off.
4954 =0 mean use VBIOS default delay which is 8 ( 32ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON
4955 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4956
4957ucLVDSPwrOffDEtoDIGON_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from vary brightness enable signal( VARY_BL) off to data enable ( DE ) signal off.
4958 =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON
4959 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4960
4961ucLVDSOffToOnDelay_in4Ms: LVDS power down sequence time in unit of 4ms. Time delay from DIGON signal off to DIGON signal active.
4962 =0 means to use VBIOS default delay which is 125 ( 500ms ).
4963 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4964
4965ucLVDSPwrOnVARY_BLtoBLON_in4Ms: LVDS power up sequence time in unit of 4ms. Time delay from VARY_BL signal on to DLON signal active.
4966 =0 means to use VBIOS default delay which is 0 ( 0ms ).
4967 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4968
4969ucLVDSPwrOffBLONtoVARY_BL_in4Ms: LVDS power down sequence time in unit of 4ms. Time delay from BLON signal off to VARY_BL signal off.
4970 =0 means to use VBIOS default delay which is 0 ( 0ms ).
4971 This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable.
4972
4973ulNbpStateMemclkFreq[4]: system memory clock frequncey in unit of 10Khz in different NB pstate.
4974
4401**********************************************************************************************************************/ 4975**********************************************************************************************************************/
4402 4976
4403/**************************************************************************/ 4977/**************************************************************************/
@@ -4459,6 +5033,7 @@ typedef struct _ATOM_ASIC_SS_ASSIGNMENT
4459#define ASIC_INTERNAL_SS_ON_DP 7 5033#define ASIC_INTERNAL_SS_ON_DP 7
4460#define ASIC_INTERNAL_SS_ON_DCPLL 8 5034#define ASIC_INTERNAL_SS_ON_DCPLL 8
4461#define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9 5035#define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9
5036#define ASIC_INTERNAL_VCE_SS 10
4462 5037
4463typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2 5038typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2
4464{ 5039{
@@ -4520,7 +5095,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
4520#define ATOM_DOS_MODE_INFO_DEF 7 5095#define ATOM_DOS_MODE_INFO_DEF 7
4521#define ATOM_I2C_CHANNEL_STATUS_DEF 8 5096#define ATOM_I2C_CHANNEL_STATUS_DEF 8
4522#define ATOM_I2C_CHANNEL_STATUS1_DEF 9 5097#define ATOM_I2C_CHANNEL_STATUS1_DEF 9
4523 5098#define ATOM_INTERNAL_TIMER_DEF 10
4524 5099
4525// BIOS_0_SCRATCH Definition 5100// BIOS_0_SCRATCH Definition
4526#define ATOM_S0_CRT1_MONO 0x00000001L 5101#define ATOM_S0_CRT1_MONO 0x00000001L
@@ -4648,6 +5223,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
4648#define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF 5223#define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF
4649#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C 5224#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C
4650#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10 5225#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10
5226#define ATOM_S2_TMDS_COHERENT_MODEb3 0x10 // used by VBIOS code only, use coherent mode for TMDS/HDMI mode
4651#define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20 5227#define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20
4652#define ATOM_S2_ROTATION_STATE_MASKb3 0xC0 5228#define ATOM_S2_ROTATION_STATE_MASKb3 0xC0
4653 5229
@@ -5038,6 +5614,23 @@ typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3
5038 USHORT usDeviceId; // Active Device Id for this surface. If no device, set to 0. 5614 USHORT usDeviceId; // Active Device Id for this surface. If no device, set to 0.
5039}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3; 5615}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3;
5040 5616
5617typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4
5618{
5619 USHORT usHight; // Image Hight
5620 USHORT usWidth; // Image Width
5621 USHORT usGraphPitch;
5622 UCHAR ucColorDepth;
5623 UCHAR ucPixelFormat;
5624 UCHAR ucSurface; // Surface 1 or 2
5625 UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE
5626 UCHAR ucModeType;
5627 UCHAR ucReserved;
5628}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4;
5629
5630// ucEnable
5631#define ATOM_GRAPH_CONTROL_SET_PITCH 0x0f
5632#define ATOM_GRAPH_CONTROL_SET_DISP_START 0x10
5633
5041typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION 5634typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION
5042{ 5635{
5043 ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface; 5636 ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface;
@@ -5057,6 +5650,58 @@ typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS
5057 USHORT usY_Size; 5650 USHORT usY_Size;
5058}GET_DISPLAY_SURFACE_SIZE_PARAMETERS; 5651}GET_DISPLAY_SURFACE_SIZE_PARAMETERS;
5059 5652
5653typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2
5654{
5655 union{
5656 USHORT usX_Size; //When use as input parameter, usX_Size indicates which CRTC
5657 USHORT usSurface;
5658 };
5659 USHORT usY_Size;
5660 USHORT usDispXStart;
5661 USHORT usDispYStart;
5662}GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2;
5663
5664
5665typedef struct _PALETTE_DATA_CONTROL_PARAMETERS_V3
5666{
5667 UCHAR ucLutId;
5668 UCHAR ucAction;
5669 USHORT usLutStartIndex;
5670 USHORT usLutLength;
5671 USHORT usLutOffsetInVram;
5672}PALETTE_DATA_CONTROL_PARAMETERS_V3;
5673
5674// ucAction:
5675#define PALETTE_DATA_AUTO_FILL 1
5676#define PALETTE_DATA_READ 2
5677#define PALETTE_DATA_WRITE 3
5678
5679
5680typedef struct _INTERRUPT_SERVICE_PARAMETERS_V2
5681{
5682 UCHAR ucInterruptId;
5683 UCHAR ucServiceId;
5684 UCHAR ucStatus;
5685 UCHAR ucReserved;
5686}INTERRUPT_SERVICE_PARAMETER_V2;
5687
5688// ucInterruptId
5689#define HDP1_INTERRUPT_ID 1
5690#define HDP2_INTERRUPT_ID 2
5691#define HDP3_INTERRUPT_ID 3
5692#define HDP4_INTERRUPT_ID 4
5693#define HDP5_INTERRUPT_ID 5
5694#define HDP6_INTERRUPT_ID 6
5695#define SW_INTERRUPT_ID 11
5696
5697// ucAction
5698#define INTERRUPT_SERVICE_GEN_SW_INT 1
5699#define INTERRUPT_SERVICE_GET_STATUS 2
5700
5701 // ucStatus
5702#define INTERRUPT_STATUS__INT_TRIGGER 1
5703#define INTERRUPT_STATUS__HPD_HIGH 2
5704
5060typedef struct _INDIRECT_IO_ACCESS 5705typedef struct _INDIRECT_IO_ACCESS
5061{ 5706{
5062 ATOM_COMMON_TABLE_HEADER sHeader; 5707 ATOM_COMMON_TABLE_HEADER sHeader;
@@ -5189,7 +5834,7 @@ typedef struct _ATOM_INIT_REG_BLOCK{
5189 5834
5190#define END_OF_REG_INDEX_BLOCK 0x0ffff 5835#define END_OF_REG_INDEX_BLOCK 0x0ffff
5191#define END_OF_REG_DATA_BLOCK 0x00000000 5836#define END_OF_REG_DATA_BLOCK 0x00000000
5192#define ATOM_INIT_REG_MASK_FLAG 0x80 5837#define ATOM_INIT_REG_MASK_FLAG 0x80 //Not used in BIOS
5193#define CLOCK_RANGE_HIGHEST 0x00ffffff 5838#define CLOCK_RANGE_HIGHEST 0x00ffffff
5194 5839
5195#define VALUE_DWORD SIZEOF ULONG 5840#define VALUE_DWORD SIZEOF ULONG
@@ -5229,6 +5874,7 @@ typedef struct _ATOM_MC_INIT_PARAM_TABLE
5229#define _128Mx8 0x51 5874#define _128Mx8 0x51
5230#define _128Mx16 0x52 5875#define _128Mx16 0x52
5231#define _256Mx8 0x61 5876#define _256Mx8 0x61
5877#define _256Mx16 0x62
5232 5878
5233#define SAMSUNG 0x1 5879#define SAMSUNG 0x1
5234#define INFINEON 0x2 5880#define INFINEON 0x2
@@ -5585,7 +6231,7 @@ typedef struct _ATOM_VRAM_MODULE_V7
5585 ULONG ulChannelMapCfg; // mmMC_SHARED_CHREMAP 6231 ULONG ulChannelMapCfg; // mmMC_SHARED_CHREMAP
5586 USHORT usModuleSize; // Size of ATOM_VRAM_MODULE_V7 6232 USHORT usModuleSize; // Size of ATOM_VRAM_MODULE_V7
5587 USHORT usPrivateReserved; // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) 6233 USHORT usPrivateReserved; // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS)
5588 USHORT usReserved; 6234 USHORT usEnableChannels; // bit vector which indicate which channels are enabled
5589 UCHAR ucExtMemoryID; // Current memory module ID 6235 UCHAR ucExtMemoryID; // Current memory module ID
5590 UCHAR ucMemoryType; // MEM_TYPE_DDR2/DDR3/GDDR3/GDDR5 6236 UCHAR ucMemoryType; // MEM_TYPE_DDR2/DDR3/GDDR3/GDDR5
5591 UCHAR ucChannelNum; // Number of mem. channels supported in this module 6237 UCHAR ucChannelNum; // Number of mem. channels supported in this module
@@ -5597,7 +6243,8 @@ typedef struct _ATOM_VRAM_MODULE_V7
5597 UCHAR ucNPL_RT; // Round trip delay (MC_SEQ_CAS_TIMING [28:24]:TCL=CL+NPL_RT-2). Always 2. 6243 UCHAR ucNPL_RT; // Round trip delay (MC_SEQ_CAS_TIMING [28:24]:TCL=CL+NPL_RT-2). Always 2.
5598 UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble 6244 UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble
5599 UCHAR ucMemorySize; // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros 6245 UCHAR ucMemorySize; // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros
5600 UCHAR ucReserved[3]; 6246 USHORT usSEQSettingOffset;
6247 UCHAR ucReserved;
5601// Memory Module specific values 6248// Memory Module specific values
5602 USHORT usEMRS2Value; // EMRS2/MR2 Value. 6249 USHORT usEMRS2Value; // EMRS2/MR2 Value.
5603 USHORT usEMRS3Value; // EMRS3/MR3 Value. 6250 USHORT usEMRS3Value; // EMRS3/MR3 Value.
@@ -5633,10 +6280,10 @@ typedef struct _ATOM_VRAM_INFO_V3
5633typedef struct _ATOM_VRAM_INFO_V4 6280typedef struct _ATOM_VRAM_INFO_V4
5634{ 6281{
5635 ATOM_COMMON_TABLE_HEADER sHeader; 6282 ATOM_COMMON_TABLE_HEADER sHeader;
5636 USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting 6283 USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting
5637 USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting 6284 USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting
5638 USHORT usRerseved; 6285 USHORT usRerseved;
5639 UCHAR ucMemDQ7_0ByteRemap; // DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3 6286 UCHAR ucMemDQ7_0ByteRemap; // DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3
5640 ULONG ulMemDQ7_0BitRemap; // each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21] 6287 ULONG ulMemDQ7_0BitRemap; // each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21]
5641 UCHAR ucReservde[4]; 6288 UCHAR ucReservde[4];
5642 UCHAR ucNumOfVRAMModule; 6289 UCHAR ucNumOfVRAMModule;
@@ -5648,9 +6295,10 @@ typedef struct _ATOM_VRAM_INFO_V4
5648typedef struct _ATOM_VRAM_INFO_HEADER_V2_1 6295typedef struct _ATOM_VRAM_INFO_HEADER_V2_1
5649{ 6296{
5650 ATOM_COMMON_TABLE_HEADER sHeader; 6297 ATOM_COMMON_TABLE_HEADER sHeader;
5651 USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting 6298 USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting
5652 USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting 6299 USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting
5653 USHORT usReserved[4]; 6300 USHORT usPerBytePresetOffset; // offset of ATOM_INIT_REG_BLOCK structure for Per Byte Offset Preset Settings
6301 USHORT usReserved[3];
5654 UCHAR ucNumOfVRAMModule; // indicate number of VRAM module 6302 UCHAR ucNumOfVRAMModule; // indicate number of VRAM module
5655 UCHAR ucMemoryClkPatchTblVer; // version of memory AC timing register list 6303 UCHAR ucMemoryClkPatchTblVer; // version of memory AC timing register list
5656 UCHAR ucVramModuleVer; // indicate ATOM_VRAM_MODUE version 6304 UCHAR ucVramModuleVer; // indicate ATOM_VRAM_MODUE version
@@ -5935,6 +6583,52 @@ typedef struct _ATOM_DISP_OUT_INFO_V2
5935 ASIC_ENCODER_INFO asEncoderInfo[1]; 6583 ASIC_ENCODER_INFO asEncoderInfo[1];
5936}ATOM_DISP_OUT_INFO_V2; 6584}ATOM_DISP_OUT_INFO_V2;
5937 6585
6586
6587typedef struct _ATOM_DISP_CLOCK_ID {
6588 UCHAR ucPpllId;
6589 UCHAR ucPpllAttribute;
6590}ATOM_DISP_CLOCK_ID;
6591
6592// ucPpllAttribute
6593#define CLOCK_SOURCE_SHAREABLE 0x01
6594#define CLOCK_SOURCE_DP_MODE 0x02
6595#define CLOCK_SOURCE_NONE_DP_MODE 0x04
6596
6597//DispOutInfoTable
6598typedef struct _ASIC_TRANSMITTER_INFO_V2
6599{
6600 USHORT usTransmitterObjId;
6601 USHORT usDispClkIdOffset; // point to clock source id list supported by Encoder Object
6602 UCHAR ucTransmitterCmdTblId;
6603 UCHAR ucConfig;
6604 UCHAR ucEncoderID; // available 1st encoder ( default )
6605 UCHAR ucOptionEncoderID; // available 2nd encoder ( optional )
6606 UCHAR uc2ndEncoderID;
6607 UCHAR ucReserved;
6608}ASIC_TRANSMITTER_INFO_V2;
6609
6610typedef struct _ATOM_DISP_OUT_INFO_V3
6611{
6612 ATOM_COMMON_TABLE_HEADER sHeader;
6613 USHORT ptrTransmitterInfo;
6614 USHORT ptrEncoderInfo;
6615 USHORT ptrMainCallParserFar; // direct address of main parser call in VBIOS binary.
6616 USHORT usReserved;
6617 UCHAR ucDCERevision;
6618 UCHAR ucMaxDispEngineNum;
6619 UCHAR ucMaxActiveDispEngineNum;
6620 UCHAR ucMaxPPLLNum;
6621 UCHAR ucCoreRefClkSource; // value of CORE_REF_CLK_SOURCE
6622 UCHAR ucReserved[3];
6623 ASIC_TRANSMITTER_INFO_V2 asTransmitterInfo[1]; // for alligment only
6624}ATOM_DISP_OUT_INFO_V3;
6625
6626typedef enum CORE_REF_CLK_SOURCE{
6627 CLOCK_SRC_XTALIN=0,
6628 CLOCK_SRC_XO_IN=1,
6629 CLOCK_SRC_XO_IN2=2,
6630}CORE_REF_CLK_SOURCE;
6631
5938// DispDevicePriorityInfo 6632// DispDevicePriorityInfo
5939typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO 6633typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO
5940{ 6634{
@@ -6070,6 +6764,39 @@ typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
6070#define HW_I2C_READ 0 6764#define HW_I2C_READ 0
6071#define I2C_2BYTE_ADDR 0x02 6765#define I2C_2BYTE_ADDR 0x02
6072 6766
6767/****************************************************************************/
6768// Structures used by HW_Misc_OperationTable
6769/****************************************************************************/
6770typedef struct _ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1
6771{
6772 UCHAR ucCmd; // Input: To tell which action to take
6773 UCHAR ucReserved[3];
6774 ULONG ulReserved;
6775}ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1;
6776
6777typedef struct _ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1
6778{
6779 UCHAR ucReturnCode; // Output: Return value base on action was taken
6780 UCHAR ucReserved[3];
6781 ULONG ulReserved;
6782}ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1;
6783
6784// Actions code
6785#define ATOM_GET_SDI_SUPPORT 0xF0
6786
6787// Return code
6788#define ATOM_UNKNOWN_CMD 0
6789#define ATOM_FEATURE_NOT_SUPPORTED 1
6790#define ATOM_FEATURE_SUPPORTED 2
6791
6792typedef struct _ATOM_HW_MISC_OPERATION_PS_ALLOCATION
6793{
6794 ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 sInput_Output;
6795 PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS sReserved;
6796}ATOM_HW_MISC_OPERATION_PS_ALLOCATION;
6797
6798/****************************************************************************/
6799
6073typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2 6800typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2
6074{ 6801{
6075 UCHAR ucHWBlkInst; // HW block instance, 0, 1, 2, ... 6802 UCHAR ucHWBlkInst; // HW block instance, 0, 1, 2, ...
@@ -6090,6 +6817,52 @@ typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2
6090#define SELECT_CRTC_PIXEL_RATE 7 6817#define SELECT_CRTC_PIXEL_RATE 7
6091#define SELECT_VGA_BLK 8 6818#define SELECT_VGA_BLK 8
6092 6819
6820// DIGTransmitterInfoTable structure used to program UNIPHY settings
6821typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_1{
6822 ATOM_COMMON_TABLE_HEADER sHeader;
6823 USHORT usDPVsPreEmphSettingOffset; // offset of PHY_ANALOG_SETTING_INFO * with DP Voltage Swing and Pre-Emphasis for each Link clock
6824 USHORT usPhyAnalogRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with None-DP mode Analog Setting's register Info
6825 USHORT usPhyAnalogSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with None-DP mode Analog Setting for each link clock range
6826 USHORT usPhyPllRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy Pll register Info
6827 USHORT usPhyPllSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy Pll Settings
6828}DIG_TRANSMITTER_INFO_HEADER_V3_1;
6829
6830typedef struct _CLOCK_CONDITION_REGESTER_INFO{
6831 USHORT usRegisterIndex;
6832 UCHAR ucStartBit;
6833 UCHAR ucEndBit;
6834}CLOCK_CONDITION_REGESTER_INFO;
6835
6836typedef struct _CLOCK_CONDITION_SETTING_ENTRY{
6837 USHORT usMaxClockFreq;
6838 UCHAR ucEncodeMode;
6839 UCHAR ucPhySel;
6840 ULONG ulAnalogSetting[1];
6841}CLOCK_CONDITION_SETTING_ENTRY;
6842
6843typedef struct _CLOCK_CONDITION_SETTING_INFO{
6844 USHORT usEntrySize;
6845 CLOCK_CONDITION_SETTING_ENTRY asClkCondSettingEntry[1];
6846}CLOCK_CONDITION_SETTING_INFO;
6847
6848typedef struct _PHY_CONDITION_REG_VAL{
6849 ULONG ulCondition;
6850 ULONG ulRegVal;
6851}PHY_CONDITION_REG_VAL;
6852
6853typedef struct _PHY_CONDITION_REG_INFO{
6854 USHORT usRegIndex;
6855 USHORT usSize;
6856 PHY_CONDITION_REG_VAL asRegVal[1];
6857}PHY_CONDITION_REG_INFO;
6858
6859typedef struct _PHY_ANALOG_SETTING_INFO{
6860 UCHAR ucEncodeMode;
6861 UCHAR ucPhySel;
6862 USHORT usSize;
6863 PHY_CONDITION_REG_INFO asAnalogSetting[1];
6864}PHY_ANALOG_SETTING_INFO;
6865
6093/****************************************************************************/ 6866/****************************************************************************/
6094//Portion VI: Definitinos for vbios MC scratch registers that driver used 6867//Portion VI: Definitinos for vbios MC scratch registers that driver used
6095/****************************************************************************/ 6868/****************************************************************************/
@@ -7020,4 +7793,68 @@ typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table
7020 7793
7021#pragma pack() // BIOS data must use byte aligment 7794#pragma pack() // BIOS data must use byte aligment
7022 7795
7796//
7797// AMD ACPI Table
7798//
7799#pragma pack(1)
7800
7801typedef struct {
7802 ULONG Signature;
7803 ULONG TableLength; //Length
7804 UCHAR Revision;
7805 UCHAR Checksum;
7806 UCHAR OemId[6];
7807 UCHAR OemTableId[8]; //UINT64 OemTableId;
7808 ULONG OemRevision;
7809 ULONG CreatorId;
7810 ULONG CreatorRevision;
7811} AMD_ACPI_DESCRIPTION_HEADER;
7812/*
7813//EFI_ACPI_DESCRIPTION_HEADER from AcpiCommon.h
7814typedef struct {
7815 UINT32 Signature; //0x0
7816 UINT32 Length; //0x4
7817 UINT8 Revision; //0x8
7818 UINT8 Checksum; //0x9
7819 UINT8 OemId[6]; //0xA
7820 UINT64 OemTableId; //0x10
7821 UINT32 OemRevision; //0x18
7822 UINT32 CreatorId; //0x1C
7823 UINT32 CreatorRevision; //0x20
7824}EFI_ACPI_DESCRIPTION_HEADER;
7825*/
7826typedef struct {
7827 AMD_ACPI_DESCRIPTION_HEADER SHeader;
7828 UCHAR TableUUID[16]; //0x24
7829 ULONG VBIOSImageOffset; //0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the stucture.
7830 ULONG Lib1ImageOffset; //0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the stucture.
7831 ULONG Reserved[4]; //0x3C
7832}UEFI_ACPI_VFCT;
7833
7834typedef struct {
7835 ULONG PCIBus; //0x4C
7836 ULONG PCIDevice; //0x50
7837 ULONG PCIFunction; //0x54
7838 USHORT VendorID; //0x58
7839 USHORT DeviceID; //0x5A
7840 USHORT SSVID; //0x5C
7841 USHORT SSID; //0x5E
7842 ULONG Revision; //0x60
7843 ULONG ImageLength; //0x64
7844}VFCT_IMAGE_HEADER;
7845
7846
7847typedef struct {
7848 VFCT_IMAGE_HEADER VbiosHeader;
7849 UCHAR VbiosContent[1];
7850}GOP_VBIOS_CONTENT;
7851
7852typedef struct {
7853 VFCT_IMAGE_HEADER Lib1Header;
7854 UCHAR Lib1Content[1];
7855}GOP_LIB1_CONTENT;
7856
7857#pragma pack()
7858
7859
7023#endif /* _ATOMBIOS_H */ 7860#endif /* _ATOMBIOS_H */