summaryrefslogtreecommitdiff
path: root/Board/IO/F81866/BSP/DxeIoTable.h
blob: fa7096d96a3d08a5954ca831c66f0feb79358d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************
//
//*************************************************************************
// $Header: /Alaska/BIN/IO/Fintek/F81866/F81866 Board/DxeIoTable.h 1     7/20/11 4:22a Kasalinyi $
//
// $Revision: 1 $
//
// $Date: 7/20/11 4:22a $
//*************************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/IO/Fintek/F81866/F81866 Board/DxeIoTable.h $
// 
// 1     7/20/11 4:22a Kasalinyi
// [Category]  	Improvement
// [Description]  	Initial Porting
// [Files]  		BSP.cif
// OemIoDecode.c
// PeiIoTable.h
// DxeIoTable.h
// F81866HwmOemHooks.c
// F81866SmartFan.c
// 
// 4     3/21/11 9:44p Mikes
// Seperate the core and oem job
//
//*************************************************************************
//<AMI_FHDR_START>
//
// Name:    DxeIoTable.C
//
// Description: 
//  SIO init table in DXE phase. Any customers have to review below tables 
//  for themselves platform and make sure each initialization is necessary.
//
// Notes:
//  In all tables, only fill with necessary setting. Don't fill with default
//
//<AMI_FHDR_END>
//*************************************************************************
#ifndef _DXEIoTable_H
#define _DXEIoTable_H
#ifdef __cplusplus
extern "C" {
#endif
//-------------------------------------------------------------------------
// Include Files
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
// Constants, Macros and Type Definitions
//-------------------------------------------------------------------------
typedef struct _DXE_DEVICE_INIT_DATA{
    UINT16      Reg16;
    UINT8       AndData8;   // 0xFF means register don't need AndMask
                            // only write OrData8 to regisrer.
    UINT8       OrData8;
} DXE_DEVICE_INIT_DATA;

//-------------------------------------------------------------------------
//Variable, Prototype, and External Declarations
//-------------------------------------------------------------------------

//<AMI_THDR_START>
//-------------------------------------------------------------------------
//
// Name:        DXE_XXX_Init_Table
//
// Description: 
//  Table filled with SIO GPIO,PME,HWM, etc. logical devices' setting
//  For example:
//  1. GPIO will define the GPIO pin useage
//  2. PME will power management control
//  3. HWM will set temperature, fan, voltage and start control.
//
// Notes:
//
//-------------------------------------------------------------------------
//<AMI_THDR_END>

DXE_DEVICE_INIT_DATA   DXE_COM_Mode_Init_Table[] = {
    // -----------------------------
    //| Reg16 | AndData8  | OrData8  | 
    // -----------------------------
    // OEM_TODO: Base on OEM board.
    // Program COM RS485/RS232 Mode Registers.
	{0xF0, 0xCF, (F81866_COM1_RS485_Mode << 4)| (F81866_COM1_RS485_RTS_INV << 5)},	//make no effect when com1 disabled
	{0xF0, 0xCF, (F81866_COM2_RS485_Mode << 4)| (F81866_COM2_RS485_RTS_INV << 5)},	//make no effect when com2 disabled
	{0xF0, 0xCF, (F81866_COM3_RS485_Mode << 4)| (F81866_COM3_RS485_RTS_INV << 5)},	//make no effect when com3 disabled
	{0xF0, 0xCF, (F81866_COM4_RS485_Mode << 4)| (F81866_COM4_RS485_RTS_INV << 5)},	//make no effect when com4 disabled
	{0xF0, 0xCF, (F81866_COM5_RS485_Mode << 4)| (F81866_COM5_RS485_RTS_INV << 5)},	//make no effect when com5 disabled
	{0xF0, 0xCF, (F81866_COM6_RS485_Mode << 4)| (F81866_COM6_RS485_RTS_INV << 5)},	//make no effect when com6 disabled
};

//-------------------------------------------------------------------------
// HWM registers init table.
//-------------------------------------------------------------------------
#if F81866_HWM_PRESENT
DXE_DEVICE_INIT_DATA   DXE_HWM_Init_Table_After_Active[] = {

    // -----------------------------
    //| Reg16 | AndData8  | OrData8  | 
    // -----------------------------
	// Configuration Setting
    {0x01, 0xF8, 0x03},  // Configuration Register ? Index 01h

	// PECI/TSI/SMBus Setting
#if (F81866_PECI_SUPPORT)
	{0x0A, 0xDE, (F81866_INTEL_SEL << 5) | F81866_PECI_EN },
//	{0x09, 0x01, F81866_I2C_ADDR & 0xFE },
    {0x0C, 0x00, 0x64 },
#endif
#if (F81866_IBEX_SUPPORT)
	{0x0A, 0xDD, (F81866_INTEL_SEL << 5) | (F81866_IBEX_EN << 1)},
	{0x08, 0x01, F81866_SMBUS_ADDR & 0xFE},
	{0xEE, 0xFF, 0x41},
	{0xED, 0xFF, 0x40},
#endif

	//PECI 3.0 & Temperture Setting
	{0x6B, 0xF9, (F81866_T2_MODE << 2) | (F81866_T1_MODE << 1) },

	//Fan type Setting	
#if F81866_SMF_PRESENT
	{0x94, 0xC0, (FAN3_TYPE<<4)|(FAN2_TYPE<<2)|FAN1_TYPE },
#endif
}; //DXE_HWM_Init_Table


// Define a table for BootScriptTable of SIO space
UINT8   DXE_HWM_SIO_BootScript_Table[] = {
    0x01,0x08,0x09,0x0A,0x0D,0x6B,0x94,0xEE,0xED
};
#endif 

/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif //_DXEIoTable_H
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************