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/arch/regs-base.h>
25 * Ka-Ro TX28 board - SoC configuration
27 #define CONFIG_MX28 /* i.MX28 SoC */
28 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
31 #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
32 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
33 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
34 #define CONFIG_SPL_LIBCOMMON_SUPPORT
35 #define CONFIG_SPL_LIBGENERIC_SUPPORT
38 * Memory configurations
40 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
41 #define PHYS_SDRAM_1 0x40000000 /* Base address */
42 #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
43 #define CONFIG_STACKSIZE 0x00010000 /* 128 KB stack */
44 #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
45 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Reserved for initial data */
46 #define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start address */
47 #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
50 * U-Boot general configurations
52 #define CONFIG_SYS_LONGHELP
53 #define CONFIG_DISPLAY_BOARDINFO
54 #define CONFIG_SYS_PROMPT "MX28 U-Boot > "
55 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
56 #define CONFIG_SYS_PBSIZE \
57 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
58 /* Print buffer size */
59 #define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
60 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
61 /* Boot argument buffer size */
62 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
63 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
64 #define CONFIG_CMDLINE_EDITING /* Command history etc */
66 #define CONFIG_SYS_64BIT_VSPRINTF
71 #define xstr(s) str(s)
74 #define CONFIG_CMDLINE_TAG
75 #define CONFIG_SETUP_MEMORY_TAGS
76 #define CONFIG_BOOTDELAY 3
77 #define CONFIG_BOOTFILE "uImage"
78 #define CONFIG_BOOTARGS "console=ttyAMA0,115200 tx28_base=stkv3" \
79 " tx28_otg_mode=device ro debug panic=1"
80 #define CONFIG_BOOTCOMMAND "run bootcmd_nand"
81 #define CONFIG_LOADADDR 0x40100000
82 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
87 #define CONFIG_EXTRA_ENV_SETTINGS \
88 "bootargs_nand=setenv bootargs ${bootargs} ${mtdparts}" \
89 " root=/dev/mtdblock3" \
90 " rootfstype=jffs2\0" \
91 "nfsroot=/tftpboot/rootfs\0" \
92 "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs" \
93 " ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0" \
94 "bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p3" \
95 " rootwait ip=dhcp\0" \
96 "bootcmd_nand=set autostart yes;run bootargs_nand;" \
98 "bootcmd_net=set autostart yes;run bootargs_nfs; dhcp\0" \
99 "bootcmd_mmc=set autostart yes;run bootargs_mmc;" \
100 " mmc read 0 ${loadaddr} 100 3000\0" \
101 "mtdids=" MTDIDS_DEFAULT "\0" \
102 "mtdparts=" MTDPARTS_DEFAULT "\0" \
105 #define MTD_NAME "gpmi-nand"
106 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
107 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":128k@" \
108 xstr(CONFIG_ENV_OFFSET) \
109 "(env),1m@0x40000(u-boot),4m(linux),16m(rootfs),-(userfs)"
114 #define CONFIG_SYS_NO_FLASH
115 #include <config_cmd_default.h>
116 #define CONFIG_ARCH_CPU_INIT
117 #define CONFIG_DISPLAY_CPUINFO
122 #define CONFIG_PL011_SERIAL
123 #define CONFIG_PL011_CLOCK 24000000
124 #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
125 #define CONFIG_CONS_INDEX 0
126 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
127 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
132 #define CONFIG_MXC_FEC
133 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
134 #define CONFIG_FEC0_IOBASE ((volatile void *)REGS_ENET_BASE)
135 #define CONFIG_FEC0_PHY_ADDR 0
136 #define CONFIG_NET_MULTI
137 #define CONFIG_ETH_PRIME
139 #define CONFIG_CMD_MII
140 #define CONFIG_CMD_DHCP
141 #define CONFIG_CMD_PING
142 /* Add for working with "strict" DHCP server */
143 #define CONFIG_BOOTP_SUBNETMASK
144 #define CONFIG_BOOTP_GATEWAY
145 #define CONFIG_BOOTP_DNS
147 #define CONFIG_CMD_MMC
148 #define CONFIG_CMD_NAND
149 #define CONFIG_CMD_MTDPARTS
154 #ifdef CONFIG_CMD_NAND
155 #define CONFIG_MTD_DEVICE
156 #define CONFIG_ENV_IS_IN_NAND
157 #define CONFIG_MXS_NAND
158 #define CONFIG_CMD_NAND_TRIMFFS
159 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
160 #define CONFIG_SYS_MAX_FLASH_SECT 1024
161 #define CONFIG_SYS_MAX_FLASH_BANKS 1
162 #define CONFIG_SYS_NAND_MAX_CHIPS 1
163 #define CONFIG_SYS_MAX_NAND_DEVICE 1
164 #ifdef CONFIG_ENV_IS_IN_NAND
165 #define CONFIG_ENV_OVERWRITE
166 #define CONFIG_ENV_OFFSET 0x20000
167 #define CONFIG_ENV_SIZE 0x20000 /* 128 KiB */
169 #ifndef CONFIG_SYS_NO_FLASH
170 #define CONFIG_CMD_FLASH
171 #define CONFIG_SYS_NAND_BASE 0xa0000000
173 #define CONFIG_OF_LIBFDT
175 #define CONFIG_SYS_NAND_BASE 0x00000000
176 #define CONFIG_CMD_ROMUPDATE
178 #endif /* CONFIG_CMD_NAND */
183 #ifdef CONFIG_CMD_MMC
184 #ifndef CONFIG_ENV_IS_IN_NAND
185 #define CONFIG_ENV_IS_IN_MMC
188 #define CONFIG_IMX_SSP_MMC /* MMC driver based on SSP */
189 #define CONFIG_GENERIC_MMC
190 #define CONFIG_DOS_PARTITION
191 #define CONFIG_CMD_FAT
192 #define CONFIG_SYS_SSP_MMC_NUM 1
194 #define CONFIG_BOOT_PARTITION_ACCESS
195 #define CONFIG_DOS_PARTITION
196 #define CONFIG_CMD_FAT
197 #define CONFIG_CMD_EXT2
200 * Environments on MMC
202 #ifdef CONFIG_ENV_IS_IN_MMC
203 #define CONFIG_SYS_MMC_ENV_DEV 0
204 #define CONFIG_CMD_ENV
205 #define CONFIG_ENV_OVERWRITE
206 /* Assoiated with the MMC layout defined in mmcops.c */
207 #define CONFIG_ENV_OFFSET 0x400 /* 1 KB */
208 #define CONFIG_ENV_SIZE (0x20000 - 0x400) /* 127 KB */
209 #define CONFIG_DYNAMIC_MMC_DEVNO
210 #endif /* CONFIG_ENV_IS_IN_MMC */
211 #endif /* CONFIG_CMD_MMC */
213 /* The global boot mode will be detected by ROM code and
214 * a boot mode value will be stored at fixed address:
215 * TO1.0 addr 0x0001a7f0
216 * TO1.2 addr 0x00019BF0
218 #ifndef MX28_EVK_TO1_0
219 #define GLOBAL_BOOT_MODE_ADDR 0x00019BF0
221 #define GLOBAL_BOOT_MODE_ADDR 0x0001a7f0
223 #define BOOT_MODE_SD0 0x9
224 #define BOOT_MODE_SD1 0xa
226 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
227 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
228 GENERATED_GBL_DATA_SIZE)
230 #endif /* __CONFIG_H */