add SDHC support in mmc driver
[u-boot-openmoko/mini2440.git] / include / configs / neo1973_gta01.h
blobd94a036dca69c553831e1285509e6d4b8293e1c9
1 /*
2 * (C) Copyright 2006 OpenMoko, Inc.
3 * Author: Harald Welte <laforge@openmoko.org>
5 * Configuation settings for the FIC Neo1973 GTA01 Linux GSM phone
7 * See file CREDITS for list of people who contributed to this
8 * project.
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA
26 #ifndef __CONFIG_H
27 #define __CONFIG_H
29 /* we want to be able to start u-boot directly from within NAND flash */
30 #define CONFIG_LL_INIT_NAND_ONLY
31 #define CONFIG_S3C2410_NAND_BOOT 1
32 #define CONFIG_S3C2410_NAND_SKIP_BAD 1
34 #define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND loading */
37 * High Level Configuration Options
38 * (easy to change)
40 #define CONFIG_ARM920T 1 /* This is an ARM920T Core */
41 #define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */
42 #define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */
44 /* input clock of PLL */
45 #define CONFIG_SYS_CLK_FREQ 12000000/* the GTA01 has 12MHz input clock */
48 #define USE_920T_MMU 1
49 #define CONFIG_USE_IRQ 1
52 * Size of malloc() pool
54 #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024)
55 /* >> CFG_VIDEO_LOGO_MAX_SIZE */
56 #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
59 * Hardware drivers
63 * select serial console configuration
65 #define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GTA01 */
66 #define CONFIG_SERIAL_MULTI
68 /* allow to overwrite serial and ethaddr */
69 #define CONFIG_ENV_OVERWRITE
71 #define CONFIG_BAUDRATE 115200
73 /***********************************************************
74 * Command definition
75 ***********************************************************/
76 #define CONFIG_CMD_BDI
77 #define CONFIG_CMD_LOADS
78 #define CONFIG_CMD_LOADB
79 #define CONFIG_CMD_IMI
80 #define CONFIG_CMD_CACHE
81 #define CONFIG_CMD_MEMORY
82 #define CONFIG_CMD_ENV
83 #define CONFIG_CMD_BOOTD
84 #define CONFIG_CMD_CONSOLE
85 #define CONFIG_CMD_BMP
86 #define CONFIG_CMD_ASKENV
87 #define CONFIG_CMD_RUN
88 #define CONFIG_CMD_ECHO
89 #define CONFIG_CMD_I2C
90 #define CONFIG_CMD_REGINFO
91 #define CONFIG_CMD_IMMAP
92 #define CONFIG_CMD_DATE
93 #define CONFIG_CMD_AUTOSCRIPT
94 #define CONFIG_CMD_BSP
95 #define CONFIG_CMD_ELF
96 #define CONFIG_CMD_MISC
97 #define CONFIG_CMD_JFFS2
98 #define CONFIG_CMD_DIAG
99 #define CONFIG_CMD_SAVES
100 #define CONFIG_CMD_NAND
101 #define CONFIG_CMD_PORTIO
102 #define CONFIG_CMD_MMC
103 #define CONFIG_CMD_FAT
104 #define CONFIG_CMD_EXT2
105 #define CONFIG_CMD_LICENSE
106 #define CONFIG_CMD_TERMINAL
108 #define CONFIG_BOOTDELAY 3
109 #define CONFIG_BOOTARGS ""
110 #define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000"
112 #define CONFIG_DOS_PARTITION 1
114 #if defined(CONFIG_CMD_KGDB)
115 #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
116 /* what's this ? it's not used anywhere */
117 #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
118 #endif
121 * Miscellaneous configurable options
123 #define CFG_LONGHELP /* undef to save memory */
124 #if defined(CONFIG_ARCH_GTA01_v3)
125 #define CFG_PROMPT "GTA01v3 # " /* Monitor Command Prompt */
126 #elif defined(CONFIG_ARCH_GTA01_v4)
127 #define CFG_PROMPT "GTA01v4 # " /* Monitor Command Prompt */
128 #elif defined(CONFIG_ARCH_GTA01B_v2)
129 #define CFG_PROMPT "GTA01Bv2 # " /* Monitor Command Prompt */
130 #elif defined(CONFIG_ARCH_GTA01B_v3)
131 #define CFG_PROMPT "GTA01Bv3 # " /* Monitor Command Prompt */
132 #elif defined(CONFIG_ARCH_GTA01B_v4)
133 #define CFG_PROMPT "GTA01Bv4 # " /* Monitor Command Prompt */
134 #endif
135 #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
136 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
137 #define CFG_MAXARGS 64 /* max number of command args */
138 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
140 #define CFG_MEMTEST_START 0x30000000 /* memtest works on */
141 #define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */
143 #undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
145 #define CFG_LOAD_ADDR 0x33000000 /* default load address */
147 /* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */
148 /* it to wrap 100 times (total 1562500) to get 1 sec. */
149 #define CFG_HZ 1562500
151 /* valid baudrates */
152 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
154 #define CFG_BOOTMENU
156 /*-----------------------------------------------------------------------
157 * Stack sizes
159 * The stack sizes are set up in start.S using the settings below
161 #define CONFIG_STACKSIZE (128*1024) /* regular stack */
162 #ifdef CONFIG_USE_IRQ
163 #define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */
164 #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
165 #endif
167 #if 0
168 #define CONFIG_USB_OHCI 1
169 #endif
171 #define CONFIG_USB_DEVICE 1
172 #define CONFIG_USB_TTY 1
173 #define CFG_CONSOLE_IS_IN_ENV 1
174 #define CONFIG_USBD_VENDORID 0x1457 /* Linux/NetChip */
175 #define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */
176 #define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */
177 #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc"
178 #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION
179 #define CONFIG_USBD_DFU 1
180 #define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */
181 #define CONFIG_USBD_DFU_INTERFACE 2
183 #define CONFIG_EXTRA_ENV_SETTINGS \
184 "usbtty=cdc_acm\0" \
185 "stderr=usbtty\0stdout=usbtty\0stdin=usbtty\0" \
186 "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200 console=tty0 loglevel=8\0" \
189 /*-----------------------------------------------------------------------
190 * Physical Memory Map
192 #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
193 #define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
194 #if defined(CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4)
195 #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
196 #elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \
197 defined(CONFIG_ARCH_GTA01B_v4)
198 #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
199 #else
200 #error Please define GTA01 variant
201 #endif
202 #define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */
204 /*-----------------------------------------------------------------------
205 * FLASH and environment organization
208 /* No NOR flash in this device */
209 #define CFG_NO_FLASH 1
211 #define CFG_ENV_IS_IN_NAND 1
212 #define CFG_ENV_SIZE 0x4000 /* 16k Total Size of Environment Sector */
213 #define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */
214 #define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */
216 #define NAND_MAX_CHIPS 1
217 #define CFG_NAND_BASE 0x4e000000
218 #define CFG_MAX_NAND_DEVICE 1
220 #define CONFIG_MMC 1
221 #define CONFIG_MMC_S3C 1
222 #define CFG_MMC_BASE 0xff000000
224 /* EXT2 driver */
225 #define CONFIG_EXT2 1
227 #define CONFIG_FAT 1
228 #define CONFIG_SUPPORT_VFAT
230 #if 1
231 /* JFFS2 driver */
232 #define CONFIG_JFFS2_CMDLINE 1
233 #define CONFIG_JFFS2_NAND 1
234 #define CONFIG_JFFS2_NAND_DEV 0
235 //#define CONFIG_JFFS2_NAND_OFF 0x634000
236 //#define CONFIG_JFFS2_NAND_SIZE 0x39cc000
237 #endif
239 /* ATAG configuration */
240 #define CONFIG_INITRD_TAG 1
241 #define CONFIG_SETUP_MEMORY_TAGS 1
242 #define CONFIG_CMDLINE_TAG 1
243 #define CONFIG_REVISION_TAG 1
244 #if 0
245 #define CONFIG_SERIAL_TAG 1
246 #endif
248 #define CONFIG_DRIVER_S3C24X0_I2C 1
249 #define CONFIG_HARD_I2C 1
250 #define CFG_I2C_SPEED 400000 /* 400kHz according to PCF50606 data sheet */
251 #define CFG_I2C_SLAVE 0x7f
253 /* we have a board_late_init() function */
254 #define BOARD_LATE_INIT 1
256 #define CONFIG_VIDEO
257 #define CONFIG_VIDEO_S3C2410
258 #define CONFIG_CFB_CONSOLE
259 #define CONFIG_VIDEO_LOGO
260 #define CONFIG_SPLASH_SCREEN
261 #define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */
262 #define CONFIG_VIDEO_BMP_GZIP
263 #define CONFIG_VGA_AS_SINGLE_DEVICE
264 #define CONFIG_CMD_UNZIP
266 #define VIDEO_FB_16BPP_PIXEL_SWAP
268 #define VIDEO_KBD_INIT_FCT 0
269 #define VIDEO_TSTC_FCT serial_tstc
270 #define VIDEO_GETC_FCT serial_getc
272 #define LCD_VIDEO_ADDR 0x33d00000
274 #define CONFIG_S3C2410_NAND_BBT 1
275 #define CONFIG_S3C2410_NAND_HWECC 1
277 #define CONFIG_DRIVER_PCF50606 1
278 #define CONFIG_RTC_PCF50606 1
280 #define MTDIDS_DEFAULT "nand0=neo1973-nand"
281 #define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),16k(u-boot_env),2M(kernel),640k(splash),-(jffs2)"
282 #define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand"
283 #define CONFIG_NAND_DYNPART
285 #endif /* __CONFIG_H */