]> git.sur5r.net Git - u-boot/blob - include/configs/titanium.h
1b409f69c12d485bb9068a4320d6f399e4cf1663
[u-boot] / include / configs / titanium.h
1 /*
2  * Copyright (C) 2013 Stefan Roese <sr@denx.de>
3  *
4  * Configuration settings for the ProjectionDesign / Barco
5  * Titanium board.
6  *
7  * Based on mx6qsabrelite.h which is:
8  * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
9  *
10  * SPDX-License-Identifier:     GPL-2.0+
11  */
12
13 #ifndef __CONFIG_H
14 #define __CONFIG_H
15
16 #include "mx6_common.h"
17
18 #define CONFIG_MX6Q
19
20 #define MACH_TYPE_TITANIUM              3769
21 #define CONFIG_MACH_TYPE                MACH_TYPE_TITANIUM
22
23 #define CONFIG_CMDLINE_TAG
24 #define CONFIG_SETUP_MEMORY_TAGS
25 #define CONFIG_INITRD_TAG
26 #define CONFIG_REVISION_TAG
27
28 /* Size of malloc() pool */
29 #define CONFIG_SYS_MALLOC_LEN           (2 * 1024 * 1024)
30
31 #define CONFIG_BOARD_EARLY_INIT_F
32 #define CONFIG_MISC_INIT_R
33 #define CONFIG_MXC_GPIO
34
35 #define CONFIG_MXC_UART
36 #define CONFIG_MXC_UART_BASE            UART1_BASE
37
38 /* I2C Configs */
39 #define CONFIG_CMD_I2C
40 #define CONFIG_SYS_I2C
41 #define CONFIG_SYS_I2C_MXC
42 #define CONFIG_SYS_I2C_MXC_I2C3         /* enable I2C bus 3 */
43 #define CONFIG_SYS_I2C_SPEED            100000
44
45 /* MMC Configs */
46 #define CONFIG_FSL_ESDHC
47 #define CONFIG_FSL_USDHC
48 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
49 #define CONFIG_SYS_FSL_USDHC_NUM        1
50
51 #define CONFIG_MMC
52 #define CONFIG_CMD_MMC
53 #define CONFIG_GENERIC_MMC
54 #define CONFIG_BOUNCE_BUFFER
55 #define CONFIG_CMD_EXT2
56 #define CONFIG_CMD_FAT
57 #define CONFIG_DOS_PARTITION
58
59 #define CONFIG_CMD_PING
60 #define CONFIG_CMD_DHCP
61 #define CONFIG_CMD_MII
62 #define CONFIG_CMD_NET
63 #define CONFIG_FEC_MXC
64 #define CONFIG_MII
65 #define IMX_FEC_BASE                    ENET_BASE_ADDR
66 #define CONFIG_FEC_XCV_TYPE             RGMII
67 #define CONFIG_FEC_MXC_PHYADDR          4
68 #define CONFIG_PHYLIB
69 #define CONFIG_PHY_MICREL
70 #define CONFIG_PHY_MICREL_KSZ9021
71
72 /* USB Configs */
73 #define CONFIG_CMD_USB
74 #define CONFIG_CMD_FAT
75 #define CONFIG_USB_EHCI
76 #define CONFIG_USB_EHCI_MX6
77 #define CONFIG_USB_STORAGE
78 #define CONFIG_MXC_USB_PORT     1
79 #define CONFIG_MXC_USB_PORTSC   (PORT_PTS_UTMI | PORT_PTS_PTW)
80 #define CONFIG_MXC_USB_FLAGS    0
81
82 /* Miscellaneous commands */
83 #define CONFIG_CMD_BMODE
84
85 /* allow to overwrite serial and ethaddr */
86 #define CONFIG_ENV_OVERWRITE
87 #define CONFIG_CONS_INDEX               1
88 #define CONFIG_BAUDRATE                 115200
89
90 /* Command definition */
91
92 #define CONFIG_BOOTDELAY                3
93
94 #define CONFIG_LOADADDR                 0x12000000
95 #define CONFIG_SYS_TEXT_BASE            0x17800000
96
97 #define CONFIG_SYS_MEMTEST_START        0x10000000
98 #define CONFIG_SYS_MEMTEST_END          (CONFIG_SYS_MEMTEST_START + (500 << 20))
99
100 #define CONFIG_HOSTNAME                 titanium
101 #define CONFIG_UBI_PART                 ubi
102 #define CONFIG_UBIFS_VOLUME             rootfs0
103
104 #define MTDIDS_DEFAULT          "nand0=gpmi-nand"
105 #define MTDPARTS_DEFAULT        "mtdparts=gpmi-nand:16M(uboot),512k(env1)," \
106                                 "512k(env2),-(ubi)"
107
108 #define CONFIG_EXTRA_ENV_SETTINGS \
109         "kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0"              \
110         "kernel_fs=/boot/uImage\0"                                      \
111         "kernel_addr=11000000\0"                                        \
112         "dtb=" __stringify(CONFIG_HOSTNAME) "/"                         \
113                 __stringify(CONFIG_HOSTNAME) ".dtb\0"                   \
114         "dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0"           \
115         "dtb_addr=12800000\0"                                           \
116         "script=boot.scr\0" \
117         "uimage=uImage\0" \
118         "console=ttymxc0\0" \
119         "baudrate=115200\0" \
120         "fdt_high=0xffffffff\0"   \
121         "initrd_high=0xffffffff\0" \
122         "mmcdev=0\0" \
123         "mmcpart=1\0" \
124         "uimage=uImage\0" \
125         "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
126                 " ${script}\0" \
127         "bootscript=echo Running bootscript from mmc ...; source\0" \
128         "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
129         "mmcroot=/dev/mmcblk0p2\0" \
130         "mmcargs=setenv bootargs console=${console},${baudrate} " \
131                 "root=${mmcroot} rootwait rw\0" \
132         "bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
133                 " ${uimage}; bootm\0" \
134         "addip=setenv bootargs ${bootargs} "                            \
135                 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
136                 ":${hostname}:${netdev}:off panic=1\0"                  \
137         "addcon=setenv bootargs ${bootargs} console=ttymxc0,"           \
138                 "${baudrate}\0"                                         \
139         "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
140         "rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0"       \
141         "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
142                 "nfsroot=${serverip}:${rootpath}\0"                     \
143         "ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0"            \
144         "part=" __stringify(CONFIG_UBI_PART) "\0"                       \
145         "boot_vol=0\0"                                                  \
146         "vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0"                    \
147         "load_ubifs=tftp ${kernel_addr} ${ubifs}\0"                     \
148         "update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}" \
149                 " ${filesize}\0"                                        \
150         "upd_ubifs=run load_ubifs update_ubifs\0"                       \
151         "init_ubi=nand erase.part ubi;ubi part ${part};"                \
152                 "ubi create ${vol} c800000\0"                           \
153         "mtdids=" MTDIDS_DEFAULT "\0"                                   \
154         "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
155         "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip"         \
156                 " addcon addmtd;"                                       \
157                 "bootm ${kernel_addr} - ${dtb_addr}\0"                  \
158         "ubifsargs=set bootargs ubi.mtd=ubi "                           \
159                 "root=ubi:rootfs${boot_vol} rootfstype=ubifs\0"         \
160         "ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0"   \
161         "ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};"             \
162                 "ubifsload ${dtb_addr} ${dtb_fs};\0"                    \
163         "nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \
164                 "addmtd;bootm ${kernel_addr} - ${dtb_addr}\0"           \
165         "load_kernel=tftp ${kernel_addr} ${kernel}\0"                   \
166         "load_dtb=tftp ${dtb_addr} ${dtb}\0"                            \
167         "net_nfs=run load_dtb load_kernel; "                            \
168                 "run nfsargs addip addcon addmtd;"                      \
169                 "bootm ${kernel_addr} - ${dtb_addr}\0"                  \
170         "delenv=env default -a -f; saveenv; reset\0"
171
172 #define CONFIG_BOOTCOMMAND              "run nand_ubifs"
173
174 /* Miscellaneous configurable options */
175 #define CONFIG_SYS_LONGHELP
176 #define CONFIG_SYS_HUSH_PARSER
177 #define CONFIG_SYS_PROMPT               "Titanium > "
178 #define CONFIG_AUTO_COMPLETE
179 #define CONFIG_CMDLINE_EDITING
180 #define CONFIG_SYS_CONSOLE_INFO_QUIET   /* don't print console @ startup */
181
182 #define CONFIG_SYS_CBSIZE               256
183
184 /* Print Buffer Size */
185 #define CONFIG_SYS_PBSIZE               (CONFIG_SYS_CBSIZE + \
186                                          sizeof(CONFIG_SYS_PROMPT) + 16)
187 #define CONFIG_SYS_MAXARGS              16
188 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
189
190 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
191
192 /* Physical Memory Map */
193 #define CONFIG_NR_DRAM_BANKS            1
194 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
195 #define PHYS_SDRAM_SIZE                 (512 << 20)
196
197 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
198 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
199 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
200
201 #define CONFIG_SYS_INIT_SP_OFFSET \
202         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
203 #define CONFIG_SYS_INIT_SP_ADDR \
204         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
205
206 /* Enable NAND support */
207 #define CONFIG_CMD_NAND
208 #define CONFIG_CMD_NAND_TRIMFFS
209 #define CONFIG_CMD_TIME
210
211 #ifdef CONFIG_CMD_NAND
212
213 /* NAND stuff */
214 #define CONFIG_NAND_MXS
215 #define CONFIG_SYS_MAX_NAND_DEVICE      1
216 #define CONFIG_SYS_NAND_BASE            0x40000000
217 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
218 #define CONFIG_SYS_NAND_ONFI_DETECTION
219
220 /* DMA stuff, needed for GPMI/MXS NAND support */
221 #define CONFIG_APBH_DMA
222 #define CONFIG_APBH_DMA_BURST
223 #define CONFIG_APBH_DMA_BURST8
224
225 /* Environment in NAND */
226 #define CONFIG_ENV_IS_IN_NAND
227 #define CONFIG_ENV_OFFSET               (16 << 20)
228 #define CONFIG_ENV_SECT_SIZE            (128 << 10)
229 #define CONFIG_ENV_SIZE                 CONFIG_ENV_SECT_SIZE
230 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + (512 << 10))
231 #define CONFIG_ENV_SIZE_REDUND          CONFIG_ENV_SIZE
232
233 #else /* CONFIG_CMD_NAND */
234
235 /* Environment in MMC */
236 #define CONFIG_ENV_SIZE                 (8 << 10)
237 #define CONFIG_ENV_IS_IN_MMC
238 #define CONFIG_ENV_OFFSET               (6 * 64 * 1024)
239 #define CONFIG_SYS_MMC_ENV_DEV          0
240
241 #endif /* CONFIG_CMD_NAND */
242
243 /* UBI/UBIFS config options */
244 #define CONFIG_LZO
245 #define CONFIG_MTD_DEVICE
246 #define CONFIG_MTD_PARTITIONS
247 #define CONFIG_RBTREE
248 #define CONFIG_CMD_MTDPARTS
249 #define CONFIG_CMD_UBI
250 #define CONFIG_CMD_UBIFS
251
252 #define CONFIG_OF_LIBFDT
253 #define CONFIG_CMD_BOOTZ
254
255 #ifndef CONFIG_SYS_DCACHE_OFF
256 #define CONFIG_CMD_CACHE
257 #endif
258
259 #endif                         /* __CONFIG_H */