kconfig: set 'default y' for all CMD_* options defined in config_cmd_default.h
[karo-tx-uboot.git] / include / configs / tx28.h
1 /*
2  * Copyright (C) 2012 <LW@KARO-electronics.de>
3  *
4  * SPDX-License-Identifier:      GPL-2.0
5  *
6  */
7
8 #ifndef __CONFIG_H
9 #define __CONFIG_H
10
11 #define CONFIG_MX28                     /* must be defined before including regs-base.h */
12
13 #include <linux/sizes.h>
14 #include <asm/arch/regs-base.h>
15
16 /*
17  * Ka-Ro TX28 board - SoC configuration
18  */
19 #define CONFIG_MXS_GPIO                                 /* GPIO control */
20 #define CONFIG_SYS_HZ                   1000            /* Ticks per second */
21 #define PHYS_SDRAM_1_SIZE               CONFIG_SDRAM_SIZE
22 #ifdef CONFIG_TX28_S
23 #define TX28_MOD_SUFFIX                 "1"
24 #else
25 #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY
26 #define TX28_MOD_SUFFIX                 "0"
27 #endif
28 #define IRAM_BASE_ADDR                  0x00000000
29
30 #ifndef CONFIG_SPL_BUILD
31 #define CONFIG_SKIP_LOWLEVEL_INIT
32 #define CONFIG_SHOW_ACTIVITY
33 #define CONFIG_ARCH_CPU_INIT
34 #define CONFIG_ARCH_MISC_INIT           /* init vector table after relocation */
35 #define CONFIG_DISPLAY_CPUINFO
36 #define CONFIG_DISPLAY_BOARDINFO
37 #define CONFIG_BOARD_LATE_INIT
38 #define CONFIG_BOARD_EARLY_INIT_F
39 #define CONFIG_SYS_GENERIC_BOARD
40
41 /* LCD Logo and Splash screen support */
42 #ifdef CONFIG_LCD
43 #define CONFIG_SPLASH_SCREEN
44 #define CONFIG_SPLASH_SCREEN_ALIGN
45 #define CONFIG_VIDEO_MXS
46 #define CONFIG_LCD_LOGO
47 #define LCD_BPP                         LCD_COLOR32
48 #define CONFIG_CMD_BMP
49 #define CONFIG_VIDEO_BMP_RLE8
50 #endif /* CONFIG_LCD */
51 #endif /* CONFIG_SPL_BUILD */
52
53 /*
54  * Memory configuration options
55  */
56 #define CONFIG_NR_DRAM_BANKS            0x1             /* 1 bank of SDRAM */
57 #define PHYS_SDRAM_1                    0x40000000      /* SDRAM Bank #1 */
58 #define CONFIG_STACKSIZE                SZ_64K
59 #define CONFIG_SYS_MALLOC_LEN           SZ_4M
60 #define CONFIG_SYS_MEMTEST_START        PHYS_SDRAM_1    /* Memtest start address */
61 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + SZ_4M)
62
63 /*
64  * U-Boot general configurations
65  */
66 #define CONFIG_SYS_LONGHELP
67 #define CONFIG_SYS_PROMPT               "TX28 U-Boot > "
68 #define CONFIG_SYS_CBSIZE               2048            /* Console I/O buffer size */
69 #define CONFIG_SYS_PBSIZE \
70         (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
71                                                         /* Print buffer size */
72 #define CONFIG_SYS_MAXARGS              256             /* Max number of command args */
73 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
74                                         /* Boot argument buffer size */
75 #define CONFIG_VERSION_VARIABLE         /* U-BOOT version */
76 #define CONFIG_AUTO_COMPLETE            /* Command auto complete */
77 #define CONFIG_CMDLINE_EDITING          /* Command history etc */
78
79 #define CONFIG_SYS_64BIT_VSPRINTF
80
81 /*
82  * Flattened Device Tree (FDT) support
83 */
84 #ifdef CONFIG_OF_LIBFDT
85 #endif
86
87 /*
88  * Boot Linux
89  */
90 #define xstr(s)                         str(s)
91 #define str(s)                          #s
92 #define __pfx(x, s)                     (x##s)
93 #define _pfx(x, s)                      __pfx(x, s)
94
95 #define CONFIG_CMDLINE_TAG
96 #define CONFIG_SETUP_MEMORY_TAGS
97 #define CONFIG_BOOTDELAY                3
98 #define CONFIG_ZERO_BOOTDELAY_CHECK
99 #define CONFIG_SYS_AUTOLOAD             "no"
100 #define CONFIG_BOOTFILE                 "uImage"
101 #define CONFIG_BOOTARGS                 "init=/linuxrc console=ttyAMA0,115200 ro debug panic=1"
102 #define CONFIG_BOOTCOMMAND              "run bootcmd_${boot_mode} bootm_cmd"
103 #ifdef CONFIG_TX28_S
104 #define CONFIG_LOADADDR                 41000000
105 #else
106 #define CONFIG_LOADADDR                 43000000
107 #endif
108 #define CONFIG_FDTADDR                  41000000
109 #define CONFIG_SYS_LOAD_ADDR            _pfx(0x, CONFIG_LOADADDR)
110 #define CONFIG_SYS_FDT_ADDR             _pfx(0x, CONFIG_FDTADDR)
111 #define CONFIG_U_BOOT_IMG_SIZE          SZ_1M
112
113 /*
114  * Extra Environment Settings
115  */
116 #ifdef CONFIG_ENV_IS_NOWHERE
117 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
118         "autostart=no\0"                                                \
119         "autoload=no\0"                                                 \
120         "bootdelay=-1\0"                                                \
121         "mtdids=" MTDIDS_DEFAULT "\0"                                   \
122         "mtdparts=" MTDPARTS_DEFAULT "\0"
123 #else
124 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
125         "autostart=no\0"                                                \
126         "baseboard=stk5-v3\0"                                           \
127         "bootargs_jffs2=run default_bootargs;set bootargs ${bootargs}"  \
128         " root=/dev/mtdblock3 rootfstype=jffs2\0"                       \
129         "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}"    \
130         " root=/dev/mmcblk0p3 rootwait\0"                               \
131         "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}"    \
132         " root=/dev/nfs nfsroot=${nfs_server}:${nfsroot},nolock"        \
133         " ip=dhcp\0"                                                    \
134         "bootargs_ubifs=run default_bootargs;set bootargs ${bootargs}"  \
135         " ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs\0"           \
136         "bootcmd_jffs2=set autostart no;run bootargs_jffs2"             \
137         ";nboot linux\0"                                                \
138         "bootcmd_mmc=set autostart no;run bootargs_mmc"                 \
139         ";fatload mmc 0 ${loadaddr} uImage\0"                           \
140         "bootcmd_nand=set autostart no;run bootargs_ubifs;nboot linux\0"\
141         "bootcmd_net=set autoload y;set autostart n;run bootargs_nfs"   \
142         ";dhcp\0"                                                       \
143         "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0"                    \
144         "boot_mode=nand\0"                                              \
145         "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
146         " ${append_bootargs}\0"                                         \
147         "fdtaddr=" xstr(CONFIG_FDTADDR) "\0"                            \
148         "fdtsave=fdt resize;nand erase.part dtb"                        \
149         ";nand write ${fdtaddr} dtb ${fdtsize}\0"                       \
150         "mtdids=" MTDIDS_DEFAULT "\0"                                   \
151         "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
152         "nfsroot=/tftpboot/rootfs\0"                                    \
153         "otg_mode=device\0"                                             \
154         "touchpanel=tsc2007\0"                                          \
155         "video_mode=VGA\0"
156 #endif /*  CONFIG_ENV_IS_NOWHERE */
157
158 #define MTD_NAME                        "gpmi-nand"
159 #define MTDIDS_DEFAULT                  "nand0=" MTD_NAME
160
161 /*
162  * Serial Driver
163  */
164 #define CONFIG_PL011_SERIAL
165 #define CONFIG_PL011_CLOCK              24000000
166 #define CONFIG_PL01x_PORTS      {       \
167         (void *)MXS_UARTDBG_BASE,       \
168         }
169 #define CONFIG_CONS_INDEX               0               /* do not change! */
170 #define CONFIG_BAUDRATE                 115200          /* Default baud rate */
171 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200, }
172 #define CONFIG_SYS_CONSOLE_INFO_QUIET
173
174 /*
175  * Ethernet Driver
176  */
177 #ifdef CONFIG_FEC_MXC
178 /* This is required for the FEC driver to work with cache enabled */
179 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
180 #define CONFIG_SYS_CACHELINE_SIZE       32
181
182 #ifdef CONFIG_FEC_MXC_PHYADDR
183 #define IMX_FEC_BASE                    MXS_ENET0_BASE
184 #endif
185
186 #define CONFIG_FEC_XCV_TYPE             RMII
187 #endif
188
189 #ifndef CONFIG_ENV_IS_NOWHERE
190 /* define one of the following options:
191 */
192 #endif
193 #define CONFIG_ENV_OVERWRITE
194
195 /*
196  * NAND flash driver
197  */
198 #ifdef CONFIG_NAND
199 #define CONFIG_SYS_NAND_BLOCK_SIZE      SZ_128K
200 #define CONFIG_NAND_MXS
201 #define CONFIG_APBH_DMA
202 #define CONFIG_APBH_DMA_BURST
203 #define CONFIG_APBH_DMA_BURST8
204 #define CONFIG_SYS_NAND_U_BOOT_OFFS     CONFIG_SYS_NAND_BLOCK_SIZE
205 #define CONFIG_SYS_MXS_DMA_CHANNEL      4
206 #define CONFIG_SYS_NAND_MAX_CHIPS       0x1
207 #define CONFIG_SYS_MAX_NAND_DEVICE      0x1
208 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
209 #define CONFIG_SYS_NAND_BASE            0x00000000
210 #else
211 #undef CONFIG_ENV_IS_IN_NAND
212 #endif /* CONFIG_CMD_NAND */
213
214 #ifdef CONFIG_ENV_IS_IN_NAND
215 #define CONFIG_ENV_OFFSET               (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
216 #define CONFIG_ENV_SIZE                 SZ_128K
217 #define CONFIG_ENV_RANGE                (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
218 #endif /* CONFIG_ENV_IS_IN_NAND */
219
220 #ifdef CONFIG_ENV_OFFSET_REDUND
221 #define CONFIG_SYS_ENV_PART_STR         xstr(CONFIG_SYS_ENV_PART_SIZE)  \
222         "(env),"                                                        \
223         xstr(CONFIG_SYS_ENV_PART_SIZE)                                  \
224         "(env2),"
225 #define CONFIG_SYS_USERFS_PART_STR      xstr(CONFIG_SYS_USERFS_PART_SIZE2) "(userfs)"
226 #else
227 #define CONFIG_SYS_ENV_PART_STR         xstr(CONFIG_SYS_ENV_PART_SIZE)  \
228         "(env),"
229 #define CONFIG_SYS_USERFS_PART_STR      xstr(CONFIG_SYS_USERFS_PART_SIZE) "(userfs)"
230 #endif /* CONFIG_ENV_OFFSET_REDUND */
231
232 /*
233  * MMC Driver
234  */
235 #ifdef CONFIG_CMD_MMC
236 #define CONFIG_MXS_MMC
237 #define CONFIG_BOUNCE_BUFFER
238
239 #define CONFIG_DOS_PARTITION
240 #define CONFIG_CMD_FAT
241 #define CONFIG_FAT_WRITE
242 #define CONFIG_CMD_EXT2
243
244 /*
245  * Environments on MMC
246  */
247 #ifdef CONFIG_ENV_IS_IN_MMC
248 #define CONFIG_SYS_MMC_ENV_DEV          0
249 /* Associated with the MMC layout defined in mmcops.c */
250 #define CONFIG_ENV_OFFSET               SZ_1K
251 #define CONFIG_ENV_SIZE                 (SZ_128K - CONFIG_ENV_OFFSET)
252 #define CONFIG_DYNAMIC_MMC_DEVNO
253 #endif /* CONFIG_ENV_IS_IN_MMC */
254 #else
255 #undef CONFIG_ENV_IS_IN_MMC
256 #endif /* CONFIG_CMD_MMC */
257
258 #ifdef CONFIG_ENV_IS_NOWHERE
259 #undef CONFIG_ENV_SIZE
260 #define CONFIG_ENV_SIZE                 SZ_4K
261 #endif
262
263 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":"        \
264         "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot),"             \
265         CONFIG_SYS_ENV_PART_STR                                         \
266         "6m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR             \
267         ",512k@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb)"               \
268         ",512k@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
269
270 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
271 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
272                                         GENERATED_GBL_DATA_SIZE)
273
274 /* Defines for SPL */
275 #define CONFIG_SPL_START_S_PATH         "arch/arm/cpu/arm926ejs/mxs"
276 #define CONFIG_SPL_LDSCRIPT             "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
277 #define CONFIG_SPL_LIBCOMMON_SUPPORT
278 #define CONFIG_SPL_LIBGENERIC_SUPPORT
279 #define CONFIG_SPL_SERIAL_SUPPORT
280 #define CONFIG_SPL_GPIO_SUPPORT
281 #define CONFIG_SYS_SPL_VDDD_VAL         1500
282 #define CONFIG_SYS_SPL_BATT_BO_LEVEL    2800
283 #define CONFIG_SYS_SPL_VDDMEM_VAL       0       /* VDDMEM is not utilized on TX28 */
284
285 #endif /* __CONFIGS_TX28_H */