Commit 99e516295f4fae7bc0a1d7efaf3106c5ddd43fad

Authored by Ajay Kumar
Committed by Minkyu Kang
1 parent 5374d386f8

EXYNOS5: Make all display related code dependent on CONFIG_LCD

u-boot compilation fails for smdk5250 when we deselect CONFIG_LCD
from the main config file.

Following error was observed:
drivers/video/libvideo.o: In function `exynos_lcd_init':
/home/ajay/u-boot-samsung/drivers/video/exynos_fb.c:68: undefined reference to `lcd_set_flush_dcache'

This is because exynos video drivers have dependency on CONFIG_LCD.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>

Showing 2 changed files with 4 additions and 0 deletions Inline Diff

board/samsung/smdk5250/smdk5250.c
1 /* 1 /*
2 * Copyright (C) 2012 Samsung Electronics 2 * Copyright (C) 2012 Samsung Electronics
3 * 3 *
4 * See file CREDITS for list of people who contributed to this 4 * See file CREDITS for list of people who contributed to this
5 * project. 5 * project.
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of 9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version. 10 * the License, or (at your option) any later version.
11 * 11 *
12 * This program is distributed in the hope that it will be useful, 12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA 20 * MA 02111-1307 USA
21 */ 21 */
22 22
23 #include <common.h> 23 #include <common.h>
24 #include <fdtdec.h> 24 #include <fdtdec.h>
25 #include <asm/io.h> 25 #include <asm/io.h>
26 #include <i2c.h> 26 #include <i2c.h>
27 #include <lcd.h> 27 #include <lcd.h>
28 #include <netdev.h> 28 #include <netdev.h>
29 #include <spi.h> 29 #include <spi.h>
30 #include <asm/arch/cpu.h> 30 #include <asm/arch/cpu.h>
31 #include <asm/arch/gpio.h> 31 #include <asm/arch/gpio.h>
32 #include <asm/arch/mmc.h> 32 #include <asm/arch/mmc.h>
33 #include <asm/arch/pinmux.h> 33 #include <asm/arch/pinmux.h>
34 #include <asm/arch/power.h> 34 #include <asm/arch/power.h>
35 #include <asm/arch/sromc.h> 35 #include <asm/arch/sromc.h>
36 #include <asm/arch/dp_info.h> 36 #include <asm/arch/dp_info.h>
37 #include <power/pmic.h> 37 #include <power/pmic.h>
38 38
39 DECLARE_GLOBAL_DATA_PTR; 39 DECLARE_GLOBAL_DATA_PTR;
40 40
41 #ifdef CONFIG_USB_EHCI_EXYNOS 41 #ifdef CONFIG_USB_EHCI_EXYNOS
42 int board_usb_vbus_init(void) 42 int board_usb_vbus_init(void)
43 { 43 {
44 struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *) 44 struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *)
45 samsung_get_base_gpio_part1(); 45 samsung_get_base_gpio_part1();
46 46
47 /* Enable VBUS power switch */ 47 /* Enable VBUS power switch */
48 s5p_gpio_direction_output(&gpio1->x2, 6, 1); 48 s5p_gpio_direction_output(&gpio1->x2, 6, 1);
49 49
50 /* VBUS turn ON time */ 50 /* VBUS turn ON time */
51 mdelay(3); 51 mdelay(3);
52 52
53 return 0; 53 return 0;
54 } 54 }
55 #endif 55 #endif
56 56
57 int board_init(void) 57 int board_init(void)
58 { 58 {
59 gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); 59 gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
60 #ifdef CONFIG_EXYNOS_SPI 60 #ifdef CONFIG_EXYNOS_SPI
61 spi_init(); 61 spi_init();
62 #endif 62 #endif
63 #ifdef CONFIG_USB_EHCI_EXYNOS 63 #ifdef CONFIG_USB_EHCI_EXYNOS
64 board_usb_vbus_init(); 64 board_usb_vbus_init();
65 #endif 65 #endif
66 return 0; 66 return 0;
67 } 67 }
68 68
69 int dram_init(void) 69 int dram_init(void)
70 { 70 {
71 gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE) 71 gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE)
72 + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE) 72 + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE)
73 + get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE) 73 + get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE)
74 + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE) 74 + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE)
75 + get_ram_size((long *)PHYS_SDRAM_5, PHYS_SDRAM_7_SIZE) 75 + get_ram_size((long *)PHYS_SDRAM_5, PHYS_SDRAM_7_SIZE)
76 + get_ram_size((long *)PHYS_SDRAM_6, PHYS_SDRAM_7_SIZE) 76 + get_ram_size((long *)PHYS_SDRAM_6, PHYS_SDRAM_7_SIZE)
77 + get_ram_size((long *)PHYS_SDRAM_7, PHYS_SDRAM_7_SIZE) 77 + get_ram_size((long *)PHYS_SDRAM_7, PHYS_SDRAM_7_SIZE)
78 + get_ram_size((long *)PHYS_SDRAM_8, PHYS_SDRAM_8_SIZE); 78 + get_ram_size((long *)PHYS_SDRAM_8, PHYS_SDRAM_8_SIZE);
79 return 0; 79 return 0;
80 } 80 }
81 81
82 #if defined(CONFIG_POWER) 82 #if defined(CONFIG_POWER)
83 int power_init_board(void) 83 int power_init_board(void)
84 { 84 {
85 if (pmic_init(I2C_PMIC)) 85 if (pmic_init(I2C_PMIC))
86 return -1; 86 return -1;
87 else 87 else
88 return 0; 88 return 0;
89 } 89 }
90 #endif 90 #endif
91 91
92 void dram_init_banksize(void) 92 void dram_init_banksize(void)
93 { 93 {
94 gd->bd->bi_dram[0].start = PHYS_SDRAM_1; 94 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
95 gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, 95 gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1,
96 PHYS_SDRAM_1_SIZE); 96 PHYS_SDRAM_1_SIZE);
97 gd->bd->bi_dram[1].start = PHYS_SDRAM_2; 97 gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
98 gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, 98 gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2,
99 PHYS_SDRAM_2_SIZE); 99 PHYS_SDRAM_2_SIZE);
100 gd->bd->bi_dram[2].start = PHYS_SDRAM_3; 100 gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
101 gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, 101 gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3,
102 PHYS_SDRAM_3_SIZE); 102 PHYS_SDRAM_3_SIZE);
103 gd->bd->bi_dram[3].start = PHYS_SDRAM_4; 103 gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
104 gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, 104 gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4,
105 PHYS_SDRAM_4_SIZE); 105 PHYS_SDRAM_4_SIZE);
106 gd->bd->bi_dram[4].start = PHYS_SDRAM_5; 106 gd->bd->bi_dram[4].start = PHYS_SDRAM_5;
107 gd->bd->bi_dram[4].size = get_ram_size((long *)PHYS_SDRAM_5, 107 gd->bd->bi_dram[4].size = get_ram_size((long *)PHYS_SDRAM_5,
108 PHYS_SDRAM_5_SIZE); 108 PHYS_SDRAM_5_SIZE);
109 gd->bd->bi_dram[5].start = PHYS_SDRAM_6; 109 gd->bd->bi_dram[5].start = PHYS_SDRAM_6;
110 gd->bd->bi_dram[5].size = get_ram_size((long *)PHYS_SDRAM_6, 110 gd->bd->bi_dram[5].size = get_ram_size((long *)PHYS_SDRAM_6,
111 PHYS_SDRAM_6_SIZE); 111 PHYS_SDRAM_6_SIZE);
112 gd->bd->bi_dram[6].start = PHYS_SDRAM_7; 112 gd->bd->bi_dram[6].start = PHYS_SDRAM_7;
113 gd->bd->bi_dram[6].size = get_ram_size((long *)PHYS_SDRAM_7, 113 gd->bd->bi_dram[6].size = get_ram_size((long *)PHYS_SDRAM_7,
114 PHYS_SDRAM_7_SIZE); 114 PHYS_SDRAM_7_SIZE);
115 gd->bd->bi_dram[7].start = PHYS_SDRAM_8; 115 gd->bd->bi_dram[7].start = PHYS_SDRAM_8;
116 gd->bd->bi_dram[7].size = get_ram_size((long *)PHYS_SDRAM_8, 116 gd->bd->bi_dram[7].size = get_ram_size((long *)PHYS_SDRAM_8,
117 PHYS_SDRAM_8_SIZE); 117 PHYS_SDRAM_8_SIZE);
118 } 118 }
119 119
120 #ifdef CONFIG_OF_CONTROL 120 #ifdef CONFIG_OF_CONTROL
121 static int decode_sromc(const void *blob, struct fdt_sromc *config) 121 static int decode_sromc(const void *blob, struct fdt_sromc *config)
122 { 122 {
123 int err; 123 int err;
124 int node; 124 int node;
125 125
126 node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS5_SROMC); 126 node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS5_SROMC);
127 if (node < 0) { 127 if (node < 0) {
128 debug("Could not find SROMC node\n"); 128 debug("Could not find SROMC node\n");
129 return node; 129 return node;
130 } 130 }
131 131
132 config->bank = fdtdec_get_int(blob, node, "bank", 0); 132 config->bank = fdtdec_get_int(blob, node, "bank", 0);
133 config->width = fdtdec_get_int(blob, node, "width", 2); 133 config->width = fdtdec_get_int(blob, node, "width", 2);
134 134
135 err = fdtdec_get_int_array(blob, node, "srom-timing", config->timing, 135 err = fdtdec_get_int_array(blob, node, "srom-timing", config->timing,
136 FDT_SROM_TIMING_COUNT); 136 FDT_SROM_TIMING_COUNT);
137 if (err < 0) { 137 if (err < 0) {
138 debug("Could not decode SROMC configuration\n"); 138 debug("Could not decode SROMC configuration\n");
139 return -FDT_ERR_NOTFOUND; 139 return -FDT_ERR_NOTFOUND;
140 } 140 }
141 141
142 return 0; 142 return 0;
143 } 143 }
144 #endif 144 #endif
145 145
146 int board_eth_init(bd_t *bis) 146 int board_eth_init(bd_t *bis)
147 { 147 {
148 #ifdef CONFIG_SMC911X 148 #ifdef CONFIG_SMC911X
149 u32 smc_bw_conf, smc_bc_conf; 149 u32 smc_bw_conf, smc_bc_conf;
150 struct fdt_sromc config; 150 struct fdt_sromc config;
151 fdt_addr_t base_addr; 151 fdt_addr_t base_addr;
152 int node; 152 int node;
153 153
154 #ifdef CONFIG_OF_CONTROL 154 #ifdef CONFIG_OF_CONTROL
155 node = decode_sromc(gd->fdt_blob, &config); 155 node = decode_sromc(gd->fdt_blob, &config);
156 if (node < 0) { 156 if (node < 0) {
157 debug("%s: Could not find sromc configuration\n", __func__); 157 debug("%s: Could not find sromc configuration\n", __func__);
158 return 0; 158 return 0;
159 } 159 }
160 node = fdtdec_next_compatible(gd->fdt_blob, node, COMPAT_SMSC_LAN9215); 160 node = fdtdec_next_compatible(gd->fdt_blob, node, COMPAT_SMSC_LAN9215);
161 if (node < 0) { 161 if (node < 0) {
162 debug("%s: Could not find lan9215 configuration\n", __func__); 162 debug("%s: Could not find lan9215 configuration\n", __func__);
163 return 0; 163 return 0;
164 } 164 }
165 165
166 /* We now have a node, so any problems from now on are errors */ 166 /* We now have a node, so any problems from now on are errors */
167 base_addr = fdtdec_get_addr(gd->fdt_blob, node, "reg"); 167 base_addr = fdtdec_get_addr(gd->fdt_blob, node, "reg");
168 if (base_addr == FDT_ADDR_T_NONE) { 168 if (base_addr == FDT_ADDR_T_NONE) {
169 debug("%s: Could not find lan9215 address\n", __func__); 169 debug("%s: Could not find lan9215 address\n", __func__);
170 return -1; 170 return -1;
171 } 171 }
172 #else 172 #else
173 /* Non-FDT configuration - bank number and timing parameters*/ 173 /* Non-FDT configuration - bank number and timing parameters*/
174 config.bank = CONFIG_ENV_SROM_BANK; 174 config.bank = CONFIG_ENV_SROM_BANK;
175 config.width = 2; 175 config.width = 2;
176 176
177 config.timing[FDT_SROM_TACS] = 0x01; 177 config.timing[FDT_SROM_TACS] = 0x01;
178 config.timing[FDT_SROM_TCOS] = 0x01; 178 config.timing[FDT_SROM_TCOS] = 0x01;
179 config.timing[FDT_SROM_TACC] = 0x06; 179 config.timing[FDT_SROM_TACC] = 0x06;
180 config.timing[FDT_SROM_TCOH] = 0x01; 180 config.timing[FDT_SROM_TCOH] = 0x01;
181 config.timing[FDT_SROM_TAH] = 0x0C; 181 config.timing[FDT_SROM_TAH] = 0x0C;
182 config.timing[FDT_SROM_TACP] = 0x09; 182 config.timing[FDT_SROM_TACP] = 0x09;
183 config.timing[FDT_SROM_PMC] = 0x01; 183 config.timing[FDT_SROM_PMC] = 0x01;
184 base_addr = CONFIG_SMC911X_BASE; 184 base_addr = CONFIG_SMC911X_BASE;
185 #endif 185 #endif
186 186
187 /* Ethernet needs data bus width of 16 bits */ 187 /* Ethernet needs data bus width of 16 bits */
188 if (config.width != 2) { 188 if (config.width != 2) {
189 debug("%s: Unsupported bus width %d\n", __func__, 189 debug("%s: Unsupported bus width %d\n", __func__,
190 config.width); 190 config.width);
191 return -1; 191 return -1;
192 } 192 }
193 smc_bw_conf = SROMC_DATA16_WIDTH(config.bank) 193 smc_bw_conf = SROMC_DATA16_WIDTH(config.bank)
194 | SROMC_BYTE_ENABLE(config.bank); 194 | SROMC_BYTE_ENABLE(config.bank);
195 195
196 smc_bc_conf = SROMC_BC_TACS(config.timing[FDT_SROM_TACS]) |\ 196 smc_bc_conf = SROMC_BC_TACS(config.timing[FDT_SROM_TACS]) |\
197 SROMC_BC_TCOS(config.timing[FDT_SROM_TCOS]) |\ 197 SROMC_BC_TCOS(config.timing[FDT_SROM_TCOS]) |\
198 SROMC_BC_TACC(config.timing[FDT_SROM_TACC]) |\ 198 SROMC_BC_TACC(config.timing[FDT_SROM_TACC]) |\
199 SROMC_BC_TCOH(config.timing[FDT_SROM_TCOH]) |\ 199 SROMC_BC_TCOH(config.timing[FDT_SROM_TCOH]) |\
200 SROMC_BC_TAH(config.timing[FDT_SROM_TAH]) |\ 200 SROMC_BC_TAH(config.timing[FDT_SROM_TAH]) |\
201 SROMC_BC_TACP(config.timing[FDT_SROM_TACP]) |\ 201 SROMC_BC_TACP(config.timing[FDT_SROM_TACP]) |\
202 SROMC_BC_PMC(config.timing[FDT_SROM_PMC]); 202 SROMC_BC_PMC(config.timing[FDT_SROM_PMC]);
203 203
204 /* Select and configure the SROMC bank */ 204 /* Select and configure the SROMC bank */
205 exynos_pinmux_config(PERIPH_ID_SROMC, config.bank); 205 exynos_pinmux_config(PERIPH_ID_SROMC, config.bank);
206 s5p_config_sromc(config.bank, smc_bw_conf, smc_bc_conf); 206 s5p_config_sromc(config.bank, smc_bw_conf, smc_bc_conf);
207 return smc911x_initialize(0, base_addr); 207 return smc911x_initialize(0, base_addr);
208 #endif 208 #endif
209 return 0; 209 return 0;
210 } 210 }
211 211
212 #ifdef CONFIG_DISPLAY_BOARDINFO 212 #ifdef CONFIG_DISPLAY_BOARDINFO
213 int checkboard(void) 213 int checkboard(void)
214 { 214 {
215 printf("\nBoard: SMDK5250\n"); 215 printf("\nBoard: SMDK5250\n");
216 216
217 return 0; 217 return 0;
218 } 218 }
219 #endif 219 #endif
220 220
221 #ifdef CONFIG_GENERIC_MMC 221 #ifdef CONFIG_GENERIC_MMC
222 int board_mmc_init(bd_t *bis) 222 int board_mmc_init(bd_t *bis)
223 { 223 {
224 int err; 224 int err;
225 225
226 err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE); 226 err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE);
227 if (err) { 227 if (err) {
228 debug("SDMMC0 not configured\n"); 228 debug("SDMMC0 not configured\n");
229 return err; 229 return err;
230 } 230 }
231 231
232 err = s5p_mmc_init(0, 8); 232 err = s5p_mmc_init(0, 8);
233 return err; 233 return err;
234 } 234 }
235 #endif 235 #endif
236 236
237 static int board_uart_init(void) 237 static int board_uart_init(void)
238 { 238 {
239 int err; 239 int err;
240 240
241 err = exynos_pinmux_config(PERIPH_ID_UART0, PINMUX_FLAG_NONE); 241 err = exynos_pinmux_config(PERIPH_ID_UART0, PINMUX_FLAG_NONE);
242 if (err) { 242 if (err) {
243 debug("UART0 not configured\n"); 243 debug("UART0 not configured\n");
244 return err; 244 return err;
245 } 245 }
246 246
247 err = exynos_pinmux_config(PERIPH_ID_UART1, PINMUX_FLAG_NONE); 247 err = exynos_pinmux_config(PERIPH_ID_UART1, PINMUX_FLAG_NONE);
248 if (err) { 248 if (err) {
249 debug("UART1 not configured\n"); 249 debug("UART1 not configured\n");
250 return err; 250 return err;
251 } 251 }
252 252
253 err = exynos_pinmux_config(PERIPH_ID_UART2, PINMUX_FLAG_NONE); 253 err = exynos_pinmux_config(PERIPH_ID_UART2, PINMUX_FLAG_NONE);
254 if (err) { 254 if (err) {
255 debug("UART2 not configured\n"); 255 debug("UART2 not configured\n");
256 return err; 256 return err;
257 } 257 }
258 258
259 err = exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE); 259 err = exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE);
260 if (err) { 260 if (err) {
261 debug("UART3 not configured\n"); 261 debug("UART3 not configured\n");
262 return err; 262 return err;
263 } 263 }
264 264
265 return 0; 265 return 0;
266 } 266 }
267 267
268 #ifdef CONFIG_BOARD_EARLY_INIT_F 268 #ifdef CONFIG_BOARD_EARLY_INIT_F
269 int board_early_init_f(void) 269 int board_early_init_f(void)
270 { 270 {
271 int err; 271 int err;
272 err = board_uart_init(); 272 err = board_uart_init();
273 if (err) { 273 if (err) {
274 debug("UART init failed\n"); 274 debug("UART init failed\n");
275 return err; 275 return err;
276 } 276 }
277 #ifdef CONFIG_SYS_I2C_INIT_BOARD 277 #ifdef CONFIG_SYS_I2C_INIT_BOARD
278 board_i2c_init(gd->fdt_blob); 278 board_i2c_init(gd->fdt_blob);
279 #endif 279 #endif
280 return err; 280 return err;
281 } 281 }
282 #endif 282 #endif
283 283
284 #ifdef CONFIG_LCD
284 void cfg_lcd_gpio(void) 285 void cfg_lcd_gpio(void)
285 { 286 {
286 struct exynos5_gpio_part1 *gpio1 = 287 struct exynos5_gpio_part1 *gpio1 =
287 (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); 288 (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
288 289
289 /* For Backlight */ 290 /* For Backlight */
290 s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT); 291 s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
291 s5p_gpio_set_value(&gpio1->b2, 0, 1); 292 s5p_gpio_set_value(&gpio1->b2, 0, 1);
292 293
293 /* LCD power on */ 294 /* LCD power on */
294 s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT); 295 s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
295 s5p_gpio_set_value(&gpio1->x1, 5, 1); 296 s5p_gpio_set_value(&gpio1->x1, 5, 1);
296 297
297 /* Set Hotplug detect for DP */ 298 /* Set Hotplug detect for DP */
298 s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3)); 299 s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
299 } 300 }
300 301
301 vidinfo_t panel_info = { 302 vidinfo_t panel_info = {
302 .vl_freq = 60, 303 .vl_freq = 60,
303 .vl_col = 2560, 304 .vl_col = 2560,
304 .vl_row = 1600, 305 .vl_row = 1600,
305 .vl_width = 2560, 306 .vl_width = 2560,
306 .vl_height = 1600, 307 .vl_height = 1600,
307 .vl_clkp = CONFIG_SYS_LOW, 308 .vl_clkp = CONFIG_SYS_LOW,
308 .vl_hsp = CONFIG_SYS_LOW, 309 .vl_hsp = CONFIG_SYS_LOW,
309 .vl_vsp = CONFIG_SYS_LOW, 310 .vl_vsp = CONFIG_SYS_LOW,
310 .vl_dp = CONFIG_SYS_LOW, 311 .vl_dp = CONFIG_SYS_LOW,
311 .vl_bpix = 4, /* LCD_BPP = 2^4, for output conosle on LCD */ 312 .vl_bpix = 4, /* LCD_BPP = 2^4, for output conosle on LCD */
312 313
313 /* wDP panel timing infomation */ 314 /* wDP panel timing infomation */
314 .vl_hspw = 32, 315 .vl_hspw = 32,
315 .vl_hbpd = 80, 316 .vl_hbpd = 80,
316 .vl_hfpd = 48, 317 .vl_hfpd = 48,
317 318
318 .vl_vspw = 6, 319 .vl_vspw = 6,
319 .vl_vbpd = 37, 320 .vl_vbpd = 37,
320 .vl_vfpd = 3, 321 .vl_vfpd = 3,
321 .vl_cmd_allow_len = 0xf, 322 .vl_cmd_allow_len = 0xf,
322 323
323 .win_id = 3, 324 .win_id = 3,
324 .cfg_gpio = cfg_lcd_gpio, 325 .cfg_gpio = cfg_lcd_gpio,
325 .backlight_on = NULL, 326 .backlight_on = NULL,
326 .lcd_power_on = NULL, 327 .lcd_power_on = NULL,
327 .reset_lcd = NULL, 328 .reset_lcd = NULL,
328 .dual_lcd_enabled = 0, 329 .dual_lcd_enabled = 0,
329 330
330 .init_delay = 0, 331 .init_delay = 0,
331 .power_on_delay = 0, 332 .power_on_delay = 0,
332 .reset_delay = 0, 333 .reset_delay = 0,
333 .interface_mode = FIMD_RGB_INTERFACE, 334 .interface_mode = FIMD_RGB_INTERFACE,
334 .dp_enabled = 1, 335 .dp_enabled = 1,
335 }; 336 };
336 337
337 static struct edp_device_info edp_info = { 338 static struct edp_device_info edp_info = {
338 .disp_info = { 339 .disp_info = {
339 .h_res = 2560, 340 .h_res = 2560,
340 .h_sync_width = 32, 341 .h_sync_width = 32,
341 .h_back_porch = 80, 342 .h_back_porch = 80,
342 .h_front_porch = 48, 343 .h_front_porch = 48,
343 .v_res = 1600, 344 .v_res = 1600,
344 .v_sync_width = 6, 345 .v_sync_width = 6,
345 .v_back_porch = 37, 346 .v_back_porch = 37,
346 .v_front_porch = 3, 347 .v_front_porch = 3,
347 .v_sync_rate = 60, 348 .v_sync_rate = 60,
348 }, 349 },
349 .lt_info = { 350 .lt_info = {
350 .lt_status = DP_LT_NONE, 351 .lt_status = DP_LT_NONE,
351 }, 352 },
352 .video_info = { 353 .video_info = {
353 .master_mode = 0, 354 .master_mode = 0,
354 .bist_mode = DP_DISABLE, 355 .bist_mode = DP_DISABLE,
355 .bist_pattern = NO_PATTERN, 356 .bist_pattern = NO_PATTERN,
356 .h_sync_polarity = 0, 357 .h_sync_polarity = 0,
357 .v_sync_polarity = 0, 358 .v_sync_polarity = 0,
358 .interlaced = 0, 359 .interlaced = 0,
359 .color_space = COLOR_RGB, 360 .color_space = COLOR_RGB,
360 .dynamic_range = VESA, 361 .dynamic_range = VESA,
361 .ycbcr_coeff = COLOR_YCBCR601, 362 .ycbcr_coeff = COLOR_YCBCR601,
362 .color_depth = COLOR_8, 363 .color_depth = COLOR_8,
363 }, 364 },
364 }; 365 };
365 366
366 static struct exynos_dp_platform_data dp_platform_data = { 367 static struct exynos_dp_platform_data dp_platform_data = {
367 .phy_enable = set_dp_phy_ctrl, 368 .phy_enable = set_dp_phy_ctrl,
368 .edp_dev_info = &edp_info, 369 .edp_dev_info = &edp_info,
369 }; 370 };
370 371
371 void init_panel_info(vidinfo_t *vid) 372 void init_panel_info(vidinfo_t *vid)
372 { 373 {
373 vid->rgb_mode = MODE_RGB_P, 374 vid->rgb_mode = MODE_RGB_P,
374 375
375 exynos_set_dp_platform_data(&dp_platform_data); 376 exynos_set_dp_platform_data(&dp_platform_data);
376 } 377 }
378 #endif
377 379
include/configs/exynos5250-dt.h
1 /* 1 /*
2 * Copyright (C) 2012 Samsung Electronics 2 * Copyright (C) 2012 Samsung Electronics
3 * 3 *
4 * Configuration settings for the SAMSUNG EXYNOS5250 board. 4 * Configuration settings for the SAMSUNG EXYNOS5250 board.
5 * 5 *
6 * See file CREDITS for list of people who contributed to this 6 * See file CREDITS for list of people who contributed to this
7 * project. 7 * project.
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as 10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of 11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version. 12 * the License, or (at your option) any later version.
13 * 13 *
14 * This program is distributed in the hope that it will be useful, 14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details. 17 * GNU General Public License for more details.
18 * 18 *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA 22 * MA 02111-1307 USA
23 */ 23 */
24 24
25 #ifndef __CONFIG_H 25 #ifndef __CONFIG_H
26 #define __CONFIG_H 26 #define __CONFIG_H
27 27
28 /* High Level Configuration Options */ 28 /* High Level Configuration Options */
29 #define CONFIG_SAMSUNG /* in a SAMSUNG core */ 29 #define CONFIG_SAMSUNG /* in a SAMSUNG core */
30 #define CONFIG_S5P /* S5P Family */ 30 #define CONFIG_S5P /* S5P Family */
31 #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */ 31 #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */
32 #define CONFIG_SMDK5250 /* which is in a SMDK5250 */ 32 #define CONFIG_SMDK5250 /* which is in a SMDK5250 */
33 33
34 #include <asm/arch/cpu.h> /* get chip and board defs */ 34 #include <asm/arch/cpu.h> /* get chip and board defs */
35 35
36 #define CONFIG_ARCH_CPU_INIT 36 #define CONFIG_ARCH_CPU_INIT
37 #define CONFIG_DISPLAY_CPUINFO 37 #define CONFIG_DISPLAY_CPUINFO
38 #define CONFIG_DISPLAY_BOARDINFO 38 #define CONFIG_DISPLAY_BOARDINFO
39 39
40 /* Enable fdt support for Exynos5250 */ 40 /* Enable fdt support for Exynos5250 */
41 #define CONFIG_ARCH_DEVICE_TREE exynos5250 41 #define CONFIG_ARCH_DEVICE_TREE exynos5250
42 #define CONFIG_OF_CONTROL 42 #define CONFIG_OF_CONTROL
43 #define CONFIG_OF_SEPARATE 43 #define CONFIG_OF_SEPARATE
44 44
45 /* Keep L2 Cache Disabled */ 45 /* Keep L2 Cache Disabled */
46 #define CONFIG_SYS_DCACHE_OFF 46 #define CONFIG_SYS_DCACHE_OFF
47 47
48 #define CONFIG_SYS_SDRAM_BASE 0x40000000 48 #define CONFIG_SYS_SDRAM_BASE 0x40000000
49 #define CONFIG_SYS_TEXT_BASE 0x43E00000 49 #define CONFIG_SYS_TEXT_BASE 0x43E00000
50 50
51 /* input clock of PLL: SMDK5250 has 24MHz input clock */ 51 /* input clock of PLL: SMDK5250 has 24MHz input clock */
52 #define CONFIG_SYS_CLK_FREQ 24000000 52 #define CONFIG_SYS_CLK_FREQ 24000000
53 53
54 #define CONFIG_SETUP_MEMORY_TAGS 54 #define CONFIG_SETUP_MEMORY_TAGS
55 #define CONFIG_CMDLINE_TAG 55 #define CONFIG_CMDLINE_TAG
56 #define CONFIG_INITRD_TAG 56 #define CONFIG_INITRD_TAG
57 #define CONFIG_CMDLINE_EDITING 57 #define CONFIG_CMDLINE_EDITING
58 58
59 /* MACH_TYPE_SMDK5250 macro will be removed once added to mach-types */ 59 /* MACH_TYPE_SMDK5250 macro will be removed once added to mach-types */
60 #define MACH_TYPE_SMDK5250 3774 60 #define MACH_TYPE_SMDK5250 3774
61 #define CONFIG_MACH_TYPE MACH_TYPE_SMDK5250 61 #define CONFIG_MACH_TYPE MACH_TYPE_SMDK5250
62 62
63 /* Power Down Modes */ 63 /* Power Down Modes */
64 #define S5P_CHECK_SLEEP 0x00000BAD 64 #define S5P_CHECK_SLEEP 0x00000BAD
65 #define S5P_CHECK_DIDLE 0xBAD00000 65 #define S5P_CHECK_DIDLE 0xBAD00000
66 #define S5P_CHECK_LPA 0xABAD0000 66 #define S5P_CHECK_LPA 0xABAD0000
67 67
68 /* Offset for inform registers */ 68 /* Offset for inform registers */
69 #define INFORM0_OFFSET 0x800 69 #define INFORM0_OFFSET 0x800
70 #define INFORM1_OFFSET 0x804 70 #define INFORM1_OFFSET 0x804
71 71
72 /* Size of malloc() pool */ 72 /* Size of malloc() pool */
73 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20)) 73 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20))
74 74
75 /* select serial console configuration */ 75 /* select serial console configuration */
76 #define CONFIG_SERIAL3 /* use SERIAL 3 */ 76 #define CONFIG_SERIAL3 /* use SERIAL 3 */
77 #define CONFIG_BAUDRATE 115200 77 #define CONFIG_BAUDRATE 115200
78 #define EXYNOS5_DEFAULT_UART_OFFSET 0x010000 78 #define EXYNOS5_DEFAULT_UART_OFFSET 0x010000
79 79
80 #define TZPC_BASE_OFFSET 0x10000 80 #define TZPC_BASE_OFFSET 0x10000
81 81
82 /* SD/MMC configuration */ 82 /* SD/MMC configuration */
83 #define CONFIG_GENERIC_MMC 83 #define CONFIG_GENERIC_MMC
84 #define CONFIG_MMC 84 #define CONFIG_MMC
85 #define CONFIG_SDHCI 85 #define CONFIG_SDHCI
86 #define CONFIG_S5P_SDHCI 86 #define CONFIG_S5P_SDHCI
87 87
88 #define CONFIG_BOARD_EARLY_INIT_F 88 #define CONFIG_BOARD_EARLY_INIT_F
89 89
90 /* PWM */ 90 /* PWM */
91 #define CONFIG_PWM 91 #define CONFIG_PWM
92 92
93 /* allow to overwrite serial and ethaddr */ 93 /* allow to overwrite serial and ethaddr */
94 #define CONFIG_ENV_OVERWRITE 94 #define CONFIG_ENV_OVERWRITE
95 95
96 /* Command definition*/ 96 /* Command definition*/
97 #include <config_cmd_default.h> 97 #include <config_cmd_default.h>
98 98
99 #define CONFIG_CMD_PING 99 #define CONFIG_CMD_PING
100 #define CONFIG_CMD_ELF 100 #define CONFIG_CMD_ELF
101 #define CONFIG_CMD_MMC 101 #define CONFIG_CMD_MMC
102 #define CONFIG_CMD_EXT2 102 #define CONFIG_CMD_EXT2
103 #define CONFIG_CMD_FAT 103 #define CONFIG_CMD_FAT
104 #define CONFIG_CMD_NET 104 #define CONFIG_CMD_NET
105 105
106 #define CONFIG_BOOTDELAY 3 106 #define CONFIG_BOOTDELAY 3
107 #define CONFIG_ZERO_BOOTDELAY_CHECK 107 #define CONFIG_ZERO_BOOTDELAY_CHECK
108 108
109 /* USB */ 109 /* USB */
110 #define CONFIG_CMD_USB 110 #define CONFIG_CMD_USB
111 #define CONFIG_USB_EHCI 111 #define CONFIG_USB_EHCI
112 #define CONFIG_USB_EHCI_EXYNOS 112 #define CONFIG_USB_EHCI_EXYNOS
113 #define CONFIG_USB_STORAGE 113 #define CONFIG_USB_STORAGE
114 114
115 /* MMC SPL */ 115 /* MMC SPL */
116 #define CONFIG_SPL 116 #define CONFIG_SPL
117 #define COPY_BL2_FNPTR_ADDR 0x02020030 117 #define COPY_BL2_FNPTR_ADDR 0x02020030
118 118
119 /* specific .lds file */ 119 /* specific .lds file */
120 #define CONFIG_SPL_LDSCRIPT "board/samsung/smdk5250/smdk5250-uboot-spl.lds" 120 #define CONFIG_SPL_LDSCRIPT "board/samsung/smdk5250/smdk5250-uboot-spl.lds"
121 #define CONFIG_SPL_TEXT_BASE 0x02023400 121 #define CONFIG_SPL_TEXT_BASE 0x02023400
122 #define CONFIG_SPL_MAX_SIZE (14 * 1024) 122 #define CONFIG_SPL_MAX_SIZE (14 * 1024)
123 123
124 #define CONFIG_BOOTCOMMAND "mmc read 40007000 451 2000; bootm 40007000" 124 #define CONFIG_BOOTCOMMAND "mmc read 40007000 451 2000; bootm 40007000"
125 125
126 /* Miscellaneous configurable options */ 126 /* Miscellaneous configurable options */
127 #define CONFIG_SYS_LONGHELP /* undef to save memory */ 127 #define CONFIG_SYS_LONGHELP /* undef to save memory */
128 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ 128 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
129 #define CONFIG_SYS_PROMPT "SMDK5250 # " 129 #define CONFIG_SYS_PROMPT "SMDK5250 # "
130 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ 130 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
131 #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */ 131 #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
132 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ 132 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
133 #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" 133 #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
134 /* Boot Argument Buffer Size */ 134 /* Boot Argument Buffer Size */
135 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 135 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
136 /* memtest works on */ 136 /* memtest works on */
137 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 137 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
138 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5E00000) 138 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5E00000)
139 #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000) 139 #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
140 140
141 #define CONFIG_SYS_HZ 1000 141 #define CONFIG_SYS_HZ 1000
142 142
143 #define CONFIG_RD_LVL 143 #define CONFIG_RD_LVL
144 144
145 #define CONFIG_NR_DRAM_BANKS 8 145 #define CONFIG_NR_DRAM_BANKS 8
146 #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */ 146 #define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
147 #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE 147 #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
148 #define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE 148 #define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE
149 #define PHYS_SDRAM_2 (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE) 149 #define PHYS_SDRAM_2 (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
150 #define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE 150 #define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE
151 #define PHYS_SDRAM_3 (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE)) 151 #define PHYS_SDRAM_3 (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
152 #define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE 152 #define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE
153 #define PHYS_SDRAM_4 (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE)) 153 #define PHYS_SDRAM_4 (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
154 #define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE 154 #define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE
155 #define PHYS_SDRAM_5 (CONFIG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE)) 155 #define PHYS_SDRAM_5 (CONFIG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE))
156 #define PHYS_SDRAM_5_SIZE SDRAM_BANK_SIZE 156 #define PHYS_SDRAM_5_SIZE SDRAM_BANK_SIZE
157 #define PHYS_SDRAM_6 (CONFIG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE)) 157 #define PHYS_SDRAM_6 (CONFIG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE))
158 #define PHYS_SDRAM_6_SIZE SDRAM_BANK_SIZE 158 #define PHYS_SDRAM_6_SIZE SDRAM_BANK_SIZE
159 #define PHYS_SDRAM_7 (CONFIG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE)) 159 #define PHYS_SDRAM_7 (CONFIG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE))
160 #define PHYS_SDRAM_7_SIZE SDRAM_BANK_SIZE 160 #define PHYS_SDRAM_7_SIZE SDRAM_BANK_SIZE
161 #define PHYS_SDRAM_8 (CONFIG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE)) 161 #define PHYS_SDRAM_8 (CONFIG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE))
162 #define PHYS_SDRAM_8_SIZE SDRAM_BANK_SIZE 162 #define PHYS_SDRAM_8_SIZE SDRAM_BANK_SIZE
163 163
164 #define CONFIG_SYS_MONITOR_BASE 0x00000000 164 #define CONFIG_SYS_MONITOR_BASE 0x00000000
165 165
166 /* FLASH and environment organization */ 166 /* FLASH and environment organization */
167 #define CONFIG_SYS_NO_FLASH 167 #define CONFIG_SYS_NO_FLASH
168 #undef CONFIG_CMD_IMLS 168 #undef CONFIG_CMD_IMLS
169 #define CONFIG_IDENT_STRING " for SMDK5250" 169 #define CONFIG_IDENT_STRING " for SMDK5250"
170 170
171 #define CONFIG_SYS_MMC_ENV_DEV 0 171 #define CONFIG_SYS_MMC_ENV_DEV 0
172 172
173 #define CONFIG_SECURE_BL1_ONLY 173 #define CONFIG_SECURE_BL1_ONLY
174 174
175 /* Secure FW size configuration */ 175 /* Secure FW size configuration */
176 #ifdef CONFIG_SECURE_BL1_ONLY 176 #ifdef CONFIG_SECURE_BL1_ONLY
177 #define CONFIG_SEC_FW_SIZE (8 << 10) /* 8KB */ 177 #define CONFIG_SEC_FW_SIZE (8 << 10) /* 8KB */
178 #else 178 #else
179 #define CONFIG_SEC_FW_SIZE 0 179 #define CONFIG_SEC_FW_SIZE 0
180 #endif 180 #endif
181 181
182 /* Configuration of BL1, BL2, ENV Blocks on mmc */ 182 /* Configuration of BL1, BL2, ENV Blocks on mmc */
183 #define CONFIG_RES_BLOCK_SIZE (512) 183 #define CONFIG_RES_BLOCK_SIZE (512)
184 #define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/ 184 #define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
185 #define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */ 185 #define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */
186 #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */ 186 #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
187 187
188 #define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE) 188 #define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
189 #define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE) 189 #define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
190 #define CONFIG_ENV_OFFSET (CONFIG_BL2_OFFSET + CONFIG_BL2_SIZE) 190 #define CONFIG_ENV_OFFSET (CONFIG_BL2_OFFSET + CONFIG_BL2_SIZE)
191 191
192 /* U-boot copy size from boot Media to DRAM.*/ 192 /* U-boot copy size from boot Media to DRAM.*/
193 #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512) 193 #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
194 #define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512) 194 #define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512)
195 195
196 #define OM_STAT (0x1f << 1) 196 #define OM_STAT (0x1f << 1)
197 #define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058 197 #define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058
198 #define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE) 198 #define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
199 199
200 #define CONFIG_DOS_PARTITION 200 #define CONFIG_DOS_PARTITION
201 201
202 #define CONFIG_IRAM_STACK 0x02050000 202 #define CONFIG_IRAM_STACK 0x02050000
203 203
204 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000) 204 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
205 205
206 /* I2C */ 206 /* I2C */
207 #define CONFIG_SYS_I2C_INIT_BOARD 207 #define CONFIG_SYS_I2C_INIT_BOARD
208 #define CONFIG_HARD_I2C 208 #define CONFIG_HARD_I2C
209 #define CONFIG_CMD_I2C 209 #define CONFIG_CMD_I2C
210 #define CONFIG_SYS_I2C_SPEED 100000 /* 100 Kbps */ 210 #define CONFIG_SYS_I2C_SPEED 100000 /* 100 Kbps */
211 #define CONFIG_DRIVER_S3C24X0_I2C 211 #define CONFIG_DRIVER_S3C24X0_I2C
212 #define CONFIG_I2C_MULTI_BUS 212 #define CONFIG_I2C_MULTI_BUS
213 #define CONFIG_MAX_I2C_NUM 8 213 #define CONFIG_MAX_I2C_NUM 8
214 #define CONFIG_SYS_I2C_SLAVE 0x0 214 #define CONFIG_SYS_I2C_SLAVE 0x0
215 #define CONFIG_I2C_EDID 215 #define CONFIG_I2C_EDID
216 216
217 /* PMIC */ 217 /* PMIC */
218 #define CONFIG_PMIC 218 #define CONFIG_PMIC
219 #define CONFIG_PMIC_I2C 219 #define CONFIG_PMIC_I2C
220 #define CONFIG_PMIC_MAX77686 220 #define CONFIG_PMIC_MAX77686
221 221
222 /* SPI */ 222 /* SPI */
223 #define CONFIG_ENV_IS_IN_SPI_FLASH 223 #define CONFIG_ENV_IS_IN_SPI_FLASH
224 #define CONFIG_SPI_FLASH 224 #define CONFIG_SPI_FLASH
225 225
226 #ifdef CONFIG_SPI_FLASH 226 #ifdef CONFIG_SPI_FLASH
227 #define CONFIG_EXYNOS_SPI 227 #define CONFIG_EXYNOS_SPI
228 #define CONFIG_CMD_SF 228 #define CONFIG_CMD_SF
229 #define CONFIG_CMD_SPI 229 #define CONFIG_CMD_SPI
230 #define CONFIG_SPI_FLASH_WINBOND 230 #define CONFIG_SPI_FLASH_WINBOND
231 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 231 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
232 #define CONFIG_SF_DEFAULT_SPEED 50000000 232 #define CONFIG_SF_DEFAULT_SPEED 50000000
233 #define EXYNOS5_SPI_NUM_CONTROLLERS 5 233 #define EXYNOS5_SPI_NUM_CONTROLLERS 5
234 #endif 234 #endif
235 235
236 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH 236 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
237 #define CONFIG_ENV_SPI_MODE SPI_MODE_0 237 #define CONFIG_ENV_SPI_MODE SPI_MODE_0
238 #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE 238 #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
239 #define CONFIG_ENV_SPI_BUS 1 239 #define CONFIG_ENV_SPI_BUS 1
240 #define CONFIG_ENV_SPI_MAX_HZ 50000000 240 #define CONFIG_ENV_SPI_MAX_HZ 50000000
241 #endif 241 #endif
242 242
243 /* PMIC */ 243 /* PMIC */
244 #define CONFIG_POWER 244 #define CONFIG_POWER
245 #define CONFIG_POWER_I2C 245 #define CONFIG_POWER_I2C
246 #define CONFIG_POWER_MAX77686 246 #define CONFIG_POWER_MAX77686
247 247
248 /* SPI */ 248 /* SPI */
249 #define CONFIG_ENV_IS_IN_SPI_FLASH 249 #define CONFIG_ENV_IS_IN_SPI_FLASH
250 #define CONFIG_SPI_FLASH 250 #define CONFIG_SPI_FLASH
251 251
252 #ifdef CONFIG_SPI_FLASH 252 #ifdef CONFIG_SPI_FLASH
253 #define CONFIG_EXYNOS_SPI 253 #define CONFIG_EXYNOS_SPI
254 #define CONFIG_CMD_SF 254 #define CONFIG_CMD_SF
255 #define CONFIG_CMD_SPI 255 #define CONFIG_CMD_SPI
256 #define CONFIG_SPI_FLASH_WINBOND 256 #define CONFIG_SPI_FLASH_WINBOND
257 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 257 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
258 #define CONFIG_SF_DEFAULT_SPEED 50000000 258 #define CONFIG_SF_DEFAULT_SPEED 50000000
259 #define EXYNOS5_SPI_NUM_CONTROLLERS 5 259 #define EXYNOS5_SPI_NUM_CONTROLLERS 5
260 #endif 260 #endif
261 261
262 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH 262 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
263 #define CONFIG_ENV_SPI_MODE SPI_MODE_0 263 #define CONFIG_ENV_SPI_MODE SPI_MODE_0
264 #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE 264 #define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
265 #define CONFIG_ENV_SPI_BUS 1 265 #define CONFIG_ENV_SPI_BUS 1
266 #define CONFIG_ENV_SPI_MAX_HZ 50000000 266 #define CONFIG_ENV_SPI_MAX_HZ 50000000
267 #endif 267 #endif
268 268
269 /* Ethernet Controllor Driver */ 269 /* Ethernet Controllor Driver */
270 #ifdef CONFIG_CMD_NET 270 #ifdef CONFIG_CMD_NET
271 #define CONFIG_SMC911X 271 #define CONFIG_SMC911X
272 #define CONFIG_SMC911X_BASE 0x5000000 272 #define CONFIG_SMC911X_BASE 0x5000000
273 #define CONFIG_SMC911X_16_BIT 273 #define CONFIG_SMC911X_16_BIT
274 #define CONFIG_ENV_SROM_BANK 1 274 #define CONFIG_ENV_SROM_BANK 1
275 #endif /*CONFIG_CMD_NET*/ 275 #endif /*CONFIG_CMD_NET*/
276 276
277 /* Enable PXE Support */ 277 /* Enable PXE Support */
278 #ifdef CONFIG_CMD_NET 278 #ifdef CONFIG_CMD_NET
279 #define CONFIG_CMD_PXE 279 #define CONFIG_CMD_PXE
280 #define CONFIG_MENU 280 #define CONFIG_MENU
281 #endif 281 #endif
282 282
283 /* Sound */ 283 /* Sound */
284 #define CONFIG_CMD_SOUND 284 #define CONFIG_CMD_SOUND
285 #ifdef CONFIG_CMD_SOUND 285 #ifdef CONFIG_CMD_SOUND
286 #define CONFIG_SOUND 286 #define CONFIG_SOUND
287 #define CONFIG_I2S 287 #define CONFIG_I2S
288 #define CONFIG_SOUND_WM8994 288 #define CONFIG_SOUND_WM8994
289 #endif 289 #endif
290 290
291 /* Enable devicetree support */ 291 /* Enable devicetree support */
292 #define CONFIG_OF_LIBFDT 292 #define CONFIG_OF_LIBFDT
293 293
294 /* SHA hashing */ 294 /* SHA hashing */
295 #define CONFIG_CMD_HASH 295 #define CONFIG_CMD_HASH
296 #define CONFIG_HASH_VERIFY 296 #define CONFIG_HASH_VERIFY
297 #define CONFIG_SHA1 297 #define CONFIG_SHA1
298 #define CONFIG_SHA256 298 #define CONFIG_SHA256
299 299
300 /* Display */ 300 /* Display */
301 #define CONFIG_LCD 301 #define CONFIG_LCD
302 #ifdef CONFIG_LCD
302 #define CONFIG_EXYNOS_FB 303 #define CONFIG_EXYNOS_FB
303 #define CONFIG_EXYNOS_DP 304 #define CONFIG_EXYNOS_DP
304 #define LCD_XRES 2560 305 #define LCD_XRES 2560
305 #define LCD_YRES 1600 306 #define LCD_YRES 1600
306 #define LCD_BPP LCD_COLOR16 307 #define LCD_BPP LCD_COLOR16
308 #endif
307 309
308 #endif /* __CONFIG_H */ 310 #endif /* __CONFIG_H */
309 311