Prepare v2023.10
[platform/kernel/u-boot.git] / include / configs / smdkc100.h
1 /*
2  * (C) Copyright 2009 Samsung Electronics
3  * Minkyu Kang <mk7.kang@samsung.com>
4  * HeungJun Kim <riverful.kim@samsung.com>
5  * Inki Dae <inki.dae@samsung.com>
6  *
7  * Configuation settings for the SAMSUNG SMDKC100 board.
8  *
9  * SPDX-License-Identifier:     GPL-2.0+
10  */
11
12 #ifndef __CONFIG_H
13 #define __CONFIG_H
14
15 /*
16  * High Level Configuration Options
17  * (easy to change)
18  */
19 #define CONFIG_SAMSUNG          1       /* in a SAMSUNG core */
20 #define CONFIG_S5P              1       /* which is in a S5P Family */
21 #define CONFIG_S5PC100          1       /* which is in a S5PC100 */
22 #define CONFIG_SMDKC100         1       /* working with SMDKC100 */
23
24 #include <asm/arch/cpu.h>               /* get chip and board defs */
25
26 #define CONFIG_ARCH_CPU_INIT
27
28 #define CONFIG_DISPLAY_CPUINFO
29 #define CONFIG_DISPLAY_BOARDINFO
30
31 /* input clock of PLL: SMDKC100 has 12MHz input clock */
32 #define CONFIG_SYS_CLK_FREQ             12000000
33
34 /* DRAM Base */
35 #define CONFIG_SYS_SDRAM_BASE           0x30000000
36
37 /* Text Base */
38 #define CONFIG_SYS_TEXT_BASE            0x34800000
39
40 #define CONFIG_SETUP_MEMORY_TAGS
41 #define CONFIG_CMDLINE_TAG
42 #define CONFIG_INITRD_TAG
43 #define CONFIG_CMDLINE_EDITING
44
45 /*
46  * Size of malloc() pool
47  * 1MB = 0x100000, 0x100000 = 1024 * 1024
48  */
49 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + (1 << 20))
50 /*
51  * select serial console configuration
52  */
53 #define CONFIG_SERIAL0                  1       /* use SERIAL 0 on SMDKC100 */
54
55 /* PWM */
56 #define CONFIG_PWM                      1
57
58 /* allow to overwrite serial and ethaddr */
59 #define CONFIG_ENV_OVERWRITE
60 #define CONFIG_BAUDRATE                 115200
61
62 /***********************************************************
63  * Command definition
64  ***********************************************************/
65 #include <config_cmd_default.h>
66
67 #undef CONFIG_CMD_FLASH
68 #undef CONFIG_CMD_IMLS
69 #undef CONFIG_CMD_NAND
70
71 #define CONFIG_CMD_CACHE
72 #define CONFIG_CMD_REGINFO
73 #define CONFIG_CMD_ONENAND
74 #define CONFIG_CMD_ELF
75 #define CONFIG_CMD_FAT
76 #define CONFIG_CMD_MTDPARTS
77
78 #define CONFIG_BOOTDELAY        3
79
80 #define CONFIG_ZERO_BOOTDELAY_CHECK
81
82 #define CONFIG_MTD_DEVICE
83 #define CONFIG_MTD_PARTITIONS
84
85 #define MTDIDS_DEFAULT          "onenand0=s3c-onenand"
86 #define MTDPARTS_DEFAULT        "mtdparts=s3c-onenand:256k(bootloader)"\
87                                 ",128k@0x40000(params)"\
88                                 ",3m@0x60000(kernel)"\
89                                 ",16m@0x360000(test)"\
90                                 ",-(UBI)"
91
92 #define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
93
94 #define CONFIG_BOOTCOMMAND      "run ubifsboot"
95
96 #define CONFIG_RAMDISK_BOOT     "root=/dev/ram0 rw rootfstype=ext2" \
97                                 " console=ttySAC0,115200n8" \
98                                 " mem=128M"
99
100 #define CONFIG_COMMON_BOOT      "console=ttySAC0,115200n8" \
101                                 " mem=128M " \
102                                 " " MTDPARTS_DEFAULT
103
104 #define CONFIG_BOOTARGS "root=/dev/mtdblock5 ubi.mtd=4" \
105                         " rootfstype=cramfs " CONFIG_COMMON_BOOT
106
107 #define CONFIG_UPDATEB  "updateb=onenand erase 0x0 0x40000;" \
108                         " onenand write 0x32008000 0x0 0x40000\0"
109
110 #define CONFIG_ENV_OVERWRITE
111 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
112         CONFIG_UPDATEB \
113         "updatek=" \
114                 "onenand erase 0x60000 0x300000;" \
115                 "onenand write 0x31008000 0x60000 0x300000\0" \
116         "updateu=" \
117                 "onenand erase block 147-4095;" \
118                 "onenand write 0x32000000 0x1260000 0x8C0000\0" \
119         "bootk=" \
120                 "onenand read 0x30007FC0 0x60000 0x300000;" \
121                 "bootm 0x30007FC0\0" \
122         "flashboot=" \
123                 "set bootargs root=/dev/mtdblock${bootblock} " \
124                 "rootfstype=${rootfstype} " \
125                 "ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT ";" \
126                 "run bootk\0" \
127         "ubifsboot=" \
128                 "set bootargs root=ubi0!rootfs rootfstype=ubifs " \
129                 " ubi.mtd=${ubiblock} ${opts} " CONFIG_COMMON_BOOT "; " \
130                 "run bootk\0" \
131         "boottrace=setenv opts initcall_debug; run bootcmd\0" \
132         "android=" \
133                 "set bootargs root=ubi0!ramdisk ubi.mtd=${ubiblock} " \
134                 "rootfstype=ubifs init=/init.sh " CONFIG_COMMON_BOOT "; " \
135                 "run bootk\0" \
136         "nfsboot=" \
137                 "set bootargs root=/dev/nfs ubi.mtd=${ubiblock} " \
138                 "nfsroot=${nfsroot},nolock " \
139                 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
140                 "${netmask}:nowplus:usb0:off " CONFIG_COMMON_BOOT "; " \
141                 "run bootk\0" \
142         "ramboot=" \
143                 "set bootargs " CONFIG_RAMDISK_BOOT \
144                 " initrd=0x33000000,8M ramdisk=8192\0" \
145         "rootfstype=cramfs\0" \
146         "mtdparts=" MTDPARTS_DEFAULT "\0" \
147         "meminfo=mem=128M\0" \
148         "nfsroot=/nfsroot/arm\0" \
149         "bootblock=5\0" \
150         "ubiblock=4\0" \
151         "ubi=enabled"
152
153 /*
154  * Miscellaneous configurable options
155  */
156 #define CONFIG_SYS_LONGHELP             /* undef to save memory */
157 #define CONFIG_SYS_HUSH_PARSER          /* use "hush" command parser    */
158 #define CONFIG_SYS_PROMPT               "SMDKC100 # "
159 #define CONFIG_SYS_CBSIZE       256     /* Console I/O Buffer Size */
160 #define CONFIG_SYS_PBSIZE       384     /* Print Buffer Size */
161 #define CONFIG_SYS_MAXARGS      16      /* max number of command args */
162 /* Boot Argument Buffer Size */
163 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
164 /* memtest works on */
165 #define CONFIG_SYS_MEMTEST_START        CONFIG_SYS_SDRAM_BASE
166 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_SDRAM_BASE + 0x5e00000)
167 #define CONFIG_SYS_LOAD_ADDR            CONFIG_SYS_SDRAM_BASE
168
169 /* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */
170 #define CONFIG_NR_DRAM_BANKS    1
171 #define PHYS_SDRAM_1            CONFIG_SYS_SDRAM_BASE   /* SDRAM Bank #1 */
172 #define PHYS_SDRAM_1_SIZE       (128 << 20)     /* 0x8000000, 128 MB Bank #1 */
173
174 #define CONFIG_SYS_MONITOR_BASE 0x00000000
175
176 /*-----------------------------------------------------------------------
177  * FLASH and environment organization
178  */
179 #define CONFIG_SYS_NO_FLASH             1
180
181 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* 256 KiB */
182 #define CONFIG_IDENT_STRING             " for SMDKC100"
183
184 #if !defined(CONFIG_NAND_SPL) && (CONFIG_SYS_TEXT_BASE >= 0xc0000000)
185 #define CONFIG_ENABLE_MMU
186 #endif
187
188 #ifdef CONFIG_ENABLE_MMU
189 #define CONFIG_SYS_MAPPED_RAM_BASE      0xc0000000
190 #else
191 #define CONFIG_SYS_MAPPED_RAM_BASE      CONFIG_SYS_SDRAM_BASE
192 #endif
193
194 /*-----------------------------------------------------------------------
195  * Boot configuration
196  */
197 #define CONFIG_ENV_IS_IN_ONENAND        1
198 #define CONFIG_ENV_SIZE                 (128 << 10)     /* 128KiB, 0x20000 */
199 #define CONFIG_ENV_ADDR                 (256 << 10)     /* 256KiB, 0x40000 */
200 #define CONFIG_ENV_OFFSET               (256 << 10)     /* 256KiB, 0x40000 */
201
202 #define CONFIG_USE_ONENAND_BOARD_INIT
203 #define CONFIG_SAMSUNG_ONENAND          1
204 #define CONFIG_SYS_ONENAND_BASE         0xE7100000
205
206 #define CONFIG_DOS_PARTITION            1
207
208 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
209
210 /*
211  * Ethernet Contoller driver
212  */
213 #ifdef CONFIG_CMD_NET
214 #define CONFIG_SMC911X         1       /* we have a SMC9115 on-board   */
215 #define CONFIG_SMC911X_16_BIT  1       /* SMC911X_16_BIT Mode          */
216 #define CONFIG_SMC911X_BASE    0x98800300      /* SMC911X Drive Base   */
217 #define CONFIG_ENV_SROM_BANK   3       /* Select SROM Bank-3 for Ethernet*/
218 #endif /* CONFIG_CMD_NET */
219
220 #endif  /* __CONFIG_H */