2 * (C) Copyright 2009 DENX Software Engineering
\r
3 * Author: John Rigby <jrigby@gmail.com>
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License as
\r
7 * published by the Free Software Foundation; either version 2 of
\r
8 * the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
\r
23 //only used in fdl2 .in uart download, the debug infors from serial will break the download process.
\r
24 #define CONFIG_FDL2_PRINT 0
\r
25 #define BOOT_NATIVE_LINUX (0)
\r
27 #define CONFIG_SILENT_CONSOLE
\r
28 #define CONFIG_GPIOLIB 1
\r
29 //#define NAND_DEBUG
\r
31 #define U_BOOT_SPRD_VER 1
\r
32 /*#define SPRD_EVM_TAG_ON 1*/
\r
33 #ifdef SPRD_EVM_TAG_ON
\r
34 #define SPRD_EVM_ADDR_START 0x00026000
\r
35 #define SPRD_EVM_TAG(_x) (*(((unsigned long *)SPRD_EVM_ADDR_START)+_x) = *(volatile unsigned long *)0x87003004)
\r
37 #define CONFIG_L2_OFF 1
\r
39 #define BOOT_DEBUG 1
\r
41 #define CONFIG_YAFFS2 1
\r
43 #define BOOT_PART "boot"
\r
44 //#define BOOT_PART "kernel"
\r
45 #define RECOVERY_PART "recovery"
\r
47 * SPREADTRUM BIGPHONE board - SoC Configuration
\r
49 #define CONFIG_SP8825
\r
50 #define CONFIG_SC8825
\r
51 #define CONFIG_TIGER
\r
52 #define CONFIG_SP6825GB
\r
55 #define CHIP_ENDIAN_LITTLE
\r
56 #define SC8800S_LITTLE_ENDIAN FALSE
\r
57 #define _LITTLE_ENDIAN 1
\r
58 #define EXT_MEM_TYPE_DDR 1
\r
61 /********** DDR timing configuration for customer begin *************/
\r
62 #define CONFIG_DDR_TIMING_CUSTOM TRUE //TRUE or FALSE
\r
64 // name: CONFIG_LPDDR1_DS
\r
65 // description: to config lpddr1 driver strength
\r
66 // note: when lpddr2, don't need to set this parameter
\r
75 #define CONFIG_LPDDR1_DS LPDDR1_DS_39_OHM
\r
77 // name: CONFIG_LPDDR2_DS
\r
78 // note: to config lpddr2 driver strength, when lpddr1, don't need to set this parameter
\r
85 #define CONFIG_LPDDR2_DS LPDDR2_DS_40_OHM
\r
87 // name: CONFIG_BYTEx_PHY_DLY
\r
88 // description: to config BYTE0~BYTE3 slave dll phase delay in ddr controller
\r
89 // note: when lpddr1, don't need to set this parameter
\r
99 #define CONFIG_BYTE0_PHS_DLY SDLL_PHS_DLY_90
\r
100 #define CONFIG_BYTE1_PHS_DLY SDLL_PHS_DLY_72
\r
101 #define CONFIG_BYTE2_PHS_DLY SDLL_PHS_DLY_72
\r
102 #define CONFIG_BYTE3_PHS_DLY SDLL_PHS_DLY_90
\r
104 // name: CONFIG_BYTEx_STEP_DLY
\r
105 // description: to config BYTE0~BYTE3 dqs step delay in ddr controller
\r
106 // note: when lpddr1, don't need to set this parameter
\r
108 // DQS_STEP_DLY_SUB3,
\r
109 // DQS_STEP_DLY_SUB2,
\r
110 // DQS_STEP_DLY_SUB1,
\r
111 // DQS_STEP_DLY_NOM,
\r
112 // DQS_STEP_DLY_DEF,
\r
113 // DQS_STEP_DLY_ADD1,
\r
114 // DQS_STEP_DLY_ADD2,
\r
115 // DQS_STEP_DLY_ADD3,
\r
116 // DQS_STEP_DLY_ADD4,
\r
117 #define CONFIG_BYTE0_STEP_DLY DQS_STEP_DLY_SUB2
\r
118 #define CONFIG_BYTE1_STEP_DLY DQS_STEP_DLY_ADD2
\r
119 #define CONFIG_BYTE2_STEP_DLY DQS_STEP_DLY_ADD1
\r
120 #define CONFIG_BYTE3_STEP_DLY DQS_STEP_DLY_SUB2
\r
121 /************* DDR timing configuration for customer end **************/
\r
124 //#define CONFIG_RAM512M
\r
125 #define BB_DRAM_TYPE_256MB_32BIT
\r
126 #define CONFIG_MTD_NAND_TIGER 1
\r
127 //#define CONFIG_MTD_NAND_SC8810 1
\r
129 //#define CONFIG_MEM_LPDDR1
\r
130 ////#define CONFIG_MEM_LPDDR1_2CS_4GBIT
\r
131 //#define CONFIG_MEM_LPDDR1_1CS_2GBIT
\r
133 #define CONFIG_SYS_HZ 1000
\r
134 #define CONFIG_SPRD_TIMER_CLK 1000 /*32768*/
\r
136 //#define CONFIG_SYS_HUSH_PARSER
\r
138 #ifdef CONFIG_SYS_HUSH_PARSER
\r
139 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
\r
142 #define FIXNV_SIZE (64 * 1024)
\r
143 #define MODEM_SIZE (0x800000)
\r
144 #define DSP_SIZE (0x3E0400) /* 3968K */
\r
145 #define VMJALUNA_SIZE (0x64000) /* 400K */
\r
146 #define RUNTIMENV_SIZE (256 * 1024)
\r
147 #define CONFIG_SPL_LOAD_LEN (0x6000)
\r
150 /*#define CMDLINE_NEED_CONV */
\r
152 #define WATCHDOG_LOAD_VALUE 0x4000
\r
153 #define CONFIG_SYS_STACK_SIZE 0x400
\r
154 //#define CONFIG_SYS_TEXT_BASZE 0x80f00000
\r
156 //#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 kB for U-Boot */
\r
158 /* NAND BOOT is the only boot method */
\r
159 #define CONFIG_NAND_U_BOOT
\r
160 #define DYNAMIC_CRC_TABLE
\r
161 /* Start copying real U-boot from the second page */
\r
162 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
\r
163 #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x80000
\r
164 #define RAM_TYPPE_IS_SDRAM 0
\r
165 //#define FPGA_TRACE_DOWNLOAD //for download image from trace
\r
167 /* Load U-Boot to this address */
\r
168 #define CONFIG_SYS_NAND_U_BOOT_DST 0x8f800000
\r
169 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
\r
170 #define CONFIG_SYS_SDRAM_BASE 0x80000000
\r
171 #define CONFIG_SYS_SDRAM_END (CONFIG_SYS_SDRAM_BASE + 256*1024*1024)
\r
173 #ifdef CONFIG_NAND_SPL
\r
174 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_END - 0x40000)
\r
177 #define CONFIG_MMU_TABLE_ADDR (0x00020000)
\r
178 #define CONFIG_SYS_INIT_SP_ADDR \
\r
179 (CONFIG_SYS_SDRAM_END - 0x10000 - GENERATED_GBL_DATA_SIZE)
\r
181 #define CONFIG_SKIP_LOWLEVEL_INIT
\r
184 #define CONFIG_HW_WATCHDOG
\r
185 //#define CONFIG_AUTOBOOT //used for FPGA test, auto boot other image
\r
186 //#define CONFIG_DISPLAY_CPUINFO
\r
188 #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
\r
189 #define CONFIG_SETUP_MEMORY_TAGS 1
\r
190 #define CONFIG_INITRD_TAG 1
\r
196 #define CONFIG_SYS_MALLOC_LEN (2 << 20) /* 1 MiB */
\r
198 * Board has 2 32MB banks of DRAM but there is a bug when using
\r
199 * both so only the first is configured
\r
201 #define CONFIG_NR_DRAM_BANKS 1
\r
203 #define PHYS_SDRAM_1 0x80000000
\r
204 #define PHYS_SDRAM_1_SIZE 0x10000000
\r
205 #if (CONFIG_NR_DRAM_BANKS == 2)
\r
206 #define PHYS_SDRAM_2 0x90000000
\r
207 #define PHYS_SDRAM_2_SIZE 0x10000000
\r
209 /* 8MB DRAM test */
\r
210 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
\r
211 #define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1+0x0800000)
\r
212 #define CONFIG_STACKSIZE (256 * 1024) /* regular stack */
\r
217 #define CONFIG_SPRD_UART 1
\r
218 #define CONFIG_SYS_SC8800X_UART1 1
\r
219 #define CONFIG_CONS_INDEX 1 /* use UART0 for console */
\r
220 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
\r
221 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
\r
222 #define CONFIG_SC8825_SPI
\r
223 #define CONFIG_SC8825_I2C
\r
225 * Flash & Environment
\r
227 /* No NOR flash present */
\r
228 #define CONFIG_SYS_MONITOR_LEN ((CONFIG_SYS_NAND_U_BOOT_OFFS)+(CONFIG_SYS_NAND_U_BOOT_SIZE))
\r
229 #define CONFIG_SYS_NO_FLASH 1
\r
230 #define CONFIG_ENV_IS_NOWHERE
\r
231 #define CONFIG_ENV_SIZE (128 * 1024)
\r
233 #define CONFIG_ENV_IS_IN_NAND
\r
234 #define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN
\r
235 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
\r
239 #define CONFIG_NAND_TIGER
\r
240 //#define CONFIG_NAND_SC8810
\r
241 #define CONFIG_SPRD_NAND_REGS_BASE (0x21100000)
\r
242 #define CONFIG_SYS_MAX_NAND_DEVICE 1
\r
243 #define CONFIG_SYS_NAND_BASE (0x21100000)
\r
244 //#define CONFIG_JFFS2_NAND
\r
245 //#define CONFIG_SPRD_NAND_HWECC
\r
246 #define CONFIG_SYS_NAND_HW_ECC
\r
247 #define CONFIG_SYS_NAND_LARGEPAGE
\r
248 //#define CONFIG_SYS_NAND_5_ADDR_CYCLE
\r
250 #define CONFIG_SYS_64BIT_VSPRINTF
\r
252 #define CONFIG_CMD_MTDPARTS
\r
253 #define CONFIG_MTD_PARTITIONS
\r
254 #define CONFIG_MTD_DEVICE
\r
255 #define CONFIG_CMD_UBI
\r
256 #define CONFIG_RBTREE
\r
258 /* U-Boot general configuration */
\r
259 #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
\r
260 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
\r
261 /* Print buffer sz */
\r
262 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
\r
263 sizeof(CONFIG_SYS_PROMPT) + 16)
\r
264 #define CONFIG_SYS_MAXARGS 32 /* max number of command args */
\r
265 /* Boot Argument Buffer Size */
\r
266 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
\r
267 #define CONFIG_CMDLINE_EDITING
\r
268 #define CONFIG_SYS_LONGHELP
\r
270 /* support OS choose */
\r
271 #undef CONFIG_BOOTM_NETBSD
\r
272 #undef CONFIG_BOOTM_RTEMS
\r
274 /* U-Boot commands */
\r
275 #include <config_cmd_default.h>
\r
276 #define CONFIG_CMD_NAND
\r
277 #undef CONFIG_CMD_FPGA
\r
278 #undef CONFIG_CMD_LOADS
\r
279 #undef CONFIG_CMD_NET
\r
280 #undef CONFIG_CMD_NFS
\r
281 #undef CONFIG_CMD_SETGETDCR
\r
283 #define CONFIG_ENV_OVERWRITE
\r
285 #ifdef SPRD_EVM_TAG_ON
\r
286 #define CONFIG_BOOTDELAY 0
\r
288 #define CONFIG_BOOTDELAY 0
\r
289 #define CONFIG_ZERO_BOOTDELAY_CHECK
\r
292 #define CONFIG_LOADADDR (CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN - 4*1024*1024) /* loadaddr env var */
\r
293 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
\r
295 #define xstr(s) str(s)
\r
298 #define MTDIDS_DEFAULT "nand0=sprd-nand"
\r
299 #ifdef CONFIG_G2PHONE
\r
300 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:384k@256k(boot),256k(params),6m(kernel),6m(ramdisk),6m(recovery),70m(system),30m(userdata),7m(cache)"
\r
301 #define CONFIG_BOOTARGS "mem=64M console=ttyS1,115200n8 init=/init "MTDPARTS_DEFAULT
\r
302 #elif defined CONFIG_SC8825
\r
303 /*#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)"*/
\r
304 //#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)"
\r
305 //#define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),512k(2ndbl),128k(params),512k(vmjaluna),10m(modem),10m(boot)"
\r
306 #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)"
\r
307 #define CONFIG_BOOTARGS "mem=256M console=ttyS1,115200n8 init=/init " MTDPARTS_DEFAULT
\r
310 #define COPY_LINUX_KERNEL_SIZE (0x600000)
\r
311 #define LINUX_INITRD_NAME "modem"
\r
313 #define CONFIG_BOOTCOMMAND "cboot normal"
\r
314 #define CONFIG_EXTRA_ENV_SETTINGS ""
\r
316 #ifdef CONFIG_CMD_NET
\r
317 #define CONFIG_IPADDR 192.168.10.2
\r
318 #define CONFIG_SERVERIP 192.168.10.5
\r
319 #define CONFIG_NETMASK 255.255.255.0
\r
320 #define CONFIG_USBNET_DEVADDR 26:03:ee:00:87:9f
\r
321 #define CONFIG_USBNET_HOSTADDR 9a:04:c7:d6:30:d0
\r
324 #define CONFIG_NET_MULTI
\r
325 #define CONFIG_CMD_DNS
\r
326 #define CONFIG_CMD_NFS
\r
327 #define CONFIG_CMD_RARP
\r
328 #define CONFIG_CMD_PING
\r
329 /*#define CONFIG_CMD_SNTP */
\r
332 #define CONFIG_USB_CORE_IP_293A
\r
333 #define CONFIG_USB_GADGET_SC8800G
\r
334 #define CONFIG_USB_DWC
\r
335 #define CONFIG_USB_GADGET_DUALSPEED
\r
336 //#define CONFIG_USB_ETHER
\r
337 #define CONFIG_CMD_FASTBOOT
\r
338 #define SCRATCH_ADDR (CONFIG_SYS_SDRAM_BASE + 0x100000)
\r
339 #define FB_DOWNLOAD_BUF_SIZE (250*1024*1024)
\r
341 #define CONFIG_MODEM_CALIBERATE
\r
343 #define CONFIG_UPDATE_TFTP
\r
345 #define CONFIG_OF_LIBFDT
\r
346 #define CONFIG_SYS_MAX_FLASH_BANKS 1
\r
347 #define CONFIG_SYS_MAX_FLASH_SECT 128
\r
351 #define CONFIG_SPLASH_SCREEN
\r
352 #define LCD_BPP LCD_COLOR16
\r
353 #define CONFIG_LCD_FWVGA 1
\r
354 //#define CONFIG_LCD_HVGA 1
\r
355 //#define CONFIG_LCD_WVGA 1
\r
356 //#define CONFIG_LCD_QHD 1
\r
357 //#define CONFIG_LCD_INFO
\r
358 //#define LCD_TEST_PATTERN
\r
359 //#define CONFIG_LCD_LOGO
\r
360 //#define CONFIG_FB_LCD_NT35516_MCU
\r
361 #define CONFIG_FB_LCD_HX8363_RGB_SPI
\r
362 #define CONFIG_SYS_WHITE_ON_BLACK
\r
363 #ifdef LCD_TEST_PATTERN
\r
364 #define CONSOLE_COLOR_RED 0xf800
\r
365 #define CONSOLE_COLOR_GREEN 0x07e0
\r
366 #define CONSOLE_COLOR_YELLOW 0x07e0
\r
367 #define CONSOLE_COLOR_BLUE 0x001f
\r
368 #define CONSOLE_COLOR_MAGENTA 0x001f
\r
369 #define CONSOLE_COLOR_CYAN 0x001f
\r
371 #endif // CONFIG_LCD
\r
376 #define CONFIG_CMD_MMC
\r
377 #ifdef CONFIG_CMD_MMC
\r
378 #define CONFIG_CMD_FAT 1
\r
379 #define CONFIG_FAT_WRITE 1
\r
380 #define CONFIG_MMC 1
\r
381 #define CONFIG_GENERIC_MMC 1
\r
382 #define CONFIG_SDHCI 1
\r
383 #define CONFIG_SYS_MMC_MAX_BLK_COUNT 0x1000
\r
384 #define CONFIG_MMC_SDMA 1
\r
385 #define CONFIG_MV_SDHCI 1
\r
386 #define CONFIG_DOS_PARTITION 1
\r
387 #define CONFIG_EFI_PARTITION 1
\r
388 #define CONFIG_SYS_MMC_NUM 1
\r
389 #define CONFIG_SYS_MMC_BASE {0x20510000}
\r
392 #define CALIBRATE_ENUM_MS 15000
\r
393 #define CALIBRATE_IO_MS 10000
\r
395 //#define LOW_BAT_ADC_LEVEL 782 /*phone battery adc value low than this value will not boot up*/
\r
396 #define LOW_BAT_VOL 3500 /*phone battery voltage low than this value will not boot up*/
\r
397 #define LOW_BAT_VOL_CHG 3300 //3.3V charger connect
\r
399 #define PWR_KEY_DETECT_CNT 12 /*this should match the count of boot_pwr_check() function */
\r
400 #define ALARM_LEAD_SET_MS 0 /* time set for alarm boot in advancd */
\r
401 #define USB_PHY_TUNE_VALUE 0x44073e33
\r
404 #endif /* __CONFIG_H */
\r