]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/s5p_goni.h
Merge branch 'master' of git://git.denx.de/u-boot-i2c
[people/ms/u-boot.git] / include / configs / s5p_goni.h
1 /*
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 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11 #ifndef __CONFIG_H
12 #define __CONFIG_H
13
14 /* High Level Configuration Options */
15 #define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
16 #define CONFIG_S5P 1 /* which is in a S5P Family */
17 #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
26 /* 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))
42 /*
43 * select serial console configuration
44 */
45 #define CONFIG_SERIAL2 1 /* use SERIAL2 */
46 #define CONFIG_BAUDRATE 115200
47
48 /* MMC */
49 #define CONFIG_GENERIC_MMC
50 #define CONFIG_MMC
51 #define CONFIG_SDHCI
52 #define CONFIG_S5P_SDHCI
53
54 /* PWM */
55 #define CONFIG_PWM 1
56
57 /* 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
72 #define CONFIG_CMD_MMC
73
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 */
162 #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
175 /* 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
198 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
199
200 #define CONFIG_SYS_CACHELINE_SIZE 64
201
202 #define CONFIG_POWER
203 #define CONFIG_POWER_I2C
204 #define CONFIG_POWER_MAX8998
205
206 #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
213 #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
217 #define CONFIG_I2C_MULTI_BUS
218 #define CONFIG_SYS_MAX_I2C_BUS 7
219 #define CONFIG_USB_GADGET
220 #define CONFIG_USB_GADGET_S3C_UDC_OTG
221 #define CONFIG_USB_GADGET_DUALSPEED
222
223 #endif /* __CONFIG_H */