1 /*
2  * Copyright (C) 2014 Samsung Electronics
3  *
4  * Configuration settings for the SAMSUNG EXYNOS5 board.
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #ifndef __CONFIG_EXYNOS4_COMMON_H
10 #define __CONFIG_EXYNOS4_COMMON_H
11 
12 #define CONFIG_EXYNOS4			/* Exynos4 Family */
13 
14 #include "exynos-common.h"
15 
16 #define CONFIG_BOARD_COMMON
17 
18 #define CONFIG_REVISION_TAG
19 
20 /* SD/MMC configuration */
21 #define CONFIG_MMC_DEFAULT_DEV	0
22 
23 /* TIZEN THOR downloader support */
24 #define CONFIG_USB_FUNCTION_THOR
25 
26 #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M
27 #define DFU_DEFAULT_POLL_TIMEOUT 300
28 
29 /* USB Samsung's IDs */
30 #define CONFIG_G_DNL_THOR_VENDOR_NUM 0x04E8
31 #define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D
32 #define CONFIG_G_DNL_UMS_VENDOR_NUM 0x0525
33 #define CONFIG_G_DNL_UMS_PRODUCT_NUM 0xA4A5
34 
35 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
36 
37 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
38 
39 #define CONFIG_USB_FUNCTION_MASS_STORAGE
40 
41 /* Common environment variables */
42 #define CONFIG_EXTRA_ENV_ITB \
43 	"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} " \
44 		"${kernelname}\0" \
45 	"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${initrdaddr} " \
46 		"${initrdname}\0" \
47 	"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdtaddr} " \
48 		"${fdtfile}\0" \
49 	"check_ramdisk=" \
50 		"if run loadinitrd; then " \
51 			"setenv initrd_addr ${initrdaddr};" \
52 		"else " \
53 			"setenv initrd_addr -;" \
54 		"fi;\0" \
55 	"check_dtb=" \
56 		"if run loaddtb; then " \
57 			"setenv fdt_addr ${fdtaddr};" \
58 		"else " \
59 			"setenv fdt_addr;" \
60 		"fi;\0" \
61 	"kernel_args=" \
62 		"setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart}" \
63 		" ${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo};\0" \
64 	"boot_fit=" \
65 		"setenv kerneladdr 0x42000000;" \
66 		"setenv kernelname Image.itb;" \
67 		"run loadkernel;" \
68 		"run kernel_args;" \
69 		"bootm ${kerneladdr}#${board_name}\0" \
70 	"boot_uimg=" \
71 		"setenv kerneladdr 0x40007FC0;" \
72 		"setenv kernelname uImage;" \
73 		"run check_dtb;" \
74 		"run check_ramdisk;" \
75 		"run loadkernel;" \
76 		"run kernel_args;" \
77 		"bootm ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
78 	"boot_zimg=" \
79 		"setenv kerneladdr 0x40007FC0;" \
80 		"setenv kernelname zImage;" \
81 		"run check_dtb;" \
82 		"run check_ramdisk;" \
83 		"run loadkernel;" \
84 		"run kernel_args;" \
85 		"bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
86 	"autoboot=" \
87 		"if test -e mmc ${mmcdev}:${mmcbootpart} Image.itb; then; " \
88 			"run boot_fit;" \
89 		"elif test -e mmc ${mmcdev}:${mmcbootpart} zImage; then; " \
90 			"run boot_zimg;" \
91 		"elif test -e mmc ${mmcdev}:${mmcbootpart} uImage; then; " \
92 			"run boot_uimg;" \
93 		"fi;\0"
94 
95 #endif	/* __CONFIG_EXYNOS4_COMMON_H */
96