]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/tx28s.h
Update TX28 support and add support for TX28S AKA TX28-4130
[karo-tx-uboot.git] / include / configs / tx28s.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_TX28_S                           /* TX28 SoM variant */
30 #define CONFIG_MXS_GPIO                         /* GPIO control */
31 #define CONFIG_SYS_HZ           1000            /* Ticks per second */
32 #define CONFIG_IDENT_STRING     "\nBoard: Ka-Ro TX28-4130"
33 #define CONFIG_SHOW_ACTIVITY
34
35 #define CONFIG_SPL
36 #define CONFIG_SPL_NO_CPU_SUPPORT_CODE
37 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
38 #define CONFIG_SPL_LDSCRIPT     "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
39 #define CONFIG_SPL_LIBCOMMON_SUPPORT
40 #define CONFIG_SPL_LIBGENERIC_SUPPORT
41 #define CONFIG_SPL_GPIO_SUPPORT
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_64M
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 IMX_FEC_BASE                    MXS_ENET0_BASE
142 #define CONFIG_FEC_MXC_PHYADDR          0x00
143
144 #define CONFIG_MII
145 #define CONFIG_FEC_XCV_TYPE             RMII
146 #define CONFIG_GET_FEC_MAC_ADDR_FROM_IIM
147 #define CONFIG_NET_MULTI
148 #define CONFIG_ETH_PRIME
149 #define CONFIG_CMD_MII
150 #define CONFIG_CMD_DHCP
151 #define CONFIG_CMD_PING
152 /* Add for working with "strict" DHCP server */
153 #define CONFIG_BOOTP_SUBNETMASK
154 #define CONFIG_BOOTP_GATEWAY
155 #define CONFIG_BOOTP_DNS
156 #endif
157
158 #define CONFIG_CMD_MMC
159 #define CONFIG_CMD_NAND
160 #define CONFIG_CMD_MTDPARTS
161
162 /*
163  * NAND flash driver
164  */
165 #ifdef CONFIG_CMD_NAND
166 #define CONFIG_MTD_DEVICE
167 #define CONFIG_ENV_IS_IN_NAND
168 #define CONFIG_NAND_MXS
169 #define CONFIG_APBH_DMA
170 #define CONFIG_APBH_DMA_BURST
171 #define CONFIG_APBH_DMA_BURST8
172 #define CONFIG_CMD_NAND_TRIMFFS
173 #define CONFIG_SYS_MXS_DMA_CHANNEL      4
174 #define CONFIG_SYS_MAX_FLASH_SECT       1024
175 #define CONFIG_SYS_MAX_FLASH_BANKS      1
176 #define CONFIG_SYS_NAND_MAX_CHIPS       1
177 #define CONFIG_SYS_MAX_NAND_DEVICE      1
178 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
179 #define CONFIG_SYS_NAND_USE_FLASH_BBT
180 #ifdef CONFIG_ENV_IS_IN_NAND
181 #define CONFIG_ENV_OVERWRITE
182 #define CONFIG_ENV_OFFSET               0x20000
183 #define CONFIG_ENV_SIZE                 0x20000 /* 128 KiB */
184 #if 0
185 #define CONFIG_ENV_OFFSET_REDUND        0x40000
186 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
187 #endif
188 #endif
189 #ifndef CONFIG_SYS_NO_FLASH
190 #define CONFIG_CMD_FLASH
191 #define CONFIG_SYS_NAND_BASE            0xa0000000
192 #define CONFIG_FIT
193 #define CONFIG_OF_LIBFDT
194 #else
195 #define CONFIG_SYS_NAND_BASE            0x00000000
196 #define CONFIG_CMD_ROMUPDATE
197 #endif
198 #endif /* CONFIG_CMD_NAND */
199
200 /*
201  * MMC Driver
202  */
203 #ifdef CONFIG_CMD_MMC
204 #ifndef CONFIG_ENV_IS_IN_NAND
205 #define CONFIG_ENV_IS_IN_MMC
206 #endif
207 #define CONFIG_MMC
208 #define CONFIG_GENERIC_MMC
209 #define CONFIG_MXS_MMC
210 #define CONFIG_DOS_PARTITION
211 #define CONFIG_CMD_FAT
212
213 #define CONFIG_BOOT_PARTITION_ACCESS
214 #define CONFIG_DOS_PARTITION
215 #define CONFIG_CMD_FAT
216 #define CONFIG_CMD_EXT2
217
218 /*
219  * Environments on MMC
220  */
221 #ifdef CONFIG_ENV_IS_IN_MMC
222 #define CONFIG_SYS_MMC_ENV_DEV  0
223 #define CONFIG_CMD_ENV
224 #define CONFIG_ENV_OVERWRITE
225 /* Assoiated with the MMC layout defined in mmcops.c */
226 #define CONFIG_ENV_OFFSET               0x400 /* 1 KB */
227 #define CONFIG_ENV_SIZE                 (0x20000 - 0x400) /* 127 KB */
228 #define CONFIG_DYNAMIC_MMC_DEVNO
229 #endif /* CONFIG_ENV_IS_IN_MMC */
230 #endif /* CONFIG_CMD_MMC */
231
232 #ifdef CONFIG_ENV_OFFSET_REDUND
233 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
234         xstr(CONFIG_ENV_OFFSET)                                         \
235         "(env),"                                                        \
236         xstr(CONFIG_ENV_OFFSET_REDUND)                          \
237         "(env2),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
238 #else
239 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
240         xstr(CONFIG_ENV_OFFSET)                                         \
241         "(env),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
242 #endif
243
244 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
245 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
246                                         GENERATED_GBL_DATA_SIZE)
247
248 #endif /* __CONFIG_H */