Merge branch '2020-07-28-Kconfig-migrations'
[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 #define CONFIG_TIZEN                    /* TIZEN lib */
16
17 #define CONFIG_SYS_L2CACHE_OFF
18 #ifndef CONFIG_SYS_L2CACHE_OFF
19 #define CONFIG_SYS_L2_PL310
20 #define CONFIG_SYS_PL310_BASE   0x10502000
21 #endif
22
23 /* TRATS2 has 4 banks of DRAM */
24 #define CONFIG_SYS_SDRAM_BASE           0x40000000
25 #define PHYS_SDRAM_1                    CONFIG_SYS_SDRAM_BASE
26 #define SDRAM_BANK_SIZE                 (256 << 20)     /* 256 MB */
27 /* memtest works on */
28 #define CONFIG_SYS_LOAD_ADDR            (CONFIG_SYS_SDRAM_BASE + 0x3E00000)
29
30 /* select serial console configuration */
31
32 /* Console configuration */
33
34 #define CONFIG_BOOTCOMMAND              "run autoboot"
35 #define CONFIG_DEFAULT_CONSOLE          "console=ttySAC2,115200n8\0"
36
37 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \
38                                         - GENERATED_GBL_DATA_SIZE)
39
40 #define CONFIG_SYS_MEM_TOP_HIDE (1 << 20)       /* ram console */
41
42 #define CONFIG_SYS_MONITOR_BASE 0x00000000
43
44 #define CONFIG_SYS_MMC_ENV_DEV          CONFIG_MMC_DEFAULT_DEV
45
46 /* Tizen - partitions definitions */
47 #define PARTS_CSA               "csa-mmc"
48 #define PARTS_BOOT              "boot"
49 #define PARTS_QBOOT             "qboot"
50 #define PARTS_CSC               "csc"
51 #define PARTS_ROOT              "platform"
52 #define PARTS_DATA              "data"
53 #define PARTS_UMS               "ums"
54
55 #define PARTS_DEFAULT \
56         "uuid_disk=${uuid_gpt_disk};" \
57         "name="PARTS_CSA",start=5MiB,size=8MiB,uuid=${uuid_gpt_"PARTS_CSA"};" \
58         "name="PARTS_BOOT",size=60MiB,uuid=${uuid_gpt_"PARTS_BOOT"};" \
59         "name="PARTS_QBOOT",size=100MiB,uuid=${uuid_gpt_"PARTS_QBOOT"};" \
60         "name="PARTS_CSC",size=150MiB,uuid=${uuid_gpt_"PARTS_CSC"};" \
61         "name="PARTS_ROOT",size=1536MiB,uuid=${uuid_gpt_"PARTS_ROOT"};" \
62         "name="PARTS_DATA",size=3000MiB,uuid=${uuid_gpt_"PARTS_DATA"};" \
63         "name="PARTS_UMS",size=-,uuid=${uuid_gpt_"PARTS_UMS"}\0" \
64
65 #define CONFIG_DFU_ALT \
66         "u-boot raw 0x80 0x800;" \
67         "/uImage ext4 0 2;" \
68         "/modem.bin ext4 0 2;" \
69         "/exynos4412-trats2.dtb ext4 0 2;" \
70         ""PARTS_CSA" part 0 1;" \
71         ""PARTS_BOOT" part 0 2;" \
72         ""PARTS_QBOOT" part 0 3;" \
73         ""PARTS_CSC" part 0 4;" \
74         ""PARTS_ROOT" part 0 5;" \
75         ""PARTS_DATA" part 0 6;" \
76         ""PARTS_UMS" part 0 7;" \
77         "params.bin raw 0x38 0x8;" \
78         "/Image.itb ext4 0 2\0"
79
80 #define CONFIG_EXTRA_ENV_SETTINGS \
81         "bootk=" \
82                 "run loaduimage;" \
83                 "if run loaddtb; then " \
84                         "bootm 0x40007FC0 - ${fdtaddr};" \
85                 "fi;" \
86                 "bootm 0x40007FC0;\0" \
87         "updatebackup=" \
88                 "mmc dev 0 2; mmc write 0x51000000 0 0x800;" \
89                 " mmc dev 0 0\0" \
90         "updatebootb=" \
91                 "mmc read 0x51000000 0x80 0x800; run updatebackup\0" \
92         "mmcboot=" \
93                 "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
94                 "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \
95                 "run bootk\0" \
96         "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
97         "boottrace=setenv opts initcall_debug; run bootcmd\0" \
98         "verify=n\0" \
99         "rootfstype=ext4\0" \
100         "console=" CONFIG_DEFAULT_CONSOLE \
101         "kernelname=uImage\0" \
102         "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
103                 "${kernelname}\0" \
104         "loaddtb=ext4load mmc ${mmcdev}:${mmcbootpart} ${fdtaddr} " \
105                 "${fdtfile}\0" \
106         "mmcdev=" __stringify(CONFIG_MMC_DEFAULT_DEV) "\0" \
107         "mmcbootpart=2\0" \
108         "mmcrootpart=5\0" \
109         "opts=always_resume=1\0" \
110         "partitions=" PARTS_DEFAULT \
111         "dfu_alt_info=" CONFIG_DFU_ALT \
112         "uartpath=ap\0" \
113         "usbpath=ap\0" \
114         "consoleon=set console console=ttySAC2,115200n8; save; reset\0" \
115         "consoleoff=set console console=ram; save; reset\0" \
116         "spladdr=0x40000100\0" \
117         "splsize=0x200\0" \
118         "splfile=falcon.bin\0" \
119         "spl_export=" \
120                    "setexpr spl_imgsize ${splsize} + 8 ;" \
121                    "setenv spl_imgsize 0x${spl_imgsize};" \
122                    "setexpr spl_imgaddr ${spladdr} - 8 ;" \
123                    "setexpr spl_addr_tmp ${spladdr} - 4 ;" \
124                    "mw.b ${spl_imgaddr} 0x00 ${spl_imgsize};run loaduimage;" \
125                    "setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \
126                    "${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo};" \
127                    "spl export atags 0x40007FC0;" \
128                    "crc32 ${spladdr} ${splsize} ${spl_imgaddr};" \
129                    "mw.l ${spl_addr_tmp} ${splsize};" \
130                    "ext4write mmc ${mmcdev}:${mmcbootpart}" \
131                    " /${splfile} ${spl_imgaddr} ${spl_imgsize};" \
132                    "setenv spl_imgsize;" \
133                    "setenv spl_imgaddr;" \
134                    "setenv spl_addr_tmp;\0" \
135         CONFIG_EXTRA_ENV_ITB \
136         "fdtaddr=40800000\0" \
137
138 /* GPT */
139
140 /* Security subsystem - enable hw_rand() */
141 #define CONFIG_EXYNOS_ACE_SHA
142
143 /* Common misc for Samsung */
144 #define CONFIG_MISC_COMMON
145
146 /* Download menu - Samsung common */
147 #define CONFIG_LCD_MENU
148
149 /* Download menu - definitions for check keys */
150 #ifndef __ASSEMBLY__
151
152 #define KEY_PWR_PMIC_NAME               "MAX77686_PMIC"
153 #define KEY_PWR_STATUS_REG              MAX77686_REG_PMIC_STATUS1
154 #define KEY_PWR_STATUS_MASK             (1 << 0)
155 #define KEY_PWR_INTERRUPT_REG           MAX77686_REG_PMIC_INT1
156 #define KEY_PWR_INTERRUPT_MASK          (1 << 1)
157
158 #define KEY_VOL_UP_GPIO                 EXYNOS4X12_GPIO_X22
159 #define KEY_VOL_DOWN_GPIO               EXYNOS4X12_GPIO_X33
160 #endif /* __ASSEMBLY__ */
161
162 /* LCD console */
163 #define LCD_BPP                 LCD_COLOR16
164
165 /* LCD */
166 #define CONFIG_BMP_16BPP
167 #define CONFIG_FB_ADDR          0x52504000
168 #define CONFIG_EXYNOS_MIPI_DSIM
169 #define CONFIG_VIDEO_BMP_GZIP
170 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54)
171
172 #endif  /* __CONFIG_H */