]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/tx48.h
Remove unused definition IOMUX_SION
[karo-tx-uboot.git] / include / configs / tx48.h
1 /*
2  * tx48.h
3  *
4  * Copyright (C) 2012 Lothar Waßmann <LW@KARO-electronics.de>
5  *
6  * based on: am335x_evm
7  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation version 2.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  */
18
19 #ifndef __TX48_H
20 #define __TX48_H
21
22 #include <config.h>
23 #include <asm/sizes.h>
24
25 /*
26  * Ka-Ro TX48 board - SoC configuration
27  */
28 #define CONFIG_AM33XX
29 #define CONFIG_AM33XX_GPIO
30 #define CONFIG_SYS_HZ                   1000            /* Ticks per second */
31 #define CONFIG_SHOW_ACTIVITY
32 #define CONFIG_DISPLAY_CPUINFO
33 #define CONFIG_DISPLAY_BOARDINFO
34 #define CONFIG_BOARD_LATE_INIT
35 #define CONFIG_SPLASH_SCREEN
36 #define CONFIG_SPLASH_SCREEN_ALIGN
37 #define CONFIG_VIDEO_DA8XX
38 #define DAVINCI_LCD_CNTL_BASE           0x4830e000
39
40 /* LCD Logo and Splash screen support */
41 #define CONFIG_LCD
42 #ifdef CONFIG_LCD
43 #define CONFIG_LCD_LOGO
44 #define LCD_BPP                         LCD_COLOR24
45 #define CONFIG_CMD_BMP
46 #define CONFIG_VIDEO_BMP_RLE8
47 #endif /* CONFIG_LCD */
48
49 /* Clock Defines */
50 #define V_OSCK                          24000000  /* Clock output from T2 */
51 #define V_SCLK                          V_OSCK
52
53 /*
54  * Memory configuration options
55  */
56 #define CONFIG_SYS_SDRAM_DDR3
57 #define CONFIG_NR_DRAM_BANKS            1               /*  1 bank of SDRAM */
58 #define PHYS_SDRAM_1                    0x80000000      /* SDRAM Bank #1 */
59 #define PHYS_SDRAM_1_SIZE               SZ_256M
60 #define CONFIG_MAX_RAM_BANK_SIZE        SZ_1G
61
62 #define CONFIG_STACKSIZE                SZ_64K
63 #define CONFIG_SYS_MALLOC_LEN           SZ_4M
64
65 #define CONFIG_SYS_MEMTEST_START        (PHYS_SDRAM_1 + (64 * 1024 * 1024))
66 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + \
67                                         (8 * 1024 * 1024))
68
69
70 /*
71  * U-Boot general configurations
72  */
73 #define CONFIG_SYS_LONGHELP
74 #define CONFIG_SYS_PROMPT       "TX48 U-Boot > "
75 #define CONFIG_SYS_CBSIZE       2048            /* Console I/O buffer size */
76 #define CONFIG_SYS_PBSIZE \
77         (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
78                                                 /* Print buffer size */
79 #define CONFIG_SYS_MAXARGS      64              /* Max number of command args */
80 #define CONFIG_SYS_BARGSIZE     CONFIG_SYS_CBSIZE
81                                                 /* Boot argument buffer size */
82 #define CONFIG_VERSION_VARIABLE                 /* U-BOOT version */
83 #define CONFIG_AUTO_COMPLETE                    /* Command auto complete */
84 #define CONFIG_CMDLINE_EDITING                  /* Command history etc */
85
86 #define CONFIG_SYS_64BIT_VSPRINTF
87 #define CONFIG_SYS_NO_FLASH
88
89 /*
90  * Flattened Device Tree (FDT) support
91 */
92 #ifdef CONFIG_OF_LIBFDT /* set via cmdline parameter thru boards.cfg */
93 #define CONFIG_FDT_FIXUP_PARTITIONS
94 #define CONFIG_OF_CONTROL
95 #define CONFIG_OF_EMBED
96 #define CONFIG_OF_BOARD_SETUP
97 #define CONFIG_DEFAULT_DEVICE_TREE      tx48
98 #define CONFIG_ARCH_DEVICE_TREE         am33xx
99 #define CONFIG_MACH_TYPE                (-1)
100 #else
101 #ifndef MACH_TYPE_TIAM335EVM
102 #define MACH_TYPE_TIAM335EVM             3589    /* Until the next sync */
103 #endif
104 #define CONFIG_MACH_TYPE         MACH_TYPE_TIAM335EVM
105 #endif
106
107 /*
108  * Boot Linux
109  */
110 #define xstr(s) str(s)
111 #define str(s)  #s
112
113 #define CONFIG_CMDLINE_TAG
114 #define CONFIG_SETUP_MEMORY_TAGS
115 #define CONFIG_BOOTDELAY        3
116 #define CONFIG_ZERO_BOOTDELAY_CHECK
117 #define CONFIG_SYS_AUTOLOAD     "no"
118 #define CONFIG_BOOTFILE         "uImage"
119 #define CONFIG_BOOTARGS         "console=ttymO0,115200 ro debug panic=1"
120 #define CONFIG_BOOTCOMMAND      "run bootcmd_nand"
121 #define CONFIG_LOADADDR         0x81000000
122 #define CONFIG_SYS_LOAD_ADDR    CONFIG_LOADADDR
123 #define CONFIG_U_BOOT_IMG_SIZE  SZ_1M
124 #define CONFIG_HW_WATCHDOG
125
126 /*
127  * Extra Environments
128  */
129 #ifdef CONFIG_OF_LIBFDT
130 #define CONFIG_FDT_FIXUP_PARTITIONS
131
132 #define TX48_BOOTM_CMD                                                  \
133         "bootm_cmd=fdt addr ${fdtcontroladdr};"                         \
134         "fdt board;"                                                    \
135         "bootm ${loadaddr} - ${fdtaddr}\0"
136 #else
137 #define TX48_BOOTM_CMD                                                  \
138         "bootm_cmd=bootm\0"
139 #endif
140
141 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
142         "autostart=no\0"                                                \
143         "baseboard=stk5-v3\0"                                           \
144         "bootargs_mmc=run default_bootargs;set bootargs ${bootargs}"    \
145         " root=/dev/mmcblk0p2 rootwait\0"                               \
146         "bootargs_nand=run default_bootargs;set bootargs ${bootargs}"   \
147         " root=/dev/mtdblock4 rootfstype=jffs2\0"               \
148         "nfsroot=/tftpboot/rootfs\0"                                    \
149         "bootargs_nfs=run default_bootargs;set bootargs ${bootargs}"    \
150         " root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},nolock\0"\
151         "bootcmd_mmc=set autostart no;run bootargs_mmc;"                \
152         "fatload mmc 0 ${loadaddr} uImage;run bootm_cmd\0"              \
153         "bootcmd_nand=set autostart no;run bootargs_nand;"              \
154         "nboot linux;run bootm_cmd\0"                                   \
155         "bootcmd_net=set autostart no;run bootargs_nfs;dhcp;"           \
156         "run bootm_cmd\0"                                               \
157         TX48_BOOTM_CMD                                                  \
158         "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
159         " ${mtdparts} video=${video_mode} ${append_bootargs}\0"         \
160         "fdtcontroladdr=80004000\0"                                     \
161         "mtdids=" MTDIDS_DEFAULT "\0"                                   \
162         "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
163         "touchpanel=tsc2007\0"                                          \
164         "video_mode=640x480MR-24@60\0"
165
166 #define MTD_NAME                        "omap2-nand.0"
167 #define MTDIDS_DEFAULT                  "nand0=" MTD_NAME
168
169 /*
170  * U-Boot Commands
171  */
172 #include <config_cmd_default.h>
173 #define CONFIG_CMD_CACHE
174 #define CONFIG_CMD_MMC
175 #define CONFIG_CMD_NAND
176 #define CONFIG_CMD_MTDPARTS
177 #define CONFIG_CMD_BOOTCE
178
179 /*
180  * Serial Driver
181  */
182 #define CONFIG_SYS_NS16550
183 #define CONFIG_SYS_NS16550_SERIAL
184 #define CONFIG_SYS_NS16550_REG_SIZE     (-4)
185 #define CONFIG_SYS_NS16550_CLK          48000000
186 #define CONFIG_SYS_NS16550_COM1         0x44e09000      /* UART0 */
187
188 /*
189  * Ethernet Driver
190  */
191 #ifdef CONFIG_CMD_NET
192 #define CONFIG_DRIVER_TI_CPSW
193 #define CONFIG_MII
194 #define CONFIG_CMD_MII
195 #define CONFIG_CMD_DHCP
196 #define CONFIG_CMD_PING
197 #define CONFIG_BOOTP_DNS
198 #define CONFIG_BOOTP_DNS2
199 #define CONFIG_BOOTP_GATEWAY
200 #define CONFIG_BOOTP_SUBNETMASK
201
202 #define CONFIG_NET_RETRY_COUNT         10
203 #define CONFIG_NET_MULTI
204 #define CONFIG_PHY_GIGE
205 #endif
206
207 /*
208  * NAND flash driver
209  */
210 #ifdef CONFIG_CMD_NAND
211 #define CONFIG_MTD_DEVICE
212 #define CONFIG_ENV_IS_IN_NAND
213 #define CONFIG_NAND_AM33XX
214 #define GPMC_NAND_ECC_LP_x16_LAYOUT
215 #define CONFIG_SYS_NAND_U_BOOT_OFFS     0x20000
216 #define CONFIG_SYS_NAND_PAGE_SIZE       2048
217 #define CONFIG_SYS_NAND_OOBSIZE         64
218 #define CONFIG_SYS_NAND_ECCSIZE         512
219 #define CONFIG_SYS_NAND_ECCBYTES        14
220 #define CONFIG_SYS_NAND_ECCSTEPS        4
221
222 #define CONFIG_SYS_MAX_FLASH_SECT       1024
223 #define CONFIG_SYS_MAX_FLASH_BANKS      1
224 #define CONFIG_SYS_NAND_MAX_CHIPS       1
225 #define CONFIG_SYS_MAX_NAND_DEVICE      1
226 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
227 #define CONFIG_SYS_NAND_USE_FLASH_BBT
228 #ifdef CONFIG_ENV_IS_IN_NAND
229 #define CONFIG_ENV_OVERWRITE
230 #define CONFIG_ENV_OFFSET               (CONFIG_U_BOOT_IMG_SIZE + CONFIG_SYS_NAND_U_BOOT_OFFS)
231 #define CONFIG_ENV_SIZE                 0x20000 /* 128 KiB */
232 #if 0
233 #define CONFIG_ENV_OFFSET_REDUND        0x20000
234 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
235 #endif
236 #endif
237 #define CONFIG_SYS_NAND_BASE            0x08000000 /* must be defined but value is irrelevant */
238 #define NAND_BASE                       CONFIG_SYS_NAND_BASE
239 #endif /* CONFIG_CMD_NAND */
240
241 /*
242  * MMC Driver
243  */
244 #ifdef CONFIG_CMD_MMC
245 #ifndef CONFIG_ENV_IS_IN_NAND
246 #define CONFIG_ENV_IS_IN_MMC
247 #endif
248 #define CONFIG_MMC
249 #define CONFIG_GENERIC_MMC
250 #define CONFIG_OMAP_HSMMC
251 #define CONFIG_OMAP_MMC_DEV_1
252
253 #define CONFIG_BOOT_PARTITION_ACCESS
254 #define CONFIG_DOS_PARTITION
255 #define CONFIG_CMD_FAT
256 #define CONFIG_CMD_EXT2
257
258 /*
259  * Environments on MMC
260  */
261 #ifdef CONFIG_ENV_IS_IN_MMC
262 #define CONFIG_SYS_MMC_ENV_DEV  0
263 #define CONFIG_ENV_OVERWRITE
264 /* Associated with the MMC layout defined in mmcops.c */
265 #define CONFIG_ENV_OFFSET               0x400 /* 1 KB */
266 #define CONFIG_ENV_SIZE                 (0x20000 - 0x400) /* 127 KB */
267 #define CONFIG_DYNAMIC_MMC_DEVNO
268 #endif /* CONFIG_ENV_IS_IN_MMC */
269 #endif /* CONFIG_CMD_MMC */
270
271 #ifdef CONFIG_ENV_OFFSET_REDUND
272 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":"        \
273         "128k(u-boot-spl),"                                             \
274         "1m(u-boot),"                                                   \
275         xstr(CONFIG_ENV_SIZE)                                           \
276         "(env),"                                                        \
277         xstr(CONFIG_ENV_SIZE)                                           \
278         "(env2),4m(linux),16m(rootfs),-(userfs)"
279 #else
280 #define MTDPARTS_DEFAULT                "mtdparts=" MTD_NAME ":"        \
281         "128k(u-boot-spl),"                                             \
282         "1m(u-boot),"                                                   \
283         xstr(CONFIG_ENV_SIZE)                                           \
284         "(env),4m(linux),16m(rootfs),-(userfs)"
285 #endif
286
287 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM_1
288 #define SRAM0_SIZE                      SZ_64K
289 #define CONFIG_SYS_INIT_SP_ADDR         0x4030B7FC
290 #define CONFIG_SPL_STACK                CONFIG_SYS_INIT_SP_ADDR
291
292  /* Platform/Board specific defs */
293 #define CONFIG_SYS_TIMERBASE            0x48040000      /* Use Timer2 */
294 #define CONFIG_SYS_PTV                  2       /* Divisor: 2^(PTV+1) => 8 */
295
296 #define CONFIG_BAUDRATE         115200
297 #define CONFIG_SYS_BAUDRATE_TABLE       { 110, 300, 600, 1200, 2400, \
298                 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
299
300 /*
301  * select serial console configuration
302  */
303 #define CONFIG_CONS_INDEX               1
304 #define CONFIG_SYS_CONSOLE_INFO_QUIET
305
306 /* Defines for SPL */
307 #define CONFIG_SPL
308 #define CONFIG_SPL_BOARD_INIT
309 #define CONFIG_SPL_TEXT_BASE            0x402F0400
310 #define CONFIG_SPL_MAX_SIZE             (46 * 1024)
311 #define CONFIG_SPL_GPIO_SUPPORT
312 #ifdef CONFIG_NAND_AM33XX
313 #define CONFIG_SPL_NAND_SUPPORT
314 #define CONFIG_SPL_NAND_SIMPLE
315 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
316 #define CONFIG_SYS_NAND_PAGE_COUNT      (CONFIG_SYS_NAND_BLOCK_SIZE /   \
317                                         CONFIG_SYS_NAND_PAGE_SIZE)
318 #define CONFIG_SYS_NAND_BLOCK_SIZE      SZ_128K
319 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   NAND_LARGE_BADBLOCK_POS
320 #define CONFIG_SYS_NAND_ECCPOS          { 2, 3, 4, 5, 6, 7, 8, 9, \
321                                          10, 11, 12, 13, 14, 15, 16, 17, \
322                                          18, 19, 20, 21, 22, 23, 24, 25, \
323                                          26, 27, 28, 29, 30, 31, 32, 33, \
324                                          34, 35, 36, 37, 38, 39, 40, 41, \
325                                          42, 43, 44, 45, 46, 47, 48, 49, \
326                                          50, 51, 52, 53, 54, 55, 56, 57, }
327 #endif
328
329 #define CONFIG_SPL_BSS_START_ADDR       0x80000000
330 #define CONFIG_SPL_BSS_MAX_SIZE         0x80000         /* 512 KB */
331
332 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
333 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
334 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION    1
335 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME        "u-boot-tx48.img"
336 #define CONFIG_SPL_MMC_SUPPORT
337 #define CONFIG_SPL_FAT_SUPPORT
338 #define CONFIG_SPL_I2C_SUPPORT
339
340 #define CONFIG_SPL_LIBCOMMON_SUPPORT
341 #define CONFIG_SPL_LIBDISK_SUPPORT
342 #define CONFIG_SPL_LIBGENERIC_SUPPORT
343 #define CONFIG_SPL_SERIAL_SUPPORT
344 #define CONFIG_SPL_YMODEM_SUPPORT
345 #define CONFIG_SPL_LDSCRIPT             "$(CPUDIR)/omap-common/u-boot-spl.lds"
346
347 /*
348  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
349  * 64 bytes before this address should be set aside for u-boot.img's
350  * header. That is 0x800FFFC0--0x80100000 should not be used for any
351  * other needs.
352  */
353 #define CONFIG_SYS_TEXT_BASE            0x80800000
354 #define CONFIG_SYS_SPL_MALLOC_START     0x80208000
355 #define CONFIG_SYS_SPL_MALLOC_SIZE      0x100000
356
357 /* Since SPL did pll and ddr initialization for us,
358  * we don't need to do it twice.
359  */
360 #ifndef CONFIG_SPL_BUILD
361 #define CONFIG_SKIP_LOWLEVEL_INIT
362 #endif
363
364 /* Unsupported features */
365 #undef CONFIG_USE_IRQ
366
367 #endif  /* __TX48_H */