blob: 2516e7a5ef624d99fac65c8d532aaa54c2dd1125 [file] [log] [blame]
Kerry She7b7b2c92011-09-08 21:16:19 +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 She7b7b2c92011-09-08 21:16:19 +080014 */
15
Jens Rottmann940095f2013-02-20 21:24:20 +010016#ifndef _PLATFORM_CFG_H_
17#define _PLATFORM_CFG_H_
Kerry She7b7b2c92011-09-08 21:16:19 +080018
19/**
Martin Roth15b63252014-12-29 22:08:15 -070020 * @def BIOS_SIZE
21 * BIOS_SIZE_{1,2,4,8,16}M
Edward O'Callaghan5760e192014-01-26 11:45:30 +110022 *
23 * In SB800, default ROM size is 1M Bytes, if your platform ROM
Kerry She7b7b2c92011-09-08 21:16:19 +080024 * bigger than 1M you have to set the ROM size outside CIMx module and
25 * before AGESA module get call.
26 */
27#ifndef BIOS_SIZE
Edward O'Callaghan5760e192014-01-26 11:45:30 +110028#define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
29#endif /* BIOS_SIZE */
Kerry She7b7b2c92011-09-08 21:16:19 +080030
31/**
32 * @def SPREAD_SPECTRUM
33 * @brief
34 * 0 - Disable Spread Spectrum function
35 * 1 - Enable Spread Spectrum function
36 */
37#define SPREAD_SPECTRUM 0
38
39/**
40 * @def SB_HPET_TIMER
Paul Menzel522b5562013-02-21 17:09:01 +010041 * @brief
Kerry She7b7b2c92011-09-08 21:16:19 +080042 * 0 - Disable hpet
43 * 1 - Enable hpet
44 */
45#define HPET_TIMER 1
46
47/**
48 * @def USB_CONFIG
49 * @brief bit[0-6] used to control USB
50 * 0 - Disable
51 * 1 - Enable
Kyösti Mälkki6533b832014-06-26 05:30:54 +030052 * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is define at BIT0
53 * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is define at BIT1
54 * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is define at BIT2
55 * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is define at BIT3
56 * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is define at BIT4
57 * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is define at BIT5
58 * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is define at BIT6
Kerry She7b7b2c92011-09-08 21:16:19 +080059 */
60#define USB_CONFIG 0x7F
61
62/**
63 * @def PCI_CLOCK_CTRL
Paul Menzel522b5562013-02-21 17:09:01 +010064 * @brief bit[0-4] used for PCI Slots Clock Control,
Kerry She7b7b2c92011-09-08 21:16:19 +080065 * 0 - disable
66 * 1 - enable
67 * PCI SLOT 0 define at BIT0
68 * PCI SLOT 1 define at BIT1
69 * PCI SLOT 2 define at BIT2
70 * PCI SLOT 3 define at BIT3
71 * PCI SLOT 4 define at BIT4
72 */
73#define PCI_CLOCK_CTRL 0x1F
74
75/**
76 * @def SATA_CONTROLLER
Paul Menzel522b5562013-02-21 17:09:01 +010077 * @brief INCHIP Sata Controller
Kerry She7b7b2c92011-09-08 21:16:19 +080078 */
79#define SATA_CONTROLLER CIMX_OPTION_ENABLED
80
81/**
82 * @def SATA_MODE
Paul Menzel522b5562013-02-21 17:09:01 +010083 * @brief INCHIP Sata Controller Mode
Kerry She7b7b2c92011-09-08 21:16:19 +080084 * NOTE: DO NOT ALLOW SATA & IDE use same mode
85 */
Kerry Sheh56ed40a2011-10-11 17:27:26 +080086#define SATA_MODE CONFIG_SB800_SATA_MODE
Kerry She7b7b2c92011-09-08 21:16:19 +080087
88/**
Paul Menzel522b5562013-02-21 17:09:01 +010089 * @brief INCHIP Sata IDE Controller Mode
Kerry She7b7b2c92011-09-08 21:16:19 +080090 */
91#define IDE_LEGACY_MODE 0
92#define IDE_NATIVE_MODE 1
93
94/**
95 * @def SATA_IDE_MODE
Paul Menzel522b5562013-02-21 17:09:01 +010096 * @brief INCHIP Sata IDE Controller Mode
Kerry She7b7b2c92011-09-08 21:16:19 +080097 * NOTE: DO NOT ALLOW SATA & IDE use same mode
98 */
99#define SATA_IDE_MODE IDE_LEGACY_MODE
100
101/**
102 * @def EXTERNAL_CLOCK
103 * @brief 00/10: Reference clock from crystal oscillator via
104 * PAD_XTALI and PAD_XTALO
105 *
106 * @def INTERNAL_CLOCK
107 * @brief 01/11: Reference clock from internal clock through
108 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
109 */
110#define EXTERNAL_CLOCK 0x00
111#define INTERNAL_CLOCK 0x01
112
113/* NOTE: inagua have to using internal clock,
114 * otherwise can not detect sata drive
115 */
116#define SATA_CLOCK_SOURCE INTERNAL_CLOCK
117
118/**
119 * @def SATA_PORT_MULT_CAP_RESERVED
120 * @brief 1 ON, 0 0FF
121 */
122#define SATA_PORT_MULT_CAP_RESERVED 1
123
124
125/**
126 * @def AZALIA_AUTO
127 * @brief Detect Azalia controller automatically.
128 *
129 * @def AZALIA_DISABLE
130 * @brief Disable Azalia controller.
131
132 * @def AZALIA_ENABLE
133 * @brief Enable Azalia controller.
134 */
135#define AZALIA_AUTO 0
136#define AZALIA_DISABLE 1
137#define AZALIA_ENABLE 2
138
139/**
Paul Menzel522b5562013-02-21 17:09:01 +0100140 * @brief INCHIP HDA controller
Kerry She7b7b2c92011-09-08 21:16:19 +0800141 */
142#define AZALIA_CONTROLLER AZALIA_AUTO
143
144/**
145 * @def AZALIA_PIN_CONFIG
146 * @brief
147 * 0 - disable
148 * 1 - enable
149 */
150#define AZALIA_PIN_CONFIG 1
151
152/**
153 * @def AZALIA_SDIN_PIN
154 * @brief
155 * SDIN0 is define at BIT0 & BIT1
156 * 00 - GPIO PIN
157 * 01 - Reserved
158 * 10 - As a Azalia SDIN pin
159 * SDIN1 is define at BIT2 & BIT3
160 * SDIN2 is define at BIT4 & BIT5
161 * SDIN3 is define at BIT6 & BIT7
162 */
Kerry She7b7b2c92011-09-08 21:16:19 +0800163#define AZALIA_SDIN_PIN 0x2A
164
165/**
166 * @def GPP_CONTROLLER
167 */
168#define GPP_CONTROLLER CIMX_OPTION_ENABLED
169
170/**
171 * @def GPP_CFGMODE
172 * @brief GPP Link Configuration
173 * four possible configuration:
174 * GPP_CFGMODE_X4000
175 * GPP_CFGMODE_X2200
176 * GPP_CFGMODE_X2110
177 * GPP_CFGMODE_X1111
178 */
179#define GPP_CFGMODE GPP_CFGMODE_X1111
180
181/**
182 * @def NB_SB_GEN2
183 * 0 - Disable
184 * 1 - Enable
185 */
186#define NB_SB_GEN2 TRUE
187
188/**
Martin Roth15b63252014-12-29 22:08:15 -0700189 * @def SB_GPP_GEN2
Kerry She7b7b2c92011-09-08 21:16:19 +0800190 * 0 - Disable
191 * 1 - Enable
192 */
193#define SB_GPP_GEN2 TRUE
194
195/**
196 * @def SB_GPP_UNHIDE_PORTS
Kyösti Mälkkiefa8a9d2014-06-26 05:30:54 +0300197 * TRUE - ports visible always, even port empty
198 * FALSE - ports invisible if port empty
Kerry She7b7b2c92011-09-08 21:16:19 +0800199 */
200#define SB_GPP_UNHIDE_PORTS FALSE
201
202/**
203 * @def GEC_CONFIG
204 * 0 - Enable
205 * 1 - Disable
206 */
207#define GEC_CONFIG 0
208
209/**
Martin Roth15b63252014-12-29 22:08:15 -0700210 * @def SIO_HWM_BASE_ADDRESS
211 * Super IO HWM base address
Kerry She7b7b2c92011-09-08 21:16:19 +0800212 */
213#define SIO_HWM_BASE_ADDRESS 0x290
214
215#endif