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