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 <linux/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
39 #define CONFIG_SYS_GENERIC_BOARD
41 /* LCD Logo and Splash screen support */
44 #define CONFIG_SPLASH_SCREEN
45 #define CONFIG_SPLASH_SCREEN_ALIGN
46 #define CONFIG_VIDEO_MXS
47 #define CONFIG_LCD_LOGO
48 #define LCD_BPP LCD_COLOR32
49 #define CONFIG_CMD_BMP
50 #define CONFIG_VIDEO_BMP_RLE8
51 #endif /* CONFIG_LCD */
52 #endif /* CONFIG_SPL_BUILD */
55 * Memory configuration options
57 #define CONFIG_NR_DRAM_BANKS 0x1 /* 1 bank of SDRAM */
58 #define PHYS_SDRAM_1 0x40000000 /* SDRAM Bank #1 */
59 #define CONFIG_STACKSIZE SZ_64K
60 #define CONFIG_SYS_MALLOC_LEN SZ_4M
61 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
62 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_4M)
65 * U-Boot general configurations
67 #define CONFIG_SYS_LONGHELP
68 #define CONFIG_SYS_PROMPT "TX28 U-Boot > "
69 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
70 #define CONFIG_SYS_PBSIZE \
71 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
72 /* Print buffer size */
73 #define CONFIG_SYS_MAXARGS 256 /* Max number of command args */
74 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
75 /* Boot argument buffer size */
76 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
77 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
78 #define CONFIG_CMDLINE_EDITING /* Command history etc */
80 #define CONFIG_SYS_64BIT_VSPRINTF
83 * Flattened Device Tree (FDT) support
85 #ifdef CONFIG_OF_LIBFDT
91 #define xstr(s) str(s)
93 #define __pfx(x, s) (x##s)
94 #define _pfx(x, s) __pfx(x, s)
96 #define CONFIG_CMDLINE_TAG
97 #define CONFIG_SETUP_MEMORY_TAGS
98 #define CONFIG_BOOTDELAY 3
99 #define CONFIG_ZERO_BOOTDELAY_CHECK
100 #define CONFIG_SYS_AUTOLOAD "no"
101 #define CONFIG_BOOTFILE "uImage"
102 #define CONFIG_BOOTARGS "init=/linuxrc console=ttyAMA0,115200 ro debug panic=1"
103 #define CONFIG_BOOTCOMMAND "run bootcmd_${boot_mode} bootm_cmd"
105 #define CONFIG_LOADADDR 41000000
107 #define CONFIG_LOADADDR 43000000
109 #define CONFIG_FDTADDR 41000000
110 #define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
111 #define CONFIG_SYS_FDT_ADDR _pfx(0x, CONFIG_FDTADDR)
112 #define CONFIG_U_BOOT_IMG_SIZE SZ_1M
115 * Extra Environment Settings
117 #ifdef CONFIG_ENV_IS_NOWHERE
118 #define CONFIG_EXTRA_ENV_SETTINGS \
122 "mtdids=" MTDIDS_DEFAULT "\0" \
123 "mtdparts=" MTDPARTS_DEFAULT "\0"
125 #define CONFIG_EXTRA_ENV_SETTINGS \
127 "baseboard=stk5-v3\0" \
128 "bootargs_jffs2=run default_bootargs;set bootargs ${bootargs}" \
129 " root=/dev/mtdblock3 rootfstype=jffs2\0" \
130 "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}" \
131 " root=/dev/mmcblk0p3 rootwait\0" \
132 "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}" \
133 " root=/dev/nfs nfsroot=${nfs_server}:${nfsroot},nolock" \
135 "bootargs_ubifs=run default_bootargs;set bootargs ${bootargs}" \
136 " ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs\0" \
137 "bootcmd_jffs2=set autostart no;run bootargs_jffs2" \
139 "bootcmd_mmc=set autostart no;run bootargs_mmc" \
140 ";fatload mmc 0 ${loadaddr} uImage\0" \
141 "bootcmd_nand=set autostart no;run bootargs_ubifs;nboot linux\0"\
142 "bootcmd_net=set autoload y;set autostart n;run bootargs_nfs" \
144 "bootm_cmd=bootm ${loadaddr} - ${fdtaddr}\0" \
146 "default_bootargs=set bootargs " CONFIG_BOOTARGS \
147 " ${append_bootargs}\0" \
148 "fdtaddr=" xstr(CONFIG_FDTADDR) "\0" \
149 "fdtsave=fdt resize;nand erase.part dtb" \
150 ";nand write ${fdtaddr} dtb ${fdtsize}\0" \
151 "mtdids=" MTDIDS_DEFAULT "\0" \
152 "mtdparts=" MTDPARTS_DEFAULT "\0" \
153 "nfsroot=/tftpboot/rootfs\0" \
154 "otg_mode=device\0" \
155 "touchpanel=tsc2007\0" \
157 #endif /* CONFIG_ENV_IS_NOWHERE */
159 #define MTD_NAME "gpmi-nand"
160 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
165 #include <config_cmd_default.h>
170 #define CONFIG_PL011_SERIAL
171 #define CONFIG_PL011_CLOCK 24000000
172 #define CONFIG_PL01x_PORTS { \
173 (void *)MXS_UARTDBG_BASE, \
175 #define CONFIG_CONS_INDEX 0 /* do not change! */
176 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
177 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, }
178 #define CONFIG_SYS_CONSOLE_INFO_QUIET
183 #ifdef CONFIG_FEC_MXC
184 /* This is required for the FEC driver to work with cache enabled */
185 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
186 #define CONFIG_SYS_CACHELINE_SIZE 32
188 #ifdef CONFIG_FEC_MXC_PHYADDR
189 #define IMX_FEC_BASE MXS_ENET0_BASE
192 #define CONFIG_FEC_XCV_TYPE RMII
193 #define CONFIG_CMD_MII
194 /* Add for working with "strict" DHCP server */
195 #define CONFIG_BOOTP_SUBNETMASK
196 #define CONFIG_BOOTP_GATEWAY
197 #define CONFIG_BOOTP_DNS
198 #define CONFIG_BOOTP_RANDOM_ID
201 #ifndef CONFIG_ENV_IS_NOWHERE
202 /* define one of the following options:
205 #define CONFIG_ENV_OVERWRITE
211 #define CONFIG_SYS_NAND_BLOCK_SIZE SZ_128K
212 #define CONFIG_NAND_MXS
213 #define CONFIG_APBH_DMA
214 #define CONFIG_APBH_DMA_BURST
215 #define CONFIG_APBH_DMA_BURST8
216 #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SYS_NAND_BLOCK_SIZE
217 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
218 #define CONFIG_SYS_NAND_MAX_CHIPS 0x1
219 #define CONFIG_SYS_MAX_NAND_DEVICE 0x1
220 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
221 #define CONFIG_SYS_NAND_BASE 0x00000000
223 #undef CONFIG_ENV_IS_IN_NAND
224 #endif /* CONFIG_CMD_NAND */
226 #ifdef CONFIG_ENV_IS_IN_NAND
227 #define CONFIG_ENV_OFFSET (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
228 #define CONFIG_ENV_SIZE SZ_128K
229 #define CONFIG_ENV_RANGE (3 * CONFIG_SYS_NAND_BLOCK_SIZE)
230 #endif /* CONFIG_ENV_IS_IN_NAND */
232 #ifdef CONFIG_ENV_OFFSET_REDUND
233 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
235 xstr(CONFIG_SYS_ENV_PART_SIZE) \
237 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE2) "(userfs)"
239 #define CONFIG_SYS_ENV_PART_STR xstr(CONFIG_SYS_ENV_PART_SIZE) \
241 #define CONFIG_SYS_USERFS_PART_STR xstr(CONFIG_SYS_USERFS_PART_SIZE) "(userfs)"
242 #endif /* CONFIG_ENV_OFFSET_REDUND */
247 #ifdef CONFIG_CMD_MMC
248 #define CONFIG_MXS_MMC
249 #define CONFIG_BOUNCE_BUFFER
251 #define CONFIG_DOS_PARTITION
252 #define CONFIG_CMD_FAT
253 #define CONFIG_FAT_WRITE
254 #define CONFIG_CMD_EXT2
257 * Environments on MMC
259 #ifdef CONFIG_ENV_IS_IN_MMC
260 #define CONFIG_SYS_MMC_ENV_DEV 0
261 /* Associated with the MMC layout defined in mmcops.c */
262 #define CONFIG_ENV_OFFSET SZ_1K
263 #define CONFIG_ENV_SIZE (SZ_128K - CONFIG_ENV_OFFSET)
264 #define CONFIG_DYNAMIC_MMC_DEVNO
265 #endif /* CONFIG_ENV_IS_IN_MMC */
267 #undef CONFIG_ENV_IS_IN_MMC
268 #endif /* CONFIG_CMD_MMC */
270 #ifdef CONFIG_ENV_IS_NOWHERE
271 #undef CONFIG_ENV_SIZE
272 #define CONFIG_ENV_SIZE SZ_4K
275 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
276 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
277 CONFIG_SYS_ENV_PART_STR \
278 "6m(linux),32m(rootfs)," CONFIG_SYS_USERFS_PART_STR \
279 ",512k@" xstr(CONFIG_SYS_NAND_DTB_OFFSET) "(dtb)" \
280 ",512k@" xstr(CONFIG_SYS_NAND_BBT_OFFSET) "(bbt)ro"
282 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
283 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
284 GENERATED_GBL_DATA_SIZE)
286 /* Defines for SPL */
287 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mxs"
288 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"
289 #define CONFIG_SPL_LIBCOMMON_SUPPORT
290 #define CONFIG_SPL_LIBGENERIC_SUPPORT
291 #define CONFIG_SPL_SERIAL_SUPPORT
292 #define CONFIG_SPL_GPIO_SUPPORT
293 #define CONFIG_SYS_SPL_VDDD_VAL 1500
294 #define CONFIG_SYS_SPL_BATT_BO_LEVEL 2800
295 #define CONFIG_SYS_SPL_VDDMEM_VAL 0 /* VDDMEM is not utilized on TX28 */
297 #endif /* __CONFIGS_TX28_H */