xref: /openbmc/u-boot/include/configs/titanium.h (revision cbcbf71b)
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 /* Size of malloc() pool */
24 #define CONFIG_SYS_MALLOC_LEN		(2 * 1024 * 1024)
25 
26 #define CONFIG_MISC_INIT_R
27 
28 #define CONFIG_MXC_UART
29 #define CONFIG_MXC_UART_BASE		UART1_BASE
30 
31 /* I2C Configs */
32 #define CONFIG_SYS_I2C
33 #define CONFIG_SYS_I2C_MXC
34 #define CONFIG_SYS_I2C_MXC_I2C1		/* enable I2C bus 1 */
35 #define CONFIG_SYS_I2C_MXC_I2C2		/* enable I2C bus 2 */
36 #define CONFIG_SYS_I2C_MXC_I2C3		/* enable I2C bus 3 */
37 #define CONFIG_SYS_I2C_SPEED		100000
38 
39 /* MMC Configs */
40 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
41 #define CONFIG_SYS_FSL_USDHC_NUM	1
42 
43 #define CONFIG_FEC_MXC
44 #define CONFIG_MII
45 #define IMX_FEC_BASE			ENET_BASE_ADDR
46 #define CONFIG_FEC_XCV_TYPE		RGMII
47 #define CONFIG_FEC_MXC_PHYADDR		4
48 #define CONFIG_PHYLIB
49 #define CONFIG_PHY_MICREL
50 #define CONFIG_PHY_MICREL_KSZ9021
51 
52 /* USB Configs */
53 #define CONFIG_USB_EHCI
54 #define CONFIG_USB_EHCI_MX6
55 #define CONFIG_MXC_USB_PORT	1
56 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
57 #define CONFIG_MXC_USB_FLAGS	0
58 
59 /* Miscellaneous commands */
60 #define CONFIG_CMD_BMODE
61 
62 #define CONFIG_SYS_MEMTEST_START	0x10000000
63 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + (500 << 20))
64 
65 #define CONFIG_HOSTNAME			titanium
66 #define CONFIG_UBI_PART			ubi
67 #define CONFIG_UBIFS_VOLUME		rootfs0
68 
69 #define MTDIDS_DEFAULT		"nand0=gpmi-nand"
70 #define MTDPARTS_DEFAULT	"mtdparts=gpmi-nand:16M(uboot),512k(env1)," \
71 				"512k(env2),-(ubi)"
72 
73 #define CONFIG_EXTRA_ENV_SETTINGS \
74 	"kernel=" __stringify(CONFIG_HOSTNAME) "/uImage\0"		\
75 	"kernel_fs=/boot/uImage\0"					\
76 	"kernel_addr=11000000\0"					\
77 	"dtb=" __stringify(CONFIG_HOSTNAME) "/"				\
78 		__stringify(CONFIG_HOSTNAME) ".dtb\0"			\
79 	"dtb_fs=/boot/" __stringify(CONFIG_HOSTNAME) ".dtb\0"		\
80 	"dtb_addr=12800000\0"						\
81 	"script=boot.scr\0" \
82 	"uimage=uImage\0" \
83 	"console=ttymxc0\0" \
84 	"baudrate=115200\0" \
85 	"fdt_high=0xffffffff\0"	  \
86 	"initrd_high=0xffffffff\0" \
87 	"mmcdev=0\0" \
88 	"mmcpart=1\0" \
89 	"uimage=uImage\0" \
90 	"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
91 		" ${script}\0" \
92 	"bootscript=echo Running bootscript from mmc ...; source\0" \
93 	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
94 	"mmcroot=/dev/mmcblk0p2\0" \
95 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
96 		"root=${mmcroot} rootwait rw\0" \
97 	"bootmmc=run mmcargs; fatload mmc ${mmcdev}:${mmcpart} ${loadaddr}" \
98 		" ${uimage}; bootm\0" \
99 	"addip=setenv bootargs ${bootargs} "				\
100 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
101 		":${hostname}:${netdev}:off panic=1\0"			\
102 	"addcon=setenv bootargs ${bootargs} console=ttymxc0,"		\
103 		"${baudrate}\0"						\
104 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
105 	"rootpath=/opt/eldk-5.3/armv7a/rootfs-minimal-mtdutils\0"	\
106 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
107 		"nfsroot=${serverip}:${rootpath}\0"			\
108 	"ubifs=" __stringify(CONFIG_HOSTNAME) "/ubifs.img\0"		\
109 	"part=" __stringify(CONFIG_UBI_PART) "\0"			\
110 	"boot_vol=0\0"							\
111 	"vol=" __stringify(CONFIG_UBIFS_VOLUME) "\0"			\
112 	"load_ubifs=tftp ${kernel_addr} ${ubifs}\0"			\
113 	"update_ubifs=ubi part ${part};ubi write ${kernel_addr} ${vol}"	\
114 		" ${filesize}\0"					\
115 	"upd_ubifs=run load_ubifs update_ubifs\0"			\
116 	"init_ubi=nand erase.part ubi;ubi part ${part};"		\
117 		"ubi create ${vol} c800000\0"				\
118 	"mtdids=" MTDIDS_DEFAULT "\0"					\
119 	"mtdparts=" MTDPARTS_DEFAULT "\0"				\
120 	"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip"		\
121 		" addcon addmtd;"					\
122 		"bootm ${kernel_addr} - ${dtb_addr}\0"			\
123 	"ubifsargs=set bootargs ubi.mtd=ubi "				\
124 		"root=ubi:rootfs${boot_vol} rootfstype=ubifs\0"		\
125 	"ubifs_mount=ubi part ubi;ubifsmount ubi:rootfs${boot_vol}\0"	\
126 	"ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};"		\
127 		"ubifsload ${dtb_addr} ${dtb_fs};\0"			\
128 	"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon "	\
129 		"addmtd;bootm ${kernel_addr} - ${dtb_addr}\0"		\
130 	"load_kernel=tftp ${kernel_addr} ${kernel}\0"			\
131 	"load_dtb=tftp ${dtb_addr} ${dtb}\0"				\
132 	"net_nfs=run load_dtb load_kernel; "				\
133 		"run nfsargs addip addcon addmtd;"			\
134 		"bootm ${kernel_addr} - ${dtb_addr}\0"			\
135 	"delenv=env default -a -f; saveenv; reset\0"
136 
137 #define CONFIG_BOOTCOMMAND		"run nand_ubifs"
138 
139 /* Print Buffer Size */
140 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
141 					 sizeof(CONFIG_SYS_PROMPT) + 16)
142 
143 /* Physical Memory Map */
144 #define CONFIG_NR_DRAM_BANKS		1
145 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
146 #define PHYS_SDRAM_SIZE			(512 << 20)
147 
148 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
149 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
150 #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
151 
152 #define CONFIG_SYS_INIT_SP_OFFSET \
153 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
154 #define CONFIG_SYS_INIT_SP_ADDR \
155 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
156 
157 /* Enable NAND support */
158 #define CONFIG_CMD_NAND
159 #define CONFIG_CMD_NAND_TRIMFFS
160 
161 #ifdef CONFIG_CMD_NAND
162 
163 /* NAND stuff */
164 #define CONFIG_NAND_MXS
165 #define CONFIG_SYS_MAX_NAND_DEVICE	1
166 #define CONFIG_SYS_NAND_BASE		0x40000000
167 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
168 #define CONFIG_SYS_NAND_ONFI_DETECTION
169 
170 /* DMA stuff, needed for GPMI/MXS NAND support */
171 #define CONFIG_APBH_DMA
172 #define CONFIG_APBH_DMA_BURST
173 #define CONFIG_APBH_DMA_BURST8
174 
175 /* Environment in NAND */
176 #define CONFIG_ENV_IS_IN_NAND
177 #define CONFIG_ENV_OFFSET		(16 << 20)
178 #define CONFIG_ENV_SECT_SIZE		(128 << 10)
179 #define CONFIG_ENV_SIZE			CONFIG_ENV_SECT_SIZE
180 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + (512 << 10))
181 #define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
182 
183 #else /* CONFIG_CMD_NAND */
184 
185 /* Environment in MMC */
186 #define CONFIG_ENV_SIZE			(8 << 10)
187 #define CONFIG_ENV_IS_IN_MMC
188 #define CONFIG_ENV_OFFSET		(6 * 64 * 1024)
189 #define CONFIG_SYS_MMC_ENV_DEV		0
190 
191 #endif /* CONFIG_CMD_NAND */
192 
193 /* UBI/UBIFS config options */
194 #define CONFIG_LZO
195 #define CONFIG_MTD_DEVICE
196 #define CONFIG_MTD_PARTITIONS
197 #define CONFIG_RBTREE
198 #define CONFIG_CMD_MTDPARTS
199 #define CONFIG_CMD_UBIFS
200 
201 #endif			       /* __CONFIG_H */
202