xref: /openbmc/u-boot/include/configs/coreboot.h (revision b97cd681)
1 /*
2  * Copyright (c) 2011 The Chromium OS Authors.
3  * (C) Copyright 2008
4  * Graeme Russ, graeme.russ@gmail.com.
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #include <asm/ibmpc.h>
10 /*
11  * board/config.h - configuration options, board specific
12  */
13 
14 #ifndef __CONFIG_H
15 #define __CONFIG_H
16 
17 /*
18  * High Level Configuration Options
19  * (easy to change)
20  */
21 #define CONFIG_SYS_COREBOOT
22 #define CONFIG_SHOW_BOOT_PROGRESS
23 #define CONFIG_LAST_STAGE_INIT
24 #define CONFIG_SYS_VSNPRINTF
25 #define CONFIG_ZBOOT_32
26 #define CONFIG_PHYSMEM
27 #define CONFIG_SYS_EARLY_PCI_INIT
28 #define CONFIG_DISPLAY_BOARDINFO_LATE
29 #define CONFIG_DISPLAY_CPUINFO
30 
31 #define CONFIG_DM
32 #define CONFIG_CMD_DM
33 #define CONFIG_DM_GPIO
34 #define CONFIG_DM_SERIAL
35 
36 #define CONFIG_LMB
37 #define CONFIG_OF_LIBFDT
38 
39 #define CONFIG_BOOTSTAGE
40 #define CONFIG_BOOTSTAGE_REPORT
41 #define CONFIG_BOOTSTAGE_FDT
42 #define CONFIG_CMD_BOOTSTAGE
43 /* Place to stash bootstage data from first-stage U-Boot */
44 #define CONFIG_BOOTSTAGE_STASH		0x0110f000
45 #define CONFIG_BOOTSTAGE_STASH_SIZE	0x7fc
46 #define CONFIG_BOOTSTAGE_USER_COUNT	60
47 
48 #define CONFIG_LZO
49 #define CONFIG_FIT
50 #undef CONFIG_ZLIB
51 #undef CONFIG_GZIP
52 #define CONFIG_SYS_BOOTM_LEN		(16 << 20)
53 
54 /*-----------------------------------------------------------------------
55  * Watchdog Configuration
56  */
57 #undef CONFIG_WATCHDOG
58 #undef CONFIG_HW_WATCHDOG
59 
60 /* SATA AHCI storage */
61 
62 #define CONFIG_SCSI_AHCI
63 
64 #ifdef CONFIG_SCSI_AHCI
65 #define CONFIG_LIBATA
66 #define CONFIG_SYS_64BIT_LBA
67 #define CONFIG_SATA_INTEL		1
68 #define CONFIG_SCSI_DEV_LIST		{PCI_VENDOR_ID_INTEL, \
69 			PCI_DEVICE_ID_INTEL_NM10_AHCI},	      \
70 	{PCI_VENDOR_ID_INTEL,		\
71 			PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_MOBILE}, \
72 	{PCI_VENDOR_ID_INTEL, \
73 			PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_SERIES6}, \
74 	{PCI_VENDOR_ID_INTEL,		\
75 			PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}
76 
77 #define CONFIG_SYS_SCSI_MAX_SCSI_ID	2
78 #define CONFIG_SYS_SCSI_MAX_LUN		1
79 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
80 					 CONFIG_SYS_SCSI_MAX_LUN)
81 #endif
82 
83 /* Generic TPM interfaced through LPC bus */
84 #define CONFIG_TPM
85 #define CONFIG_TPM_TIS_LPC
86 #define CONFIG_TPM_TIS_BASE_ADDRESS        0xfed40000
87 
88 /*-----------------------------------------------------------------------
89  * Real Time Clock Configuration
90  */
91 #define CONFIG_RTC_MC146818
92 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS	0
93 #define CONFIG_SYS_ISA_IO      CONFIG_SYS_ISA_IO_BASE_ADDRESS
94 
95 /*-----------------------------------------------------------------------
96  * Serial Configuration
97  */
98 #define CONFIG_COREBOOT_SERIAL
99 #define CONFIG_SYS_NS16550
100 #define CONFIG_BAUDRATE			115200
101 #define CONFIG_SYS_BAUDRATE_TABLE	{300, 600, 1200, 2400, 4800, \
102 					 9600, 19200, 38400, 115200}
103 #define CONFIG_SYS_NS16550_PORT_MAPPED
104 
105 #define CONFIG_STD_DEVICES_SETTINGS     "stdin=usbkbd,vga,serial\0" \
106 					"stdout=vga,serial,cbmem\0" \
107 					"stderr=vga,serial,cbmem\0"
108 
109 #define CONFIG_CONSOLE_MUX
110 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
111 #define CONFIG_SYS_STDIO_DEREGISTER
112 #define CONFIG_CBMEM_CONSOLE
113 
114 #define CONFIG_CMDLINE_EDITING
115 #define CONFIG_COMMAND_HISTORY
116 #define CONFIG_AUTO_COMPLETE
117 #define CONFIG_SYS_HUSH_PARSER
118 
119 #define CONFIG_SUPPORT_VFAT
120 /************************************************************
121  * ATAPI support (experimental)
122  ************************************************************/
123 #define CONFIG_ATAPI
124 
125 /************************************************************
126  * DISK Partition support
127  ************************************************************/
128 #define CONFIG_EFI_PARTITION
129 #define CONFIG_DOS_PARTITION
130 #define CONFIG_MAC_PARTITION
131 #define CONFIG_ISO_PARTITION		/* Experimental */
132 
133 #define CONFIG_CMD_PART
134 #define CONFIG_CMD_CBFS
135 #define CONFIG_CMD_EXT4
136 #define CONFIG_CMD_EXT4_WRITE
137 #define CONFIG_PARTITION_UUIDS
138 
139 /*-----------------------------------------------------------------------
140  * Video Configuration
141  */
142 #define CONFIG_VIDEO
143 #define CONFIG_VIDEO_COREBOOT
144 #define CONFIG_VIDEO_SW_CURSOR
145 #define VIDEO_FB_16BPP_WORD_SWAP
146 #define CONFIG_I8042_KBD
147 #define CONFIG_CFB_CONSOLE
148 #define CONFIG_SYS_CONSOLE_INFO_QUIET
149 
150 /* x86 GPIOs are accessed through a PCI device */
151 #define CONFIG_INTEL_ICH6_GPIO
152 
153 /*-----------------------------------------------------------------------
154  * Command line configuration.
155  */
156 #include <config_cmd_default.h>
157 
158 #define CONFIG_TRACE
159 #define CONFIG_CMD_TRACE
160 #define CONFIG_TRACE_BUFFER_SIZE	(16 << 20)
161 #define CONFIG_TRACE_EARLY_SIZE		(8 << 20)
162 #define CONFIG_TRACE_EARLY
163 #define CONFIG_TRACE_EARLY_ADDR		0x01400000
164 
165 #define CONFIG_CMD_BDI
166 #define CONFIG_CMD_BOOTD
167 #define CONFIG_CMD_CONSOLE
168 #define CONFIG_CMD_DATE
169 #define CONFIG_CMD_ECHO
170 #undef CONFIG_CMD_FLASH
171 #define CONFIG_CMD_FPGA
172 #define CONFIG_CMD_FPGA_LOADMK
173 #define CONFIG_CMD_GPIO
174 #define CONFIG_CMD_IMI
175 #undef CONFIG_CMD_IMLS
176 #define CONFIG_CMD_IO
177 #define CONFIG_CMD_IRQ
178 #define CONFIG_CMD_ITEST
179 #define CONFIG_CMD_LOADB
180 #define CONFIG_CMD_LOADS
181 #define CONFIG_CMD_MEMORY
182 #define CONFIG_CMD_MISC
183 #define CONFIG_CMD_NET
184 #undef CONFIG_CMD_NFS
185 #define CONFIG_CMD_PCI
186 #define CONFIG_CMD_PING
187 #define CONFIG_CMD_RUN
188 #define CONFIG_CMD_SAVEENV
189 #define CONFIG_CMD_SETGETDCR
190 #define CONFIG_CMD_SOURCE
191 #define CONFIG_CMD_TIME
192 #define CONFIG_CMD_GETTIME
193 #define CONFIG_CMD_XIMG
194 #define CONFIG_CMD_SCSI
195 
196 #define CONFIG_CMD_FAT
197 #define CONFIG_CMD_EXT2
198 
199 #define CONFIG_CMD_ZBOOT
200 #define CONFIG_CMD_ELF
201 
202 #define CONFIG_BOOTDELAY	2
203 #define CONFIG_BOOTARGS		\
204 	"root=/dev/sdb3 init=/sbin/init rootwait ro"
205 #define CONFIG_BOOTCOMMAND	\
206 	"ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000"
207 
208 
209 #if defined(CONFIG_CMD_KGDB)
210 #define CONFIG_KGDB_BAUDRATE			115200
211 #endif
212 
213 /*
214  * Miscellaneous configurable options
215  */
216 #define CONFIG_SYS_LONGHELP
217 #define CONFIG_SYS_CBSIZE			512
218 #define CONFIG_SYS_PBSIZE			(CONFIG_SYS_CBSIZE + \
219 						 sizeof(CONFIG_SYS_PROMPT) + \
220 						 16)
221 #define CONFIG_SYS_MAXARGS			16
222 #define CONFIG_SYS_BARGSIZE			CONFIG_SYS_CBSIZE
223 
224 #define CONFIG_SYS_MEMTEST_START		0x00100000
225 #define CONFIG_SYS_MEMTEST_END			0x01000000
226 #define CONFIG_SYS_LOAD_ADDR			0x20000000
227 
228 /*-----------------------------------------------------------------------
229  * SDRAM Configuration
230  */
231 #define CONFIG_NR_DRAM_BANKS			4
232 
233 /* CONFIG_SYS_SDRAM_DRCTMCTL Overrides the following*/
234 #undef CONFIG_SYS_SDRAM_PRECHARGE_DELAY
235 #undef CONFIG_SYS_SDRAM_RAS_CAS_DELAY
236 #undef CONFIG_SYS_SDRAM_CAS_LATENCY_2T
237 #undef CONFIG_SYS_SDRAM_CAS_LATENCY_3T
238 
239 /*-----------------------------------------------------------------------
240  * CPU Features
241  */
242 
243 #define CONFIG_SYS_X86_TSC_TIMER
244 #define CONFIG_SYS_PCAT_INTERRUPTS
245 #define CONFIG_SYS_PCAT_TIMER
246 #define CONFIG_SYS_NUM_IRQS			16
247 
248 /*-----------------------------------------------------------------------
249  * Memory organization:
250  * 32kB Stack
251  * 16kB Cache-As-RAM @ 0x19200000
252  * 256kB Monitor
253  * (128kB + Environment Sector Size) malloc pool
254  */
255 #define CONFIG_SYS_STACK_SIZE			(32 * 1024)
256 #define CONFIG_SYS_CAR_ADDR			0x19200000
257 #define CONFIG_SYS_CAR_SIZE			(16 * 1024)
258 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
259 #define CONFIG_SYS_MONITOR_LEN			(256 * 1024)
260 #define CONFIG_SYS_MALLOC_LEN			(0x20000 + 128 * 1024)
261 #define CONFIG_SYS_MALLOC_F_LEN			(1 << 10)
262 
263 /* allow to overwrite serial and ethaddr */
264 #define CONFIG_ENV_OVERWRITE
265 
266 /*-----------------------------------------------------------------------
267  * FLASH configuration
268  */
269 #define CONFIG_ICH_SPI
270 #define CONFIG_SPI_FLASH
271 #define CONFIG_SPI_FLASH_MACRONIX
272 #define CONFIG_SPI_FLASH_WINBOND
273 #define CONFIG_SPI_FLASH_GIGADEVICE
274 #define CONFIG_SYS_NO_FLASH
275 #define CONFIG_CMD_SF
276 #define CONFIG_CMD_SF_TEST
277 #define CONFIG_CMD_SPI
278 #define CONFIG_SPI
279 
280 /*-----------------------------------------------------------------------
281  * Environment configuration
282  */
283 #define CONFIG_ENV_IS_NOWHERE
284 #define CONFIG_ENV_SIZE			0x01000
285 
286 /*-----------------------------------------------------------------------
287  * PCI configuration
288  */
289 #define CONFIG_PCI
290 
291 #define CONFIG_CROS_EC
292 #define CONFIG_CROS_EC_LPC
293 #define CONFIG_CMD_CROS_EC
294 #define CONFIG_ARCH_EARLY_INIT_R
295 
296 /*-----------------------------------------------------------------------
297  * USB configuration
298  */
299 #define CONFIG_USB_EHCI
300 #define CONFIG_USB_EHCI_PCI
301 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS     12
302 #define CONFIG_USB_MAX_CONTROLLER_COUNT        2
303 #define CONFIG_USB_STORAGE
304 #define CONFIG_USB_KEYBOARD
305 #define CONFIG_SYS_USB_EVENT_POLL
306 
307 #define CONFIG_USB_HOST_ETHER
308 #define CONFIG_USB_ETHER_ASIX
309 #define CONFIG_USB_ETHER_SMSC95XX
310 #define CONFIG_TFTP_TSIZE
311 #define CONFIG_CMD_DHCP
312 #define CONFIG_BOOTP_BOOTFILESIZE
313 #define CONFIG_BOOTP_BOOTPATH
314 #define CONFIG_BOOTP_GATEWAY
315 #define CONFIG_BOOTP_HOSTNAME
316 
317 #define CONFIG_CMD_USB
318 
319 #define CONFIG_EXTRA_ENV_SETTINGS \
320 	CONFIG_STD_DEVICES_SETTINGS
321 
322 #endif	/* __CONFIG_H */
323