s5pc110: aquila: disable features (size issue)
[kernel/u-boot.git] / include / configs / s5pc1xx_universal.h
1 /*
2  * Copyright (C) 2009 Samsung Electronics
3  * Minkyu Kang <mk7.kang@samsung.com>
4  *
5  * Configuation settings for the SAMSUNG Universal (s5pc100) board.
6  *
7  * See file CREDITS for list of people who contributed to this
8  * project.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License as
12  * published by the Free Software Foundation; either version 2 of
13  * the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307 USA
24  */
25
26 #ifndef __CONFIG_H
27 #define __CONFIG_H
28
29 /*
30  * High Level Configuration Options
31  * (easy to change)
32  */
33 #define CONFIG_ARMCORTEXA8      1       /* This is an ARM V7 CPU core */
34 #define CONFIG_SAMSUNG          1       /* in a SAMSUNG core */
35 #define CONFIG_S5PC1XX          1       /* which is in a S5PC1XX Family */
36 #define CONFIG_S5PC100          1       /* which is in a S5PC100 */
37 #define CONFIG_S5PC110          1       /* which is in a S5PC110 */
38 #define CONFIG_UNIVERSAL        1       /* working with Universal */
39
40 #include <asm/arch/cpu.h>               /* get chip and board defs */
41
42 #define CONFIG_ARCH_CPU_INIT
43
44 #define CONFIG_SYS_SDRAM_BASE   0x30000000
45
46 /* input clock of PLL: Universal has 12MHz/24MHz input clock at S5PC100/C110 */
47 #define CONFIG_SYS_CLK_FREQ_C100        12000000
48 #define CONFIG_SYS_CLK_FREQ_C110        24000000
49
50 #define CONFIG_MEMORY_UPPER_CODE
51
52 #define CONFIG_SETUP_MEMORY_TAGS
53 #define CONFIG_CMDLINE_TAG
54 #define CONFIG_INITRD_TAG
55 #define CONFIG_REVISION_TAG
56
57 /* Clock Defines */
58 #define V_OSCK          26000000        /* Clock output from T2 */
59 #define V_SCLK          (V_OSCK >> 1)
60
61 /*
62  * Architecture magic and machine type
63  */
64 #define MACH_TYPE       3000
65
66 #define CONFIG_DISPLAY_CPUINFO
67
68 #undef CONFIG_SKIP_RELOCATE_UBOOT
69
70 /*
71  * Size of malloc() pool
72  */
73 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 1024 * 1024)
74 #define CONFIG_SYS_GBL_DATA_SIZE        128     /* size in bytes for initial data */
75
76 /*
77  * select serial console configuration
78  */
79 #define CONFIG_SERIAL_MULTI     1
80 #define CONFIG_SERIAL2          1       /* we use SERIAL 2 on S5PC100 */
81
82 /* MMC */
83 #define CONFIG_GENERIC_MMC      1
84 #define CONFIG_MMC              1
85 #define CONFIG_S5PC1XX_MMC      1
86 #define CONFIG_MMC_INDEX        0
87
88 #define CONFIG_SYS_HUSH_PARSER          /* use "hush" command parser    */
89 #ifdef CONFIG_SYS_HUSH_PARSER
90 #define CONFIG_SYS_PROMPT_HUSH_PS2      "> "
91 #endif
92
93 #define CONFIG_CMDLINE_EDITING
94
95 #define CONFIG_BAUDRATE         115200
96
97 /* It should define before config_cmd_default.h */
98 #define CONFIG_SYS_NO_FLASH             1
99 /***********************************************************
100  * Command definition
101  ***********************************************************/
102 #include <config_cmd_default.h>
103
104 #undef CONFIG_CMD_LOADB
105 #undef CONFIG_CMD_LOADS
106 #undef CONFIG_CMD_BOOTD
107 #undef CONFIG_CMD_FPGA
108 #undef CONFIG_CMD_XIMG
109 #undef CONFIG_CMD_NAND
110 #undef CONFIG_CMD_IMLS
111 #undef CONFIG_CMD_FLASH
112 #undef CONFIG_CMD_IMLS
113 #undef CONFIG_CMD_NET
114 #define CONFIG_CMD_CACHE
115 #define CONFIG_CMD_REGINFO
116 #define CONFIG_CMD_ONENAND
117 #define CONFIG_CMD_MTDPARTS
118 #define CONFIG_CMD_I2C
119 #define CONFIG_CMD_MMC
120 #define CONFIG_CMD_SLEEP
121
122 #define CONFIG_SYS_64BIT_VSPRINTF       1
123
124 #define CONFIG_BOOTDELAY        1
125
126 #define CONFIG_ZERO_BOOTDELAY_CHECK
127
128 #define CONFIG_NETMASK          255.255.255.0
129 #define CONFIG_IPADDR           192.168.129.3
130 #define CONFIG_SERVERIP         192.168.129.1
131 #define CONFIG_GATEWAYIP        192.168.129.1
132 #define CONFIG_ETHADDR          00:0E:99:34:10:00
133
134 #define CONFIG_MTD_DEVICE
135 #define CONFIG_MTD_PARTITIONS
136
137 /* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
138 #define MTDIDS_DEFAULT          "onenand0=samsung-onenand"
139 #define MTDPARTS_DEFAULT        "mtdparts=samsung-onenand:256k(bootloader)"\
140                                 ",128k(params)"\
141                                 ",3m(kernel)"\
142                                 ",18m(modem)"\
143                                 ",7m(fota)"\
144                                 ",9m(log)"\
145                                 ",-(UBI)"
146
147 #define MTDPARTS_DEFAULT_4KB    "mtdparts=samsung-onenand:256k(bootloader)"\
148                                 ",256k(params)"\
149                                 ",3m(kernel)"\
150                                 ",18m(modem)"\
151                                 ",7m(fota)"\
152                                 ",9m(log)"\
153                                 ",-(UBI)"
154
155 #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
156
157 #define CONFIG_BOOTCOMMAND      "run ubifsboot"
158
159 #define CONFIG_RAMDISK_BOOT     "root=/dev/ram0 rw rootfstype=ext2" \
160                 " console=ttySAC2,115200n8" \
161                 " ${meminfo}"
162
163 #define CONFIG_COMMON_BOOT      "console=ttySAC2,115200n8" \
164                 " ${meminfo}" \
165                 " ${mtdparts}"
166
167 #define CONFIG_BOOTARGS "root=/dev/mtdblock7 ubi.mtd=6" \
168                 " rootfstype=cramfs " CONFIG_COMMON_BOOT
169
170 #define CONFIG_UPDATEB  "updateb=onenand erase 0x0 0x40000;" \
171                         " onenand write 0x32008000 0x0 0x40000\0"
172
173 #define CONFIG_ENV_OVERWRITE
174 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
175 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
176         CONFIG_UPDATEB \
177         "updatek=onenand erase 0x80000 0x300000;" \
178         " onenand write 0x31008000 0x80000 0x300000\0" \
179         "updateu=onenand erase 0x01560000 0x1eaa0000;" \
180         " onenand write 0x32000000 0x1260000 0x8C0000\0" \
181         "bootk=onenand read 0x30007FC0 0x80000 0x300000;" \
182         " bootm 0x30007FC0\0" \
183         "flashboot=set bootargs root=/dev/mtdblock${bootblock}" \
184          " rootfstype=${rootfstype}" \
185          " ubi.mtd=${ubiblock} ${opts} ${lcd} " CONFIG_COMMON_BOOT "; run bootk\0" \
186         "ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs" \
187          " ubi.mtd=${ubiblock} ${opts} ${lcd} " CONFIG_COMMON_BOOT "; run bootk\0" \
188         "boottrace=setenv opts initcall_debug; run bootcmd\0" \
189         "android=set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock}" \
190          " rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; run bootk\0" \
191         "nfsboot=set bootargs root=/dev/nfs rw ubi.mtd=${ubiblock}" \
192          " nfsroot=${nfsroot},nolock,tcp ip=${ipaddr}:${serverip}:${gatewayip}:" \
193          "${netmask}:generic:usb0:off " CONFIG_COMMON_BOOT "; run bootk\0" \
194         "ramboot=set bootargs " CONFIG_RAMDISK_BOOT \
195          " initrd=0x33000000,8M ramdisk=8192\0" \
196         "mmcboot=set bootargs root=${mmcblk} rootfstype=${rootfstype}" \
197          " ubi.mtd=${ubiblock} ${opts} ${lcd} " CONFIG_COMMON_BOOT "; run bootk\0" \
198         "verify=n\0" \
199         "rootfstype=cramfs\0" \
200         "mtdparts=" MTDPARTS_DEFAULT "\0" \
201         "meminfo=mem=80M mem=128M@0x40000000\0" \
202         "nfsroot=/nfsroot/arm\0" \
203         "mmcblk=/dev/mmcblk1p1\0" \
204         "bootblock=7\0" \
205         "ubiblock=6\0" \
206         "ubi=enabled"
207
208 /*
209  * Miscellaneous configurable options
210  */
211 #define CONFIG_SYS_LONGHELP     /* undef to save memory */
212 #define CONFIG_SYS_PROMPT       "Universal # "  /* Monitor Command Prompt */
213 #define CONFIG_SYS_CBSIZE       256     /* Console I/O Buffer Size */
214 #define CONFIG_SYS_PBSIZE       384     /* Print Buffer Size */
215 #define CONFIG_SYS_MAXARGS      16      /* max number of command args */
216 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size */
217
218 #define CONFIG_SYS_MEMTEST_START        CONFIG_SYS_SDRAM_BASE   /* memtest works on           */
219 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_SDRAM_BASE + 0x5000000)
220
221 #define CONFIG_SYS_LOAD_ADDR            (CONFIG_SYS_SDRAM_BASE + 0x4800000)
222
223 #define CONFIG_SYS_HZ                   1000
224
225 /* valid baudrates */
226 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
227
228 /*-----------------------------------------------------------------------
229  * Stack sizes
230  *
231  * The stack sizes are set up in start.S using the settings below
232  */
233 #define CONFIG_STACKSIZE        (256 << 10)     /* regular stack 256KB */
234
235 /*******************************
236  Support Clock Settings(APLL)
237  *******************************
238  ARMCLK         HCLKD0          PCLKD0
239  -------------------------------
240  667            166                     83
241  600            150                     75
242  533            133                     66
243  500            166                     66
244  467            117                     59
245  400            100                     50
246  *******************************/
247
248 #define CONFIG_CLK_667_166_83
249 /*#define CONFIG_CLK_666_166_66*/
250 /*#define CONFIG_CLK_600_150_75*/
251 /*#define CONFIG_CLK_533_133_66*/
252 /*#define CONFIG_CLK_500_166_66*/
253 /*#define CONFIG_CLK_467_117_59*/
254 /*#define CONFIG_CLK_400_100_50*/
255
256 /* Universal has 2 banks of DRAM, but swap the bank */
257 #define CONFIG_NR_DRAM_BANKS    2
258 #define PHYS_SDRAM_1            CONFIG_SYS_SDRAM_BASE   /* OneDRAM Bank #0 */
259 #define PHYS_SDRAM_1_SIZE       (80 << 20)              /* 80 MB in Bank #0 */
260 #define S5PC100_PHYS_SDRAM_2    0x38000000              /* mDDR DMC0 Bank #1 */
261 #define S5PC110_PHYS_SDRAM_2    0x40000000              /* mDDR DMC1 Bank #0 */
262 #define PHYS_SDRAM_2_SIZE       (128 << 20)             /* 128 MB in Bank #1 */
263
264
265 #define CONFIG_SYS_MONITOR_BASE 0x00000000
266
267 /*-----------------------------------------------------------------------
268  * FLASH and environment organization
269  */
270
271 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* Reserve 2 sectors */
272
273 /* OneNAND IPL uses 8KiB */
274 #define CONFIG_ONENAND_START_PAGE       4
275
276 #define CONFIG_ENV_IS_IN_ONENAND        1
277 #define CONFIG_ENV_SIZE                 (256 << 10)     /* 256 KiB, 0x40000 */
278 #define CONFIG_ENV_ADDR                 (256 << 10)     /* 256 KiB, 0x40000 */
279 #define CONFIG_ENV_OFFSET               (256 << 10)     /* 256 KiB, 0x40000 */
280
281 #define CONFIG_USE_ONENAND_BOARD_INIT
282 #define CONFIG_SAMSUNG_ONENAND          1
283 #define CONFIG_SYS_ONENAND_BASE         0xB0000000
284
285 #define CONFIG_DOS_PARTITION    1
286
287 #define CONFIG_MISC_INIT_R
288
289 /* I2C */
290 #if 0
291 #define CONFIG_DRIVER_S5PC1XX_I2C
292 #define CONFIG_HARD_I2C         1
293 #define CONFIG_SYS_I2C_SPEED    50000
294 #define CONFIG_SYS_I2C_SLAVE    0xFE
295 #define CONFIG_SYS_I2C_0        1
296 #else
297 #include <i2c-gpio.h>
298 #define CONFIG_SOFT_I2C         1
299 #define CONFIG_SYS_I2C_INIT_BOARD
300 #define CONFIG_SYS_I2C_SPEED    50000
301 #define CONFIG_I2C_MULTI_BUS
302 #define CONFIG_SYS_MAX_I2C_BUS  5
303 #endif
304
305 /* USB Downloader */
306 #define CONFIG_CMD_USBDOWN
307 #define CONFIG_SAMSUNG_USB
308 #define CONFIG_OTG_CLK_OSCC
309 #define CONFIG_SYS_DOWN_ADDR    CONFIG_SYS_SDRAM_BASE
310 #define CONFIG_RAMDISK_ADDR     (CONFIG_SYS_SDRAM_BASE + 0x03000000)
311
312 /* LCD */
313 #if 1           /* For LCD test */
314 #define CONFIG_LCD              1
315 #define CONFIG_S5PC1XXFB        1
316 #endif
317
318 #if 0
319 #define CONFIG_CMD_EXT2                 1
320 #define CONFIG_CMD_ONENAND_EXT2         1
321 #endif
322
323 #endif  /* __CONFIG_H */