2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 * Copyright (C) 2013 Sage Electronic Engineering, LLC
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
18 #ifndef _PLATFORM_CFG_H_
19 #define _PLATFORM_CFG_H_
21 /* Gizmo has no legacy P/S2 controller */
26 * BIOS_SIZE_{1,2,4,8,16}M
28 * In SB800, default ROM size is 1M Bytes, if your platform ROM
29 * bigger than 1M you have to set the ROM size outside CIMx module and
30 * before AGESA module get call.
33 #define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
34 #endif /* BIOS_SIZE */
37 * @def SPREAD_SPECTRUM
39 * 0 - Disable Spread Spectrum function
40 * 1 - Enable Spread Spectrum function
42 #define SPREAD_SPECTRUM 0
54 * @brief bit[0-6] used to control USB
57 * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is define at BIT0
58 * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is define at BIT1
59 * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is define at BIT2
60 * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is define at BIT3
61 * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is define at BIT4
62 * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is define at BIT5
63 * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is define at BIT6
65 #define USB_CONFIG 0x7F
69 * @brief bit[0-4] used for PCI Slots Clock Control,
72 * PCI SLOT 0 define at BIT0
73 * PCI SLOT 1 define at BIT1
74 * PCI SLOT 2 define at BIT2
75 * PCI SLOT 3 define at BIT3
76 * PCI SLOT 4 define at BIT4
78 #define PCI_CLOCK_CTRL 0x00 /* PCI clocks aren't used on Gizmo */
81 * @def SATA_CONTROLLER
82 * @brief INCHIP Sata Controller
84 #define SATA_CONTROLLER CIMX_OPTION_ENABLED
88 * @brief INCHIP Sata Controller Mode
89 * NOTE: DO NOT ALLOW SATA & IDE use same mode
91 #define SATA_MODE CONFIG_SB800_SATA_MODE
94 * @brief INCHIP Sata IDE Controller Mode
96 #define IDE_LEGACY_MODE 0
97 #define IDE_NATIVE_MODE 1
101 * @brief INCHIP Sata IDE Controller Mode
102 * NOTE: DO NOT ALLOW SATA & IDE use same mode
104 #define SATA_IDE_MODE IDE_LEGACY_MODE
107 * @def EXTERNAL_CLOCK
108 * @brief 00/10: Reference clock from crystal oscillator via
109 * PAD_XTALI and PAD_XTALO
111 * @def INTERNAL_CLOCK
112 * @brief 01/11: Reference clock from internal clock through
113 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
115 #define EXTERNAL_CLOCK 0x00
116 #define INTERNAL_CLOCK 0x01
118 /* NOTE: inagua have to using internal clock,
119 * otherwise can not detect sata drive
121 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
124 * @def SATA_PORT_MULT_CAP_RESERVED
127 #define SATA_PORT_MULT_CAP_RESERVED 1
132 * @brief Detect Azalia controller automatically.
134 * @def AZALIA_DISABLE
135 * @brief Disable Azalia controller.
138 * @brief Enable Azalia controller.
140 #define AZALIA_AUTO 0
141 #define AZALIA_DISABLE 1
142 #define AZALIA_ENABLE 2
145 * @brief INCHIP HDA controller
147 #define AZALIA_CONTROLLER AZALIA_AUTO
150 * @def AZALIA_PIN_CONFIG
155 #define AZALIA_PIN_CONFIG 1
158 * @def AZALIA_SDIN_PIN
160 * SDIN0 is define at BIT0 & BIT1
163 * 10 - As a Azalia SDIN pin
164 * SDIN1 is define at BIT2 & BIT3
165 * SDIN2 is define at BIT4 & BIT5
166 * SDIN3 is define at BIT6 & BIT7
168 //#define AZALIA_SDIN_PIN 0xAA
169 #define AZALIA_SDIN_PIN 0x2A
172 * @def GPP_CONTROLLER
174 #define GPP_CONTROLLER CIMX_OPTION_ENABLED
178 * @brief GPP Link Configuration
179 * four possible configuration:
185 #define GPP_CFGMODE GPP_CFGMODE_X1111
192 #define NB_SB_GEN2 TRUE
199 #define SB_GPP_GEN2 TRUE
202 * @def SB_GPP_UNHIDE_PORTS
203 * TRUE - ports visible always, even port empty
204 * FALSE - ports invisible if port empty
206 #define SB_GPP_UNHIDE_PORTS TRUE
215 const static CODECENTRY gizmo_codec_alc272
[] =
218 {0x11, 0x411111F0}, /* S/PDIF-OUT2 unused */
219 {0x12, 0x411111F0}, /* DMIC-1/2 unused */
220 {0x13, 0x411111F0}, /* DMIC-3/4 unused */
221 {0x14, 0x411111F0}, /* LOUT-1 unused */
222 {0x15, 0x21000100}, /* LOUT2 - to Explorer */
223 {0x17, 0x411111F0}, /* MONO-OUT unused */
224 {0x18, 0x01A15010}, /* MIC1 */
225 {0x19, 0x411111F0}, /* MIC2 unused */
226 {0x1A, 0x01013010}, /* LINE1 */
227 {0x1B, 0x21800101}, /* LINE2 from Explorer */
228 {0x1D, 0x40100000}, /* PCBEEP */
229 {0x1E, 0x411111F0}, /* S/PDIF-OUT1 unused */
230 {0x21, 0x01214010}, /* HPOUT */
231 {0xff, 0xffffffff} /* end of table */
234 static const CODECTBLLIST codec_tablelist
[] =
236 {0x010ec0272, (CODECENTRY
*)&gizmo_codec_alc272
[0]},
237 {0x0FFFFFFFFUL
, (CODECENTRY
*)0x0FFFFFFFFUL
}
241 * @def AZALIA_OEM_VERB_TABLE
242 * Mainboard specific codec verb table list
244 #define AZALIA_OEM_VERB_TABLE (&codec_tablelist[0])
246 /* set up an ACPI preferred power management profile */
248 * PM_UNSPECIFIED = 0,
251 * PM_WORKSTATION = 3,
252 * PM_ENTERPRISE_SERVER = 4,
253 * PM_SOHO_SERVER = 5,
254 * PM_APPLIANCE_PC = 6,
255 * PM_PERFORMANCE_SERVER = 7,
258 #define FADT_PM_PROFILE 1