]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/tx28.h
dd384c594a3a7360021e41baae9778026040d705
[karo-tx-uboot.git] / include / configs / tx28.h
1 /*
2  * Copyright (C) 2010 Freescale Semiconductor, Inc.
3  *
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.
8  *
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.
13  *
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,
17  * MA 02111-1307 USA
18  */
19 #ifndef __CONFIG_H
20 #define __CONFIG_H
21
22 #include <asm/sizes.h>
23 #include <asm/arch/regs-base.h>
24
25 /*
26  * Ka-Ro TX28 board - SoC configuration
27  */
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-40x0"
32 #define CONFIG_SHOW_ACTIVITY
33
34 #define CONFIG_SPL
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_SPL_FIXED_BATT_SUPPLY
42 #define CONFIG_SKIP_LOWLEVEL_INIT
43
44 /*
45  * Memory configurations
46  */
47 #define CONFIG_NR_DRAM_BANKS    1               /* 1 bank of DRAM */
48 #define PHYS_SDRAM_1            0x40000000      /* Base address */
49 #define PHYS_SDRAM_1_SIZE       SZ_128M
50 #define CONFIG_STACKSIZE        0x00010000      /* 128 KB stack */
51 #define CONFIG_SYS_MALLOC_LEN   0x00400000      /* 4 MB for malloc */
52 #define CONFIG_SYS_GBL_DATA_SIZE 128            /* Reserved for initial data */
53 #define CONFIG_SYS_MEMTEST_START 0x40000000     /* Memtest start address */
54 #define CONFIG_SYS_MEMTEST_END   0x40400000     /* 4 MB RAM test */
55
56 /*
57  * U-Boot general configurations
58  */
59 #define CONFIG_SYS_LONGHELP
60 #define CONFIG_SYS_PROMPT       "MX28 U-Boot > "
61 #define CONFIG_SYS_CBSIZE       2048            /* Console I/O buffer size */
62 #define CONFIG_SYS_PBSIZE \
63         (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
64                                                 /* Print buffer size */
65 #define CONFIG_SYS_MAXARGS      64              /* Max number of command args */
66 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE
67                                                 /* Boot argument buffer size */
68 #define CONFIG_VERSION_VARIABLE                 /* U-BOOT version */
69 #define CONFIG_AUTO_COMPLETE                    /* Command auto complete */
70 #define CONFIG_CMDLINE_EDITING                  /* Command history etc */
71
72 #define CONFIG_SYS_64BIT_VSPRINTF
73
74 /*
75  * Boot Linux
76  */
77 #define xstr(s) str(s)
78 #define str(s)  #s
79
80 #define CONFIG_CMDLINE_TAG
81 #define CONFIG_SETUP_MEMORY_TAGS
82 #define CONFIG_BOOTDELAY        3
83 #define CONFIG_ZERO_BOOTDELAY_CHECK
84 #define CONFIG_BOOTFILE         "uImage"
85 #define CONFIG_BOOTARGS         "console=ttyAMA0,115200 tx28_base=stkv3" \
86         " tx28_otg_mode=device ro debug panic=1"
87 #define CONFIG_BOOTCOMMAND      "run bootcmd_nand"
88 #define CONFIG_LOADADDR         0x40100000
89 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
90
91 /*
92  * Extra Environments
93  */
94 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
95         "bootargs_nand=setenv bootargs ${bootargs} ${mtdparts}"         \
96         " root=/dev/mtdblock3"                                          \
97         " rootfstype=jffs2\0"                                           \
98         "nfsroot=/tftpboot/rootfs\0"                                    \
99         "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs"        \
100         " ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"              \
101         "bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p3"  \
102         " rootwait ip=dhcp\0"                                           \
103         "bootcmd_nand=set autostart yes;run bootargs_nand;"             \
104         " nboot linux\0"                                                \
105         "bootcmd_net=set autostart yes;run bootargs_nfs; dhcp\0"        \
106         "bootcmd_mmc=set autostart yes;run bootargs_mmc;"               \
107         " mmc read 0 ${loadaddr} 100 3000\0"                            \
108         "mtdids=" MTDIDS_DEFAULT "\0"                                   \
109         "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
110         "autostart=no\0"
111
112 #define MTD_NAME                        "gpmi-nand"
113 #define MTDIDS_DEFAULT                  "nand0=" MTD_NAME
114
115 /*
116  * U-Boot Commands
117  */
118 #define CONFIG_SYS_NO_FLASH
119 #include <config_cmd_default.h>
120 #define CONFIG_ARCH_CPU_INIT
121 #define CONFIG_DISPLAY_CPUINFO
122
123 /*
124  * Serial Driver
125  */
126 #define CONFIG_PL011_SERIAL
127 #define CONFIG_PL011_CLOCK              24000000
128 #define CONFIG_PL01x_PORTS              { (void *)MXS_UARTDBG_BASE }
129 #define CONFIG_CONS_INDEX               0
130 #define CONFIG_BAUDRATE                 115200          /* Default baud rate */
131 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
132
133 /*
134  * FEC Driver
135  */
136 #define CONFIG_FEC_MXC
137 #ifdef CONFIG_FEC_MXC
138 /* This is required for the FEC driver to work with cache enabled */
139 #define CONFIG_SYS_ARM_CACHE_WRITETHROUGH
140
141 #define CONFIG_FEC_MXC_MULTI
142
143 #define CONFIG_MII
144 #define CONFIG_FEC_XCV_TYPE             RMII
145 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
146 #define CONFIG_NET_MULTI
147 #define CONFIG_ETH_PRIME
148 #define CONFIG_CMD_MII
149 #define CONFIG_CMD_DHCP
150 #define CONFIG_CMD_PING
151 /* Add for working with "strict" DHCP server */
152 #define CONFIG_BOOTP_SUBNETMASK
153 #define CONFIG_BOOTP_GATEWAY
154 #define CONFIG_BOOTP_DNS
155 #endif
156
157 #define CONFIG_CMD_MMC
158 #define CONFIG_CMD_NAND
159 #define CONFIG_CMD_MTDPARTS
160
161 /*
162  * NAND flash driver
163  */
164 #ifdef CONFIG_CMD_NAND
165 #define CONFIG_MTD_DEVICE
166 #define CONFIG_ENV_IS_IN_NAND
167 #define CONFIG_NAND_MXS
168 #define CONFIG_APBH_DMA
169 #define CONFIG_APBH_DMA_BURST
170 #define CONFIG_APBH_DMA_BURST8
171 #define CONFIG_CMD_NAND_TRIMFFS
172 #define CONFIG_SYS_MXS_DMA_CHANNEL      4
173 #define CONFIG_SYS_MAX_FLASH_SECT       1024
174 #define CONFIG_SYS_MAX_FLASH_BANKS      1
175 #define CONFIG_SYS_NAND_MAX_CHIPS       1
176 #define CONFIG_SYS_MAX_NAND_DEVICE      1
177 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
178 #define CONFIG_SYS_NAND_USE_FLASH_BBT
179 #ifdef CONFIG_ENV_IS_IN_NAND
180 #define CONFIG_ENV_OVERWRITE
181 #define CONFIG_ENV_OFFSET               0x20000
182 #define CONFIG_ENV_SIZE                 0x20000 /* 128 KiB */
183 #if 0
184 #define CONFIG_ENV_OFFSET_REDUND        0x40000
185 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
186 #endif
187 #endif
188 #ifndef CONFIG_SYS_NO_FLASH
189 #define CONFIG_CMD_FLASH
190 #define CONFIG_SYS_NAND_BASE            0xa0000000
191 #define CONFIG_FIT
192 #define CONFIG_OF_LIBFDT
193 #else
194 #define CONFIG_SYS_NAND_BASE            0x00000000
195 #define CONFIG_CMD_ROMUPDATE
196 #endif
197 #endif /* CONFIG_CMD_NAND */
198
199 /*
200  * MMC Driver
201  */
202 #ifdef CONFIG_CMD_MMC
203 #ifndef CONFIG_ENV_IS_IN_NAND
204 #define CONFIG_ENV_IS_IN_MMC
205 #endif
206 #define CONFIG_MMC
207 #define CONFIG_GENERIC_MMC
208 #define CONFIG_MXS_MMC
209 #define CONFIG_DOS_PARTITION
210 #define CONFIG_CMD_FAT
211
212 #define CONFIG_BOOT_PARTITION_ACCESS
213 #define CONFIG_DOS_PARTITION
214 #define CONFIG_CMD_FAT
215 #define CONFIG_CMD_EXT2
216
217 /*
218  * Environments on MMC
219  */
220 #ifdef CONFIG_ENV_IS_IN_MMC
221 #define CONFIG_SYS_MMC_ENV_DEV  0
222 #define CONFIG_CMD_ENV
223 #define CONFIG_ENV_OVERWRITE
224 /* Assoiated with the MMC layout defined in mmcops.c */
225 #define CONFIG_ENV_OFFSET               0x400 /* 1 KB */
226 #define CONFIG_ENV_SIZE                 (0x20000 - 0x400) /* 127 KB */
227 #define CONFIG_DYNAMIC_MMC_DEVNO
228 #endif /* CONFIG_ENV_IS_IN_MMC */
229 #endif /* CONFIG_CMD_MMC */
230
231 #ifdef CONFIG_ENV_OFFSET_REDUND
232 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
233         xstr(CONFIG_ENV_OFFSET)                                         \
234         "(env),"                                                        \
235         xstr(CONFIG_ENV_OFFSET_REDUND)                          \
236         "(env2),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
237 #else
238 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
239         xstr(CONFIG_ENV_OFFSET)                                         \
240         "(env),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
241 #endif
242
243 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
244 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
245                                         GENERATED_GBL_DATA_SIZE)
246
247 #endif /* __CONFIG_H */