Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 1 | /* |
| 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 Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | |
Jens Rottmann | 940095f | 2013-02-20 21:24:20 +0100 | [diff] [blame] | 17 | #ifndef _PLATFORM_CFG_H_ |
| 18 | #define _PLATFORM_CFG_H_ |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 19 | |
| 20 | /** |
Martin Roth | 15b6325 | 2014-12-29 22:08:15 -0700 | [diff] [blame] | 21 | * @def BIOS_SIZE |
| 22 | * BIOS_SIZE_{1,2,4,8,16}M |
Edward O'Callaghan | 5760e19 | 2014-01-26 11:45:30 +1100 | [diff] [blame] | 23 | * |
| 24 | * In SB800, default ROM size is 1M Bytes, if your platform ROM |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 25 | * bigger than 1M you have to set the ROM size outside CIMx module and |
| 26 | * before AGESA module get call. |
| 27 | */ |
| 28 | #ifndef BIOS_SIZE |
Edward O'Callaghan | 5760e19 | 2014-01-26 11:45:30 +1100 | [diff] [blame] | 29 | #define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1) |
| 30 | #endif /* BIOS_SIZE */ |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 31 | |
| 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 Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 42 | * @brief |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 43 | * 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älkki | 6533b83 | 2014-06-26 05:30:54 +0300 | [diff] [blame] | 53 | * 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 Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 60 | */ |
| 61 | #define USB_CONFIG 0x7F |
| 62 | |
| 63 | /** |
| 64 | * @def PCI_CLOCK_CTRL |
Paul Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 65 | * @brief bit[0-4] used for PCI Slots Clock Control, |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 66 | * 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 Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 78 | * @brief INCHIP Sata Controller |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 79 | */ |
| 80 | #define SATA_CONTROLLER CIMX_OPTION_ENABLED |
| 81 | |
| 82 | /** |
| 83 | * @def SATA_MODE |
Paul Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 84 | * @brief INCHIP Sata Controller Mode |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 85 | * NOTE: DO NOT ALLOW SATA & IDE use same mode |
| 86 | */ |
| 87 | #define SATA_MODE CONFIG_SB800_SATA_MODE |
| 88 | |
| 89 | /** |
Paul Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 90 | * @brief INCHIP Sata IDE Controller Mode |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 91 | */ |
| 92 | #define IDE_LEGACY_MODE 0 |
| 93 | #define IDE_NATIVE_MODE 1 |
| 94 | |
| 95 | /** |
| 96 | * @def SATA_IDE_MODE |
Paul Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 97 | * @brief INCHIP Sata IDE Controller Mode |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 98 | * 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 Menzel | 522b556 | 2013-02-21 17:09:01 +0100 | [diff] [blame] | 141 | * @brief INCHIP HDA controller |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 142 | */ |
| 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 Roth | 15b6325 | 2014-12-29 22:08:15 -0700 | [diff] [blame] | 191 | * @def SB_GPP_GEN2 |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 192 | * 0 - Disable |
| 193 | * 1 - Enable |
| 194 | */ |
| 195 | #define SB_GPP_GEN2 TRUE |
| 196 | |
| 197 | /** |
| 198 | * @def SB_GPP_UNHIDE_PORTS |
Kyösti Mälkki | efa8a9d | 2014-06-26 05:30:54 +0300 | [diff] [blame] | 199 | * TRUE - ports visible always, even port empty |
| 200 | * FALSE - ports invisible if port empty |
Kerry Sheh | b9136ed8 | 2011-11-15 21:27:57 +0800 | [diff] [blame] | 201 | */ |
| 202 | #define SB_GPP_UNHIDE_PORTS FALSE |
| 203 | |
| 204 | /** |
| 205 | * @def GEC_CONFIG |
| 206 | * 0 - Enable |
| 207 | * 1 - Disable |
| 208 | */ |
| 209 | #define GEC_CONFIG 0 |
| 210 | |
| 211 | #endif |