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,
23 //only used in fdl2 .in uart download, the debug infors from serial will break the download process.
24 #define CONFIG_FDL2_PRINT 0
25 #define BOOT_NATIVE_LINUX (0)
27 #define CONFIG_SILENT_CONSOLE
28 #define CONFIG_GPIOLIB 1
31 #define U_BOOT_SPRD_VER 1
32 /*#define SPRD_EVM_TAG_ON 1*/
33 #ifdef SPRD_EVM_TAG_ON
34 #define SPRD_EVM_ADDR_START 0x40006000
35 #define SPRD_EVM_TAG(_x) (*(((unsigned long *)SPRD_EVM_ADDR_START)+_x) = *(volatile unsigned long *)0x87003004)
37 #define CONFIG_L2_OFF 1
41 #define CONFIG_YAFFS2 1
43 #define BOOT_PART "boot"
44 //#define BOOT_PART "kernel"
45 #define RECOVERY_PART "recovery"
47 * SPREADTRUM BIGPHONE board - SoC Configuration
52 #define CONFIG_SP8810EA
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 CONFIG_SC8810_DDR_6G /* 4Gb+2Gb */
62 #define CONFIG_EMMC_BOOT
65 //#define CONFIG_SP8810_MMC
66 #define CONFIG_UEFI_PARTITION
67 #define CONFIG_EFI_PARTITION
68 #define SPL_USB_DOWNLOAD
69 #define CONFIG_EXT4_SPARSE_DOWNLOAD
70 //#define DOWNLOAD_IMAGE_WITHOUT_SPARSE
71 //#define FDL2_NOT_DLOAD_BACKUP_NVCALIBRATION
72 //#define CONFIG_EMMC_SPL
74 #ifdef CONFIG_EMMC_BOOT
75 #define EMMC_SECTOR_SIZE 512
76 #define CONFIG_SYS_EMMC_U_BOOT_SECTOR_NUM 0x400
79 #define CONFIG_RAM512M
80 #define BB_DRAM_TYPE_256MB_32BIT
81 #define CONFIG_MTD_NAND_SC8810 1
83 #define CONFIG_SYS_HZ 1000
84 #define CONFIG_SPRD_TIMER_CLK 1000 /*32768*/
86 //#define CONFIG_SYS_HUSH_PARSER
88 #ifdef CONFIG_SYS_HUSH_PARSER
89 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
92 #define FIXNV_SIZE (124 * 1024)
93 #define MODEM_SIZE (8 * 1024 * 1024)
94 #define DSP_SIZE (0x3E0400) /* 3968K */
95 #define VMJALUNA_SIZE (0x64000) /* 400K */
96 #define RUNTIMENV_SIZE (256 * 1024)
97 #define CONFIG_SPL_LOAD_LEN (0x6000)
100 /*#define CMDLINE_NEED_CONV */
102 #define WATCHDOG_LOAD_VALUE 0x4000
103 #define CONFIG_SYS_STACK_SIZE 0x400
105 //#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 kB for U-Boot */
107 /* NAND BOOT is the only boot method */
108 #define CONFIG_NAND_U_BOOT
109 #define DYNAMIC_CRC_TABLE
110 /* Start copying real U-boot from the second page */
111 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
112 #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x80000
113 #define RAM_TYPPE_IS_SDRAM 0
115 /* Load U-Boot to this address */
116 #define CONFIG_SYS_NAND_U_BOOT_DST 0x0f800000
118 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
119 #define CONFIG_SYS_SDRAM_BASE 0x00000000
120 #define CONFIG_SYS_SDRAM_END (CONFIG_SYS_SDRAM_BASE + 256*1024*1024)
122 #ifdef CONFIG_NAND_SPL
123 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_END - 0x40000)
126 #define CONFIG_MMU_TABLE_ADDR (0x40000000)
127 #define CONFIG_SYS_INIT_SP_ADDR \
128 (CONFIG_SYS_SDRAM_END - 0x10000 - GENERATED_GBL_DATA_SIZE)
130 #define CONFIG_SKIP_LOWLEVEL_INIT
133 #define CONFIG_HW_WATCHDOG
135 #define CONFIG_DISPLAY_CPUINFO
137 #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
138 #define CONFIG_SETUP_MEMORY_TAGS 1
139 #define CONFIG_INITRD_TAG 1
145 #define CONFIG_SYS_MALLOC_LEN (2 << 20) /* 1 MiB */
147 * Board has 2 32MB banks of DRAM but there is a bug when using
148 * both so only the first is configured
150 #define CONFIG_NR_DRAM_BANKS 1
152 #define PHYS_SDRAM_1 0x00000000
153 #define PHYS_SDRAM_1_SIZE 0x10000000
154 #if (CONFIG_NR_DRAM_BANKS == 2)
155 #define PHYS_SDRAM_2 0x90000000
156 #define PHYS_SDRAM_2_SIZE 0x02000000
159 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
160 #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1+0x0800000)
161 #define CONFIG_STACKSIZE (256 * 1024) /* regular stack */
166 #define CONFIG_SPRD_UART 1
167 #define CONFIG_SYS_SC8800X_UART1 1
168 #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
169 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
170 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
173 * Flash & Environment
175 /* No NOR flash present */
176 #define CONFIG_SYS_MONITOR_LEN ((CONFIG_SYS_NAND_U_BOOT_OFFS)+(CONFIG_SYS_NAND_U_BOOT_SIZE))
177 #define CONFIG_SYS_NO_FLASH 1
178 #define CONFIG_ENV_IS_NOWHERE
179 #define CONFIG_ENV_SIZE (128 * 1024)
181 #define CONFIG_ENV_IS_IN_NAND
182 #define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN
183 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
187 #define CONFIG_NAND_SC8810
188 #define CONFIG_SPRD_NAND_REGS_BASE (0x60000000)
189 #define CONFIG_SYS_MAX_NAND_DEVICE 1
190 #define CONFIG_SYS_NAND_BASE (0x60000000)
191 //#define CONFIG_JFFS2_NAND
192 //#define CONFIG_SPRD_NAND_HWECC
193 #define CONFIG_SYS_NAND_HW_ECC
194 #define CONFIG_SYS_NAND_LARGEPAGE
195 //#define CONFIG_SYS_NAND_5_ADDR_CYCLE
197 #define CONFIG_SYS_64BIT_VSPRINTF
199 #define CONFIG_CMD_MTDPARTS
200 #define CONFIG_MTD_PARTITIONS
201 #define CONFIG_MTD_DEVICE
202 #define CONFIG_CMD_UBI
203 #define CONFIG_RBTREE
205 /* U-Boot general configuration */
206 #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
207 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
208 /* Print buffer sz */
209 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
210 sizeof(CONFIG_SYS_PROMPT) + 16)
211 #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
212 /* Boot Argument Buffer Size */
213 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
214 #define CONFIG_CMDLINE_EDITING
215 #define CONFIG_SYS_LONGHELP
217 /* support OS choose */
218 #undef CONFIG_BOOTM_NETBSD
219 #undef CONFIG_BOOTM_RTEMS
221 /* U-Boot commands */
222 #include <config_cmd_default.h>
223 #define CONFIG_CMD_NAND
224 #undef CONFIG_CMD_FPGA
225 #undef CONFIG_CMD_LOADS
226 #undef CONFIG_CMD_NET
227 #undef CONFIG_CMD_NFS
228 #undef CONFIG_CMD_SETGETDCR
230 #define CONFIG_ENV_OVERWRITE
232 #ifdef SPRD_EVM_TAG_ON
233 #define CONFIG_BOOTDELAY 0
235 #define CONFIG_BOOTDELAY 0
236 #define CONFIG_ZERO_BOOTDELAY_CHECK
239 #define CONFIG_LOADADDR (CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN - 4*1024*1024) /* loadaddr env var */
240 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
242 #define xstr(s) str(s)
245 #define MTDIDS_DEFAULT "nand0=sprd-nand"
246 #ifdef CONFIG_G2PHONE
247 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:384k@256k(boot),256k(params),6m(kernel),6m(ramdisk),6m(recovery),70m(system),30m(userdata),7m(cache)"
248 #define CONFIG_BOOTARGS "mem=64M console=ttyS1,115200n8 init=/init "MTDPARTS_DEFAULT
249 #elif defined CONFIG_SP8810
250 /*#define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),384k(2ndbl),128k(params),512k(vmjaluna),6016k(modem),7680k(kernel),5120k(dsp),1280k(fixnv),2560k(runtimenv),6400k(recovery),100m(system),198m(userdata),1m(boot_logo),1m(fastboot_logo),2m(cache),256k(misc)"*/
251 //#define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),512k(2ndbl),128k(params),512k(vmjaluna),10m(modem),10m(boot),5120k(dsp),1280k(fixnv),3840k(backupfixnv),3840k(runtimenv),10m(recovery),150m(system),300m(userdata),1m(boot_logo),1m(fastboot_logo),2m(cache),256k(misc)"
252 //#define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),512k(2ndbl),128k(params),512k(vmjaluna),10m(modem),10m(boot)"
253 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),512k(2ndbl),256k(params),512k(vmjaluna),10m(modem),3840k(fixnv),3840k(backupfixnv),5120k(dsp),3840k(runtimenv),10m(boot),10m(recovery),250m(system),180m(userdata),20m(cache),256k(misc),1m(boot_logo),1m(fastboot_logo),3840k(productinfo),512k(kpanic)"
254 #define CONFIG_BOOTARGS "mem=240M console=ttyS1,115200n8 init=/init " MTDPARTS_DEFAULT
257 #define COPY_LINUX_KERNEL_SIZE (0x600000)
258 #define LINUX_INITRD_NAME "modem"
260 #define CONFIG_BOOTCOMMAND "cboot normal"
261 #define CONFIG_EXTRA_ENV_SETTINGS ""
263 #ifdef CONFIG_CMD_NET
264 #define CONFIG_IPADDR 192.168.10.2
265 #define CONFIG_SERVERIP 192.168.10.5
266 #define CONFIG_NETMASK 255.255.255.0
267 #define CONFIG_USBNET_DEVADDR 26:03:ee:00:87:9f
268 #define CONFIG_USBNET_HOSTADDR 9a:04:c7:d6:30:d0
271 #define CONFIG_NET_MULTI
272 #define CONFIG_CMD_DNS
273 #define CONFIG_CMD_NFS
274 #define CONFIG_CMD_RARP
275 #define CONFIG_CMD_PING
276 /*#define CONFIG_CMD_SNTP */
279 #define CONFIG_USB_GADGET_SC8800G
280 #define CONFIG_USB_DWC
281 #define CONFIG_USB_GADGET_DUALSPEED
282 //#define CONFIG_USB_ETHER
283 #define CONFIG_CMD_FASTBOOT
284 #define SCRATCH_ADDR (CONFIG_SYS_SDRAM_BASE + 0x100000)
285 #define FB_DOWNLOAD_BUF_SIZE (250*1024*1024)
287 #define CONFIG_MODEM_CALIBERATE
288 #define CONFIG_MODEM_CALI_UART /* uart calibration only */
290 #define CONFIG_UPDATE_TFTP
292 #define CONFIG_OF_LIBFDT
293 #define CONFIG_SYS_MAX_FLASH_BANKS 1
294 #define CONFIG_SYS_MAX_FLASH_SECT 128
298 #define CONFIG_SPLASH_SCREEN
299 #define LCD_BPP LCD_COLOR16
300 #define CONFIG_LCD_HVGA 1
301 //#define CONFIG_LCD_WVGA 1
302 #define CONFIG_MACH_NEVISTD 1
303 //#define CONFIG_LCD_NT35510
304 #define CONFIG_LCD_ILI9486
305 //#define CONFIG_LCD_INFO
306 //#define LCD_TEST_PATTERN
307 //#define CONFIG_LCD_LOGO
308 #define CONFIG_SYS_WHITE_ON_BLACK
309 #ifdef LCD_TEST_PATTERN
310 #define CONSOLE_COLOR_RED 0xf800
311 #define CONSOLE_COLOR_GREEN 0x07e0
312 #define CONSOLE_COLOR_YELLOW 0x07e0
313 #define CONSOLE_COLOR_BLUE 0x001f
314 #define CONSOLE_COLOR_MAGENTA 0x001f
315 #define CONSOLE_COLOR_CYAN 0x001f
322 #define CONFIG_CMD_MMC
323 #ifdef CONFIG_CMD_MMC
324 #define CONFIG_CMD_FAT 1
325 #define CONFIG_FAT_WRITE 1
326 #define CONFIG_GENERIC_MMC 1
327 #define CONFIG_SDHCI 1
328 #define CONFIG_SYS_MMC_MAX_BLK_COUNT 0x1000
329 #define CONFIG_MMC_SDMA 1
330 #define CONFIG_MV_SDHCI 1
331 #define CONFIG_DOS_PARTITION 1
332 #define CONFIG_SYS_MMC_NUM 2
333 #define CONFIG_SYS_MMC_BASE {0x20500000,0x20510000}
336 #define CALIBRATE_ENUM_MS 1000
337 #define CALIBRATE_IO_MS 10000
339 #define LOW_BAT_VOL 3500 /*phone battery voltage low than this value will not boot up*/
340 #define LOW_BAT_VOL_CHG 3300 //3.3V charger connect
342 #define PWR_KEY_DETECT_CNT 12 /*this should match the count of boot_pwr_check() function */
343 #define ALARM_LEAD_SET_MS 0 /* time set for alarm boot in advancd */
345 #endif /* __CONFIG_H */