tizen 2.4 release
[kernel/u-boot-tm1.git] / include / configs / 788.h
1 /*
2  * (C) Copyright 2009 DENX Software Engineering
3  * Author: John Rigby <jrigby@gmail.com>
4  *
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.
9  *
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.
14  *
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,
18  * MA 02111-1307 USA
19  */
20
21 #ifndef __CONFIG_H
22 #define __CONFIG_H
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)
26
27 #define CONFIG_SILENT_CONSOLE
28 #define CONFIG_GPIOLIB 1
29 //#define NAND_DEBUG  
30 //#define DEBUG
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)
36 #endif
37 #define CONFIG_L2_OFF                   1
38
39 #define BOOT_DEBUG 1
40
41 #define CONFIG_YAFFS2 1
42
43 #define BOOT_PART "boot"
44 //#define BOOT_PART "kernel"
45 #define RECOVERY_PART "recovery"
46 /*
47  * SPREADTRUM BIGPHONE board - SoC Configuration
48  */
49
50 #define CONFIG_SC8810
51 #define CONFIG_SP8810
52
53 #ifdef CONFIG_SC8810
54 #define CHIP_ENDIAN_LITTLE
55 #define SC8800S_LITTLE_ENDIAN FALSE
56 #define _LITTLE_ENDIAN 1
57 #define EXT_MEM_TYPE_DDR 1
58 #endif
59
60 #define CONFIG_RAM512M
61 #define BB_DRAM_TYPE_256MB_32BIT
62 #define  CONFIG_MTD_NAND_SC8810 1
63
64 #define CONFIG_SYS_HZ                   1000
65 #define CONFIG_SPRD_TIMER_CLK           1000 /*32768*/
66
67 //#define CONFIG_SYS_HUSH_PARSER
68
69 #ifdef CONFIG_SYS_HUSH_PARSER
70 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
71 #endif
72
73 #define FIXNV_SIZE              (64 * 1024)
74 #define MODEM_SIZE              (0x800000)
75 #define DSP_SIZE        (0x3E0400) /* 3968K */
76 #define VMJALUNA_SIZE       (0x64000) /* 400K */
77 #define RUNTIMENV_SIZE      (256 * 1024)
78 #define CONFIG_SPL_LOAD_LEN (0x4000)
79
80
81 /*#define CMDLINE_NEED_CONV */
82
83 #define WATCHDOG_LOAD_VALUE     0x4000
84 #define CONFIG_SYS_STACK_SIZE   0x400
85
86 //#define       CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* 256 kB for U-Boot */
87
88 /* NAND BOOT is the only boot method */
89 #define CONFIG_NAND_U_BOOT
90 #define DYNAMIC_CRC_TABLE
91 /* Start copying real U-boot from the second page */
92 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x40000
93 #define CONFIG_SYS_NAND_U_BOOT_SIZE     0x78000
94 #define RAM_TYPPE_IS_SDRAM      0
95
96 /* Load U-Boot to this address */
97 #define CONFIG_SYS_NAND_U_BOOT_DST 0x0f800000
98
99 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_NAND_U_BOOT_DST
100 #define CONFIG_SYS_SDRAM_BASE 0x00000000
101 #define CONFIG_SYS_SDRAM_END (CONFIG_SYS_SDRAM_BASE + 256*1024*1024)
102
103 #ifdef CONFIG_NAND_SPL
104 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_END - 0x40000)
105 #else
106
107 #define CONFIG_MMU_TABLE_ADDR (0x40000000)
108 #define CONFIG_SYS_INIT_SP_ADDR     \
109         (CONFIG_SYS_SDRAM_END - 0x10000 - GENERATED_GBL_DATA_SIZE)
110
111 #define CONFIG_SKIP_LOWLEVEL_INIT
112 #endif
113
114 #define CONFIG_HW_WATCHDOG
115
116 #define CONFIG_DISPLAY_CPUINFO
117
118 #define CONFIG_CMDLINE_TAG              1       /* enable passing of ATAGs */
119 #define CONFIG_SETUP_MEMORY_TAGS        1
120 #define CONFIG_INITRD_TAG               1
121
122 /*
123  * Memory Info
124  */
125 /* malloc() len */
126 #define CONFIG_SYS_MALLOC_LEN           (2 << 20)       /* 1 MiB */
127 /*
128  * Board has 2 32MB banks of DRAM but there is a bug when using
129  * both so only the first is configured
130  */
131 #define CONFIG_NR_DRAM_BANKS    1
132
133 #define PHYS_SDRAM_1            0x00000000
134 #define PHYS_SDRAM_1_SIZE       0x10000000
135 #if (CONFIG_NR_DRAM_BANKS == 2)
136 #define PHYS_SDRAM_2            0x90000000
137 #define PHYS_SDRAM_2_SIZE       0x02000000
138 #endif
139 /* 8MB DRAM test */
140 #define CONFIG_SYS_MEMTEST_START        PHYS_SDRAM_1
141 #define CONFIG_SYS_MEMTEST_END          (PHYS_SDRAM_1+0x0800000)
142 #define CONFIG_STACKSIZE        (256 * 1024)    /* regular stack */
143
144 /*
145  * Serial Info
146  */
147 #define CONFIG_SPRD_UART                1
148 #define CONFIG_SYS_SC8800X_UART1        1
149 #define CONFIG_CONS_INDEX       1       /* use UART0 for console */
150 #define CONFIG_BAUDRATE         115200  /* Default baud rate */
151 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
152
153 /*
154  * Flash & Environment
155  */
156 /* No NOR flash present */
157 #define CONFIG_SYS_MONITOR_LEN ((CONFIG_SYS_NAND_U_BOOT_OFFS)+(CONFIG_SYS_NAND_U_BOOT_SIZE))
158 #define CONFIG_SYS_NO_FLASH     1
159 #define CONFIG_ENV_IS_NOWHERE
160 #define CONFIG_ENV_SIZE         (128 * 1024)    
161 /*
162 #define CONFIG_ENV_IS_IN_NAND
163 #define CONFIG_ENV_OFFSET       CONFIG_SYS_MONITOR_LEN
164 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
165 */
166
167 /* NAND */
168 #define CONFIG_NAND_SC8810
169 #define CONFIG_SPRD_NAND_REGS_BASE      (0x60000000)
170 #define CONFIG_SYS_MAX_NAND_DEVICE      1
171 #define CONFIG_SYS_NAND_BASE            (0x60000000)
172 //#define CONFIG_JFFS2_NAND
173 //#define CONFIG_SPRD_NAND_HWECC
174 #define CONFIG_SYS_NAND_HW_ECC
175 #define CONFIG_SYS_NAND_LARGEPAGE
176 //#define CONFIG_SYS_NAND_5_ADDR_CYCLE
177
178 #define CONFIG_SYS_64BIT_VSPRINTF
179
180 #define CONFIG_CMD_MTDPARTS
181 #define CONFIG_MTD_PARTITIONS
182 #define CONFIG_MTD_DEVICE
183 #define CONFIG_CMD_UBI
184 #define CONFIG_RBTREE
185
186 /* U-Boot general configuration */
187 #define CONFIG_SYS_PROMPT       "=> "   /* Monitor Command Prompt */
188 #define CONFIG_SYS_CBSIZE       1024    /* Console I/O Buffer Size  */
189 /* Print buffer sz */
190 #define CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE + \
191                 sizeof(CONFIG_SYS_PROMPT) + 16)
192 #define CONFIG_SYS_MAXARGS      32      /* max number of command args */
193 /* Boot Argument Buffer Size */
194 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE
195 #define CONFIG_CMDLINE_EDITING
196 #define CONFIG_SYS_LONGHELP
197
198 /* support OS choose */
199 #undef CONFIG_BOOTM_NETBSD 
200 #undef CONFIG_BOOTM_RTEMS
201
202 /* U-Boot commands */
203 #include <config_cmd_default.h>
204 #define CONFIG_CMD_NAND
205 #undef CONFIG_CMD_FPGA
206 #undef CONFIG_CMD_LOADS
207 #undef CONFIG_CMD_NET
208 #undef CONFIG_CMD_NFS
209 #undef CONFIG_CMD_SETGETDCR
210
211 #define CONFIG_ENV_OVERWRITE
212
213 #ifdef SPRD_EVM_TAG_ON
214 #define CONFIG_BOOTDELAY        0
215 #else
216 #define CONFIG_BOOTDELAY        0
217 #define CONFIG_ZERO_BOOTDELAY_CHECK
218 #endif
219
220 #define CONFIG_LOADADDR         (CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN - 4*1024*1024)    /* loadaddr env var */
221 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
222
223 #define xstr(s) str(s)
224 #define str(s)  #s
225
226 #define MTDIDS_DEFAULT "nand0=sprd-nand"
227
228 #define COPY_LINUX_KERNEL_SIZE  (0x600000)
229 #define LINUX_INITRD_NAME       "modem"
230
231 #define CONFIG_BOOTCOMMAND "cboot normal"
232 #define CONFIG_EXTRA_ENV_SETTINGS                               ""      
233
234 #ifdef CONFIG_CMD_NET
235 #define CONFIG_IPADDR 192.168.10.2
236 #define CONFIG_SERVERIP 192.168.10.5
237 #define CONFIG_NETMASK 255.255.255.0
238 #define CONFIG_USBNET_DEVADDR 26:03:ee:00:87:9f
239 #define CONFIG_USBNET_HOSTADDR 9a:04:c7:d6:30:d0
240
241
242 #define CONFIG_NET_MULTI
243 #define CONFIG_CMD_DNS
244 #define CONFIG_CMD_NFS
245 #define CONFIG_CMD_RARP
246 #define CONFIG_CMD_PING
247 /*#define CONFIG_CMD_SNTP */
248 #endif
249
250 #define CONFIG_USB_GADGET_SC8800G
251 #define CONFIG_USB_DWC
252 #define CONFIG_USB_GADGET_DUALSPEED
253 //#define CONFIG_USB_ETHER
254 #define CONFIG_CMD_FASTBOOT
255 #define SCRATCH_ADDR    (CONFIG_SYS_SDRAM_BASE + 0x100000)
256 #define FB_DOWNLOAD_BUF_SIZE (250*1024*1024)
257
258 #define CONFIG_MODEM_CALIBERATE
259 /*
260 #define CONFIG_UPDATE_TFTP
261 #define CONFIG_FIT
262 #define CONFIG_OF_LIBFDT
263 #define CONFIG_SYS_MAX_FLASH_BANKS 1
264 #define CONFIG_SYS_MAX_FLASH_SECT 128
265 */
266 #define CONFIG_LCD
267 #ifdef CONFIG_LCD
268 #define CONFIG_LCD_788
269 #define CONFIG_SPLASH_SCREEN
270 #define LCD_BPP LCD_COLOR16
271 #define CONFIG_LCD_HVGA   1
272 //#define CONFIG_LCD_WVGA   1
273 //#define CONFIG_LCD_INFO
274 //#define LCD_TEST_PATTERN
275 //#define CONFIG_LCD_LOGO
276 #define CONFIG_SYS_WHITE_ON_BLACK
277 #define CONFIG_LCD_HX8357
278 #define CONFIG_LCD_RM61581_TRULY
279 #ifdef LCD_TEST_PATTERN
280 #define CONSOLE_COLOR_RED 0xf800 
281 #define CONSOLE_COLOR_GREEN 0x07e0
282 #define CONSOLE_COLOR_YELLOW 0x07e0
283 #define CONSOLE_COLOR_BLUE 0x001f
284 #define CONSOLE_COLOR_MAGENTA 0x001f
285 #define CONSOLE_COLOR_CYAN 0x001f
286 #endif
287 #endif // CONFIG_LCD
288 #define CONFIG_BOARD_788
289 /*
290  * MMC definition
291  */
292 #define CONFIG_CMD_MMC
293 #ifdef CONFIG_CMD_MMC
294 #define CONFIG_CMD_FAT                  1
295 #define CONFIG_FAT_WRITE        1
296 #define CONFIG_MMC                      1
297 #define CONFIG_GENERIC_MMC              1
298 #define CONFIG_SDHCI                    1
299 #define CONFIG_SYS_MMC_MAX_BLK_COUNT    0x1000
300 #define CONFIG_MMC_SDMA                 1
301 #define CONFIG_MV_SDHCI                 1
302 #define CONFIG_DOS_PARTITION            1
303 #define CONFIG_EFI_PARTITION            1
304 #define CONFIG_SYS_MMC_NUM              1
305 #define CONFIG_SYS_MMC_BASE             {0x20500000}
306 #endif
307 #define CALIBRATE_ENUM_MS 15000
308 #define CALIBRATE_IO_MS 10000
309
310 #define LOW_BAT_VOL            3500 /*phone battery voltage low than this value will not boot up*/
311 #define LOW_BAT_VOL_CHG        3300    //3.3V charger connect
312
313 #define PWR_KEY_DETECT_CNT 12 /*this should match the count of boot_pwr_check() function */
314 #define ALARM_LEAD_SET_MS 0 /* time set for alarm boot in advancd */
315
316 #endif /* __CONFIG_H */