coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
platform_cfg.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 
4 #ifndef _PLATFORM_CFG_H_
5 #define _PLATFORM_CFG_H_
6 
7 /**
8  * @def BIOS_SIZE
9  * BIOS_SIZE_{1,2,4,8,16}M
10  *
11  * In SB800, default ROM size is 1M Bytes, if your platform ROM
12  * bigger than 1M you have to set the ROM size outside CIMx module and
13  * before AGESA module get call.
14  */
15 #ifndef BIOS_SIZE
16 #define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
17 #endif /* BIOS_SIZE */
18 
19 /**
20  * @def SPREAD_SPECTRUM
21  * @brief
22  * 0 - Disable Spread Spectrum function
23  * 1 - Enable Spread Spectrum function
24  */
25 #define SPREAD_SPECTRUM 0
26 
27 /**
28  * @def SB_HPET_TIMER
29  * @brief
30  * 0 - Disable hpet
31  * 1 - Enable hpet
32  */
33 #define HPET_TIMER 1
34 
35 /**
36  * @def USB_CONFIG
37  * @brief bit[0-6] used to control USB
38  * 0 - Disable
39  * 1 - Enable
40  * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is defined at BIT0
41  * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is defined at BIT1
42  * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is defined at BIT2
43  * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is defined at BIT3
44  * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is defined at BIT4
45  * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is defined at BIT5
46  * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is defined at BIT6
47  */
48 #if CONFIG(BOARD_LIPPERT_FRONTRUNNER_AF)
49 #define USB_CONFIG 0x3F
50 #elif CONFIG(BOARD_LIPPERT_TOUCAN_AF)
51 #define USB_CONFIG 0x0F
52 #endif
53 
54 /**
55  * @def PCI_CLOCK_CTRL
56  * @brief bit[0-4] used for PCI Slots Clock Control,
57  * 0 - disable
58  * 1 - enable
59  * PCI SLOT 0 define at BIT0
60  * PCI SLOT 1 define at BIT1
61  * PCI SLOT 2 define at BIT2
62  * PCI SLOT 3 define at BIT3
63  * PCI SLOT 4 define at BIT4
64  */
65 #if CONFIG(BOARD_LIPPERT_FRONTRUNNER_AF)
66 #define PCI_CLOCK_CTRL 0x1F
67 #elif CONFIG(BOARD_LIPPERT_TOUCAN_AF)
68 #define PCI_CLOCK_CTRL 0x1E
69 #endif
70 
71 /**
72  * @def SATA_CONTROLLER
73  * @brief INCHIP Sata Controller
74  */
75 #define SATA_CONTROLLER CIMX_OPTION_ENABLED
76 
77 /**
78  * @def SATA_MODE
79  * @brief INCHIP Sata Controller Mode
80  * NOTE: DO NOT ALLOW SATA & IDE use same mode
81  */
82 #define SATA_MODE CONFIG_SB800_SATA_MODE
83 
84 /**
85  * @brief INCHIP Sata IDE Controller Mode
86  */
87 #define IDE_LEGACY_MODE 0
88 #define IDE_NATIVE_MODE 1
89 
90 /**
91  * @def SATA_IDE_MODE
92  * @brief INCHIP Sata IDE Controller Mode
93  * NOTE: DO NOT ALLOW SATA & IDE use same mode
94  */
95 #define SATA_IDE_MODE IDE_LEGACY_MODE
96 
97 /**
98  * @def EXTERNAL_CLOCK
99  * @brief 00/10: Reference clock from crystal oscillator via
100  * PAD_XTALI and PAD_XTALO
101  *
102  * @def INTERNAL_CLOCK
103  * @brief 01/11: Reference clock from internal clock through
104  * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
105  */
106 #define EXTERNAL_CLOCK 0x00
107 #define INTERNAL_CLOCK 0x01
108 
109 /* NOTE: inagua have to using internal clock,
110  * otherwise can not detect sata drive
111  */
112 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
113 
114 /**
115  * @def SATA_PORT_MULT_CAP_RESERVED
116  * @brief 1 ON, 0 0FF
117  */
118 #define SATA_PORT_MULT_CAP_RESERVED 1
119 
120 
121 /**
122  * @def AZALIA_AUTO
123  * @brief Detect Azalia controller automatically.
124  *
125  * @def AZALIA_DISABLE
126  * @brief Disable Azalia controller.
127 
128  * @def AZALIA_ENABLE
129  * @brief Enable Azalia controller.
130  */
131 #define AZALIA_AUTO 0
132 #define AZALIA_DISABLE 1
133 #define AZALIA_ENABLE 2
134 
135 /**
136  * @brief INCHIP HDA controller
137  */
138 #define AZALIA_CONTROLLER AZALIA_AUTO
139 
140 /**
141  * @def AZALIA_PIN_CONFIG
142  * @brief
143  * 0 - disable
144  * 1 - enable
145  */
146 #define AZALIA_PIN_CONFIG 1
147 
148 /**
149  * @def AZALIA_SDIN_PIN
150  * @brief
151  * SDIN0 is defined at BIT0 & BIT1
152  * 00 - GPIO PIN
153  * 01 - Reserved
154  * 10 - As a Azalia SDIN pin
155  * SDIN1 is defined at BIT2 & BIT3
156  * SDIN2 is defined at BIT4 & BIT5
157  * SDIN3 is defined at BIT6 & BIT7
158  */
159 #if CONFIG(BOARD_LIPPERT_FRONTRUNNER_AF)
160 #define AZALIA_SDIN_PIN 0x02
161 #elif CONFIG(BOARD_LIPPERT_TOUCAN_AF)
162 #define AZALIA_SDIN_PIN 0x2A
163 #endif
164 
165 /**
166  * @def GPP_CONTROLLER
167  */
168 #if CONFIG(BOARD_LIPPERT_FRONTRUNNER_AF)
169 #define GPP_CONTROLLER CIMX_OPTION_DISABLED
170 #elif CONFIG(BOARD_LIPPERT_TOUCAN_AF)
171 #define GPP_CONTROLLER CIMX_OPTION_ENABLED
172 #endif
173 
174 /**
175  * @def GPP_CFGMODE
176  * @brief GPP Link Configuration
177  * four possible configuration:
178  * GPP_CFGMODE_X4000
179  * GPP_CFGMODE_X2200
180  * GPP_CFGMODE_X2110
181  * GPP_CFGMODE_X1111
182  */
183 #define GPP_CFGMODE GPP_CFGMODE_X1111
184 
185 /**
186  * @def NB_SB_GEN2
187  * 0 - Disable
188  * 1 - Enable
189  */
190 #define NB_SB_GEN2 TRUE
191 
192 /**
193  * @def SB_GPP_GEN2
194  * 0 - Disable
195  * 1 - Enable
196  */
197 #define SB_GPP_GEN2 TRUE
198 
199 /**
200  * @def SB_GPP_UNHIDE_PORTS
201  * TRUE - ports visible always, even port empty
202  * FALSE - ports invisible if port empty
203  */
204 #define SB_GPP_UNHIDE_PORTS FALSE
205 
206 /**
207  * @def GEC_CONFIG
208  * 0 - Enable
209  * 1 - Disable
210  */
211 #define GEC_CONFIG 1
212 
213 static const CODECENTRY frontrunneraf_codec_alc886[] = /* Realtek ALC886/8 */
214 {
215  /* NID, PinConfig (Verbs 71F..C) */
216  {0x11, 0x411111F0}, /* NPC */
217  {0x12, 0x411111F0}, /* DMIC */
218  {0x14, 0x01214110}, /* FRONT (Port-D) */
219  {0x15, 0x01011112}, /* SURR (Port-A) */
220  {0x16, 0x01016111}, /* CEN/LFE (Port-G) */
221  {0x17, 0x411111F0}, /* SIDESURR (Port-H) */
222  {0x18, 0x01A19930}, /* MIC1 (Port-B) */
223  {0x19, 0x411111F0}, /* MIC2 (Port-F) */
224  {0x1A, 0x0181313F}, /* LINE1 (Port-C) */
225  {0x1B, 0x411111F0}, /* LINE2 (Port-E) */
226  {0x1C, 0x411111F0}, /* CD-IN */
227  {0x1D, 0x40132601}, /* BEEP-IN */
228  {0x1E, 0x01441120}, /* S/PDIF-OUT */
229  {0x1F, 0x01C46140}, /* S/PDIF-IN */
230  {0xff, 0xffffffff} /* end of table */
231 };
232 
233 static const CODECTBLLIST codec_tablelist[] =
234 {
235  {0x10ec0888, (CODECENTRY*)&frontrunneraf_codec_alc886[0]},
236  {0xFFFFFFFF, (CODECENTRY*)0xFFFFFFFFL}
237 };
238 
239 /**
240  * @def AZALIA_OEM_VERB_TABLE
241  * Mainboard specific codec verb table list
242  */
243 #define AZALIA_OEM_VERB_TABLE (&codec_tablelist[0])
244 
245 #endif
static const CODECTBLLIST codec_tablelist[]
Definition: platform_cfg.h:233
static const CODECENTRY frontrunneraf_codec_alc886[]
Definition: platform_cfg.h:213