]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/tx28.h
- add CONFIG_SYS_SPL_VDDD_VAL and CONFIG_SYS_SPL_BATT_BO_LEVEL
[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-40xx"
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_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
45
46 /*
47  * Memory configurations
48  */
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 */
57
58 /*
59  * U-Boot general configurations
60  */
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 */
73
74 #define CONFIG_SYS_64BIT_VSPRINTF
75
76 /*
77  * Boot Linux
78  */
79 #define xstr(s) str(s)
80 #define str(s)  #s
81
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
92
93 /*
94  * Extra Environments
95  */
96 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
97         "autostart=no\0"                                                \
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;"             \
101         " nboot linux\0"                                                \
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"                               \
114         "video_mode=VGA\0"
115
116 #define MTD_NAME                        "gpmi-nand"
117 #define MTDIDS_DEFAULT                  "nand0=" MTD_NAME
118
119 /*
120  * U-Boot Commands
121  */
122 #define CONFIG_SYS_NO_FLASH
123 #include <config_cmd_default.h>
124 #define CONFIG_ARCH_CPU_INIT
125 #define CONFIG_DISPLAY_CPUINFO
126
127 /*
128  * Serial Driver
129  */
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 }
136
137 /*
138  * FEC Driver
139  */
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
144
145 #define CONFIG_FEC_MXC_MULTI
146
147 #define CONFIG_MII
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
159 #endif
160
161 #define CONFIG_CMD_MMC
162 #define CONFIG_CMD_NAND
163 #define CONFIG_CMD_MTDPARTS
164
165 /*
166  * NAND flash driver
167  */
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 */
187 #if 0
188 #define CONFIG_ENV_OFFSET_REDUND        0x40000
189 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
190 #endif
191 #endif
192 #ifndef CONFIG_SYS_NO_FLASH
193 #define CONFIG_CMD_FLASH
194 #define CONFIG_SYS_NAND_BASE            0xa0000000
195 #define CONFIG_FIT
196 #define CONFIG_OF_LIBFDT
197 #else
198 #define CONFIG_SYS_NAND_BASE            0x00000000
199 #define CONFIG_CMD_ROMUPDATE
200 #endif
201 #endif /* CONFIG_CMD_NAND */
202
203 /*
204  * MMC Driver
205  */
206 #ifdef CONFIG_CMD_MMC
207 #ifndef CONFIG_ENV_IS_IN_NAND
208 #define CONFIG_ENV_IS_IN_MMC
209 #endif
210 #define CONFIG_MMC
211 #define CONFIG_GENERIC_MMC
212 #define CONFIG_MXS_MMC
213 #define CONFIG_DOS_PARTITION
214 #define CONFIG_CMD_FAT
215
216 #define CONFIG_BOOT_PARTITION_ACCESS
217 #define CONFIG_DOS_PARTITION
218 #define CONFIG_CMD_FAT
219 #define CONFIG_CMD_EXT2
220
221 /*
222  * Environments on MMC
223  */
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 */
234
235 #ifdef CONFIG_ENV_OFFSET_REDUND
236 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
237         xstr(CONFIG_ENV_OFFSET)                                         \
238         "(env),"                                                        \
239         xstr(CONFIG_ENV_OFFSET_REDUND)                          \
240         "(env2),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
241 #else
242 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":128k@"   \
243         xstr(CONFIG_ENV_OFFSET)                                         \
244         "(env),1m(u-boot),4m(linux),16m(rootfs),-(userfs)"
245 #endif
246
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)
250
251 #endif /* __CONFIG_H */