configs: tizen_tm1: fix the duplicated defined config
[profile/mobile/platform/kernel/u-boot-tm1.git] / include / configs / tizen_tm1.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
24 #define CONFIG_TIZEN
25
26 //#define CONFIG_SECURE_BOOT
27 //#define CONFIG_ROM_VERIFY_SPL
28 #define PRIMPUKPATH "/dev/block/mmcblk0boot0"
29 #define PRIMPUKSTART 512
30 #define PRIMPUKLEN 260
31 #define CONFIG_OF_LIBFDT
32 //#ifdef CONFIG_OF_LIBFDT
33 //MACH_TYPE_SC8830=2014
34 //ask for detect it
35 #define DT_PLATFROM_ID 8830
36 #define DT_HARDWARE_ID 0
37 #define DT_SOC_VER     0
38 #define DT_SLP_SOC_VER     0x20000
39 #define CONFIG_MULTI_DTS
40 //#endif
41 //only used in fdl2 .in uart download, the debug infors  from  serial will break the download process.
42 #define CONFIG_FDL2_PRINT        0
43 #define BOOT_NATIVE_LINUX        1
44 #define BOOT_NATIVE_LINUX_MODEM  1
45 #define CONFIG_SILENT_CONSOLE
46 #define CONFIG_GPIOLIB 1
47 //#define NAND_DEBUG
48 //#define DEBUG
49 //#define CONFIG_SDRAMDISK
50 #define U_BOOT_SPRD_VER 1
51 /*#define SPRD_EVM_TAG_ON 1*/
52 #ifdef SPRD_EVM_TAG_ON
53 #define SPRD_EVM_ADDR_START 0x00026000
54 #define SPRD_EVM_TAG(_x) (*(((unsigned long *)SPRD_EVM_ADDR_START)+_x) = *(volatile unsigned long *)0x87003004)
55 #endif
56 #define CONFIG_L2_OFF                   1
57
58 #define BOOT_DEBUG 1
59
60 //#define CONFIG_YAFFS2 1
61
62 //#define BOOT_PART "boot"
63 #define BOOT_PART "kernel"
64 #define RECOVERY_PART "recovery"
65 #define UBIPAC_PART  "ubipac"
66
67 /*
68  * SPREADTRUM BIGPHONE board - SoC Configuration
69  */
70 //#define CONFIG_SP8830
71 #define CONFIG_SC8830
72 #define CONFIG_SPX30G   //tshark chip
73 #define CONFIG_SPX30G2  //tshark2 chip
74
75 #define CONFIG_TIZENZ3_3G
76 #define CONFIG_SP8830WCN
77 #define CONFIG_ADIE_SC2723S
78
79 #define CONFIG_SUPPORT_W
80 #define WDSP_ADR       0x88020000
81 #define WFIXNV_ADR     0x88240000
82 #define WRUNTIMENV_ADR 0x88280000
83 #define WMODEM_ADR     0x88300000
84 #define MODEM_ADR     WMODEM_ADR
85 #define CONFIG_SUPPORT_WIFI
86 #define WCNMODEM_ADR      0x8a808000
87 #define WCNFIXNV_ADR      0x8a800000
88 #define WCNRUNTIMENV_ADR  0x8a820000
89 //#define WMODEM_CODE_COPY_ADR 0x50000000
90 //#define WCN_CODE_COPY_ADR 0x50003000
91
92 #define CP0_CODE_COPY_ADR 0x50000000
93 #define CP2_CODE_COPY_ADR 0x50003000
94
95 #define CONFIG_AUTODLOADER
96
97 #define CHIP_ENDIAN_LITTLE
98 #define _LITTLE_ENDIAN 1
99
100 #define CONFIG_RAM1G
101
102 #define CONFIG_EMMC_BOOT
103
104
105 #ifdef  CONFIG_EMMC_BOOT
106 #define EMMC_SECTOR_SIZE 512
107 #define CONFIG_MMC
108
109 #define CONFIG_FS_EXT4
110 #define CONFIG_EXT4_WRITE
111 #define CONFIG_CMD_EXT4
112 #define CONFIG_CMD_EXT4_WRITE
113
114 //#define CONFIG_TIGER_MMC
115 #define CONFIG_EFI_PARTITION
116 //#define CONFIG_EMMC_SPL
117 #define CONFIG_SYS_EMMC_U_BOOT_SECTOR_NUM ((CONFIG_SYS_NAND_U_BOOT_SIZE+EMMC_SECTOR_SIZE-1)/EMMC_SECTOR_SIZE)
118
119 #endif
120
121 /*
122  * MMC definition
123  */
124 #define CONFIG_CMD_MMC
125 #ifdef  CONFIG_CMD_MMC
126 #define CONFIG_CMD_FAT                  1
127 #define CONFIG_FAT_WRITE                1
128 #ifndef CONFIG_MMC
129 #define CONFIG_MMC                      1
130 #endif  /* !CONFIG_MMC */
131 #define CONFIG_GENERIC_MMC              1
132 #define CONFIG_SDHCI                    1
133 #define CONFIG_SDHCI_CTRL_NO_HISPD     1 /* disable high speed control */
134 #define CONFIG_SYS_MMC_MAX_BLK_COUNT    0x1000
135 #define CONFIG_MMC_SDMA                 1
136 #define CONFIG_MV_SDHCI                 1
137 #define CONFIG_DOS_PARTITION            1
138 #ifndef CONFIG_EFI_PARTITION
139 #define CONFIG_EFI_PARTITION            1
140 #endif  /* !CONFIG_EFI_PARTITION */
141 #define CONFIG_SYS_MMC_NUM              1
142 #define CONFIG_SYS_MMC_BASE             {0x20600000}
143 #define CONFIG_SYS_SD_BASE              0x20300000
144 #endif
145
146 #define BB_DRAM_TYPE_256MB_32BIT
147
148 #define CONFIG_SYS_HZ                   1000
149 #define CONFIG_SPRD_TIMER_CLK           1000 /*32768*/
150
151 //#define CONFIG_SYS_HUSH_PARSER
152
153 #ifdef CONFIG_SYS_HUSH_PARSER
154 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
155 #endif
156
157 #define FIXNV_SIZE              (2*128 * 1024)
158 #define PRODUCTINFO_SIZE        (16 * 1024)
159 #define WMODEM_SIZE             (0x800000)
160 #define WDSP_SIZE               (0x200000)
161 #define WCNMODEM_SIZE           (0x100000)
162 #define VMJALUNA_SIZE           (0x64000) /* 400K */
163 #define RUNTIMENV_SIZE          (3*128 * 1024)
164 #ifdef CONFIG_ROM_VERIFY_SPL
165 #define CONFIG_SPL_LOAD_LEN     (0x8000) /* 32 KB */
166 #define CONFIG_BOOTINFO_LENGTH  (0x200)  /* 512 Bytes*/
167 #define PUBKEY_BSC_BLOCK_INDEX  (CONFIG_SPL_LOAD_LEN - CONFIG_BOOTINFO_LENGTH * 2) / EMMC_SECTOR_SIZE
168 #define PUBKEY_VLR_BLOCK_INDEX  2
169 #define PUBKEY_READ_BLOCK_NUMS  1
170 #define CONFIG_SPL_HASH_LEN     (0x400) /* 1KB */
171 #else
172 #define CONFIG_SPL_LOAD_LEN     (0x6000)
173 #define PUBKEY_BSC_BLOCK_INDEX  0
174 #define PUBKEY_VLR_BLOCK_INDEX  0
175 #define PUBKEY_READ_BLOCK_NUMS  (SEC_HEADER_MAX_SIZE / EMMC_SECTOR_SIZE)
176 #define CONFIG_SPL_HASH_LEN     (0xC00) /* 3KB */
177 #endif
178
179 #define PRODUCTINFO_ADR         0x80490000
180
181 /*#define CMDLINE_NEED_CONV */
182
183 #define WATCHDOG_LOAD_VALUE     0x4000
184 #define CONFIG_SYS_STACK_SIZE   0x400
185 //#define CONFIG_SYS_TEXT_BASZE  0x80f00000
186
187 //#define       CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* 256 kB for U-Boot */
188
189 /* NAND BOOT is the only boot method */
190 #define CONFIG_NAND_U_BOOT
191 #define DYNAMIC_CRC_TABLE
192 /* Start copying real U-boot from the second page */
193 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x40000
194 #define CONFIG_SYS_NAND_U_BOOT_SIZE     0xa0000
195 #define RAM_TYPPE_IS_SDRAM      0
196 //#define FPGA_TRACE_DOWNLOAD //for download image from trace
197
198 /* Load U-Boot to this address */
199 #define CONFIG_SYS_NAND_U_BOOT_DST      0x9f600000
200 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_NAND_U_BOOT_DST
201 #define CONFIG_SYS_SDRAM_BASE 0x80000000
202 #define CONFIG_SYS_SDRAM_END (CONFIG_SYS_SDRAM_BASE + 256*1024*1024)
203
204 #ifdef CONFIG_NAND_SPL
205 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_END - 0x40000)
206 #else
207
208 #define CONFIG_MMU_TABLE_ADDR (0x00020000)
209 #define CONFIG_SYS_INIT_SP_ADDR     \
210         (CONFIG_SYS_SDRAM_END - 0x10000 - GENERATED_GBL_DATA_SIZE)
211
212 #define CONFIG_SKIP_LOWLEVEL_INIT
213 #endif
214
215 #define CONFIG_HW_WATCHDOG
216 //#define CONFIG_AUTOBOOT //used for FPGA test, auto boot other image
217 //#define CONFIG_DISPLAY_CPUINFO
218
219 #define CONFIG_CMDLINE_TAG              1       /* enable passing of ATAGs */
220 #define CONFIG_SETUP_MEMORY_TAGS        1
221 #define CONFIG_INITRD_TAG               1
222
223 /*
224  * Memory Info
225  */
226 /* malloc() len */
227 #define CONFIG_SYS_MALLOC_LEN           (2 << 20)       /* 1 MiB */
228 /*
229  * Board has 2 32MB banks of DRAM but there is a bug when using
230  * both so only the first is configured
231  */
232 #define CONFIG_NR_DRAM_BANKS    1
233
234 #define PHYS_SDRAM_1            0x80000000
235 #define PHYS_SDRAM_1_SIZE       0x10000000
236 #if (CONFIG_NR_DRAM_BANKS == 2)
237 #define PHYS_SDRAM_2            0x90000000
238 #define PHYS_SDRAM_2_SIZE       0x10000000
239 #endif
240 /* 8MB DRAM test */
241 #define CONFIG_SYS_MEMTEST_START        PHYS_SDRAM_1
242 #define CONFIG_SYS_MEMTEST_END          (PHYS_SDRAM_1+0x0800000)
243 #define CONFIG_STACKSIZE        (256 * 1024)    /* regular stack */
244
245 /*
246  * Serial Info
247  */
248 #define CONFIG_SPRD_UART                1
249 #define CONFIG_SYS_SC8800X_UART1        1
250 #define CONFIG_CONS_INDEX       1       /* use UART0 for console */
251 #define CONFIG_BAUDRATE         115200  /* Default baud rate */
252 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
253 #define CONFIG_SPRD_SPI
254 #define CONFIG_SPRD_I2C
255 #define CONFIG_SC8830_I2C
256 /*
257  * Flash & Environment
258  */
259 /* No NOR flash present */
260 #define CONFIG_SYS_MONITOR_LEN ((CONFIG_SYS_NAND_U_BOOT_OFFS)+(CONFIG_SYS_NAND_U_BOOT_SIZE))
261 #define CONFIG_SYS_NO_FLASH     1
262 #define CONFIG_ENV_IS_NOWHERE
263 #define CONFIG_ENV_SIZE         (128 * 1024)
264 /*
265 #define CONFIG_ENV_IS_IN_NAND
266 #define CONFIG_ENV_OFFSET       CONFIG_SYS_MONITOR_LEN
267 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
268 */
269
270 /* DDR */
271 #define CONFIG_CLK_PARA
272
273 #ifndef CONFIG_CLK_PARA
274 #define DDR_CLK 464
275 #else
276 #define MAGIC_HEADER    0x5555AAAA
277 #define MAGIC_END       0xAAAA5555
278 #define CONFIG_PARA_VERSION 1
279 #define CLK_CA7_CORE    ARM_CLK_1000M
280 #define CLK_CA7_AXI     ARM_CLK_500M
281 #define CLK_CA7_DGB     ARM_CLK_200M
282 #define CLK_CA7_AHB     AHB_CLK_192M
283 #define CLK_CA7_APB     APB_CLK_64M
284 #define CLK_PUB_AHB     PUB_AHB_CLK_153_6M
285 #define CLK_AON_APB     AON_APB_CLK_128M
286 #define DDR_FREQ        800000000
287 #define DCDC_ARM        1200
288 #define DCDC_CORE       1100
289 #define CONFIG_VOL_PARA
290 #endif
291
292
293 /* NAND */
294 //#define CONFIG_NAND_SC8830
295 #define CONFIG_SPRD_NAND_REGS_BASE      (0x20B00000)
296 #define CONFIG_SYS_MAX_NAND_DEVICE      1
297 #define CONFIG_SYS_NAND_BASE            (0x20B00000)
298 //#define CONFIG_JFFS2_NAND
299 //#define CONFIG_SPRD_NAND_HWECC
300 #define CONFIG_SYS_NAND_HW_ECC
301 #define CONFIG_SYS_NAND_LARGEPAGE
302 //#define CONFIG_SYS_NAND_5_ADDR_CYCLE
303
304 #define CONFIG_SYS_64BIT_VSPRINTF
305
306 //#define CONFIG_CMD_MTDPARTS
307 //#define CONFIG_MTD_PARTITIONS
308 //#define CONFIG_MTD_DEVICE
309 //#define CONFIG_CMD_UBI
310 #define CONFIG_RBTREE
311
312 //#define CONFIG_CMD_UBIFS
313 //#define CONFIG_LZO
314 //#ifdef CONFIG_CMD_UBIFS
315 //#define CONFIG_FS_UBIFS
316 //#endif
317
318 /* U-Boot general configuration */
319 #define CONFIG_SYS_PROMPT       "TM1 # "        /* Monitor Command Prompt */
320 #define CONFIG_SYS_CBSIZE       1024    /* Console I/O Buffer Size  */
321 /* Print buffer sz */
322 #define CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE + \
323                 sizeof(CONFIG_SYS_PROMPT) + 16)
324 #define CONFIG_SYS_MAXARGS      32      /* max number of command args */
325 /* Boot Argument Buffer Size */
326 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE
327 #define CONFIG_CMDLINE_EDITING
328 #define CONFIG_SYS_LONGHELP
329
330 /* INFORM3 */
331 #define INFORM3 0xf90
332
333 /* support OS choose */
334 #undef CONFIG_BOOTM_NETBSD
335 #undef CONFIG_BOOTM_RTEMS
336
337 /* U-Boot commands */
338 #include <config_cmd_default.h>
339 //#define CONFIG_CMD_NAND
340 #undef CONFIG_CMD_FPGA
341 #undef CONFIG_CMD_LOADS
342 #undef CONFIG_CMD_NET
343 #undef CONFIG_CMD_NFS
344 #undef CONFIG_CMD_SETGETDCR
345
346 #define CONFIG_ENV_OVERWRITE
347
348 #ifdef SPRD_EVM_TAG_ON
349 #define CONFIG_BOOTDELAY        0
350 #else
351 #define CONFIG_BOOTDELAY        0
352 #define CONFIG_ZERO_BOOTDELAY_CHECK
353 #endif
354
355 #define CONFIG_LOADADDR         (CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN - 4*1024*1024)    /* loadaddr env var */
356 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
357
358 #define xstr(s) str(s)
359 #define str(s)  #s
360
361 #ifdef CONFIG_RAM_1G_512M
362 #define MEM_INIT_PARA "mem=1536M"
363 #elif defined(CONFIG_RAM1G)
364 #define MEM_INIT_PARA "mem=1024M"
365 #elif defined(CONFIG_RAM512M)
366 #define MEM_INIT_PARA "mem=512M"
367 #elif defined(CONFIG_RAM256M)
368 #define MEM_INIT_PARA "mem=256M"
369 //#elif defined(CONFIG_RAMxxxM)
370 ////#define MEM_INIT_PARA "mem=xxxM" //xxx maybe 1024 etc
371 #else
372 #error "CONFIG_RAMxxxM macro must be defined"
373 #endif
374 #define MTDIDS_DEFAULT "nand0=sprd-nand"
375 //#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)"
376 #define MTDPARTS_DEFAULT "mtdparts=sprd-nand:256k(spl),768k(2ndbl),512k(kpanic),-(ubipac)"
377 #define CONFIG_BOOTARGS MEM_INIT_PARA" loglevel=1 console=ttyS1,115200n8 init=/init " MTDPARTS_DEFAULT
378
379 /* for tizen */
380 #define CMDLINE_DEFAULT_TIZEN   ""
381
382 #define CONFIG_FB_RAM_BASE              0x8fe2e000
383 #define SEC_LOG_LENGTH                  0xffe00
384 #define CONFIG_BOOTLOADER_VER   "tizen"
385
386 #define COPY_LINUX_KERNEL_SIZE  (0x600000)
387 #define LINUX_INITRD_NAME       "modem"
388
389 #define CONFIG_BOOTCOMMAND "cboot normal"
390 #define CONFIG_EXTRA_ENV_SETTINGS                       \
391                 "hw_revision=0\0"                                       \
392                 "muic_rustproof=0\0"                                    \
393                 "dbg_level=auto\0"                                      \
394                 "console=on\0"                                          \
395                 "sec_log=on\0"                                          \
396                 "sec_log_addr=0x86b00000\0"                     \
397                 "emmc_checksum=3\0"                                     \
398         ""
399
400 #define CONFIG_MMC_DEFAULT_DEV          1
401
402 /* Tizen - partitions definitions */
403 #define PARTS_BOOT                      "sboot"
404 #define PARTS_RECOVERY          "recovery"
405 #define PARTS_KERNEL            "kernel"
406 #define PARTS_MODULE            "module"
407 #define PARTS_MODEM                     "modem"
408 #define PARTS_DSP                       "dsp"
409 #define PARTS_FIXNV1            "fixnv1"
410 #define PARTS_FIXNV2            "fixnv2"
411 #define PARTS_SYSDATA           "system-data"
412 #define PARTS_USER                      "user"
413 #define PARTS_ROOTFS            "rootfs"
414 #define PARTS_RUNTIMENV1        "runtimenv1"
415 #define PARTS_RUNTIMENV2        "runtimenv2"
416 #define PARTS_RAMDISK           "ramdisk1"
417 #define PARTS_RAMDISK2          "ramdisk2"
418
419 #define CONFIG_RAMDISK_BOOT     1
420
421 #define CONFIG_SIG
422
423 #ifdef CONFIG_CMD_NET
424 #define CONFIG_IPADDR 192.168.10.2
425 #define CONFIG_SERVERIP 192.168.10.5
426 #define CONFIG_NETMASK 255.255.255.0
427 #define CONFIG_USBNET_DEVADDR 26:03:ee:00:87:9f
428 #define CONFIG_USBNET_HOSTADDR 9a:04:c7:d6:30:d0
429
430 #define CONFIG_NET_MULTI
431 #define CONFIG_CMD_DNS
432 #define CONFIG_CMD_NFS
433 #define CONFIG_CMD_RARP
434 #define CONFIG_CMD_PING
435 /*#define CONFIG_CMD_SNTP */
436 #endif
437
438 #define CONFIG_USB_CORE_IP_293A
439 #define CONFIG_USB_GADGET_SC8800G
440 #define CONFIG_USB_DWC
441 #define CONFIG_USB_GADGET_DUALSPEED
442 //#define CONFIG_USB_ETHER
443 #define CONFIG_CMD_FASTBOOT
444 #define SCRATCH_ADDR    (CONFIG_SYS_SDRAM_BASE + 0x100000)
445 #define FB_DOWNLOAD_BUF_SIZE           (CONFIG_SYS_NAND_U_BOOT_DST - SCRATCH_ADDR-0x800000)
446 #define SCRATCH_ADDR_EXT1              (CONFIG_SYS_NAND_U_BOOT_DST + 32*1024*1024)
447 #define FB_DOWNLOAD_BUF_EXT1_SIZE      (224*1024*1024)
448
449 #define CONFIG_MODEM_CALIBERATE
450 #define CONFIG_MODEM_CALI_UART
451
452 #define CONFIG_LCD
453 #ifdef  CONFIG_LCD
454 #define LCD_VDD_2V8_TO_3V0
455 #define CONFIG_DSIH_VERSION_1P21A
456 #define CONFIG_SPLASH_SCREEN
457 #define LCD_BPP LCD_COLOR16
458 //#define CONFIG_LCD_PAD_1024   1
459 //#define CONFIG_LCD_PAD_WXGA 1
460 //#define CONFIG_LCD_HVGA   1
461 //#define CONFIG_LCD_QVGA   1
462 //#define CONFIG_LCD_QHD 1
463 #define CONFIG_LCD_720P 1
464 //#define CONFIG_LCD_INFO
465 //#define LCD_TEST_PATTERN
466 #define CONFIG_LCD_LOGO
467 //#define CONFIG_FB_LCD_S6D0139
468 //#define CONFIG_FB_LCD_HX8389C_MIPI
469 //#define CONFIG_FB_LCD_SSD2075_MIPI
470 //#define CONFIG_FB_LCD_NT35516_MIPI
471 //#define CONFIG_FB_LCD_ILI9486S1_MIPI
472 //#define CONFIG_FB_LCD_VX5B3D_MIPI
473 //#define CONFIG_FB_LCD_NT51017_MIPI
474 //#define CONFIG_FB_LCD_HX8389C_MIPI
475 #define CONFIG_FB_LCD_S6E8AA5X01_MIPI
476 #define CONFIG_SYS_WHITE_ON_BLACK
477 #ifdef  LCD_TEST_PATTERN
478 #define CONSOLE_COLOR_RED 0xf800
479 #define CONSOLE_COLOR_GREEN 0x07e0
480 #define CONSOLE_COLOR_YELLOW 0x07e0
481 #define CONSOLE_COLOR_BLUE 0x001f
482 #define CONSOLE_COLOR_MAGENTA 0x001f
483 #define CONSOLE_COLOR_CYAN 0x001f
484 #endif
485 #endif // CONFIG_LCD
486
487 //#define CONFIG_SPRD_SYSDUMP
488 //#include <asm/sizes.h>
489 //#define SPRD_SYSDUMP_MAGIC      ((PHYS_OFFSET_ADDR & (~(SZ_512M - 1))) + SZ_512M - SZ_1M)
490 //#define REAL_SDRAM_SIZE 0x40000000     /*dump 1G */
491
492 #define CALIBRATE_ENUM_MS 3000
493 #define CALIBRATE_IO_MS 2000
494
495 //#define LOW_BAT_ADC_LEVEL 782 /*phone battery adc value low than this value will not boot up*/
496 #define LOW_BAT_VOL            3500 /*phone battery voltage low than this value will not boot up*/
497 #define LOW_BAT_VOL_CHG        3300    //3.3V charger connect
498
499 #define PWR_KEY_DETECT_CNT 12 /*this should match the count of boot_pwr_check() function */
500 #define ALARM_LEAD_SET_MS 0 /* time set for alarm boot in advancd */
501
502 #define PHYS_OFFSET_ADDR                        0x80000000
503 #define TD_CP_OFFSET_ADDR                       0x8000000       /*128*/
504 #define TD_CP_SDRAM_SIZE                        0x1200000       /*18M*/
505 #define WCDMA_CP_OFFSET_ADDR            0x8000000       /*256M*/
506 #define WCDMA_CP_SDRAM_SIZE             0x1c00000       /*28M*/
507 #define WCN_CP_OFFSET_ADDR              0x0a800000      /*168M*/
508 #define WCN_CP_SDRAM_SIZE               0x201000        /*cp2size*/
509
510 #define SIPC_APCP_RESET_ADDR_SIZE       0xC00   /*3K*/
511 #define SIPC_APCP_RESET_SIZE    0x1000  /*4K*/
512 #define SIPC_TD_APCP_START_ADDR         (PHYS_OFFSET_ADDR + TD_CP_OFFSET_ADDR + TD_CP_SDRAM_SIZE - SIPC_APCP_RESET_SIZE)        /*0x897FF000*/
513 #define SIPC_WCDMA_APCP_START_ADDR      (PHYS_OFFSET_ADDR + WCDMA_CP_OFFSET_ADDR + WCDMA_CP_SDRAM_SIZE - SIPC_APCP_RESET_SIZE) /*0x899F0000*/
514 #define SIPC_WCN_APCP_START_ADDR                (PHYS_OFFSET_ADDR + WCN_CP_OFFSET_ADDR + WCN_CP_SDRAM_SIZE - SIPC_APCP_RESET_SIZE) /*0x94EFF000*/
515 #define CALIBRATION_FLAG               (PHYS_OFFSET_ADDR + WCDMA_CP_OFFSET_ADDR + WCDMA_CP_SDRAM_SIZE - 0x400)
516 #define CALIBRATION_FLAG_WCDMA   CALIBRATION_FLAG
517
518 #define CONFIG_RAM_CONSOLE
519
520 #ifdef CONFIG_RAM_CONSOLE
521 #define CONFIG_RAM_CONSOLE_SIZE        0x80000
522 #define CONFIG_RAM_CONSOLE_START    (CONFIG_SYS_NAND_U_BOOT_START + 0x600000)
523 #endif
524 //#define CALIBRATION_FLAG           0x89700000
525
526 //#define CONFIG_CMD_SOUND 1
527 //#define CONFIG_CMD_FOR_HTC 1
528 //#define CONFIG_SOUND_CODEC_SPRD_V3 1
529 //#define CONFIG_SOUND_DAI_VBC_R2P0 1
530 /* #define CONFIG_SPRD_AUDIO_DEBUG */
531
532 #define CONFIG_RAMDUMP_NO_SPLIT 1 /* Don't split sysdump file */
533
534 #define CONFIG_PBINT_7S_RESET_V1
535 /*7S reset config*/
536 #define CONFIG_7S_RST_MODULE_EN         1       //0:disable module; 1:enable module
537
538 #define CONFIG_7S_RST_SW_MODE           1       //0:hw reset,1:arm reset,power keep on
539 #define CONFIG_7S_RST_SHORT_MODE        1       //0:long press then release key to trigger;1:press key some time to trigger
540 #define CONFIG_7S_RST_2KEY_MODE         1       //0:1Key--Normal mode; 1:2KEY
541 #define CONFIG_7S_RST_THRESHOLD         7       //7S, hold key down for this time to trigger
542
543 #define USB_PHY_TUNE_VALUE 0x44073e33
544
545 /*control the CP need to boot*/
546 #define modem_cp0_enable 1
547 #define modem_cp1_enable 0
548 #define modem_cp2_enable 0
549
550 //#define CONFIG_SMPL_MODE
551 /* rang:0(0.5s) - 7(4s) unit: s step: 0.5s */
552 /* #define CONFIG_SMPL_THRESHOLD 0 */
553
554 #define BACKLIGHT_GPIO 214 /*PWM*/
555 #define LCD_LDO_EN_GPIO 167 /*LCD_LDO_EN_GPIO*/
556
557 #endif /* __CONFIG_H */