1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _PLATFORM_CFG_H_
4 #define _PLATFORM_CFG_H_
8 * BIOS_SIZE_{1,2,4,8,16}M
10 * In SB800, default ROM size is 1M Bytes, if your platform ROM
11 * bigger than 1M you have to set the ROM size outside CIMx module and
12 * before AGESA module get call.
15 #define BIOS_SIZE ((CONFIG_COREBOOT_ROMSIZE_KB >> 10) - 1)
16 #endif /* BIOS_SIZE */
19 * @def SPREAD_SPECTRUM
21 * 0 - Disable Spread Spectrum function
22 * 1 - Enable Spread Spectrum function
24 #define SPREAD_SPECTRUM 0
36 * @brief bit[0-6] used to control USB
39 * Usb Ohci1 Controller (Bus 0 Dev 18 Func0) is defined at BIT0
40 * Usb Ehci1 Controller (Bus 0 Dev 18 Func2) is defined at BIT1
41 * Usb Ohci2 Controller (Bus 0 Dev 19 Func0) is defined at BIT2
42 * Usb Ehci2 Controller (Bus 0 Dev 19 Func2) is defined at BIT3
43 * Usb Ohci3 Controller (Bus 0 Dev 22 Func0) is defined at BIT4
44 * Usb Ehci3 Controller (Bus 0 Dev 22 Func2) is defined at BIT5
45 * Usb Ohci4 Controller (Bus 0 Dev 20 Func5) is defined at BIT6
47 #define USB_CONFIG 0x7F
51 * @brief bit[0-4] used for PCI Slots Clock Control,
54 * PCI SLOT 0 define at BIT0
55 * PCI SLOT 1 define at BIT1
56 * PCI SLOT 2 define at BIT2
57 * PCI SLOT 3 define at BIT3
58 * PCI SLOT 4 define at BIT4
60 #define PCI_CLOCK_CTRL 0x1F
63 * @def SATA_CONTROLLER
64 * @brief INCHIP Sata Controller
66 #define SATA_CONTROLLER CIMX_OPTION_ENABLED
70 * @brief INCHIP Sata Controller Mode
71 * NOTE: DO NOT ALLOW SATA & IDE use same mode
73 #define SATA_MODE CONFIG_SB800_SATA_MODE
76 * @brief INCHIP Sata IDE Controller Mode
78 #define IDE_LEGACY_MODE 0
79 #define IDE_NATIVE_MODE 1
83 * @brief INCHIP Sata IDE Controller Mode
84 * NOTE: DO NOT ALLOW SATA & IDE use same mode
86 #define SATA_IDE_MODE IDE_LEGACY_MODE
90 * @brief 00/10: Reference clock from crystal oscillator via
91 * PAD_XTALI and PAD_XTALO
94 * @brief 01/11: Reference clock from internal clock through
95 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
97 #define EXTERNAL_CLOCK 0x00
98 #define INTERNAL_CLOCK 0x01
100 /* NOTE: inagua have to using internal clock,
101 * otherwise can not detect sata drive
103 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
106 * @def SATA_PORT_MULT_CAP_RESERVED
109 #define SATA_PORT_MULT_CAP_RESERVED 1
113 * @brief Detect Azalia controller automatically.
115 * @def AZALIA_DISABLE
116 * @brief Disable Azalia controller.
119 * @brief Enable Azalia controller.
121 #define AZALIA_AUTO 0
122 #define AZALIA_DISABLE 1
123 #define AZALIA_ENABLE 2
126 * @brief INCHIP HDA controller
128 #define AZALIA_CONTROLLER AZALIA_AUTO
131 * @def AZALIA_PIN_CONFIG
136 #define AZALIA_PIN_CONFIG 1
139 * @def AZALIA_SDIN_PIN
141 * SDIN0 is defined at BIT0 & BIT1
144 * 10 - As a Azalia SDIN pin
145 * SDIN1 is defined at BIT2 & BIT3
146 * SDIN2 is defined at BIT4 & BIT5
147 * SDIN3 is defined at BIT6 & BIT7
149 //#define AZALIA_SDIN_PIN 0xAA
150 #define AZALIA_SDIN_PIN 0x2A
153 * @def GPP_CONTROLLER
155 #define GPP_CONTROLLER CIMX_OPTION_ENABLED
159 * @brief GPP Link Configuration
160 * four possible configuration:
166 #define GPP_CFGMODE GPP_CFGMODE_X1111
173 #define NB_SB_GEN2 TRUE
180 #define SB_GPP_GEN2 TRUE
183 * @def SB_GPP_UNHIDE_PORTS
184 * TRUE - ports visible always, even port empty
185 * FALSE - ports invisible if port empty
187 #define SB_GPP_UNHIDE_PORTS FALSE
197 * @def SIO_HWM_BASE_ADDRESS
198 * Super IO HWM base address
200 #define SIO_HWM_BASE_ADDRESS 0x290