2 * (C) Copyright 2009 DENX Software Engineering
3 * Author: John Rigby <jrigby@gmail.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #define CONFIG_SILENT_CONSOLE
25 #define CONFIG_GPIOLIB 1
28 #define U_BOOT_SPRD_VER 1
29 /*#define SPRD_EVM_TAG_ON 1*/
30 #ifdef SPRD_EVM_TAG_ON
31 #define SPRD_EVM_ADDR_START 0x40006000
32 #define SPRD_EVM_TAG(_x) (*(((unsigned long *)SPRD_EVM_ADDR_START)+_x) = *(volatile unsigned long *)0x87003004)
37 #define CONFIG_YAFFS2 1
39 #define BOOT_PART "boot"
40 //#define BOOT_PART "kernel"
41 #define RECOVERY_PART "recovery"
43 * SPREADTRUM BIGPHONE board - SoC Configuration
45 #define CONFIG_ARM926EJS /* arm926ejs CPU core */
46 #define CONFIG_SC8800G
47 #define CONFIG_OPENPHONE
49 #define CONFIG_LCD_SP6810A
53 #define PLATFORM_SC8800G
54 #define CHIP_VER_8800G2
55 #define CHIP_ENDIAN_LITTLE
56 #define SC8800S_LITTLE_ENDIAN FALSE
57 #define _LITTLE_ENDIAN 1
58 #define EXT_MEM_TYPE_DDR 1
61 #define BB_DRAM_TYPE_256MB_32BIT
62 #define CONFIG_MTD_NAND_SPRD 1
64 #define CONFIG_SYS_HZ 1000
65 #define CONFIG_SPRD_TIMER_CLK 1000 /*32768*/
67 //#define CONFIG_SYS_HUSH_PARSER
69 #ifdef CONFIG_SYS_HUSH_PARSER
70 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
73 /*#define CMDLINE_NEED_CONV */
75 #define WATCHDOG_LOAD_VALUE 0x4000
76 #define CONFIG_SYS_STACK_SIZE 0x400
78 //#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 kB for U-Boot */
80 /* NAND BOOT is the only boot method */
81 #define CONFIG_NAND_U_BOOT
82 #define DYNAMIC_CRC_TABLE
83 /* Start copying real U-boot from the second page */
84 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
85 #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x60000
86 #ifdef CONFIG_NAND_SPL
87 /* Load U-Boot to this address */
88 #define CONFIG_SYS_NAND_U_BOOT_DST 0x00f00000
89 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
91 #define CONFIG_SYS_SDRAM_BASE 0x00000000
92 #define CONFIG_SYS_INIT_SP_ADDR \
93 (CONFIG_SYS_SDRAM_BASE + 0x4000)
95 #define CONFIG_SYS_NAND_SPARE_SIZE 64
96 #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
97 #define CONFIG_SYS_NAND_PAGE_COUNT 64
98 #define CONFIG_SYS_NAND_SIZE (128 * 1024 * 1024)
99 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
102 #define CONFIG_SYS_SDRAM_BASE 0x00000000
103 #define CONFIG_SYS_INIT_SP_ADDR \
104 (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
106 #define CONFIG_SKIP_LOWLEVEL_INIT
109 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
110 /* Size of the block protected by one OOB (Spare Area in Samsung terminology) */
111 #define CONFIG_SYS_NAND_ECCSIZE CONFIG_SYS_NAND_PAGE_SIZE
112 /* Number of ECC bytes per OOB - S3C6400 calculates 4 bytes ECC in 1-bit mode */
113 //#define CONFIG_SYS_NAND_ECCBYTES 4
114 #define CONFIG_SYS_NAND_ECCBYTES 16
115 /* Number of ECC-blocks per NAND page */
116 #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / CONFIG_SYS_NAND_ECCSIZE)
117 /* Size of a single OOB region */
118 #define CONFIG_SYS_NAND_OOBSIZE 64
119 /* Number of ECC bytes per page */
120 #define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * CONFIG_SYS_NAND_ECCSTEPS)
121 /* ECC byte positions */
122 #define CONFIG_SYS_NAND_ECCPOS {40, 41, 42, 43, 44, 45, 46, 47, \
123 48, 49, 50, 51, 52, 53, 54, 55, \
124 56, 57, 58, 59, 60, 61, 62, 63}
126 #define CONFIG_HW_WATCHDOG
128 #define CONFIG_DISPLAY_CPUINFO
130 #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
131 #define CONFIG_SETUP_MEMORY_TAGS 1
132 #define CONFIG_INITRD_TAG 1
138 #define CONFIG_SYS_MALLOC_LEN (2 << 20) /* 1 MiB */
140 * Board has 2 32MB banks of DRAM but there is a bug when using
141 * both so only the first is configured
143 #define CONFIG_NR_DRAM_BANKS 1
145 #define PHYS_SDRAM_1 0x00000000
146 #define PHYS_SDRAM_1_SIZE 0x10000000
147 #if (CONFIG_NR_DRAM_BANKS == 2)
148 #define PHYS_SDRAM_2 0x90000000
149 #define PHYS_SDRAM_2_SIZE 0x02000000
152 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
153 #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1+0x0800000)
154 #define CONFIG_STACKSIZE (256 * 1024) /* regular stack */
159 #define CONFIG_SPRD_UART 1
160 #define CONFIG_SYS_SC8800X_UART1 1
161 #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
162 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
163 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
166 * Flash & Environment
168 /* No NOR flash present */
169 #define CONFIG_SYS_MONITOR_LEN ((CONFIG_SYS_NAND_U_BOOT_OFFS)+(CONFIG_SYS_NAND_U_BOOT_SIZE))
170 #define CONFIG_SYS_NO_FLASH 1
171 #define CONFIG_ENV_IS_NOWHERE
172 #define CONFIG_ENV_SIZE (128 * 1024)
174 #define CONFIG_ENV_IS_IN_NAND
175 #define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN
176 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
180 #define CONFIG_NAND_SPRD
181 #define CONFIG_SPRD_NAND_REGS_BASE (0x60000000)
182 #define CONFIG_SYS_MAX_NAND_DEVICE 1
183 #define CONFIG_SYS_NAND_BASE (0x60000000)
184 //#define CONFIG_JFFS2_NAND
185 #define CONFIG_SPRD_NAND_HWECC
186 #define CONFIG_SYS_NAND_LARGEPAGE
188 #define CONFIG_SYS_64BIT_VSPRINTF
190 #define CONFIG_CMD_MTDPARTS
191 #define CONFIG_MTD_PARTITIONS
192 #define CONFIG_MTD_DEVICE
193 #define CONFIG_CMD_UBI
194 #define CONFIG_RBTREE
196 /* U-Boot general configuration */
197 #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
198 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
199 /* Print buffer sz */
200 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
201 sizeof(CONFIG_SYS_PROMPT) + 16)
202 #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
203 /* Boot Argument Buffer Size */
204 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
205 #define CONFIG_CMDLINE_EDITING
206 #define CONFIG_SYS_LONGHELP
208 /* support OS choose */
209 #undef CONFIG_BOOTM_NETBSD
210 #undef CONFIG_BOOTM_RTEMS
212 /* U-Boot commands */
213 #include <config_cmd_default.h>
214 #define CONFIG_CMD_NAND
215 #undef CONFIG_CMD_FPGA
216 #undef CONFIG_CMD_LOADS
217 #undef CONFIG_CMD_NET
218 #undef CONFIG_CMD_NFS
219 #undef CONFIG_CMD_SETGETDCR
221 #define CONFIG_ENV_OVERWRITE
223 #ifdef SPRD_EVM_TAG_ON
224 #define CONFIG_BOOTDELAY 0
226 #define CONFIG_BOOTDELAY 0
227 #define CONFIG_ZERO_BOOTDELAY_CHECK
230 #define CONFIG_LOADADDR 0x01000000 /* loadaddr env var */
231 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
233 #define xstr(s) str(s)
236 #define MTDIDS_DEFAULT "nand0=sprd-nand"
237 #ifdef CONFIG_G2PHONE
238 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:384k@256k(boot),256k(params),6m(kernel),6m(ramdisk),6m(recovery),70m(system),30m(userdata),7m(cache)"
239 #define CONFIG_BOOTARGS "mem=64M console=ttyS1,115200n8 init=/init "MTDPARTS_DEFAULT
240 #elif defined CONFIG_OPENPHONE
241 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),512k(2ndbl),128k(params),512k(vmjaluna),10m(modem),3840k(fixnv),3840k(backupfixnv),5120k(dsp),3840k(runtimenv),10m(boot),10m(recovery),150m(system),280m(userdata),20m(cache),256k(misc),1m(boot_logo),1m(fastboot_logo),2m(productinfo),512k(kpanic)"
242 #define CONFIG_BOOTARGS "mem=240M console=ttyS1,115200n8 init=/init " MTDPARTS_DEFAULT
244 /* used blocks are 4019 and remaining block are 4096 - 4019 */
246 #define CONFIG_BOOTCOMMAND "cboot normal"
247 #define CONFIG_EXTRA_ENV_SETTINGS ""
249 #ifdef CONFIG_CMD_NET
250 #define CONFIG_IPADDR 192.168.10.2
251 #define CONFIG_SERVERIP 192.168.10.5
252 #define CONFIG_NETMASK 255.255.255.0
253 #define CONFIG_USBNET_DEVADDR 26:03:ee:00:87:9f
254 #define CONFIG_USBNET_HOSTADDR 9a:04:c7:d6:30:d0
257 #define CONFIG_NET_MULTI
258 #define CONFIG_CMD_DNS
259 #define CONFIG_CMD_NFS
260 #define CONFIG_CMD_RARP
261 #define CONFIG_CMD_PING
262 /*#define CONFIG_CMD_SNTP */
265 #define CONFIG_USB_GADGET_SC8800G
266 #define CONFIG_USB_DWC
267 #define CONFIG_USB_GADGET_DUALSPEED
268 //#define CONFIG_USB_ETHER
269 #define CONFIG_CMD_FASTBOOT
270 #define SCRATCH_ADDR 0x1000000
271 #define FB_DOWNLOAD_BUF_SIZE (150*1024*1024)
273 #define CONFIG_MODEM_CALIBERATE
275 #define CONFIG_UPDATE_TFTP
277 #define CONFIG_OF_LIBFDT
278 #define CONFIG_SYS_MAX_FLASH_BANKS 1
279 #define CONFIG_SYS_MAX_FLASH_SECT 128
283 #define CONFIG_SPLASH_SCREEN
284 #define LCD_BPP LCD_COLOR16
285 //#define CONFIG_LCD_INFO
286 //#define LCD_TEST_PATTERN
287 //#define CONFIG_LCD_LOGO
288 #define CONFIG_SYS_WHITE_ON_BLACK
289 #ifdef LCD_TEST_PATTERN
290 #define CONSOLE_COLOR_RED 0xf800
291 #define CONSOLE_COLOR_GREEN 0x07e0
292 #define CONSOLE_COLOR_YELLOW 0x07e0
293 #define CONSOLE_COLOR_BLUE 0x001f
294 #define CONSOLE_COLOR_MAGENTA 0x001f
295 #define CONSOLE_COLOR_CYAN 0x001f
299 #define CALIBRATE_ENUM_MS 15000
300 #define CALIBRATE_IO_MS 10000
302 #define LOW_BAT_VOL 3500 /*phone battery voltage low than this value will not boot up*/
303 #define LOW_BAT_VOL_CHG 3300 //3.3V charger connect
305 #define PWR_KEY_DETECT_CNT 12 /*this should match the count of boot_pwr_check() function */
306 #define ALARM_LEAD_SET_MS 0 /* time set for alarm boot in advancd */
307 #define USB_PHY_TUNE_VALUE 0x44073e33
311 #endif /* __CONFIG_H */