blob: d39a3abe70826933617f5e5c39ea63fc7fb81bd2 [file] [log] [blame]
Kerry Shefeed3292011-08-18 18:03:44 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Kerry Shefeed3292011-08-18 18:03:44 +080014 */
15
16
Jens Rottmann940095f2013-02-20 21:24:20 +010017#ifndef _PLATFORM_CFG_H_
18#define _PLATFORM_CFG_H_
Kerry Shefeed3292011-08-18 18:03:44 +080019
20/**
Martin Roth15b63252014-12-29 22:08:15 -070021 * @def BIOS_SIZE
22 * BIOS_SIZE_{1,2,4,8,16}M
Edward O'Callaghan5760e192014-01-26 11:45:30 +110023 *
24 * In SB800, default ROM size is 1M Bytes, if your platform ROM
Kerry Shefeed3292011-08-18 18:03:44 +080025 * bigger than 1M you have to set the ROM size outside CIMx module and
26 * before AGESA module get call.
27 */
efdesign98d91c9b72011-09-15 10:59:55 -060028#ifndef BIOS_SIZE
Edward O'Callaghan5760e192014-01-26 11:45:30 +110029#define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
30#endif /* BIOS_SIZE */
Kerry Shefeed3292011-08-18 18:03:44 +080031
32/**
33 * @def SPREAD_SPECTRUM
34 * @brief
35 * 0 - Disable Spread Spectrum function
36 * 1 - Enable Spread Spectrum function
37 */
38#define SPREAD_SPECTRUM 0
39
40/**
41 * @def SB_HPET_TIMER
Paul Menzel522b5562013-02-21 17:09:01 +010042 * @brief
Kerry Shefeed3292011-08-18 18:03:44 +080043 * 0 - Disable hpet
44 * 1 - Enable hpet
45 */
46#define HPET_TIMER 1
47
48/**
49 * @def USB_CONFIG
50 * @brief bit[0-6] used to control USB
51 * 0 - Disable
52 * 1 - Enable
Kyösti Mälkki6533b832014-06-26 05:30:54 +030053 * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is define at BIT0
54 * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is define at BIT1
55 * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is define at BIT2
56 * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is define at BIT3
57 * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is define at BIT4
58 * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is define at BIT5
59 * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is define at BIT6
Kerry Shefeed3292011-08-18 18:03:44 +080060 */
61#define USB_CONFIG 0x7F
62
63/**
64 * @def PCI_CLOCK_CTRL
Paul Menzel522b5562013-02-21 17:09:01 +010065 * @brief bit[0-4] used for PCI Slots Clock Control,
Kerry Shefeed3292011-08-18 18:03:44 +080066 * 0 - disable
67 * 1 - enable
68 * PCI SLOT 0 define at BIT0
69 * PCI SLOT 1 define at BIT1
70 * PCI SLOT 2 define at BIT2
71 * PCI SLOT 3 define at BIT3
72 * PCI SLOT 4 define at BIT4
73 */
74#define PCI_CLOCK_CTRL 0x1F
75
76/**
77 * @def SATA_CONTROLLER
Paul Menzel522b5562013-02-21 17:09:01 +010078 * @brief INCHIP Sata Controller
Kerry Shefeed3292011-08-18 18:03:44 +080079 */
80#define SATA_CONTROLLER CIMX_OPTION_ENABLED
81
82/**
83 * @def SATA_MODE
Paul Menzel522b5562013-02-21 17:09:01 +010084 * @brief INCHIP Sata Controller Mode
Kerry Shefeed3292011-08-18 18:03:44 +080085 * NOTE: DO NOT ALLOW SATA & IDE use same mode
86 */
Kerry Sheh01f7ab92012-01-19 13:18:36 +080087#define SATA_MODE CONFIG_SB800_SATA_MODE
Kerry Shefeed3292011-08-18 18:03:44 +080088
89/**
Paul Menzel522b5562013-02-21 17:09:01 +010090 * @brief INCHIP Sata IDE Controller Mode
Kerry Shefeed3292011-08-18 18:03:44 +080091 */
92#define IDE_LEGACY_MODE 0
93#define IDE_NATIVE_MODE 1
94
95/**
96 * @def SATA_IDE_MODE
Paul Menzel522b5562013-02-21 17:09:01 +010097 * @brief INCHIP Sata IDE Controller Mode
Kerry Shefeed3292011-08-18 18:03:44 +080098 * NOTE: DO NOT ALLOW SATA & IDE use same mode
99 */
100#define SATA_IDE_MODE IDE_LEGACY_MODE
101
102/**
103 * @def EXTERNAL_CLOCK
104 * @brief 00/10: Reference clock from crystal oscillator via
105 * PAD_XTALI and PAD_XTALO
106 *
107 * @def INTERNAL_CLOCK
108 * @brief 01/11: Reference clock from internal clock through
109 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
110 */
111#define EXTERNAL_CLOCK 0x00
112#define INTERNAL_CLOCK 0x01
113
114/* NOTE: inagua have to using internal clock,
115 * otherwise can not detect sata drive
116 */
117#define SATA_CLOCK_SOURCE INTERNAL_CLOCK
118
119/**
120 * @def SATA_PORT_MULT_CAP_RESERVED
121 * @brief 1 ON, 0 0FF
122 */
123#define SATA_PORT_MULT_CAP_RESERVED 1
124
125
126/**
127 * @def AZALIA_AUTO
128 * @brief Detect Azalia controller automatically.
129 *
130 * @def AZALIA_DISABLE
131 * @brief Disable Azalia controller.
132
133 * @def AZALIA_ENABLE
134 * @brief Enable Azalia controller.
135 */
136#define AZALIA_AUTO 0
137#define AZALIA_DISABLE 1
138#define AZALIA_ENABLE 2
139
140/**
Paul Menzel522b5562013-02-21 17:09:01 +0100141 * @brief INCHIP HDA controller
Kerry Shefeed3292011-08-18 18:03:44 +0800142 */
143#define AZALIA_CONTROLLER AZALIA_AUTO
144
145/**
146 * @def AZALIA_PIN_CONFIG
147 * @brief
148 * 0 - disable
149 * 1 - enable
150 */
151#define AZALIA_PIN_CONFIG 1
152
153/**
154 * @def AZALIA_SDIN_PIN
155 * @brief
156 * SDIN0 is define at BIT0 & BIT1
157 * 00 - GPIO PIN
158 * 01 - Reserved
159 * 10 - As a Azalia SDIN pin
160 * SDIN1 is define at BIT2 & BIT3
161 * SDIN2 is define at BIT4 & BIT5
162 * SDIN3 is define at BIT6 & BIT7
163 */
164//#define AZALIA_SDIN_PIN 0xAA
165#define AZALIA_SDIN_PIN 0x2A
166
167/**
168 * @def GPP_CONTROLLER
169 */
170#define GPP_CONTROLLER CIMX_OPTION_ENABLED
171
172/**
173 * @def GPP_CFGMODE
174 * @brief GPP Link Configuration
175 * four possible configuration:
176 * GPP_CFGMODE_X4000
177 * GPP_CFGMODE_X2200
178 * GPP_CFGMODE_X2110
179 * GPP_CFGMODE_X1111
180 */
181#define GPP_CFGMODE GPP_CFGMODE_X1111
182
183/**
184 * @def NB_SB_GEN2
185 * 0 - Disable
186 * 1 - Enable
187 */
188#define NB_SB_GEN2 TRUE
189
190/**
Martin Roth15b63252014-12-29 22:08:15 -0700191 * @def SB_GPP_GEN2
Kerry Shefeed3292011-08-18 18:03:44 +0800192 * 0 - Disable
193 * 1 - Enable
194 */
195#define SB_GPP_GEN2 TRUE
196
Kerry Shehf3b05002011-10-12 12:06:23 +0800197/**
198 * @def SB_GPP_UNHIDE_PORTS
Kyösti Mälkkiefa8a9d2014-06-26 05:30:54 +0300199 * TRUE - ports visible always, even port empty
200 * FALSE - ports invisible if port empty
Kerry Shehf3b05002011-10-12 12:06:23 +0800201 */
202#define SB_GPP_UNHIDE_PORTS FALSE
Kerry Shefeed3292011-08-18 18:03:44 +0800203
204/**
205 * @def GEC_CONFIG
206 * 0 - Enable
207 * 1 - Disable
208 */
209#define GEC_CONFIG 0
210
211#endif