1
2
3
4
5
6
7
8
9
10
11
12#ifndef __CONFIG_H__
13#define __CONFIG_H__
14
15#include <linux/sizes.h>
16#include <asm/arch/nexell.h>
17
18
19
20
21#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE
22#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
23#define CONFIG_SYS_MEM_SIZE 0x40000000
24#define CONFIG_SYS_SDRAM_BASE 0x71000000
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61#define CONFIG_SYS_SDRAM_SIZE (0xb0000000 - CONFIG_SYS_SDRAM_BASE)
62
63#define CONFIG_SYS_MALLOC_LEN (32 * 1024 * 1024)
64
65#define BMP_LOAD_ADDR 0x78000000
66
67
68#define CONFIG_SYS_LOAD_ADDR 0x71080000
69#define INITRD_START 0x79000000
70#define KERNEL_DTB_ADDR 0x7A000000
71
72
73
74
75
76#undef CONFIG_USE_IRQ
77
78#define CONFIG_SYS_HZ 1000
79
80
81
82
83
84#define CONFIG_ARCH_CPU_INIT
85
86
87
88
89#ifdef CONFIG_SYS_PROMPT
90#undef CONFIG_SYS_PROMPT
91
92#define CONFIG_SYS_PROMPT "nanopi2# "
93#endif
94
95
96#define CONFIG_SYS_CBSIZE 1024
97
98#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
99 sizeof(CONFIG_SYS_PROMPT) + 16)
100
101#define CONFIG_SYS_MAXARGS 16
102
103#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
104
105
106
107
108#undef CONFIG_BOOTM_NETBSD
109#undef CONFIG_BOOTM_RTEMS
110
111
112
113
114#define CONFIG_PL011_CLOCK 50000000
115#define CONFIG_PL01x_PORTS {(void *)PHY_BASEADDR_UART0, \
116 (void *)PHY_BASEADDR_UART1, \
117 (void *)PHY_BASEADDR_UART2, \
118 (void *)PHY_BASEADDR_UART3}
119#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
120
121
122
123
124#define CONFIG_SYS_PLLFIN 24000000UL
125
126
127
128
129#define CONFIG_TIMER_SYS_TICK_CH 0
130
131
132
133
134#ifndef CONFIG_S5P4418_ONEWIRE
135#ifdef CONFIG_PWM_NX
136
137#define BACKLIGHT_CH 0
138#define BACKLIGHT_DIV 0
139#define BACKLIGHT_INV 0
140#define BACKLIGHT_DUTY 50
141#define BACKLIGHT_HZ 1000
142#endif
143#endif
144
145
146
147
148
149#define CONFIG_VIDEO_LOGO
150
151#ifdef CONFIG_VIDEO_LOGO
152#ifdef CONFIG_SPLASH_SCREEN
153#define SPLASH_FILE logo.bmp
154#endif
155
156#endif
157
158
159
160
161#define BLOADER_MMC \
162 "ext4load mmc ${rootdev}:${bootpart} "
163
164#ifdef CONFIG_OF_BOARD_SETUP
165#define EXTRA_ENV_DTB_RESERVE \
166 "dtb_reserve=" \
167 "if test -n \"$dtb_addr\"; then fdt addr $dtb_addr; fi\0"
168#else
169#define EXTRA_ENV_DTB_RESERVE \
170 "dtb_reserve=" \
171 "if test -n \"$fb_addr\"; then " \
172 "fdt addr $dtb_addr;" \
173 "fdt resize;" \
174 "fdt mk /reserved-memory display_reserved;" \
175 "fdt set /reserved-memory/display_reserved " \
176 "reg <$fb_addr 0x800000>;" \
177 "fi;\0"
178#endif
179
180#ifdef CONFIG_SPLASH_SCREEN
181#define EXTRA_ENV_BOOT_LOGO \
182 "splashimage=" __stringify(BMP_LOAD_ADDR)"\0" \
183 "splashfile=" __stringify(SPLASH_FILE)"\0" \
184 "splashpos=m,m\0" \
185 "fb_addr=\0" \
186 EXTRA_ENV_DTB_RESERVE
187#else
188 #define EXTRA_ENV_BOOT_LOGO EXTRA_ENV_DTB_RESERVE
189#endif
190
191#define CONFIG_EXTRA_ENV_SETTINGS \
192 "fdt_high=0xffffffff\0" \
193 "initrd_high=0xffffffff\0" \
194 "rootdev=" __stringify(CONFIG_ROOT_DEV) "\0" \
195 "rootpart=" __stringify(CONFIG_ROOT_PART) "\0" \
196 "bootpart=" __stringify(CONFIG_BOOT_PART) "\0" \
197 "kernel=zImage\0" \
198 "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
199 "dtb_name=s5p4418-nanopi2-rev01.dtb\0" \
200 "dtb_addr=" __stringify(KERNEL_DTB_ADDR) "\0" \
201 "initrd_name=ramdisk.img\0" \
202 "initrd_addr=" __stringify(INITRD_START) "\0" \
203 "initrd_size=0x600000\0" \
204 "load_dtb=" \
205 BLOADER_MMC "${dtb_addr} ${dtb_name}; " \
206 "run dtb_reserve\0" \
207 "load_kernel=" \
208 BLOADER_MMC "${loadaddr} ${kernel}\0" \
209 "load_initrd=" \
210 BLOADER_MMC "${initrd_addr} ${initrd_name}; " \
211 "setenv initrd_size 0x${filesize}\0" \
212 "mmcboot=" \
213 "run load_kernel; run load_initrd; run load_dtb; " \
214 "bootz ${loadaddr} ${initrd_addr}:${initrd_size} " \
215 "${dtb_addr}\0" \
216 "bootcmd=run mmcboot\0" \
217 EXTRA_ENV_BOOT_LOGO
218
219#endif
220