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/mx28.h>
27 #define CONFIG_MX28 /* i.MX28 SoC */
28 #define CONFIG_MX28_TO1_2
29 #define CONFIG_SYS_HZ 1000 /* Ticks per second */
30 /* ROM loads UBOOT into DRAM */
31 #define CONFIG_SKIP_RELOCATE_UBOOT
34 * Memory configurations
36 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
37 #define PHYS_SDRAM_1 0x40000000 /* Base address */
38 #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
39 #define CONFIG_STACKSIZE 0x00020000 /* 128 KB stack */
40 #define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
41 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Reserved for initial data */
42 #define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start address */
43 #define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
46 * U-Boot general configurations
48 #define CONFIG_SYS_LONGHELP
49 #define CONFIG_DISPLAY_BOARDINFO
50 #define CONFIG_SYS_PROMPT "MX28 U-Boot > "
51 #define CONFIG_SYS_CBSIZE 2048 /* Console I/O buffer size */
52 #define CONFIG_SYS_PBSIZE \
53 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
54 /* Print buffer size */
55 #define CONFIG_SYS_MAXARGS 64 /* Max number of command args */
56 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
57 /* Boot argument buffer size */
58 #define CONFIG_VERSION_VARIABLE /* U-BOOT version */
59 #define CONFIG_AUTO_COMPLETE /* Command auto complete */
60 #define CONFIG_CMDLINE_EDITING /* Command history etc */
62 #define CONFIG_SYS_64BIT_VSPRINTF
67 #define CONFIG_CMDLINE_TAG
68 #define CONFIG_SETUP_MEMORY_TAGS
69 #define CONFIG_BOOTDELAY 3
70 #define CONFIG_BOOTFILE "uImage"
71 #define CONFIG_BOOTARGS "console=ttyAMA0,115200 tx28_base=stkv3" \
72 " tx28_otg_mode=device ro debug panic=1"
73 #define CONFIG_BOOTCOMMAND "run bootcmd_nand"
74 #define CONFIG_LOADADDR 0x40100000
75 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
80 #define CONFIG_EXTRA_ENV_SETTINGS \
81 "bootargs_nand=setenv bootargs ${bootargs} ${mtdparts}" \
82 " root=/dev/mtdblock3" \
83 " rootfstype=jffs2\0" \
84 "nfsroot=/tftpboot/rootfs\0" \
85 "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs" \
86 " ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0" \
87 "bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p3" \
88 " rootwait ip=dhcp\0" \
89 "bootcmd_nand=set autostart yes;run bootargs_nand;" \
91 "bootcmd_net=set autostart yes;run bootargs_nfs; dhcp\0" \
92 "bootcmd_mmc=set autostart yes;run bootargs_mmc;" \
93 " mmc read 0 ${loadaddr} 100 3000\0" \
94 "mtdids=" MTDIDS_DEFAULT "\0" \
95 "mtdparts=" MTDPARTS_DEFAULT "\0" \
98 #define __stringify(s) _stringify(s)
99 #define _stringify(s) #s
101 #define MTD_NAME "gpmi-nand"
102 #define MTDIDS_DEFAULT "nand0=" MTD_NAME
103 #define MTDPARTS_DEFAULT "mtdparts=" MTD_NAME ":128k@" \
104 __stringify(CONFIG_ENV_OFFSET) \
105 "(env),1m@0x40000(u-boot),4m(linux),16m(rootfs),-(userfs)"
110 #define CONFIG_SYS_NO_FLASH
111 #include <config_cmd_default.h>
112 #define CONFIG_ARCH_CPU_INIT
113 #define CONFIG_DISPLAY_CPUINFO
118 #define CONFIG_UARTDBG_CLK 24000000
119 #define CONFIG_BAUDRATE 115200 /* Default baud rate */
120 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
125 #define CONFIG_MXC_FEC
126 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
127 #define CONFIG_FEC0_IOBASE ((volatile void *)REGS_ENET_BASE)
128 #define CONFIG_FEC0_PHY_ADDR 0
129 #define CONFIG_NET_MULTI
130 #define CONFIG_ETH_PRIME
132 #define CONFIG_CMD_MII
133 #define CONFIG_CMD_DHCP
134 #define CONFIG_CMD_PING
135 /* Add for working with "strict" DHCP server */
136 #define CONFIG_BOOTP_SUBNETMASK
137 #define CONFIG_BOOTP_GATEWAY
138 #define CONFIG_BOOTP_DNS
140 #define CONFIG_CMD_MMC
141 #define CONFIG_CMD_NAND
142 #define CONFIG_CMD_MTDPARTS
147 #ifdef CONFIG_CMD_NAND
148 #define CONFIG_MTD_DEVICE
149 #define CONFIG_ENV_IS_IN_NAND
150 #define CONFIG_MXS_NAND
151 #define CONFIG_SYS_MXS_DMA_CHANNEL 4
152 #define CONFIG_SYS_MAX_FLASH_SECT 1024
153 #define CONFIG_SYS_MAX_FLASH_BANKS 1
154 #define CONFIG_SYS_NAND_MAX_CHIPS 1
155 #define CONFIG_SYS_MAX_NAND_DEVICE 1
156 #ifdef CONFIG_ENV_IS_IN_NAND
157 #define CONFIG_ENV_OVERWRITE
158 #define CONFIG_ENV_OFFSET 0x20000
159 #define CONFIG_ENV_SIZE 0x20000 /* 128 KiB */
161 #ifndef CONFIG_SYS_NO_FLASH
162 #define CONFIG_CMD_FLASH
163 #define CONFIG_SYS_NAND_BASE 0xa0000000
165 #define CONFIG_OF_LIBFDT
167 #define CONFIG_SYS_NAND_BASE 0x00000000
168 #define CONFIG_CMD_ROMUPDATE
170 #endif /* CONFIG_CMD_NAND */
175 #ifdef CONFIG_CMD_MMC
176 #ifndef CONFIG_ENV_IS_IN_NAND
177 #define CONFIG_ENV_IS_IN_MMC
180 #define CONFIG_IMX_SSP_MMC /* MMC driver based on SSP */
181 #define CONFIG_GENERIC_MMC
182 #define CONFIG_DOS_PARTITION
183 #define CONFIG_CMD_FAT
184 #define CONFIG_SYS_SSP_MMC_NUM 1
186 #define CONFIG_BOOT_PARTITION_ACCESS
187 #define CONFIG_DOS_PARTITION
188 #define CONFIG_CMD_FAT
189 #define CONFIG_CMD_EXT2
192 * Environments on MMC
194 #ifdef CONFIG_ENV_IS_IN_MMC
195 #define CONFIG_SYS_MMC_ENV_DEV 0
196 #define CONFIG_CMD_ENV
197 #define CONFIG_ENV_OVERWRITE
198 /* Assoiated with the MMC layout defined in mmcops.c */
199 #define CONFIG_ENV_OFFSET 0x400 /* 1 KB */
200 #define CONFIG_ENV_SIZE (0x20000 - 0x400) /* 127 KB */
201 #define CONFIG_DYNAMIC_MMC_DEVNO
202 #endif /* CONFIG_ENV_IS_IN_MMC */
203 #endif /* CONFIG_CMD_MMC */
205 /* The global boot mode will be detected by ROM code and
206 * a boot mode value will be stored at fixed address:
207 * TO1.0 addr 0x0001a7f0
208 * TO1.2 addr 0x00019BF0
210 #ifndef MX28_EVK_TO1_0
211 #define GLOBAL_BOOT_MODE_ADDR 0x00019BF0
213 #define GLOBAL_BOOT_MODE_ADDR 0x0001a7f0
215 #define BOOT_MODE_SD0 0x9
216 #define BOOT_MODE_SD1 0xa
218 #endif /* __MX28_EVK_H */