blob: d0fafd71361e22d4eec0a22a31095fd2f4755e73 [file] [log] [blame]
Minkyu Kangc474a8e2010-05-31 22:02:42 +09001/*
2 * Copyright (C) 2009 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
4 * Kyungmin Park <kyungmin.park@samsung.com>
5 *
6 * Configuation settings for the SAMSUNG Universal (s5pc100) board.
7 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
Minkyu Kangc474a8e2010-05-31 22:02:42 +09009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14/* High Level Configuration Options */
Minkyu Kangc474a8e2010-05-31 22:02:42 +090015#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
Minkyu Kang889a2752010-08-23 19:52:03 +090016#define CONFIG_S5P 1 /* which is in a S5P Family */
Minkyu Kangc474a8e2010-05-31 22:02:42 +090017#define CONFIG_S5PC110 1 /* which is in a S5PC110 */
18#define CONFIG_MACH_GONI 1 /* working with Goni */
19
20#include <asm/arch/cpu.h> /* get chip and board defs */
21
22#define CONFIG_ARCH_CPU_INIT
23#define CONFIG_DISPLAY_CPUINFO
24#define CONFIG_DISPLAY_BOARDINFO
25
Minkyu Kangc474a8e2010-05-31 22:02:42 +090026/* input clock of PLL: has 24MHz input clock at S5PC110 */
27#define CONFIG_SYS_CLK_FREQ_C110 24000000
28
29/* DRAM Base */
30#define CONFIG_SYS_SDRAM_BASE 0x30000000
31
32#define CONFIG_SETUP_MEMORY_TAGS
33#define CONFIG_CMDLINE_TAG
34#define CONFIG_INITRD_TAG
35#define CONFIG_CMDLINE_EDITING
36
37/*
38 * Size of malloc() pool
39 * 1MB = 0x100000, 0x100000 = 1024 * 1024
40 */
41#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20))
Minkyu Kangc474a8e2010-05-31 22:02:42 +090042/*
43 * select serial console configuration
44 */
45#define CONFIG_SERIAL2 1 /* use SERIAL2 */
Minkyu Kangc474a8e2010-05-31 22:02:42 +090046#define CONFIG_BAUDRATE 115200
47
Minkyu Kang87f314e2010-07-06 20:58:41 +090048/* MMC */
Jaehoon Chung7d2d58b2012-04-23 02:36:29 +000049#define CONFIG_GENERIC_MMC
50#define CONFIG_MMC
51#define CONFIG_SDHCI
52#define CONFIG_S5P_SDHCI
Minkyu Kang87f314e2010-07-06 20:58:41 +090053
Minkyu Kang96caf022011-03-10 20:10:19 +090054/* PWM */
55#define CONFIG_PWM 1
56
Minkyu Kangc474a8e2010-05-31 22:02:42 +090057/* It should define before config_cmd_default.h */
58#define CONFIG_SYS_NO_FLASH 1
59
60/* Command definition */
61#include <config_cmd_default.h>
62
63#undef CONFIG_CMD_FPGA
64#undef CONFIG_CMD_MISC
65#undef CONFIG_CMD_NET
66#undef CONFIG_CMD_NFS
67#undef CONFIG_CMD_XIMG
68#define CONFIG_CMD_CACHE
69#define CONFIG_CMD_REGINFO
70#define CONFIG_CMD_ONENAND
71#define CONFIG_CMD_MTDPARTS
Minkyu Kang87f314e2010-07-06 20:58:41 +090072#define CONFIG_CMD_MMC
Minkyu Kangc474a8e2010-05-31 22:02:42 +090073
74#define CONFIG_BOOTDELAY 1
75#define CONFIG_ZERO_BOOTDELAY_CHECK
76
77#define CONFIG_MTD_DEVICE
78#define CONFIG_MTD_PARTITIONS
79
80/* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
81#define MTDIDS_DEFAULT "onenand0=samsung-onenand"
82#define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:1m(bootloader)"\
83 ",256k(params)"\
84 ",2816k(config)"\
85 ",8m(csa)"\
86 ",7m(kernel)"\
87 ",1m(log)"\
88 ",12m(modem)"\
89 ",60m(qboot)"\
90 ",-(UBI)\0"
91
92#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
93
94#define CONFIG_BOOTCOMMAND "run ubifsboot"
95
96#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
97
98#define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext2" \
99 " ${console} ${meminfo}"
100
101#define CONFIG_COMMON_BOOT "${console} ${meminfo} ${mtdparts}"
102
103#define CONFIG_BOOTARGS "root=/dev/mtdblock8 ubi.mtd=8 ubi.mtd=3 ubi.mtd=6" \
104 " rootfstype=cramfs " CONFIG_COMMON_BOOT
105
106#define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x100000;" \
107 " onenand write 0x32008000 0x0 0x100000\0"
108
109#define CONFIG_UBI_MTD " ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6"
110
111#define CONFIG_UBIFS_OPTION "rootflags=bulk_read,no_chk_data_crc"
112
113#define CONFIG_ENV_OVERWRITE
114#define CONFIG_SYS_CONSOLE_IS_IN_ENV
115#define CONFIG_EXTRA_ENV_SETTINGS \
116 CONFIG_UPDATEB \
117 "updatek=" \
118 "onenand erase 0xc00000 0x600000;" \
119 "onenand write 0x31008000 0xc00000 0x600000\0" \
120 "updateu=" \
121 "onenand erase 0x01560000 0x1eaa0000;" \
122 "onenand write 0x32000000 0x1260000 0x8C0000\0" \
123 "bootk=" \
124 "onenand read 0x30007FC0 0xc00000 0x600000;" \
125 "bootm 0x30007FC0\0" \
126 "flashboot=" \
127 "set bootargs root=/dev/mtdblock${bootblock} " \
128 "rootfstype=${rootfstype}" CONFIG_UBI_MTD " ${opts} " \
129 "${lcdinfo} " CONFIG_COMMON_BOOT "; run bootk\0" \
130 "ubifsboot=" \
131 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
132 CONFIG_UBIFS_OPTION CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
133 CONFIG_COMMON_BOOT "; run bootk\0" \
134 "tftpboot=" \
135 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
136 CONFIG_UBIFS_OPTION CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
137 CONFIG_COMMON_BOOT "; tftp 0x30007FC0 uImage; " \
138 "bootm 0x30007FC0\0" \
139 "ramboot=" \
140 "set bootargs " CONFIG_RAMDISK_BOOT \
141 " initrd=0x33000000,8M ramdisk=8192\0" \
142 "mmcboot=" \
143 "set bootargs root=${mmcblk} rootfstype=${rootfstype}" \
144 CONFIG_UBI_MTD " ${opts} ${lcdinfo} " \
145 CONFIG_COMMON_BOOT "; run bootk\0" \
146 "boottrace=setenv opts initcall_debug; run bootcmd\0" \
147 "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
148 "verify=n\0" \
149 "rootfstype=cramfs\0" \
150 "console=" CONFIG_DEFAULT_CONSOLE \
151 "mtdparts=" MTDPARTS_DEFAULT \
152 "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
153 "mmcblk=/dev/mmcblk1p1\0" \
154 "bootblock=9\0" \
155 "ubiblock=8\0" \
156 "ubi=enabled\0" \
157 "opts=always_resume=1"
158
159/* Miscellaneous configurable options */
160#define CONFIG_SYS_LONGHELP /* undef to save memory */
161#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
Minkyu Kangc474a8e2010-05-31 22:02:42 +0900162#define CONFIG_SYS_PROMPT "Goni # "
163#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
164#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
165#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
166/* Boot Argument Buffer Size */
167#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
168/* memtest works on */
169#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
170#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000)
171#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4000000)
172
173#define CONFIG_SYS_HZ 1000
174
Minkyu Kangc474a8e2010-05-31 22:02:42 +0900175/* Goni has 3 banks of DRAM, but swap the bank */
176#define CONFIG_NR_DRAM_BANKS 3
177#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */
178#define PHYS_SDRAM_1_SIZE (80 << 20) /* 80 MB in Bank #0 */
179#define PHYS_SDRAM_2 0x40000000 /* mDDR DMC1 Bank #1 */
180#define PHYS_SDRAM_2_SIZE (256 << 20) /* 256 MB in Bank #1 */
181#define PHYS_SDRAM_3 0x50000000 /* mDDR DMC2 Bank #2 */
182#define PHYS_SDRAM_3_SIZE (128 << 20) /* 128 MB in Bank #2 */
183
184#define CONFIG_SYS_MONITOR_BASE 0x00000000
185#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 KiB */
186
187/* FLASH and environment organization */
188#define CONFIG_ENV_IS_IN_ONENAND 1
189#define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB, 0x40000 */
190#define CONFIG_ENV_ADDR (1 << 20) /* 1 MB, 0x100000 */
191
192#define CONFIG_USE_ONENAND_BOARD_INIT
193#define CONFIG_SAMSUNG_ONENAND 1
194#define CONFIG_SYS_ONENAND_BASE 0xB0000000
195
196#define CONFIG_DOS_PARTITION 1
197
Minkyu Kang177feff2010-11-22 20:27:44 +0900198#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
199
Łukasz Majewski7cb54942011-10-17 01:42:23 +0000200#define CONFIG_SYS_CACHELINE_SIZE 64
201
Łukasz Majewskibe3b51a2012-11-13 03:22:14 +0000202#define CONFIG_POWER
203#define CONFIG_POWER_I2C
204#define CONFIG_POWER_MAX8998
Łukasz Majewski2a7dd9d2011-10-03 19:45:51 +0000205
Łukasz Majewski85776b02011-08-22 22:34:59 +0000206#include <asm/arch/gpio.h>
207/*
208 * I2C Settings
209 */
210#define CONFIG_SOFT_I2C_GPIO_SCL s5pc110_gpio_get_nr(j4, 3)
211#define CONFIG_SOFT_I2C_GPIO_SDA s5pc110_gpio_get_nr(j4, 0)
212
Heiko Schocherea818db2013-01-29 08:53:15 +0100213#define CONFIG_SYS_I2C
214#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
215#define CONFIG_SYS_I2C_SOFT_SPEED 50000
216#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F
Łukasz Majewski85776b02011-08-22 22:34:59 +0000217#define CONFIG_I2C_MULTI_BUS
218#define CONFIG_SYS_MAX_I2C_BUS 7
Lukasz Majewskia954da22011-10-27 10:36:47 +0200219#define CONFIG_USB_GADGET
220#define CONFIG_USB_GADGET_S3C_UDC_OTG
221#define CONFIG_USB_GADGET_DUALSPEED
Łukasz Majewski85776b02011-08-22 22:34:59 +0000222
Minkyu Kangc474a8e2010-05-31 22:02:42 +0900223#endif /* __CONFIG_H */