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 /* Gizmo has no legacy P/S2 controller */
8 #define LEGACY_FREE 1
9 
10 /**
11  * @def BIOS_SIZE
12  * BIOS_SIZE_{1,2,4,8,16}M
13  *
14  * In SB800, default ROM size is 1M Bytes, if your platform ROM
15  * bigger than 1M you have to set the ROM size outside CIMx module and
16  * before AGESA module get call.
17  */
18 #ifndef BIOS_SIZE
19 #define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
20 #endif /* BIOS_SIZE */
21 
22 /**
23  * @def SPREAD_SPECTRUM
24  * @brief
25  * 0 - Disable Spread Spectrum function
26  * 1 - Enable Spread Spectrum function
27  */
28 #define SPREAD_SPECTRUM 0
29 
30 /**
31  * @def SB_HPET_TIMER
32  * @brief
33  * 0 - Disable hpet
34  * 1 - Enable hpet
35  */
36 #define HPET_TIMER 1
37 
38 /**
39  * @def USB_CONFIG
40  * @brief bit[0-6] used to control USB
41  * 0 - Disable
42  * 1 - Enable
43  * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is defined at BIT0
44  * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is defined at BIT1
45  * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is defined at BIT2
46  * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is defined at BIT3
47  * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is defined at BIT4
48  * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is defined at BIT5
49  * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is defined at BIT6
50  */
51 #define USB_CONFIG 0x7F
52 
53 /**
54  * @def PCI_CLOCK_CTRL
55  * @brief bit[0-4] used for PCI Slots Clock Control,
56  * 0 - disable
57  * 1 - enable
58  * PCI SLOT 0 define at BIT0
59  * PCI SLOT 1 define at BIT1
60  * PCI SLOT 2 define at BIT2
61  * PCI SLOT 3 define at BIT3
62  * PCI SLOT 4 define at BIT4
63  */
64 #define PCI_CLOCK_CTRL 0x00 /* PCI clocks aren't used on Gizmo */
65 
66 /**
67  * @def SATA_CONTROLLER
68  * @brief INCHIP Sata Controller
69  */
70 #define SATA_CONTROLLER CIMX_OPTION_ENABLED
71 
72 /**
73  * @def SATA_MODE
74  * @brief INCHIP Sata Controller Mode
75  * NOTE: DO NOT ALLOW SATA & IDE use same mode
76  */
77 #define SATA_MODE CONFIG_SB800_SATA_MODE
78 
79 /**
80  * @brief INCHIP Sata IDE Controller Mode
81  */
82 #define IDE_LEGACY_MODE 0
83 #define IDE_NATIVE_MODE 1
84 
85 /**
86  * @def SATA_IDE_MODE
87  * @brief INCHIP Sata IDE Controller Mode
88  * NOTE: DO NOT ALLOW SATA & IDE use same mode
89  */
90 #define SATA_IDE_MODE IDE_LEGACY_MODE
91 
92 /**
93  * @def EXTERNAL_CLOCK
94  * @brief 00/10: Reference clock from crystal oscillator via
95  * PAD_XTALI and PAD_XTALO
96  *
97  * @def INTERNAL_CLOCK
98  * @brief 01/11: Reference clock from internal clock through
99  * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
100  */
101 #define EXTERNAL_CLOCK 0x00
102 #define INTERNAL_CLOCK 0x01
103 
104 /* NOTE: inagua have to using internal clock,
105  * otherwise can not detect sata drive
106  */
107 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
108 
109 /**
110  * @def SATA_PORT_MULT_CAP_RESERVED
111  * @brief 1 ON, 0 0FF
112  */
113 #define SATA_PORT_MULT_CAP_RESERVED 1
114 
115 
116 /**
117  * @def AZALIA_AUTO
118  * @brief Detect Azalia controller automatically.
119  *
120  * @def AZALIA_DISABLE
121  * @brief Disable Azalia controller.
122 
123  * @def AZALIA_ENABLE
124  * @brief Enable Azalia controller.
125  */
126 #define AZALIA_AUTO 0
127 #define AZALIA_DISABLE 1
128 #define AZALIA_ENABLE 2
129 
130 /**
131  * @brief INCHIP HDA controller
132  */
133 #define AZALIA_CONTROLLER AZALIA_AUTO
134 
135 /**
136  * @def AZALIA_PIN_CONFIG
137  * @brief
138  * 0 - disable
139  * 1 - enable
140  */
141 #define AZALIA_PIN_CONFIG 1
142 
143 /**
144  * @def AZALIA_SDIN_PIN
145  * @brief
146  * SDIN0 is defined at BIT0 & BIT1
147  * 00 - GPIO PIN
148  * 01 - Reserved
149  * 10 - As a Azalia SDIN pin
150  * SDIN1 is defined at BIT2 & BIT3
151  * SDIN2 is defined at BIT4 & BIT5
152  * SDIN3 is defined at BIT6 & BIT7
153  */
154 //#define AZALIA_SDIN_PIN 0xAA
155 #define AZALIA_SDIN_PIN 0x2A
156 
157 /**
158  * @def GPP_CONTROLLER
159  */
160 #define GPP_CONTROLLER CIMX_OPTION_ENABLED
161 
162 /**
163  * @def GPP_CFGMODE
164  * @brief GPP Link Configuration
165  * four possible configuration:
166  * GPP_CFGMODE_X4000
167  * GPP_CFGMODE_X2200
168  * GPP_CFGMODE_X2110
169  * GPP_CFGMODE_X1111
170  */
171 #define GPP_CFGMODE GPP_CFGMODE_X1111
172 
173 /**
174  * @def NB_SB_GEN2
175  * 0 - Disable
176  * 1 - Enable
177  */
178 #define NB_SB_GEN2 TRUE
179 
180 /**
181  * @def SB_GPP_GEN2
182  * 0 - Disable
183  * 1 - Enable
184  */
185 #define SB_GPP_GEN2 TRUE
186 
187 /**
188  * @def SB_GPP_UNHIDE_PORTS
189  * TRUE - ports visible always, even port empty
190  * FALSE - ports invisible if port empty
191  */
192 #define SB_GPP_UNHIDE_PORTS TRUE
193 
194 /**
195  * @def GEC_CONFIG
196  * 0 - Enable
197  * 1 - Disable
198  */
199 #define GEC_CONFIG 0
200 
201 static const CODECENTRY gizmo_codec_alc272[] =
202 {
203  /* NID, PinConfig */
204  {0x11, 0x411111F0}, /* S/PDIF-OUT2 unused */
205  {0x12, 0x411111F0}, /* DMIC-1/2 unused */
206  {0x13, 0x411111F0}, /* DMIC-3/4 unused */
207  {0x14, 0x411111F0}, /* LOUT-1 unused */
208  {0x15, 0x21000100}, /* LOUT2 - to Explorer */
209  {0x17, 0x411111F0}, /* MONO-OUT unused */
210  {0x18, 0x01A15010}, /* MIC1 */
211  {0x19, 0x411111F0}, /* MIC2 unused */
212  {0x1A, 0x01013010}, /* LINE1 */
213  {0x1B, 0x21800101}, /* LINE2 from Explorer */
214  {0x1D, 0x40100000}, /* PCBEEP */
215  {0x1E, 0x411111F0}, /* S/PDIF-OUT1 unused */
216  {0x21, 0x01214010}, /* HPOUT */
217  {0xff, 0xffffffff} /* end of table */
218 };
219 
220 static const CODECTBLLIST codec_tablelist[] =
221 {
222  {0x010ec0272, (CODECENTRY*)&gizmo_codec_alc272[0]},
223  {0x0FFFFFFFFUL, (CODECENTRY*)0x0FFFFFFFFUL}
224 };
225 
226 /**
227  * @def AZALIA_OEM_VERB_TABLE
228  * Mainboard specific codec verb table list
229  */
230 #define AZALIA_OEM_VERB_TABLE (&codec_tablelist[0])
231 
232 #endif
static const CODECTBLLIST codec_tablelist[]
Definition: platform_cfg.h:220
static const CODECENTRY gizmo_codec_alc272[]
Definition: platform_cfg.h:201