uboot-neo1973_defaultconsole_usbtty.patch
[u-boot-openmoko/mini2440.git] / include / configs / neo1973_gta02.h
blob248e33da8a71d4d0d9e49b96e479df549ce79843
1 /*
2 * (C) Copyright 2007 OpenMoko, Inc.
3 * Author: Harald Welte <laforge@openmoko.org>
5 * Configuation settings for the FIC Neo1973 GTA02 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_SMDK2440 1 /* on a SAMSUNG SMDK2410 Board */
43 /* input clock of PLL */
44 #define CONFIG_SYS_CLK_FREQ 12000000/* the GTA02 has this input clock */
47 #define USE_920T_MMU 1
48 #define CONFIG_USE_IRQ 1
51 * Size of malloc() pool
53 #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 400*1024)
54 /* >> CFG_VIDEO_LOGO_MAX_SIZE */
55 #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
58 * Hardware drivers
62 * select serial console configuration
64 #define CONFIG_SERIAL3 1 /* we use SERIAL 1 on GTA01 */
65 #define CONFIG_SERIAL_MULTI
67 /* allow to overwrite serial and ethaddr */
68 #define CONFIG_ENV_OVERWRITE
70 #define CONFIG_BAUDRATE 115200
72 /***********************************************************
73 * Command definition
74 ***********************************************************/
75 #define CONFIG_CMD_BDI
76 #define CONFIG_CMD_LOADS
77 #define CONFIG_CMD_LOADB
78 #define CONFIG_CMD_IMI
79 #define CONFIG_CMD_CACHE
80 #define CONFIG_CMD_MEMORY
81 #define CONFIG_CMD_ENV
82 /* CFG_CMD_IRQ | */ \
83 #define CONFIG_CMD_BOOTD
84 #define CONFIG_CMD_CONSOLE
85 /* CFG_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 /* CFG_CMD_USB | */ \
98 #define CONFIG_CMD_JFFS2
99 #define CONFIG_CMD_DIAG
100 /* CFG_CMD_HWFLOW | */ \
101 #define CONFIG_CMD_SAVES
102 #define CONFIG_CMD_NAND
103 #define CONFIG_CMD_FLASH
104 #define CONFIG_CMD_PORTIO
105 #define CONFIG_CMD_MMC
106 #define CONFIG_CMD_FAT
107 #define CONFIG_CMD_EXT2
108 #define CONFIG_CMD_LICENSE
109 #define CONFIG_CMD_TERMINAL
111 #define CONFIG_BOOTDELAY 3
112 #define CONFIG_BOOTARGS ""
113 #define CONFIG_BOOTCOMMAND "setenv bootargs ${bootargs_base} ${mtdparts}; nand read.e 0x32000000 kernel; bootm 0x32000000"
115 #define CONFIG_DOS_PARTITION 1
117 #if defined(CONFIG_CMD_KGDB)
118 #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
119 /* what's this ? it's not used anywhere */
120 #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
121 #endif
124 * Miscellaneous configurable options
126 #define CFG_LONGHELP /* undef to save memory */
128 #define STRINGIFY(s) DO_STRINGIFY(s) /* expand the argument */
129 #define DO_STRINGIFY(s) #s /* quote it */
130 #define CFG_PROMPT "GTA02v" STRINGIFY(CONFIG_GTA02_REVISION) " # "
131 /* Monitor Command Prompt */
132 #if defined(CONFIG_ARCH_GTA02_v1)
133 #define CONFIG_S3C2440 1 /* SAMSUNG S3C2440 SoC */
134 #else
135 #define CONFIG_S3C2442 1 /* SAMSUNG S3C2442 SoC */
136 #endif
138 #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
139 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
140 #define CFG_MAXARGS 64 /* max number of command args */
141 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
143 #define CFG_MEMTEST_START 0x30000000 /* memtest works on */
144 #define CFG_MEMTEST_END 0x33F00000 /* 63 MB in DRAM */
146 #undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
148 #define CFG_LOAD_ADDR 0x33000000 /* default load address */
150 /* the PWM TImer 4 uses a counter of 15625 for 10 ms, so we need */
151 /* it to wrap 100 times (total 1562500) to get 1 sec. */
152 #define CFG_HZ 1562500
154 /* valid baudrates */
155 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
157 #define CFG_BOOTMENU
159 /*-----------------------------------------------------------------------
160 * Stack sizes
162 * The stack sizes are set up in start.S using the settings below
164 #define CONFIG_STACKSIZE (128*1024) /* regular stack */
165 #ifdef CONFIG_USE_IRQ
166 #define CONFIG_STACKSIZE_IRQ (8*1024) /* IRQ stack */
167 #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
168 #endif
170 #if 0
171 #define CONFIG_USB_OHCI_NEW 1
172 #define CFG_USB_OHCI_CPU_INIT 1
173 #define CFG_USB_OHCI_REGS_BASE 0x49000000 /* S3C24X0_USB_HOST_BASE */
174 #define CFG_USB_OHCI_SLOT_NAME "s3c2440"
175 #define CFG_USB_OHCI_MAX_ROOT_PORTS 2
176 #endif
178 #define CONFIG_USB_DEVICE 1
179 #define CONFIG_USB_TTY 1
180 #define CFG_CONSOLE_IS_IN_ENV 1
181 #define CONFIG_USBD_VENDORID 0x1d50 /* OpenMoko, Inc. */
182 #define CONFIG_USBD_PRODUCTID_GSERIAL 0x5120 /* gserial */
183 #define CONFIG_USBD_PRODUCTID_CDCACM 0x5119 /* CDC ACM */
184 #define CONFIG_USBD_MANUFACTURER "OpenMoko, Inc"
185 #define CONFIG_USBD_PRODUCT_NAME "Neo1973 Bootloader " U_BOOT_VERSION
186 #define CONFIG_USBD_DFU 1
187 #define CONFIG_USBD_DFU_XFER_SIZE 4096 /* 0x4000 */
188 #define CONFIG_USBD_DFU_INTERFACE 2
190 #define CONFIG_EXTRA_ENV_SETTINGS \
191 "usbtty=cdc_acm\0" \
192 "stderr=usbtty\0stdout=usbtty\0stdin=usbtty\0" \
193 "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock6 console=ttySAC2,115200 console=tty0 loglevel=8\0" \
196 /*-----------------------------------------------------------------------
197 * Physical Memory Map
199 #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
200 #define PHYS_SDRAM_1 0x30000000 /* SDRAM Bank #1 */
201 #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
202 #define PHYS_SDRAM_RES_SIZE 0x00200000 /* 2 MB for frame buffer */
204 /*-----------------------------------------------------------------------
205 * FLASH and environment organization
208 #define CFG_ENV_IS_IN_NAND 1
209 #define CFG_ENV_SIZE 0x40000 /* 128k Total Size of Environment Sector */
210 #define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */
211 #define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */
212 #define CFG_ENV_OVERRIDE /* allow pre-loading the environment */
214 #define NAND_MAX_CHIPS 1
215 #define CFG_NAND_BASE 0x4e000000
216 #define CFG_MAX_NAND_DEVICE 1
218 #define CONFIG_MMC 1
219 #define CONFIG_MMC_WIDE 1
220 #define CONFIG_MMC_GLAMO 1
221 #define CFG_MMC_BASE 0xff000000
222 #define CONFIG_DEPOWER_MMC_ON_BOOT 1
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 PCF50633 data sheet */
251 #define CFG_I2C_SLAVE 0x7f
253 /* we have a board_late_init() function */
254 #define BOARD_LATE_INIT 1
256 #if 1
257 #define CONFIG_VIDEO
258 #define CONFIG_VIDEO_GLAMO3362
259 #define CONFIG_CFB_CONSOLE
260 //#define CONFIG_VIDEO_LOGO
261 //#define CONFIG_SPLASH_SCREEN
262 #define CFG_VIDEO_LOGO_MAX_SIZE (640*480+1024+100) /* 100 = slack */
263 #define CONFIG_VIDEO_BMP_GZIP
264 #define CONFIG_VGA_AS_SINGLE_DEVICE
265 #define CONFIG_CMD_UNZIP
267 #define VIDEO_FB_16BPP_PIXEL_SWAP
269 #define VIDEO_KBD_INIT_FCT 0
270 #define VIDEO_TSTC_FCT serial_tstc
271 #define VIDEO_GETC_FCT serial_getc
273 #define CONFIG_GLAMO_BASE 0x08000000
274 #endif
276 #define CONFIG_S3C2410_NAND_BBT 1
277 //#define CONFIG_S3C2410_NAND_HWECC 1
279 #define CONFIG_DRIVER_PCF50633 1
280 #define CONFIG_RTC_PCF50633 1
282 #define MTDIDS_DEFAULT "nor0=physmap-flash,nand0=neo1973-nand"
283 //#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),128k(u-boot_env),8M(kernel),640k(splash),256k(factory),-(rootfs)"
284 #define CFG_MTDPARTS_PREFIX "physmap-flash:-(nor);"
285 #define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand"
286 #define CONFIG_NAND_DYNPART
288 #define CFG_MAX_FLASH_BANKS 1
289 #define CFG_MAX_FLASH_SECT 1
291 #define DFU_NUM_ALTERNATES 7
293 #endif /* __CONFIG_H */