Convert CONFIG_PCI_GT64120 to Kconfig
[platform/kernel/u-boot.git] / include / configs / trats2.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2013 Samsung Electronics
4  * Sanghee Kim <sh0130.kim@samsung.com>
5  * Piotr Wilczek <p.wilczek@samsung.com>
6  *
7  * Configuation settings for the SAMSUNG TRATS2 (EXYNOS4412) board.
8  */
9
10 #ifndef __CONFIG_TRATS2_H
11 #define __CONFIG_TRATS2_H
12
13 #include <configs/exynos4-common.h>
14
15 #ifndef CONFIG_SYS_L2CACHE_OFF
16 #define CONFIG_SYS_L2_PL310
17 #define CONFIG_SYS_PL310_BASE   0x10502000
18 #endif
19
20 /* TRATS2 has 4 banks of DRAM */
21 #define CONFIG_SYS_SDRAM_BASE           0x40000000
22 #define PHYS_SDRAM_1                    CONFIG_SYS_SDRAM_BASE
23 #define SDRAM_BANK_SIZE                 (256 << 20)     /* 256 MB */
24
25 /* Tizen - partitions definitions */
26 #define PARTS_CSA               "csa-mmc"
27 #define PARTS_BOOT              "boot"
28 #define PARTS_QBOOT             "qboot"
29 #define PARTS_CSC               "csc"
30 #define PARTS_ROOT              "platform"
31 #define PARTS_DATA              "data"
32 #define PARTS_UMS               "ums"
33
34 #define PARTS_DEFAULT \
35         "uuid_disk=${uuid_gpt_disk};" \
36         "name="PARTS_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
37         "name="PARTS_BOOT",size=60MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \
38         "name="PARTS_QBOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_QBOOT"};" \
39         "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \
40         "name="PARTS_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \
41         "name="PARTS_DATA",size=3000MiB,uuid=${uuid_gpt_"PARTS_DATA"};" \
42         "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \
43
44 #define CONFIG_DFU_ALT \
45         "u-boot raw 0x80 0x800;" \
46         "/uImage ext4 0 2;" \
47         "/modem.bin ext4 0 2;" \
48         "/exynos4412-trats2.dtb ext4 0 2;" \
49         ""PARTS_CSA" part 0 1;" \
50         ""PARTS_BOOT" part 0 2;" \
51         ""PARTS_QBOOT" part 0 3;" \
52         ""PARTS_CSC" part 0 4;" \
53         ""PARTS_ROOT" part 0 5;" \
54         ""PARTS_DATA" part 0 6;" \
55         ""PARTS_UMS" part 0 7;" \
56         "params.bin raw 0x38 0x8;" \
57         "/Image.itb ext4 0 2\0"
58
59 #define CONFIG_EXTRA_ENV_SETTINGS \
60         "bootk=" \
61                 "run loaduimage;" \
62                 "if run loaddtb; then " \
63                         "bootm 0x40007FC0 - ${fdtaddr};" \
64                 "fi;" \
65                 "bootm 0x40007FC0;\0" \
66         "updatebackup=" \
67                 "mmc dev 0 2; mmc write 0x51000000 0 0x800;" \
68                 " mmc dev 0 0\0" \
69         "updatebootb=" \
70                 "mmc read 0x51000000 0x80 0x800; run updatebackup\0" \
71         "mmcboot=" \
72                 "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
73                 "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \
74                 "run bootk\0" \
75         "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
76         "boottrace=setenv opts initcall_debug; run bootcmd\0" \
77         "verify=n\0" \
78         "rootfstype=ext4\0" \
79         "console=console=ttySAC2,115200n8\0" \
80         "kernelname=uImage\0" \
81         "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
82                 "${kernelname}\0" \
83         "loaddtb=ext4load mmc ${mmcdev}:${mmcbootpart} ${fdtaddr} " \
84                 "${fdtfile}\0" \
85         "mmcdev=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0" \
86         "mmcbootpart=2\0" \
87         "mmcrootpart=5\0" \
88         "opts=always_resume=1\0" \
89         "partitions=" PARTS_DEFAULT \
90         "dfu_alt_info=" CONFIG_DFU_ALT \
91         "uartpath=ap\0" \
92         "usbpath=ap\0" \
93         "consoleon=set console console=ttySAC2,115200n8; save; reset\0" \
94         "consoleoff=set console console=ram; save; reset\0" \
95         "spladdr=0x40000100\0" \
96         "splsize=0x200\0" \
97         "splfile=falcon.bin\0" \
98         "spl_export=" \
99                    "setexpr spl_imgsize ${splsize} + 8 ;" \
100                    "setenv spl_imgsize 0x${spl_imgsize};" \
101                    "setexpr spl_imgaddr ${spladdr} - 8 ;" \
102                    "setexpr spl_addr_tmp ${spladdr} - 4 ;" \
103                    "mw.b ${spl_imgaddr} 0x00 ${spl_imgsize};run loaduimage;" \
104                    "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
105                    "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo};" \
106                    "spl export atags 0x40007FC0;" \
107                    "crc32 ${spladdr} ${splsize} ${spl_imgaddr};" \
108                    "mw.l ${spl_addr_tmp} ${splsize};" \
109                    "ext4write mmc ${mmcdev}:${mmcbootpart}" \
110                    " /${splfile} ${spl_imgaddr} ${spl_imgsize};" \
111                    "setenv spl_imgsize;" \
112                    "setenv spl_imgaddr;" \
113                    "setenv spl_addr_tmp;\0" \
114         ENV_ITB \
115         "fdtaddr=40800000\0" \
116
117 /* GPT */
118
119 /* Common misc for Samsung */
120 #define CONFIG_MISC_COMMON
121
122 /* Download menu - Samsung common */
123 #define CONFIG_LCD_MENU
124
125 /* Download menu - definitions for check keys */
126 #ifndef __ASSEMBLY__
127
128 #define KEY_PWR_PMIC_NAME               "MAX77686_PMIC"
129 #define KEY_PWR_STATUS_REG              MAX77686_REG_PMIC_STATUS1
130 #define KEY_PWR_STATUS_MASK             (1 << 0)
131 #define KEY_PWR_INTERRUPT_REG           MAX77686_REG_PMIC_INT1
132 #define KEY_PWR_INTERRUPT_MASK          (1 << 1)
133
134 #define KEY_VOL_UP_GPIO                 EXYNOS4X12_GPIO_X22
135 #define KEY_VOL_DOWN_GPIO               EXYNOS4X12_GPIO_X33
136 #endif /* __ASSEMBLY__ */
137
138 /* LCD console */
139 #define LCD_BPP                 LCD_COLOR16
140
141 /* LCD */
142 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
143
144 #endif  /* __CONFIG_H */