xref: /openbmc/u-boot/include/configs/apx4devkit.h (revision 86cf1c82850f7c226f23684e19616e526ffaf10f)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2c1393bb3SVeli-Pekka Peltola /*
3c1393bb3SVeli-Pekka Peltola  * Copyright (C) 2012 Bluegiga Technologies Oy
4c1393bb3SVeli-Pekka Peltola  *
5c1393bb3SVeli-Pekka Peltola  * Authors:
6c1393bb3SVeli-Pekka Peltola  * Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
7c1393bb3SVeli-Pekka Peltola  * Lauri Hintsala <lauri.hintsala@bluegiga.com>
8c1393bb3SVeli-Pekka Peltola  *
9c1393bb3SVeli-Pekka Peltola  * Based on m28evk.h:
10c1393bb3SVeli-Pekka Peltola  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
11c1393bb3SVeli-Pekka Peltola  * on behalf of DENX Software Engineering GmbH
12c1393bb3SVeli-Pekka Peltola  */
135434caf5SMarek Vasut #ifndef __CONFIGS_APX4DEVKIT_H__
145434caf5SMarek Vasut #define __CONFIGS_APX4DEVKIT_H__
15c1393bb3SVeli-Pekka Peltola 
165434caf5SMarek Vasut /* System configurations */
17c1393bb3SVeli-Pekka Peltola #define CONFIG_MACH_TYPE	MACH_TYPE_APX4DEVKIT
18c1393bb3SVeli-Pekka Peltola 
195434caf5SMarek Vasut /* Memory configuration */
20c1393bb3SVeli-Pekka Peltola #define PHYS_SDRAM_1			0x40000000	/* Base address */
21c1393bb3SVeli-Pekka Peltola #define PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512 MB RAM */
22c1393bb3SVeli-Pekka Peltola #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
23c1393bb3SVeli-Pekka Peltola 
245434caf5SMarek Vasut /* Environment */
25c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_OVERWRITE
26c1393bb3SVeli-Pekka Peltola 
275434caf5SMarek Vasut /* Environment is in MMC */
285434caf5SMarek Vasut #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
29c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_OFFSET		(256 * 1024)
30c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_SIZE			(16 * 1024)
31c1393bb3SVeli-Pekka Peltola #define CONFIG_SYS_MMC_ENV_DEV		0
32c1393bb3SVeli-Pekka Peltola #endif
33c1393bb3SVeli-Pekka Peltola 
345434caf5SMarek Vasut /* Environment is in NAND */
355434caf5SMarek Vasut #if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
36c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_SECT_SIZE		(128 * 1024)
37c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_SIZE			(128 * 1024)
38c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE
39c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_RANGE		(384 * 1024)
40c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_OFFSET		0x120000
41c1393bb3SVeli-Pekka Peltola #define CONFIG_ENV_OFFSET_REDUND	\
42c1393bb3SVeli-Pekka Peltola 		(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
43c1393bb3SVeli-Pekka Peltola #endif
44c1393bb3SVeli-Pekka Peltola 
455434caf5SMarek Vasut /* UBI and NAND partitioning */
46c1393bb3SVeli-Pekka Peltola 
475434caf5SMarek Vasut /* FEC Ethernet on SoC */
48c1393bb3SVeli-Pekka Peltola #ifdef CONFIG_CMD_NET
495434caf5SMarek Vasut #define CONFIG_FEC_MXC
50c1393bb3SVeli-Pekka Peltola #define CONFIG_ETHPRIME			"FEC"
51c1393bb3SVeli-Pekka Peltola #define CONFIG_FEC_MXC_PHYADDR		0
52c1393bb3SVeli-Pekka Peltola #define IMX_FEC_BASE			MXS_ENET0_BASE
53c1393bb3SVeli-Pekka Peltola #endif
54c1393bb3SVeli-Pekka Peltola 
55c1393bb3SVeli-Pekka Peltola /* USB */
56c1393bb3SVeli-Pekka Peltola #ifdef CONFIG_CMD_USB
57c1393bb3SVeli-Pekka Peltola #define CONFIG_EHCI_MXS_PORT1
58afa87210SMarek Vasut #define CONFIG_USB_MAX_CONTROLLER_COUNT	1
59c1393bb3SVeli-Pekka Peltola #endif
60c1393bb3SVeli-Pekka Peltola 
61c1393bb3SVeli-Pekka Peltola /* Boot Linux */
62c1393bb3SVeli-Pekka Peltola #define CONFIG_BOOTFILE			"uImage"
63c1393bb3SVeli-Pekka Peltola #define CONFIG_BOOTCOMMAND		"run bootcmd_nand"
64c1393bb3SVeli-Pekka Peltola #define CONFIG_LOADADDR			0x41000000
65c1393bb3SVeli-Pekka Peltola #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
66c1393bb3SVeli-Pekka Peltola #define CONFIG_SERIAL_TAG
67c1393bb3SVeli-Pekka Peltola #define CONFIG_REVISION_TAG
68c1393bb3SVeli-Pekka Peltola 
69c1393bb3SVeli-Pekka Peltola /* Extra Environments */
70c1393bb3SVeli-Pekka Peltola #define CONFIG_EXTRA_ENV_SETTINGS \
7143ede0bcSTom Rini 	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
72c1393bb3SVeli-Pekka Peltola 	"verify=no\0" \
73c1393bb3SVeli-Pekka Peltola 	"bootcmd=run bootcmd_nand\0" \
74c1393bb3SVeli-Pekka Peltola 	"kernelargs=console=tty0 console=ttyAMA0,115200 consoleblank=0\0" \
75c1393bb3SVeli-Pekka Peltola 	"bootargs_nand=" \
76c1393bb3SVeli-Pekka Peltola 		"setenv bootargs ${kernelargs} ubi.mtd=3,2048 " \
77c1393bb3SVeli-Pekka Peltola 		"root=ubi0:rootfs rootfstype=ubifs ${mtdparts} rw\0" \
78c1393bb3SVeli-Pekka Peltola 	"bootcmd_nand=" \
79c1393bb3SVeli-Pekka Peltola 		"run bootargs_nand && ubi part root 2048 && " \
80949a7710SJoe Hershberger 		"ubifsmount ubi:rootfs && ubifsload 41000000 boot/uImage && " \
81c1393bb3SVeli-Pekka Peltola 		"bootm 41000000\0" \
82c1393bb3SVeli-Pekka Peltola 	"bootargs_mmc=" \
83c1393bb3SVeli-Pekka Peltola 		"setenv bootargs ${kernelargs} " \
84c1393bb3SVeli-Pekka Peltola 		"root=/dev/mmcblk0p2 rootwait ${mtdparts} rw\0" \
85c1393bb3SVeli-Pekka Peltola 	"bootcmd_mmc=" \
86c1393bb3SVeli-Pekka Peltola 		"run bootargs_mmc && mmc rescan && " \
87c1393bb3SVeli-Pekka Peltola 		"ext2load mmc 0:2 41000000 boot/uImage && bootm 41000000\0" \
88c1393bb3SVeli-Pekka Peltola ""
89c1393bb3SVeli-Pekka Peltola 
905434caf5SMarek Vasut /* The rest of the configuration is shared */
915434caf5SMarek Vasut #include <configs/mxs.h>
925434caf5SMarek Vasut 
935434caf5SMarek Vasut #endif /* __CONFIGS_APX4DEVKIT_H__ */
94