2 * Copyright (C) 2012 <LW@KARO-electronics.de>
4 * SPDX-License-Identifier: GPL-2.0
11 #define CONFIG_MX28 /* must be defined before including regs-base.h */
13 #include <asm/sizes.h>
14 #include <asm/arch/regs-base.h>
17 * Ka-Ro TX28 board - SoC configuration
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
23 #define TX28_MOD_SUFFIX "1"
25 #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY
26 #define TX28_MOD_SUFFIX "0"
28 #define IRAM_BASE_ADDR 0x00000000
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
40 /* LCD Logo and Splash screen support */
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_COLOR24
48 #define CONFIG_CMD_BMP
49 #define CONFIG_VIDEO_BMP_RLE8
50 #endif /* CONFIG_LCD */
51 #endif /* CONFIG_SPL_BUILD */
54 * Memory configuration options
56 #define CONFIG_NR_DRAM_BANKS 1 /* 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)
64 * U-Boot general configurations
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 */
79 #define CONFIG_SYS_64BIT_VSPRINTF
80 #define CONFIG_SYS_NO_FLASH
83 * Flattened Device Tree (FDT) support
85 #define CONFIG_OF_LIBFDT
86 #ifdef CONFIG_OF_LIBFDT
87 #define CONFIG_FDT_FIXUP_PARTITIONS
88 #define CONFIG_OF_BOARD_SETUP
94 #define xstr(s) str(s)
96 #define __pfx(x, s) (x##s)
97 #define _pfx(x, s) __pfx(x, s)
99 #define CONFIG_CMDLINE_TAG
100 #define CONFIG_SETUP_MEMORY_TAGS
101 #define CONFIG_BOOTDELAY 3
102 #define CONFIG_ZERO_BOOTDELAY_CHECK
103 #define CONFIG_SYS_AUTOLOAD "no"
104 #define CONFIG_BOOTFILE "uImage"
105 #define CONFIG_BOOTARGS "init=/linuxrc console=ttyAMA0,115200 ro debug panic=1"
106 #define CONFIG_BOOTCOMMAND "run bootcmd_${boot_mode} bootm_cmd"
108 #define CONFIG_LOADADDR 41000000
110 #define CONFIG_LOADADDR 43000000
112 #define CONFIG_FDTADDR 41000000
113 #define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
114 #define CONFIG_SYS_FDT_ADDR _pfx(0x, CONFIG_FDTADDR)
115 #define CONFIG_U_BOOT_IMG_SIZE SZ_1M
118 * Extra Environment Settings
120 #ifdef CONFIG_ENV_IS_NOWHERE
121 #define CONFIG_EXTRA_ENV_SETTINGS \
125 "mtdids=" MTDIDS_DEFAULT "\0" \
126 "mtdparts=" MTDPARTS_DEFAULT "\0"
128 #define CONFIG_EXTRA_ENV_SETTINGS \
130 "baseboard=stk5-v3\0" \
131 "bootargs_jffs2=run default_bootargs;set bootargs ${bootargs}" \
132 " root=/dev/mtdblock3 rootfstype=jffs2\0" \
133 "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}" \
134 " root=/dev/mmcblk0p3 rootwait\0" \
135 "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}" \
136 " root=/dev/nfs nfsroot=${nfs_server}:${nfsroot},nolock" \
138 "bootargs_ubifs=run default_bootargs;set bootargs ${bootargs}" \
139 " ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs\0" \
140 "bootcmd_jffs2=set autostart no;run bootargs_jffs2" \
142 "bootcmd_mmc=set autostart no;run bootargs_mmc" \
143 ";fatload mmc 0 ${loadaddr} uImage\0" \
144 "bootcmd_nand=set autostart no;run bootargs_ubifs;nboot linux\0"\
145 "bootcmd_net=set autoload y;set autostart n;run bootargs_nfs" \
147 "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0" \
149 "default_bootargs=set bootargs " CONFIG_BOOTARGS \
150 " ${append_bootargs}\0" \
151 "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \
152 "fdtsave=fdt resize;nand erase.part dtb" \
153 ";nand write ${fdtaddr} dtb ${fdtsize}\0" \
154 "mtdids=" MTDIDS_DEFAULT "\0" \
155 "mtdparts=" MTDPARTS_DEFAULT "\0" \
156 "nfsroot=/tftpboot/rootfs\0" \
157 "otg_mode=device\0" \
158 "touchpanel=tsc2007\0" \
160 #endif /* CONFIG_ENV_IS_NOWHERE */
162 #define MTD_NAME "gpmi-nand"
163 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
168 #include <config_cmd_default.h>
169 #define CONFIG_CMD_CACHE
170 #define CONFIG_CMD_MMC
171 #define CONFIG_CMD_NAND
172 #define CONFIG_CMD_MTDPARTS
173 #define CONFIG_CMD_BOOTCE
174 #define CONFIG_CMD_TIME
175 #define CONFIG_CMD_MEMTEST
180 #define CONFIG_PL011_SERIAL
181 #define CONFIG_PL011_CLOCK 24000000
182 #define CONFIG_PL01x_PORTS { \
183 (void *)MXS_UARTDBG_BASE, \
185 #define CONFIG_CONS_INDEX 0 /* do not change! */
186 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
187 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, }
188 #define CONFIG_SYS_CONSOLE_INFO_QUIET
193 #define CONFIG_FEC_MXC
194 #ifdef CONFIG_FEC_MXC
195 /* This is required for the FEC driver to work with cache enabled */
196 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
197 #define CONFIG_SYS_CACHELINE_SIZE 32
199 #ifndef CONFIG_TX28_S
200 #define CONFIG_FEC_MXC_MULTI
202 #define IMX_FEC_BASE MXS_ENET0_BASE
203 #define CONFIG_FEC_MXC_PHYADDR 0x00
206 #define CONFIG_PHY_SMSC
207 #define CONFIG_PHYLIB
209 #define CONFIG_FEC_XCV_TYPE RMII
210 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
211 #define CONFIG_NET_MULTI
212 #define CONFIG_CMD_MII
213 #define CONFIG_CMD_DHCP
214 #define CONFIG_CMD_PING
215 /* Add for working with "strict" DHCP server */
216 #define CONFIG_BOOTP_SUBNETMASK
217 #define CONFIG_BOOTP_GATEWAY
218 #define CONFIG_BOOTP_DNS
219 #define CONFIG_BOOTP_RANDOM_ID
222 #ifndef CONFIG_ENV_IS_NOWHERE
223 /* define one of the following options:
224 #define CONFIG_ENV_IS_IN_NAND
225 #define CONFIG_ENV_IS_IN_MMC
227 #define CONFIG_ENV_IS_IN_NAND
229 #define CONFIG_ENV_OVERWRITE
234 #ifdef CONFIG_CMD_NAND
235 #define CONFIG_SYS_NAND_BLOCK_SIZE SZ_128K
236 #define CONFIG_MTD_DEVICE
237 #define CONFIG_NAND_MXS
238 #define CONFIG_APBH_DMA
239 #define CONFIG_APBH_DMA_BURST
240 #define CONFIG_APBH_DMA_BURST8
241 #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SYS_NAND_BLOCK_SIZE
242 #define CONFIG_CMD_NAND_TRIMFFS
243 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
244 #define CONFIG_SYS_NAND_MAX_CHIPS 1
245 #define CONFIG_SYS_MAX_NAND_DEVICE 1
246 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
247 #define CONFIG_SYS_NAND_USE_FLASH_BBT
248 #define CONFIG_SYS_NAND_BASE 0x00000000
249 #define CONFIG_CMD_ROMUPDATE
251 #undef CONFIG_ENV_IS_IN_NAND
252 #endif /* CONFIG_CMD_NAND */
254 #ifdef CONFIG_ENV_IS_IN_NAND
255 #define CONFIG_ENV_OFFSET (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
256 #define CONFIG_ENV_SIZE SZ_128K
257 #define CONFIG_ENV_RANGE (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
258 #endif /* CONFIG_ENV_IS_IN_NAND */
260 #ifdef CONFIG_ENV_OFFSET_REDUND
261 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
263 xstr(CONFIG_SYS_ENV_PART_SIZE) \
265 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE2) "(userfs)"
267 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
269 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE) "(userfs)"
270 #endif /* CONFIG_ENV_OFFSET_REDUND */
275 #ifdef CONFIG_CMD_MMC
277 #define CONFIG_GENERIC_MMC
278 #define CONFIG_MXS_MMC
279 #define CONFIG_BOUNCE_BUFFER
281 #define CONFIG_DOS_PARTITION
282 #define CONFIG_CMD_FAT
283 #define CONFIG_FAT_WRITE
284 #define CONFIG_CMD_EXT2
287 * Environments on MMC
289 #ifdef CONFIG_ENV_IS_IN_MMC
290 #define CONFIG_SYS_MMC_ENV_DEV 0
291 /* Associated with the MMC layout defined in mmcops.c */
292 #define CONFIG_ENV_OFFSET SZ_1K
293 #define CONFIG_ENV_SIZE (SZ_128K - CONFIG_ENV_OFFSET)
294 #define CONFIG_DYNAMIC_MMC_DEVNO
295 #endif /* CONFIG_ENV_IS_IN_MMC */
297 #undef CONFIG_ENV_IS_IN_MMC
298 #endif /* CONFIG_CMD_MMC */
300 #ifdef CONFIG_ENV_IS_NOWHERE
301 #undef CONFIG_ENV_SIZE
302 #define CONFIG_ENV_SIZE SZ_4K
305 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
306 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
307 CONFIG_SYS_ENV_PART_STR \
308 "6m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR \
309 ",512k@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb)" \
310 ",512k@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
312 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
313 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
314 GENERATED_GBL_DATA_SIZE)
316 /* Defines for SPL */
318 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
319 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
320 #define CONFIG_SPL_LIBCOMMON_SUPPORT
321 #define CONFIG_SPL_LIBGENERIC_SUPPORT
322 #define CONFIG_SPL_SERIAL_SUPPORT
323 #define CONFIG_SPL_GPIO_SUPPORT
324 #define CONFIG_SYS_SPL_VDDD_VAL 1500
325 #define CONFIG_SYS_SPL_BATT_BO_LEVEL 2800
326 #define CONFIG_SYS_SPL_VDDMEM_VAL 0 /* VDDMEM is not utilized on TX28 */
328 #endif /* __CONFIGS_TX28_H */