2 * Copyright (C) 2012 <LW@KARO-electronics.de>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation version 2.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 #ifndef __CONFIGS_TX28_H
14 #define __CONFIGS_TX28_H
16 #include <asm/sizes.h>
17 #include <asm/arch/regs-base.h>
20 * Ka-Ro TX28 board - SoC configuration
22 #define CONFIG_MX28 /* i.MX28 SoC */
23 #define CONFIG_MXS_GPIO /* GPIO control */
24 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
26 #define PHYS_SDRAM_1_SIZE SZ_64M
27 #define TX28_MOD_SUFFIX "1"
29 #define PHYS_SDRAM_1_SIZE SZ_128M
30 #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY
31 #define TX28_MOD_SUFFIX "0"
34 #ifndef CONFIG_SPL_BUILD
35 #define CONFIG_SKIP_LOWLEVEL_INIT
36 #define CONFIG_SHOW_ACTIVITY
37 #define CONFIG_ARCH_CPU_INIT
38 #define CONFIG_DISPLAY_CPUINFO
39 #define CONFIG_BOARD_LATE_INIT
40 #define CONFIG_BOARD_EARLY_INIT_F
42 /* LCD Logo and Splash screen support */
45 #define CONFIG_SPLASH_SCREEN
46 #define CONFIG_SPLASH_SCREEN_ALIGN
47 #define CONFIG_VIDEO_MXS
48 #define CONFIG_LCD_LOGO
49 #define LCD_BPP LCD_COLOR24
50 #define CONFIG_CMD_BMP
51 #define CONFIG_VIDEO_BMP_RLE8
52 #endif /* CONFIG_LCD */
53 #endif /* CONFIG_SPL_BUILD */
56 * Memory configuration options
58 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of SDRAM */
59 #define PHYS_SDRAM_1 0x40000000 /* SDRAM Bank #1 */
60 #define CONFIG_STACKSIZE SZ_64K
61 #define CONFIG_SYS_MALLOC_LEN SZ_4M
62 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
63 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_4M)
66 * U-Boot general configurations
68 #define CONFIG_SYS_LONGHELP
69 #define CONFIG_SYS_PROMPT "TX28 U-Boot > "
70 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
71 #define CONFIG_SYS_PBSIZE \
72 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
73 /* Print buffer size */
74 #define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
75 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
76 /* Boot argument buffer size */
77 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
78 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
79 #define CONFIG_CMDLINE_EDITING /* Command history etc */
81 #define CONFIG_SYS_64BIT_VSPRINTF
82 #define CONFIG_SYS_NO_FLASH
85 * Flattened Device Tree (FDT) support
87 #define CONFIG_OF_LIBFDT
88 #ifdef CONFIG_OF_LIBFDT
89 #define CONFIG_FDT_FIXUP_PARTITIONS
90 #define CONFIG_OF_EMBED
91 #define CONFIG_OF_BOARD_SETUP
92 #define CONFIG_DEFAULT_DEVICE_TREE tx28
93 #define CONFIG_ARCH_DEVICE_TREE mx28
94 #define CONFIG_SYS_FDT_ADDR (PHYS_SDRAM_1 + SZ_16M)
100 #define xstr(s) str(s)
102 #define __pfx(x, s) (x##s)
103 #define _pfx(x, s) __pfx(x, s)
105 #define CONFIG_CMDLINE_TAG
106 #define CONFIG_SETUP_MEMORY_TAGS
107 #define CONFIG_BOOTDELAY 3
108 #define CONFIG_ZERO_BOOTDELAY_CHECK
109 #define CONFIG_SYS_AUTOLOAD "no"
110 #define CONFIG_BOOTFILE "uImage"
111 #define CONFIG_BOOTARGS "console=ttyAMA0,115200 ro debug panic=1"
112 #define CONFIG_BOOTCOMMAND "run bootcmd_nand"
113 #define CONFIG_LOADADDR 43000000
114 #define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
115 #define CONFIG_U_BOOT_IMG_SIZE SZ_1M
120 #ifdef CONFIG_ENV_IS_NOWHERE
121 #define CONFIG_EXTRA_ENV_SETTINGS \
125 "fdtaddr=11000000\0" \
126 "mtdids=" MTDIDS_DEFAULT "\0" \
127 "mtdparts=" MTDPARTS_DEFAULT "\0"
129 #define CONFIG_EXTRA_ENV_SETTINGS \
131 "baseboard=stk5-v3\0" \
132 "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}" \
133 " root=/dev/mmcblk0p3 rootwait\0" \
134 "bootargs_nand=run default_bootargs;set bootargs ${bootargs}" \
135 " root=/dev/mtdblock3 rootfstype=jffs2\0" \
136 "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}" \
137 " root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"\
138 "bootcmd_mmc=set autostart no;run bootargs_mmc;" \
139 "fatload mmc 0 ${loadaddr} uImage;run bootm_cmd\0" \
140 "bootcmd_nand=set autostart no;run bootargs_nand;" \
141 "nboot linux;run bootm_cmd\0" \
142 "bootcmd_net=set autostart no;run bootargs_nfs;dhcp;" \
144 "bootm_cmd=fdt boardsetup;bootm ${loadaddr} - ${fdtaddr}\0" \
145 "default_bootargs=set bootargs " CONFIG_BOOTARGS \
146 " mxsfb.mode=${video_mode} ${append_bootargs}\0" \
147 "fdtaddr=41000000\0" \
148 "mtdids=" MTDIDS_DEFAULT "\0" \
149 "mtdparts=" MTDPARTS_DEFAULT "\0" \
150 "nfsroot=/tftpboot/rootfs\0" \
151 "otg_mode=device\0" \
152 "touchpanel=tsc2007\0" \
154 #endif /* CONFIG_ENV_IS_NOWHERE */
156 #define MTD_NAME "gpmi-nand"
157 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
162 #include <config_cmd_default.h>
163 #define CONFIG_CMD_CACHE
164 #define CONFIG_CMD_MMC
165 #define CONFIG_CMD_NAND
166 #define CONFIG_CMD_MTDPARTS
167 #define CONFIG_CMD_BOOTCE
168 #define CONFIG_CMD_TIME
173 #define CONFIG_PL011_SERIAL
174 #define CONFIG_PL011_CLOCK 24000000
175 #define CONFIG_PL01x_PORTS { \
176 (void *)MXS_UARTDBG_BASE, \
178 #define CONFIG_CONS_INDEX 0 /* do not change! */
179 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
180 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, }
181 #define CONFIG_SYS_CONSOLE_INFO_QUIET
186 #define CONFIG_FEC_MXC
187 #ifdef CONFIG_FEC_MXC
188 /* This is required for the FEC driver to work with cache enabled */
189 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
191 #ifndef CONFIG_TX28_S
192 #define CONFIG_FEC_MXC_MULTI
194 #define IMX_FEC_BASE MXS_ENET0_BASE
195 #define CONFIG_FEC_MXC_PHYADDR 0x00
199 #define CONFIG_FEC_XCV_TYPE RMII
200 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
201 #define CONFIG_NET_MULTI
202 #define CONFIG_CMD_MII
203 #define CONFIG_CMD_DHCP
204 #define CONFIG_CMD_PING
205 /* Add for working with "strict" DHCP server */
206 #define CONFIG_BOOTP_SUBNETMASK
207 #define CONFIG_BOOTP_GATEWAY
208 #define CONFIG_BOOTP_DNS
211 #ifndef CONFIG_ENV_IS_NOWHERE
212 /* define one of the following options:
213 #define CONFIG_ENV_IS_IN_NAND
214 #define CONFIG_ENV_IS_IN_MMC
216 #define CONFIG_ENV_IS_IN_NAND
218 #define CONFIG_ENV_OVERWRITE
223 #ifdef CONFIG_CMD_NAND
224 #define CONFIG_MTD_DEVICE
225 #define CONFIG_NAND_MXS
226 #define CONFIG_APBH_DMA
227 #define CONFIG_APBH_DMA_BURST
228 #define CONFIG_APBH_DMA_BURST8
229 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000
230 #define CONFIG_CMD_NAND_TRIMFFS
231 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
232 #define CONFIG_SYS_MAX_FLASH_SECT 1024
233 #define CONFIG_SYS_MAX_FLASH_BANKS 1
234 #define CONFIG_SYS_NAND_MAX_CHIPS 1
235 #define CONFIG_SYS_MAX_NAND_DEVICE 1
236 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
237 #define CONFIG_SYS_NAND_USE_FLASH_BBT
238 #define CONFIG_SYS_NAND_BASE 0x00000000
239 #define CONFIG_CMD_ROMUPDATE
241 #undef CONFIG_ENV_IS_IN_NAND
242 #endif /* CONFIG_CMD_NAND */
244 #define CONFIG_ENV_OFFSET (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
245 #define CONFIG_ENV_SIZE SZ_128K
246 #define CONFIG_ENV_RANGE 0x60000
247 #ifdef CONFIG_ENV_OFFSET_REDUND
248 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_ENV_RANGE) \
250 xstr(CONFIG_ENV_RANGE) \
252 #define CONFIG_SYS_USERFS_PART_STR "107904k(userfs)"
254 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_ENV_RANGE) \
256 #define CONFIG_SYS_USERFS_PART_STR "108288k(userfs)"
257 #endif /* CONFIG_ENV_OFFSET_REDUND */
262 #ifdef CONFIG_CMD_MMC
264 #define CONFIG_GENERIC_MMC
265 #define CONFIG_MXS_MMC
266 #define CONFIG_BOUNCE_BUFFER
268 #define CONFIG_DOS_PARTITION
269 #define CONFIG_CMD_FAT
270 #define CONFIG_CMD_EXT2
273 * Environments on MMC
275 #ifdef CONFIG_ENV_IS_IN_MMC
276 #define CONFIG_SYS_MMC_ENV_DEV 0
277 #undef CONFIG_ENV_OFFSET
278 #undef CONFIG_ENV_SIZE
279 /* Associated with the MMC layout defined in mmcops.c */
280 #define CONFIG_ENV_OFFSET SZ_1K
281 #define CONFIG_ENV_SIZE (SZ_128K - CONFIG_ENV_OFFSET)
282 #define CONFIG_DYNAMIC_MMC_DEVNO
283 #endif /* CONFIG_ENV_IS_IN_MMC */
285 #undef CONFIG_ENV_IS_IN_MMC
286 #endif /* CONFIG_CMD_MMC */
288 #ifdef CONFIG_ENV_IS_NOWHERE
289 #undef CONFIG_ENV_SIZE
290 #define CONFIG_ENV_SIZE SZ_4K
293 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
294 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
295 CONFIG_SYS_ENV_PART_STR \
296 "4m(linux),16m(rootfs)," \
297 CONFIG_SYS_USERFS_PART_STR ",256k(dtb),512k@0x7f80000(bbt)ro"
299 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
300 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
301 GENERATED_GBL_DATA_SIZE)
303 /* Defines for SPL */
305 #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
306 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
307 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
308 #define CONFIG_SPL_LIBCOMMON_SUPPORT
309 #define CONFIG_SPL_LIBGENERIC_SUPPORT
310 #define CONFIG_SPL_SERIAL_SUPPORT
311 #define CONFIG_SPL_GPIO_SUPPORT
312 #define CONFIG_SYS_SPL_VDDD_VAL 1500
313 #define CONFIG_SYS_SPL_BATT_BO_LEVEL 2800
314 #define CONFIG_SYS_SPL_VDDMEM_VAL 0 /* VDDMEM is not utilized on TX28 */
316 #endif /* __CONFIGS_TX28_H */