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.
16 #include <asm/sizes.h>
19 * Ka-Ro TX6Q board - SoC configuration
22 #define CONFIG_SYS_MX6_HCLK 24000000
23 #define CONFIG_SYS_MX6_CLK32 32768
24 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
25 #define CONFIG_SHOW_ACTIVITY
26 #define CONFIG_ARCH_CPU_INIT
27 #define CONFIG_DISPLAY_BOARDINFO
28 #define CONFIG_BOARD_LATE_INIT
29 #define CONFIG_BOARD_EARLY_INIT_F
31 #define CONFIG_NETCONSOLE
34 /* LCD Logo and Splash screen support */
38 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
40 #define CONFIG_SPLASH_SCREEN
41 #define CONFIG_SPLASH_SCREEN_ALIGN
42 #define CONFIG_VIDEO_IPUV3
43 #define CONFIG_IPU_CLKRATE 266000000
44 #define CONFIG_LCD_LOGO
45 #define LCD_BPP LCD_COLOR24
46 #define CONFIG_CMD_BMP
47 #define CONFIG_VIDEO_BMP_RLE8
48 #endif /* CONFIG_LCD */
51 * Memory configuration options
53 #define CONFIG_NR_DRAM_BANKS 1 /* # of SDRAM banks */
54 #define PHYS_SDRAM_1 0x10000000 /* Base address of bank 1 */
55 #define PHYS_SDRAM_1_SIZE SZ_1G
56 #define CONFIG_STACKSIZE SZ_128K
57 #define CONFIG_SYS_MALLOC_LEN SZ_8M
58 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 /* Memtest start address */
59 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_4M)
60 #define CONFIG_SYS_SDRAM_CLK 528
63 * U-Boot general configurations
65 #define CONFIG_SYS_LONGHELP
66 #define CONFIG_SYS_PROMPT "TX6Q U-Boot > "
67 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
68 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
69 sizeof(CONFIG_SYS_PROMPT) + 16) /* Print buffer size */
70 #define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
71 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
72 /* Boot argument buffer size */
73 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
74 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
75 #define CONFIG_CMDLINE_EDITING /* Command history etc */
77 #define CONFIG_SYS_64BIT_VSPRINTF
78 #define CONFIG_SYS_NO_FLASH
81 * Flattened Device Tree (FDT) support
83 #define CONFIG_OF_LIBFDT
84 #ifdef CONFIG_OF_LIBFDT
85 #define CONFIG_FDT_FIXUP_PARTITIONS
86 #define CONFIG_OF_EMBED
87 #define CONFIG_OF_BOARD_SETUP
88 #define CONFIG_DEFAULT_DEVICE_TREE tx6q
89 #define CONFIG_ARCH_DEVICE_TREE mx6q
90 #define CONFIG_SYS_FDT_ADDR (PHYS_SDRAM_1 + SZ_16M)
96 #define xstr(s) str(s)
98 #define __pfx(x, s) (x##s)
99 #define _pfx(x, s) __pfx(x, s)
101 #define CONFIG_CMDLINE_TAG
102 #define CONFIG_SETUP_MEMORY_TAGS
103 #define CONFIG_BOOTDELAY 1
104 #define CONFIG_ZERO_BOOTDELAY_CHECK
105 #define CONFIG_SYS_AUTOLOAD "no"
106 #define CONFIG_BOOTFILE "uImage"
107 #define CONFIG_BOOTARGS "console=ttymxc0,115200 ro debug panic=1"
108 #define CONFIG_BOOTCOMMAND "run bootcmd_nand"
109 #define CONFIG_LOADADDR 18000000
110 #define CONFIG_SYS_LOAD_ADDR _pfx(0x, CONFIG_LOADADDR)
111 #define CONFIG_U_BOOT_IMG_SIZE SZ_1M
112 #define CONFIG_IMX_WATCHDOG
113 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 3000
118 #define CONFIG_EXTRA_ENV_SETTINGS \
120 "baseboard=stk5-v3\0" \
121 "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}" \
122 " root=/dev/mmcblk0p3 rootwait\0" \
123 "bootargs_nand=run default_bootargs;set bootargs ${bootargs}" \
124 " root=/dev/mtdblock3 rootfstype=jffs2\0" \
125 "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}" \
126 " root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"\
127 "bootcmd_mmc=set autostart no;run bootargs_mmc;" \
128 "fatload mmc 0 ${loadaddr} uImage;run bootm_cmd\0" \
129 "bootcmd_nand=set autostart no;run bootargs_nand;" \
130 "nboot linux;run bootm_cmd\0" \
131 "bootcmd_net=set autostart no;run bootargs_nfs;dhcp;" \
134 "bootm_cmd=fdt boardsetup;bootm ${loadaddr} - ${fdtaddr}\0" \
136 "default_bootargs=set bootargs " CONFIG_BOOTARGS \
137 " video=${video_mode} ${append_bootargs}\0" \
138 "fdtaddr=11000000\0" \
139 "mtdids=" MTDIDS_DEFAULT "\0" \
140 "mtdparts=" MTDPARTS_DEFAULT "\0" \
141 "nfsroot=/tftpboot/rootfs\0" \
142 "otg_mode=device\0" \
143 "touchpanel=tsc2007\0" \
144 "video_mode=VGA-1:640x480MR-24@60\0"
146 #define MTD_NAME "gpmi-nand"
147 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
152 #include <config_cmd_default.h>
153 #define CONFIG_CMD_CACHE
154 #define CONFIG_CMD_MMC
155 #define CONFIG_CMD_NAND
156 #define CONFIG_CMD_MTDPARTS
158 #define CONFIG_CMD_BOOTCE
160 #define CONFIG_CMD_TIME
161 #define CONFIG_CMD_I2C
166 #define CONFIG_MXC_UART
167 #define CONFIG_MXC_UART_BASE UART1_BASE
168 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
169 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, }
170 #define CONFIG_SYS_CONSOLE_INFO_QUIET
175 #define CONFIG_MXC_GPIO
180 #define CONFIG_FEC_MXC
181 #ifdef CONFIG_FEC_MXC
182 /* This is required for the FEC driver to work with cache enabled */
183 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
185 #define IMX_FEC_BASE ENET_BASE_ADDR
186 #define CONFIG_FEC_MXC_PHYADDR 0
187 #define CONFIG_PHYLIB
188 #define CONFIG_PHY_SMSC
190 #define CONFIG_FEC_XCV_TYPE RMII
191 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
192 #define CONFIG_CMD_MII
193 #define CONFIG_CMD_DHCP
194 #define CONFIG_CMD_PING
195 /* Add for working with "strict" DHCP server */
196 #define CONFIG_BOOTP_SUBNETMASK
197 #define CONFIG_BOOTP_GATEWAY
198 #define CONFIG_BOOTP_DNS
204 #ifdef CONFIG_CMD_I2C
205 #define CONFIG_HARD_I2C 1
206 #define CONFIG_I2C_MXC 1
207 #define CONFIG_SYS_I2C_BASE I2C1_BASE_ADDR
208 #define CONFIG_SYS_I2C_MX6_PORT1
209 #define CONFIG_SYS_I2C_SPEED 10000
210 #define CONFIG_SYS_I2C_SLAVE 0x3c
211 #define CONFIG_MX6_INTER_LDO_BYPASS 0
217 #ifdef CONFIG_CMD_NAND
218 #define CONFIG_MTD_DEVICE
220 #define CONFIG_MTD_DEBUG
221 #define CONFIG_MTD_DEBUG_VERBOSE 4
223 #define CONFIG_ENV_IS_IN_NAND
224 #define CONFIG_NAND_MXS
225 #define CONFIG_NAND_PAGE_SIZE 2048
226 #define CONFIG_NAND_OOB_SIZE 64
227 #define CONFIG_NAND_PAGES_PER_BLOCK 64
228 #define CONFIG_APBH_DMA
229 #define CONFIG_APBH_DMA_BURST
230 #define CONFIG_APBH_DMA_BURST8
231 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000
232 #define CONFIG_CMD_NAND_TRIMFFS
233 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
234 #define CONFIG_SYS_MAX_FLASH_SECT 1024
235 #define CONFIG_SYS_MAX_FLASH_BANKS 1
236 #define CONFIG_SYS_NAND_MAX_CHIPS 1
237 #define CONFIG_SYS_MAX_NAND_DEVICE 1
238 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
239 #define CONFIG_SYS_NAND_USE_FLASH_BBT
240 #ifdef CONFIG_ENV_IS_IN_NAND
241 #define CONFIG_ENV_OVERWRITE
242 #define CONFIG_ENV_OFFSET (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
243 #define CONFIG_ENV_SIZE SZ_128K
244 #define CONFIG_ENV_RANGE 0x60000
246 #define CONFIG_SYS_NAND_BASE 0x00000000
247 #define CONFIG_CMD_ROMUPDATE
248 #endif /* CONFIG_CMD_NAND */
253 #ifdef CONFIG_CMD_MMC
254 #ifndef CONFIG_ENV_IS_IN_NAND
255 #define CONFIG_ENV_IS_IN_MMC
258 #define CONFIG_GENERIC_MMC
259 #define CONFIG_FSL_ESDHC
260 #define CONFIG_FSL_USDHC
262 #define CONFIG_SYS_FSL_ESDHC_USE_PIO
264 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
265 #define CONFIG_SYS_FSL_ESDHC_NUM 2
267 #define CONFIG_DOS_PARTITION
268 #define CONFIG_CMD_FAT
269 #define CONFIG_CMD_EXT2
272 * Environments on MMC
274 #ifdef CONFIG_ENV_IS_IN_MMC
275 #define CONFIG_SYS_MMC_ENV_DEV 0
276 #define CONFIG_ENV_OVERWRITE
277 /* Associated with the MMC layout defined in mmcops.c */
278 #define CONFIG_ENV_OFFSET SZ_1K
279 #define CONFIG_ENV_SIZE (SZ_128K - CONFIG_ENV_OFFSET)
280 #define CONFIG_DYNAMIC_MMC_DEVNO
281 #endif /* CONFIG_ENV_IS_IN_MMC */
282 #endif /* CONFIG_CMD_MMC */
284 #ifdef CONFIG_ENV_OFFSET_REDUND
285 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
286 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
287 xstr(CONFIG_ENV_RANGE) \
289 xstr(CONFIG_ENV_RANGE) \
290 "(env2),4m(linux),16m(rootfs),256k(dtb),-(userfs)"
292 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":" \
293 "1m@" xstr(CONFIG_SYS_NAND_U_BOOT_OFFS) "(u-boot)," \
294 xstr(CONFIG_ENV_RANGE) \
295 "(env),4m(linux),16m(rootfs),256k(dtb),-(userfs)"
298 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
299 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
300 GENERATED_GBL_DATA_SIZE)
302 #ifdef CONFIG_CMD_IIM
303 #define CONFIG_IMX_IIM
306 #endif /* __CONFIG_H */