xref: /openbmc/u-boot/include/configs/am65x_evm.h (revision ef64e782)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Configuration header file for K3 AM654 EVM
4  *
5  * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
6  *	Lokesh Vutla <lokeshvutla@ti.com>
7  */
8 
9 #ifndef __CONFIG_AM654_EVM_H
10 #define __CONFIG_AM654_EVM_H
11 
12 #include <linux/sizes.h>
13 #include <config_distro_bootcmd.h>
14 #include <environment/ti/mmc.h>
15 
16 #define CONFIG_ENV_SIZE			(128 << 10)
17 
18 /* DDR Configuration */
19 #define CONFIG_SYS_SDRAM_BASE1		0x880000000
20 
21 /* SPL Loader Configuration */
22 #ifdef CONFIG_TARGET_AM654_A53_EVM
23 #define CONFIG_SPL_TEXT_BASE		0x80080000
24 #endif
25 
26 #define CONFIG_SKIP_LOWLEVEL_INIT
27 
28 #define CONFIG_SPL_MAX_SIZE		CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE
29 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SPL_TEXT_BASE +	\
30 					CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE - 4)
31 
32 /* U-Boot general configuration */
33 #define EXTRA_ENV_AM65X_BOARD_SETTINGS					\
34 	"findfdt="							\
35 		"if test $board_name = am65x; then "			\
36 			"setenv name_fdt k3-am654-base-board.dtb; "	\
37 		"else if test $name_fdt = undefined; then "		\
38 			"echo WARNING: Could not determine device tree to use;"\
39 		"fi; fi; "						\
40 		"setenv fdtfile ${name_fdt}\0"				\
41 	"loadaddr=0x80080000\0"						\
42 	"fdtaddr=0x82000000\0"						\
43 	"name_kern=Image\0"						\
44 	"console=ttyS2,115200n8\0"					\
45 	"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \
46 	"run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
47 
48 /* U-Boot MMC-specific configuration */
49 #define EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC				\
50 	"boot=mmc\0"							\
51 	"mmcdev=1\0"							\
52 	"bootpart=1:2\0"						\
53 	"bootdir=/boot\0"						\
54 	"rd_spec=-\0"							\
55 	"init_mmc=run args_all args_mmc\0"				\
56 	"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
57 	"get_kern_mmc=load mmc ${bootpart} ${loadaddr} "		\
58 		"${bootdir}/${name_kern}\0"
59 
60 /* Incorporate settings into the U-Boot environment */
61 #define CONFIG_EXTRA_ENV_SETTINGS					\
62 	DEFAULT_MMC_TI_ARGS						\
63 	EXTRA_ENV_AM65X_BOARD_SETTINGS					\
64 	EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC
65 
66 /* Now for the remaining common defines */
67 #include <configs/ti_armv7_common.h>
68 
69 #endif /* __CONFIG_AM654_EVM_H */
70