2 * Copyright (C) 2010 Freescale Semiconductor, Inc.
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; either version 2 of
7 * the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 #include <asm/sizes.h>
23 #include <asm/arch/regs-base.h>
26 * Ka-Ro TX28 board - SoC configuration
28 #define CONFIG_MX28 /* i.MX28 SoC */
29 #define CONFIG_MXS_GPIO /* GPIO control */
30 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
31 #define CONFIG_IDENT_STRING "\nBoard: Ka-Ro TX28-40xx"
32 #define CONFIG_SHOW_ACTIVITY
35 #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
36 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
37 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
38 #define CONFIG_SPL_LIBCOMMON_SUPPORT
39 #define CONFIG_SPL_LIBGENERIC_SUPPORT
40 #define CONFIG_SPL_GPIO_SUPPORT
41 #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY
42 #define CONFIG_SYS_SPL_VDDD_VAL 1500
43 #define CONFIG_SYS_SPL_BATT_BO_LEVEL 2800
44 #define CONFIG_SKIP_LOWLEVEL_INIT
47 * Memory configurations
49 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
50 #define PHYS_SDRAM_1 0x40000000 /* Base address */
51 #define PHYS_SDRAM_1_SIZE SZ_128M
52 #define CONFIG_STACKSIZE 0x00010000 /* 128 KB stack */
53 #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
54 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Reserved for initial data */
55 #define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start address */
56 #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
59 * U-Boot general configurations
61 #define CONFIG_SYS_LONGHELP
62 #define CONFIG_SYS_PROMPT "MX28 U-Boot > "
63 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
64 #define CONFIG_SYS_PBSIZE \
65 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
66 /* Print buffer size */
67 #define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
68 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
69 /* Boot argument buffer size */
70 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
71 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
72 #define CONFIG_CMDLINE_EDITING /* Command history etc */
74 #define CONFIG_SYS_64BIT_VSPRINTF
79 #define xstr(s) str(s)
82 #define CONFIG_CMDLINE_TAG
83 #define CONFIG_SETUP_MEMORY_TAGS
84 #define CONFIG_BOOTDELAY 3
85 #define CONFIG_ZERO_BOOTDELAY_CHECK
86 #define CONFIG_BOOTFILE "uImage"
87 #define CONFIG_BOOTARGS "console=ttyAMA0,115200 tx28_base=stkv3" \
88 " tx28_otg_mode=device ro debug panic=1"
89 #define CONFIG_BOOTCOMMAND "run bootcmd_nand"
90 #define CONFIG_LOADADDR 0x40100000
91 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
96 #define CONFIG_EXTRA_ENV_SETTINGS \
98 "bootcmd_mmc=set autostart yes;run bootargs_mmc;" \
99 " mmc read ${loadaddr} 100 3000\0" \
100 "bootcmd_nand=set autostart yes;run bootargs_nand;" \
102 "bootcmd_net=setenv autostart yes;run bootargs_nfs; dhcp\0" \
103 "bootargs_mmc=run default_bootargs;setenv bootargs ${bootargs}" \
104 " root=/dev/mmcblk0p3 rootwait\0" \
105 "bootargs_nand=run default_bootargs;setenv bootargs ${bootargs}"\
106 " ${mtdparts} root=/dev/mtdblock3 rootfstype=jffs2\0" \
107 "nfsroot=/tftpboot/rootfs\0" \
108 "bootargs_nfs=run default_bootargs;setenv bootargs ${bootargs}" \
109 " root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"\
110 "default_bootargs=set bootargs " CONFIG_BOOTARGS \
111 " mxsfb.mode=${video_mode}\0" \
112 "mtdids=" MTDIDS_DEFAULT "\0" \
113 "mtdparts=" MTDPARTS_DEFAULT "\0" \
116 #define MTD_NAME "gpmi-nand"
117 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
122 #define CONFIG_SYS_NO_FLASH
123 #include <config_cmd_default.h>
124 #define CONFIG_ARCH_CPU_INIT
125 #define CONFIG_DISPLAY_CPUINFO
130 #define CONFIG_PL011_SERIAL
131 #define CONFIG_PL011_CLOCK 24000000
132 #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
133 #define CONFIG_CONS_INDEX 0
134 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
135 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
140 #define CONFIG_FEC_MXC
141 #ifdef CONFIG_FEC_MXC
142 /* This is required for the FEC driver to work with cache enabled */
143 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
145 #define CONFIG_FEC_MXC_MULTI
148 #define CONFIG_FEC_XCV_TYPE RMII
149 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
150 #define CONFIG_NET_MULTI
151 #define CONFIG_ETH_PRIME
152 #define CONFIG_CMD_MII
153 #define CONFIG_CMD_DHCP
154 #define CONFIG_CMD_PING
155 /* Add for working with "strict" DHCP server */
156 #define CONFIG_BOOTP_SUBNETMASK
157 #define CONFIG_BOOTP_GATEWAY
158 #define CONFIG_BOOTP_DNS
161 #define CONFIG_CMD_MMC
162 #define CONFIG_CMD_NAND
163 #define CONFIG_CMD_MTDPARTS
168 #ifdef CONFIG_CMD_NAND
169 #define CONFIG_MTD_DEVICE
170 #define CONFIG_ENV_IS_IN_NAND
171 #define CONFIG_NAND_MXS
172 #define CONFIG_APBH_DMA
173 #define CONFIG_APBH_DMA_BURST
174 #define CONFIG_APBH_DMA_BURST8
175 #define CONFIG_CMD_NAND_TRIMFFS
176 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
177 #define CONFIG_SYS_MAX_FLASH_SECT 1024
178 #define CONFIG_SYS_MAX_FLASH_BANKS 1
179 #define CONFIG_SYS_NAND_MAX_CHIPS 1
180 #define CONFIG_SYS_MAX_NAND_DEVICE 1
181 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
182 #define CONFIG_SYS_NAND_USE_FLASH_BBT
183 #ifdef CONFIG_ENV_IS_IN_NAND
184 #define CONFIG_ENV_OVERWRITE
185 #define CONFIG_ENV_OFFSET 0x20000
186 #define CONFIG_ENV_SIZE 0x20000 /* 128 KiB */
188 #define CONFIG_ENV_OFFSET_REDUND 0x40000
189 #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
192 #ifndef CONFIG_SYS_NO_FLASH
193 #define CONFIG_CMD_FLASH
194 #define CONFIG_SYS_NAND_BASE 0xa0000000
196 #define CONFIG_OF_LIBFDT
198 #define CONFIG_SYS_NAND_BASE 0x00000000
199 #define CONFIG_CMD_ROMUPDATE
201 #endif /* CONFIG_CMD_NAND */
206 #ifdef CONFIG_CMD_MMC
207 #ifndef CONFIG_ENV_IS_IN_NAND
208 #define CONFIG_ENV_IS_IN_MMC
211 #define CONFIG_GENERIC_MMC
212 #define CONFIG_MXS_MMC
213 #define CONFIG_DOS_PARTITION
214 #define CONFIG_CMD_FAT
216 #define CONFIG_BOOT_PARTITION_ACCESS
217 #define CONFIG_DOS_PARTITION
218 #define CONFIG_CMD_FAT
219 #define CONFIG_CMD_EXT2
222 * Environments on MMC
224 #ifdef CONFIG_ENV_IS_IN_MMC
225 #define CONFIG_SYS_MMC_ENV_DEV 0
226 #define CONFIG_CMD_ENV
227 #define CONFIG_ENV_OVERWRITE
228 /* Assoiated with the MMC layout defined in mmcops.c */
229 #define CONFIG_ENV_OFFSET 0x400 /* 1 KB */
230 #define CONFIG_ENV_SIZE (0x20000 - 0x400) /* 127 KB */
231 #define CONFIG_DYNAMIC_MMC_DEVNO
232 #endif /* CONFIG_ENV_IS_IN_MMC */
233 #endif /* CONFIG_CMD_MMC */
235 #ifdef CONFIG_ENV_OFFSET_REDUND
236 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":128k@" \
237 xstr(CONFIG_ENV_OFFSET) \
239 xstr(CONFIG_ENV_OFFSET_REDUND) \
240 "(env2),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
242 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":128k@" \
243 xstr(CONFIG_ENV_OFFSET) \
244 "(env),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
247 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
248 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
249 GENERATED_GBL_DATA_SIZE)
251 #endif /* __CONFIG_H */