xref: /openbmc/u-boot/include/configs/colibri_vf.h (revision 43ede0bc)
1e7b860faSSanchayan Maity /*
2b891d010SMarcel Ziswiler  * Copyright 2015-2016 Toradex, Inc.
3e7b860faSSanchayan Maity  *
4b891d010SMarcel Ziswiler  * Configuration settings for the Toradex VF50/VF61 modules.
5e7b860faSSanchayan Maity  *
6e7b860faSSanchayan Maity  * Based on vf610twr.h:
7e7b860faSSanchayan Maity  * Copyright 2013 Freescale Semiconductor, Inc.
8e7b860faSSanchayan Maity  *
9e7b860faSSanchayan Maity  * SPDX-License-Identifier:	GPL-2.0+
10e7b860faSSanchayan Maity  */
11e7b860faSSanchayan Maity 
12e7b860faSSanchayan Maity #ifndef __CONFIG_H
13e7b860faSSanchayan Maity #define __CONFIG_H
14e7b860faSSanchayan Maity 
15e7b860faSSanchayan Maity #include <asm/arch/imx-regs.h>
16e7b860faSSanchayan Maity 
1718fb0e3cSGong Qianyu #define CONFIG_SYS_FSL_CLK
18e7b860faSSanchayan Maity 
19b891d010SMarcel Ziswiler #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
20e7b860faSSanchayan Maity 
21e7b860faSSanchayan Maity #define CONFIG_SKIP_LOWLEVEL_INIT
22e7b860faSSanchayan Maity 
23e7b860faSSanchayan Maity #ifdef CONFIG_CMD_FUSE
24e7b860faSSanchayan Maity #define CONFIG_MXC_OCOTP
25e7b860faSSanchayan Maity #endif
26e7b860faSSanchayan Maity 
2780b9c3bbSStefan Agner #ifdef CONFIG_VIDEO_FSL_DCU_FB
2880b9c3bbSStefan Agner #define CONFIG_SPLASH_SCREEN_ALIGN
2980b9c3bbSStefan Agner #define CONFIG_VIDEO_LOGO
3080b9c3bbSStefan Agner #define CONFIG_VIDEO_BMP_LOGO
3180b9c3bbSStefan Agner #define CONFIG_SYS_FSL_DCU_LE
3280b9c3bbSStefan Agner 
3380b9c3bbSStefan Agner #define CONFIG_SYS_DCU_ADDR		DCU0_BASE_ADDR
3480b9c3bbSStefan Agner #define DCU_LAYER_MAX_NUM		64
3580b9c3bbSStefan Agner #endif
3680b9c3bbSStefan Agner 
37e7b860faSSanchayan Maity /* Size of malloc() pool */
38e7b860faSSanchayan Maity #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
39e7b860faSSanchayan Maity 
40e7b860faSSanchayan Maity /* Allow to overwrite serial and ethaddr */
41e7b860faSSanchayan Maity #define CONFIG_ENV_OVERWRITE
42b891d010SMarcel Ziswiler #define CONFIG_ENV_VARS_UBOOT_CONFIG
43e7b860faSSanchayan Maity #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
44e7b860faSSanchayan Maity 
45e7b860faSSanchayan Maity /* NAND support */
468fca2d8cSStefan Agner #define CONFIG_SYS_NAND_ONFI_DETECTION
47e7b860faSSanchayan Maity #define CONFIG_SYS_MAX_NAND_DEVICE	1
48e7b860faSSanchayan Maity #define CONFIG_SYS_NAND_BASE		NFC_BASE_ADDR
49e7b860faSSanchayan Maity 
50e7b860faSSanchayan Maity /* Dynamic MTD partition support */
51e7b860faSSanchayan Maity #define CONFIG_MTD_PARTITIONS
52e7b860faSSanchayan Maity #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
53e7b860faSSanchayan Maity 
54e7b860faSSanchayan Maity #define CONFIG_FSL_ESDHC
55e7b860faSSanchayan Maity #define CONFIG_SYS_FSL_ESDHC_ADDR	0
56e7b860faSSanchayan Maity #define CONFIG_SYS_FSL_ESDHC_NUM	1
57e7b860faSSanchayan Maity 
58e7b860faSSanchayan Maity #define CONFIG_FEC_MXC
59e7b860faSSanchayan Maity #define CONFIG_MII
60e7b860faSSanchayan Maity #define IMX_FEC_BASE			ENET1_BASE_ADDR
61e7b860faSSanchayan Maity #define CONFIG_FEC_XCV_TYPE		RMII
62e7b860faSSanchayan Maity #define CONFIG_FEC_MXC_PHYADDR          0
63e7b860faSSanchayan Maity 
64e7b860faSSanchayan Maity #define CONFIG_IPADDR		192.168.10.2
65e7b860faSSanchayan Maity #define CONFIG_NETMASK		255.255.255.0
66e7b860faSSanchayan Maity #define CONFIG_SERVERIP		192.168.10.1
67e7b860faSSanchayan Maity 
68e7b860faSSanchayan Maity #define CONFIG_LOADADDR			0x80008000
69e7b860faSSanchayan Maity #define CONFIG_FDTADDR			0x84000000
70e7b860faSSanchayan Maity 
71e7b860faSSanchayan Maity /* We boot from the gfxRAM area of the OCRAM. */
72c0f432c3SStefan Agner #define CONFIG_SYS_TEXT_BASE		0x3f401000
73c0f432c3SStefan Agner #define CONFIG_BOARD_SIZE_LIMIT		520192
74e7b860faSSanchayan Maity 
75e7b860faSSanchayan Maity #define SD_BOOTCMD \
76e7b860faSSanchayan Maity 	"sdargs=root=/dev/mmcblk0p2 rw rootwait\0"	\
77e7b860faSSanchayan Maity 	"sdboot=run setup; setenv bootargs ${defargs} ${sdargs} ${mtdparts} " \
78e7b860faSSanchayan Maity 	"${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \
79e7b860faSSanchayan Maity 	"load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \
80e7b860faSSanchayan Maity 	"load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \
81faf1e62bSSanchayan Maity 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
82e7b860faSSanchayan Maity 
83e7b860faSSanchayan Maity #define NFS_BOOTCMD \
84e7b860faSSanchayan Maity 	"nfsargs=ip=:::::eth0: root=/dev/nfs\0"	\
85e7b860faSSanchayan Maity 	"nfsboot=run setup; " \
86e7b860faSSanchayan Maity 	"setenv bootargs ${defargs} ${nfsargs} ${mtdparts} " \
87e7b860faSSanchayan Maity 	"${setupargs} ${vidargs}; echo Booting from NFS...;" \
88e7b860faSSanchayan Maity 	"dhcp ${kernel_addr_r} && "	\
89e7b860faSSanchayan Maity 	"tftp ${fdt_addr_r} ${soc}-colibri-${fdt_board}.dtb && " \
90faf1e62bSSanchayan Maity 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
91e7b860faSSanchayan Maity 
92e7b860faSSanchayan Maity #define UBI_BOOTCMD	\
93e7b860faSSanchayan Maity 	"ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
94e7b860faSSanchayan Maity 	"ubi.fm_autoconvert=1\0" \
95e7b860faSSanchayan Maity 	"ubiboot=run setup; " \
96e7b860faSSanchayan Maity 	"setenv bootargs ${defargs} ${ubiargs} ${mtdparts} "   \
97e7b860faSSanchayan Maity 	"${setupargs} ${vidargs}; echo Booting from NAND...; " \
983ed82d6fSSanchayan Maity 	"ubi part ubi && " \
993ed82d6fSSanchayan Maity 	"ubi read ${kernel_addr_r} kernel && " \
1003ed82d6fSSanchayan Maity 	"ubi read ${fdt_addr_r} dtb && " \
101faf1e62bSSanchayan Maity 	"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
102e7b860faSSanchayan Maity 
103e7b860faSSanchayan Maity #define CONFIG_BOOTCOMMAND "run ubiboot; run sdboot; run nfsboot"
104e7b860faSSanchayan Maity 
105bba97cd2SSanchayan Maity #define DFU_ALT_NAND_INFO "vf-bcb part 0,1;u-boot part 0,2;ubi part 0,4"
106bba97cd2SSanchayan Maity 
107e7b860faSSanchayan Maity #define CONFIG_EXTRA_ENV_SETTINGS \
108e7b860faSSanchayan Maity 	"kernel_addr_r=0x82000000\0" \
109e7b860faSSanchayan Maity 	"fdt_addr_r=0x84000000\0" \
110e7b860faSSanchayan Maity 	"kernel_file=zImage\0" \
111e7b860faSSanchayan Maity 	"fdt_file=${soc}-colibri-${fdt_board}.dtb\0" \
112e7b860faSSanchayan Maity 	"fdt_board=eval-v3\0" \
113faf1e62bSSanchayan Maity 	"fdt_fixup=;\0" \
114e7b860faSSanchayan Maity 	"defargs=\0" \
115e7b860faSSanchayan Maity 	"console=ttyLP0\0" \
116e7b860faSSanchayan Maity 	"setup=setenv setupargs " \
117e7b860faSSanchayan Maity 	"console=tty1 console=${console}" \
118e7b860faSSanchayan Maity 	",${baudrate}n8 ${memargs}\0" \
119e7b860faSSanchayan Maity 	"setsdupdate=mmc rescan && set interface mmc && " \
120e7b860faSSanchayan Maity 	"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \
121e7b860faSSanchayan Maity 	"source ${loadaddr}\0" \
122e7b860faSSanchayan Maity 	"setusbupdate=usb start && set interface usb && " \
123e7b860faSSanchayan Maity 	"fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \
124e7b860faSSanchayan Maity 	"source ${loadaddr}\0" \
125e7b860faSSanchayan Maity 	"setupdate=run setsdupdate || run setusbupdate\0" \
126*43ede0bcSTom Rini 	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
127bba97cd2SSanchayan Maity 	"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \
12880b9c3bbSStefan Agner 	"video-mode=dcufb:640x480-16@60,monitor=lcd\0" \
12980b9c3bbSStefan Agner 	"splashpos=m,m\0" \
130e7b860faSSanchayan Maity 	SD_BOOTCMD \
131e7b860faSSanchayan Maity 	NFS_BOOTCMD \
132e7b860faSSanchayan Maity 	UBI_BOOTCMD
133e7b860faSSanchayan Maity 
134e7b860faSSanchayan Maity /* Miscellaneous configurable options */
135e7b860faSSanchayan Maity #define CONFIG_SYS_LONGHELP		/* undef to save memory */
136e7b860faSSanchayan Maity #undef CONFIG_AUTO_COMPLETE
137aa5a0d98SSanchayan Maity #define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size */
138e7b860faSSanchayan Maity #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
139e7b860faSSanchayan Maity 
140e7b860faSSanchayan Maity #define CONFIG_SYS_MEMTEST_START	0x80010000
141e7b860faSSanchayan Maity #define CONFIG_SYS_MEMTEST_END		0x87C00000
142e7b860faSSanchayan Maity 
143e7b860faSSanchayan Maity #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
144e7b860faSSanchayan Maity #define CONFIG_SYS_HZ			1000
145e7b860faSSanchayan Maity #define CONFIG_CMDLINE_EDITING
146e7b860faSSanchayan Maity 
147e7b860faSSanchayan Maity /* Physical memory map */
148e7b860faSSanchayan Maity #define CONFIG_NR_DRAM_BANKS		1
149e7b860faSSanchayan Maity #define PHYS_SDRAM			(0x80000000)
150e7b860faSSanchayan Maity #define PHYS_SDRAM_SIZE			(256 * 1024 * 1024)
151e7b860faSSanchayan Maity 
152e7b860faSSanchayan Maity #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
153e7b860faSSanchayan Maity #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
154e7b860faSSanchayan Maity #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
155e7b860faSSanchayan Maity 
156e7b860faSSanchayan Maity #define CONFIG_SYS_INIT_SP_OFFSET \
157e7b860faSSanchayan Maity 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
158e7b860faSSanchayan Maity #define CONFIG_SYS_INIT_SP_ADDR \
159e7b860faSSanchayan Maity 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
160e7b860faSSanchayan Maity 
161e7b860faSSanchayan Maity /* Environment organization */
162e7b860faSSanchayan Maity 
163e7b860faSSanchayan Maity #ifdef CONFIG_ENV_IS_IN_MMC
164e7b860faSSanchayan Maity #define CONFIG_SYS_MMC_ENV_DEV		0
165e7b860faSSanchayan Maity #define CONFIG_ENV_OFFSET		(12 * 64 * 1024)
166e7b860faSSanchayan Maity #define CONFIG_ENV_SIZE			(8 * 1024)
167e7b860faSSanchayan Maity #endif
168e7b860faSSanchayan Maity 
169e7b860faSSanchayan Maity #ifdef CONFIG_ENV_IS_IN_NAND
170e7b860faSSanchayan Maity #define CONFIG_ENV_SIZE			(64 * 2048)
171e7b860faSSanchayan Maity #define CONFIG_ENV_RANGE		(4 * 64 * 2048)
172e7b860faSSanchayan Maity #define CONFIG_ENV_OFFSET		(12 * 64 * 2048)
173e7b860faSSanchayan Maity #endif
174e7b860faSSanchayan Maity 
175bba97cd2SSanchayan Maity /* USB Host Support */
176bba97cd2SSanchayan Maity #define CONFIG_USB_EHCI_VF
177bba97cd2SSanchayan Maity #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
178bba97cd2SSanchayan Maity #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
179bba97cd2SSanchayan Maity 
180bba97cd2SSanchayan Maity /* USB DFU */
181bba97cd2SSanchayan Maity #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024)
182bba97cd2SSanchayan Maity 
183bba97cd2SSanchayan Maity /* USB Storage */
18401acd6abSPaul Kocialkowski #define CONFIG_USB_FUNCTION_MASS_STORAGE
185bba97cd2SSanchayan Maity 
186e7b860faSSanchayan Maity #endif /* __CONFIG_H */
187