]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/configs/s5p_goni.h
arm: goni: Update configuration for Goni target
[people/ms/u-boot.git] / include / configs / s5p_goni.h
CommitLineData
c474a8eb
MK
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 *
1a459660 8 * SPDX-License-Identifier: GPL-2.0+
c474a8eb
MK
9 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14/* High Level Configuration Options */
c474a8eb 15#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
889a275d 16#define CONFIG_S5P 1 /* which is in a S5P Family */
c474a8eb
MK
17#define CONFIG_S5PC110 1 /* which is in a S5PC110 */
18#define CONFIG_MACH_GONI 1 /* working with Goni */
19
a45ddf7a 20#include <linux/sizes.h>
c474a8eb
MK
21#include <asm/arch/cpu.h> /* get chip and board defs */
22
23#define CONFIG_ARCH_CPU_INIT
24#define CONFIG_DISPLAY_CPUINFO
25#define CONFIG_DISPLAY_BOARDINFO
26
c474a8eb
MK
27/* input clock of PLL: has 24MHz input clock at S5PC110 */
28#define CONFIG_SYS_CLK_FREQ_C110 24000000
29
30/* DRAM Base */
31#define CONFIG_SYS_SDRAM_BASE 0x30000000
32
35bea619
MK
33/* Text Base */
34#define CONFIG_SYS_TEXT_BASE 0x34800000
35
c474a8eb
MK
36#define CONFIG_SETUP_MEMORY_TAGS
37#define CONFIG_CMDLINE_TAG
2ac9a35b 38#define CONFIG_REVISION_TAG
c474a8eb
MK
39#define CONFIG_INITRD_TAG
40#define CONFIG_CMDLINE_EDITING
41
a45ddf7a
MZ
42/* Size of malloc() pool.*/
43#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_1M)
44
c474a8eb
MK
45/*
46 * select serial console configuration
47 */
48#define CONFIG_SERIAL2 1 /* use SERIAL2 */
c474a8eb
MK
49#define CONFIG_BAUDRATE 115200
50
87f314e9 51/* MMC */
7d2d58b4
JC
52#define CONFIG_GENERIC_MMC
53#define CONFIG_MMC
54#define CONFIG_SDHCI
55#define CONFIG_S5P_SDHCI
87f314e9 56
96caf02f
MK
57/* PWM */
58#define CONFIG_PWM 1
59
c474a8eb
MK
60/* It should define before config_cmd_default.h */
61#define CONFIG_SYS_NO_FLASH 1
62
63/* Command definition */
64#include <config_cmd_default.h>
65
66#undef CONFIG_CMD_FPGA
67#undef CONFIG_CMD_MISC
68#undef CONFIG_CMD_NET
69#undef CONFIG_CMD_NFS
70#undef CONFIG_CMD_XIMG
71#define CONFIG_CMD_CACHE
72#define CONFIG_CMD_REGINFO
73#define CONFIG_CMD_ONENAND
74#define CONFIG_CMD_MTDPARTS
87f314e9 75#define CONFIG_CMD_MMC
c474a8eb
MK
76
77#define CONFIG_BOOTDELAY 1
78#define CONFIG_ZERO_BOOTDELAY_CHECK
79
80#define CONFIG_MTD_DEVICE
81#define CONFIG_MTD_PARTITIONS
82
83/* Actual modem binary size is 16MiB. Add 2MiB for bad block handling */
84#define MTDIDS_DEFAULT "onenand0=samsung-onenand"
85#define MTDPARTS_DEFAULT "mtdparts=samsung-onenand:1m(bootloader)"\
86 ",256k(params)"\
87 ",2816k(config)"\
88 ",8m(csa)"\
89 ",7m(kernel)"\
90 ",1m(log)"\
91 ",12m(modem)"\
a45ddf7a 92 ",60m(qboot)\0"
c474a8eb
MK
93
94#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
95
a45ddf7a 96#define CONFIG_BOOTCOMMAND "run mmcboot"
c474a8eb
MK
97
98#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
99
a45ddf7a 100#define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext4" \
c474a8eb
MK
101 " ${console} ${meminfo}"
102
103#define CONFIG_COMMON_BOOT "${console} ${meminfo} ${mtdparts}"
104
a45ddf7a
MZ
105#define CONFIG_BOOTARGS "root=/dev/mtdblock8 rootfstype=ext4 " \
106 CONFIG_COMMON_BOOT
c474a8eb
MK
107
108#define CONFIG_UPDATEB "updateb=onenand erase 0x0 0x100000;" \
109 " onenand write 0x32008000 0x0 0x100000\0"
110
2ac9a35b
PW
111#define CONFIG_MISC_COMMON
112#define CONFIG_MISC_INIT_R
113
c474a8eb
MK
114#define CONFIG_ENV_OVERWRITE
115#define CONFIG_SYS_CONSOLE_IS_IN_ENV
2ac9a35b
PW
116#define CONFIG_ENV_VARS_UBOOT_CONFIG
117#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
c474a8eb
MK
118#define CONFIG_EXTRA_ENV_SETTINGS \
119 CONFIG_UPDATEB \
120 "updatek=" \
121 "onenand erase 0xc00000 0x600000;" \
122 "onenand write 0x31008000 0xc00000 0x600000\0" \
123 "updateu=" \
124 "onenand erase 0x01560000 0x1eaa0000;" \
125 "onenand write 0x32000000 0x1260000 0x8C0000\0" \
126 "bootk=" \
a45ddf7a 127 "run loaduimage;" \
c474a8eb
MK
128 "bootm 0x30007FC0\0" \
129 "flashboot=" \
130 "set bootargs root=/dev/mtdblock${bootblock} " \
a45ddf7a 131 "rootfstype=${rootfstype} ${opts} " \
c474a8eb
MK
132 "${lcdinfo} " CONFIG_COMMON_BOOT "; run bootk\0" \
133 "ubifsboot=" \
134 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
a45ddf7a 135 "${opts} ${lcdinfo} " \
c474a8eb
MK
136 CONFIG_COMMON_BOOT "; run bootk\0" \
137 "tftpboot=" \
138 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
a45ddf7a
MZ
139 "${opts} ${lcdinfo} " CONFIG_COMMON_BOOT \
140 "; tftp 0x30007FC0 uImage; bootm 0x30007FC0\0" \
c474a8eb
MK
141 "ramboot=" \
142 "set bootargs " CONFIG_RAMDISK_BOOT \
a45ddf7a 143 "initrd=0x33000000,8M ramdisk=8192\0" \
c474a8eb 144 "mmcboot=" \
a45ddf7a
MZ
145 "set bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
146 "rootfstype=${rootfstype} ${opts} ${lcdinfo} " \
c474a8eb
MK
147 CONFIG_COMMON_BOOT "; run bootk\0" \
148 "boottrace=setenv opts initcall_debug; run bootcmd\0" \
149 "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
150 "verify=n\0" \
a45ddf7a 151 "rootfstype=ext4\0" \
c474a8eb
MK
152 "console=" CONFIG_DEFAULT_CONSOLE \
153 "mtdparts=" MTDPARTS_DEFAULT \
154 "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
a45ddf7a
MZ
155 "loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \
156 "mmcdev=0\0" \
157 "mmcbootpart=2\0" \
158 "mmcrootpart=5\0" \
c474a8eb
MK
159 "bootblock=9\0" \
160 "ubiblock=8\0" \
161 "ubi=enabled\0" \
162 "opts=always_resume=1"
163
164/* Miscellaneous configurable options */
165#define CONFIG_SYS_LONGHELP /* undef to save memory */
166#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
c474a8eb
MK
167#define CONFIG_SYS_PROMPT "Goni # "
168#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
169#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
170#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
171/* Boot Argument Buffer Size */
172#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
173/* memtest works on */
174#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
175#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000)
176#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4000000)
177
c474a8eb
MK
178/* Goni has 3 banks of DRAM, but swap the bank */
179#define CONFIG_NR_DRAM_BANKS 3
180#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */
181#define PHYS_SDRAM_1_SIZE (80 << 20) /* 80 MB in Bank #0 */
182#define PHYS_SDRAM_2 0x40000000 /* mDDR DMC1 Bank #1 */
183#define PHYS_SDRAM_2_SIZE (256 << 20) /* 256 MB in Bank #1 */
184#define PHYS_SDRAM_3 0x50000000 /* mDDR DMC2 Bank #2 */
185#define PHYS_SDRAM_3_SIZE (128 << 20) /* 128 MB in Bank #2 */
186
187#define CONFIG_SYS_MONITOR_BASE 0x00000000
188#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 KiB */
189
190/* FLASH and environment organization */
191#define CONFIG_ENV_IS_IN_ONENAND 1
192#define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB, 0x40000 */
193#define CONFIG_ENV_ADDR (1 << 20) /* 1 MB, 0x100000 */
194
195#define CONFIG_USE_ONENAND_BOARD_INIT
196#define CONFIG_SAMSUNG_ONENAND 1
197#define CONFIG_SYS_ONENAND_BASE 0xB0000000
198
199#define CONFIG_DOS_PARTITION 1
200
a45ddf7a
MZ
201#define CONFIG_CMD_FAT
202#define CONFIG_CMD_EXT4
203
204/* write support for filesystems */
205#define CONFIG_FAT_WRITE
206#define CONFIG_EXT4_WRITE
207
177feff3
MK
208#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
209
7cb54948
ŁM
210#define CONFIG_SYS_CACHELINE_SIZE 64
211
be3b51aa
ŁM
212#define CONFIG_POWER
213#define CONFIG_POWER_I2C
214#define CONFIG_POWER_MAX8998
2a7dd9d7 215
85776b02
ŁM
216#include <asm/arch/gpio.h>
217/*
218 * I2C Settings
219 */
9b97b727
AS
220#define CONFIG_SOFT_I2C_GPIO_SCL S5PC110_GPIO_J43
221#define CONFIG_SOFT_I2C_GPIO_SDA S5PC110_GPIO_J40
85776b02 222
ea818dbb
HS
223#define CONFIG_SYS_I2C
224#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
225#define CONFIG_SYS_I2C_SOFT_SPEED 50000
226#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F
85776b02
ŁM
227#define CONFIG_I2C_MULTI_BUS
228#define CONFIG_SYS_MAX_I2C_BUS 7
a954da29
ŁM
229#define CONFIG_USB_GADGET
230#define CONFIG_USB_GADGET_S3C_UDC_OTG
231#define CONFIG_USB_GADGET_DUALSPEED
a45ddf7a 232#define CONFIG_USB_GADGET_VBUS_DRAW 2
85776b02 233
c474a8eb 234#endif /* __CONFIG_H */