xref: /openbmc/u-boot/include/configs/titanium.h (revision afea2c96)
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 <asm/arch/imx-regs.h>
17 #include <asm/imx-common/gpio.h>
18 
19 #define CONFIG_MX6
20 #define CONFIG_MX6Q
21 #define CONFIG_DISPLAY_CPUINFO
22 #define CONFIG_DISPLAY_BOARDINFO
23 
24 #define MACH_TYPE_TITANIUM		3769
25 #define CONFIG_MACH_TYPE		MACH_TYPE_TITANIUM
26 
27 #define CONFIG_CMDLINE_TAG
28 #define CONFIG_SETUP_MEMORY_TAGS
29 #define CONFIG_INITRD_TAG
30 #define CONFIG_REVISION_TAG
31 
32 /* Size of malloc() pool */
33 #define CONFIG_SYS_MALLOC_LEN		(2 * 1024 * 1024)
34 
35 #define CONFIG_BOARD_EARLY_INIT_F
36 #define CONFIG_MISC_INIT_R
37 #define CONFIG_MXC_GPIO
38 
39 #define CONFIG_MXC_UART
40 #define CONFIG_MXC_UART_BASE		UART1_BASE
41 
42 /* I2C Configs */
43 #define CONFIG_CMD_I2C
44 #define CONFIG_SYS_I2C
45 #define CONFIG_SYS_I2C_MXC
46 #define CONFIG_SYS_I2C_SPEED		100000
47 
48 /* MMC Configs */
49 #define CONFIG_FSL_ESDHC
50 #define CONFIG_FSL_USDHC
51 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
52 #define CONFIG_SYS_FSL_USDHC_NUM	1
53 
54 #define CONFIG_MMC
55 #define CONFIG_CMD_MMC
56 #define CONFIG_GENERIC_MMC
57 #define CONFIG_BOUNCE_BUFFER
58 #define CONFIG_CMD_EXT2
59 #define CONFIG_CMD_FAT
60 #define CONFIG_DOS_PARTITION
61 
62 #define CONFIG_CMD_PING
63 #define CONFIG_CMD_DHCP
64 #define CONFIG_CMD_MII
65 #define CONFIG_CMD_NET
66 #define CONFIG_FEC_MXC
67 #define CONFIG_MII
68 #define IMX_FEC_BASE			ENET_BASE_ADDR
69 #define CONFIG_FEC_XCV_TYPE		RGMII
70 #define CONFIG_FEC_MXC_PHYADDR		4
71 #define CONFIG_PHYLIB
72 #define CONFIG_PHY_MICREL
73 #define CONFIG_PHY_MICREL_KSZ9021
74 
75 /* USB Configs */
76 #define CONFIG_CMD_USB
77 #define CONFIG_CMD_FAT
78 #define CONFIG_USB_EHCI
79 #define CONFIG_USB_EHCI_MX6
80 #define CONFIG_USB_STORAGE
81 #define CONFIG_MXC_USB_PORT	1
82 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
83 #define CONFIG_MXC_USB_FLAGS	0
84 
85 /* Miscellaneous commands */
86 #define CONFIG_CMD_BMODE
87 
88 /* allow to overwrite serial and ethaddr */
89 #define CONFIG_ENV_OVERWRITE
90 #define CONFIG_CONS_INDEX		1
91 #define CONFIG_BAUDRATE			115200
92 
93 /* Command definition */
94 #include <config_cmd_default.h>
95 
96 #undef CONFIG_CMD_IMLS
97 
98 #define CONFIG_BOOTDELAY		3
99 
100 #define CONFIG_LOADADDR			0x12000000
101 #define CONFIG_SYS_TEXT_BASE		0x17800000
102 
103 #define CONFIG_SYS_MEMTEST_START	0x10000000
104 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + (500 << 20))
105 
106 #define CONFIG_HOSTNAME			titanium
107 #define CONFIG_UBI_PART			ubi
108 #define CONFIG_UBIFS_VOLUME		rootfs0
109 
110 #define MTDIDS_DEFAULT		"nand0=gpmi-nand"
111 #define MTDPARTS_DEFAULT	"mtdparts=gpmi-nand:16M(uboot),512k(env1)," \
112 				"512k(env2),-(ubi)"
113 
114 #define CONFIG_EXTRA_ENV_SETTINGS \
115 	"kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
116 	"kernel_fs=/boot/uImage\0"					\
117 	"kernel_addr=11000000\0"					\
118 	"dtb=" __stringify(CONFIG_HOSTNAME) "/"				\
119 		__stringify(CONFIG_HOSTNAME) ".dtb\0"			\
120 	"dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0"		\
121 	"dtb_addr=12800000\0"						\
122 	"script=boot.scr\0" \
123 	"uimage=uImage\0" \
124 	"console=ttymxc0\0" \
125 	"baudrate=115200\0" \
126 	"fdt_high=0xffffffff\0"	  \
127 	"initrd_high=0xffffffff\0" \
128 	"mmcdev=0\0" \
129 	"mmcpart=1\0" \
130 	"uimage=uImage\0" \
131 	"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
132 		" ${script}\0" \
133 	"bootscript=echo Running bootscript from mmc ...; source\0" \
134 	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
135 	"mmcroot=/dev/mmcblk0p2\0" \
136 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
137 		"root=${mmcroot} rootwait rw\0" \
138 	"bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
139 		" ${uimage}; bootm\0" \
140 	"addip=setenv bootargs ${bootargs} "				\
141 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
142 		":${hostname}:${netdev}:off panic=1\0"			\
143 	"addcon=setenv bootargs ${bootargs} console=ttymxc0,"		\
144 		"${baudrate}\0"						\
145 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
146 	"rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0"	\
147 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
148 		"nfsroot=${serverip}:${rootpath}\0"			\
149 	"ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0"		\
150 	"part=" __stringify(CONFIG_UBI_PART) "\0"			\
151 	"boot_vol=0\0"							\
152 	"vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0"			\
153 	"load_ubifs=tftp ${kernel_addr} ${ubifs}\0"			\
154 	"update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}"	\
155 		" ${filesize}\0"					\
156 	"upd_ubifs=run load_ubifs update_ubifs\0"			\
157 	"init_ubi=nand erase.part ubi;ubi part ${part};"		\
158 		"ubi create ${vol} c800000\0"				\
159 	"mtdids=" MTDIDS_DEFAULT "\0"					\
160 	"mtdparts=" MTDPARTS_DEFAULT "\0"				\
161 	"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip"		\
162 		" addcon addmtd;"					\
163 		"bootm ${kernel_addr} - ${dtb_addr}\0"			\
164 	"ubifsargs=set bootargs ubi.mtd=ubi "				\
165 		"root=ubi:rootfs${boot_vol} rootfstype=ubifs\0"		\
166 	"ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0"	\
167 	"ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};"		\
168 		"ubifsload ${dtb_addr} ${dtb_fs};\0"			\
169 	"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon "	\
170 		"addmtd;bootm ${kernel_addr} - ${dtb_addr}\0"		\
171 	"load_kernel=tftp ${kernel_addr} ${kernel}\0"			\
172 	"load_dtb=tftp ${dtb_addr} ${dtb}\0"				\
173 	"net_nfs=run load_dtb load_kernel; "				\
174 		"run nfsargs addip addcon addmtd;"			\
175 		"bootm ${kernel_addr} - ${dtb_addr}\0"			\
176 	"delenv=env default -a -f; saveenv; reset\0"
177 
178 #define CONFIG_BOOTCOMMAND		"run nand_ubifs"
179 
180 /* Miscellaneous configurable options */
181 #define CONFIG_SYS_LONGHELP
182 #define CONFIG_SYS_HUSH_PARSER
183 #define CONFIG_SYS_PROMPT		"Titanium > "
184 #define CONFIG_AUTO_COMPLETE
185 #define CONFIG_CMDLINE_EDITING
186 #define CONFIG_SYS_CONSOLE_INFO_QUIET	/* don't print console @ startup */
187 
188 #define CONFIG_SYS_CBSIZE		256
189 
190 /* Print Buffer Size */
191 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
192 					 sizeof(CONFIG_SYS_PROMPT) + 16)
193 #define CONFIG_SYS_MAXARGS		16
194 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
195 
196 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
197 #define CONFIG_SYS_HZ			1000
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