xref: /openbmc/u-boot/include/environment/ti/boot.h (revision 679590eb)
1 /*
2  * Boot related environment variable definitions on TI boards.
3  *
4  * (C) Copyright 2017 Linaro Ltd.
5  * Sam Protsenko <semen.protsenko@linaro.org>
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef __TI_BOOT_H
11 #define __TI_BOOT_H
12 
13 #ifndef CONSOLEDEV
14 #define CONSOLEDEV "ttyO2"
15 #endif
16 
17 #ifndef PARTS_DEFAULT
18 #define PARTS_DEFAULT
19 #endif
20 
21 #define DEFAULT_COMMON_BOOT_TI_ARGS \
22 	"console=" CONSOLEDEV ",115200n8\0" \
23 	"fdtfile=undefined\0" \
24 	"bootpart=0:2\0" \
25 	"bootdir=/boot\0" \
26 	"bootfile=zImage\0" \
27 	"usbtty=cdc_acm\0" \
28 	"vram=16M\0" \
29 	"partitions=" PARTS_DEFAULT "\0" \
30 	"optargs=\0" \
31 	"dofastboot=0\0"
32 
33 #ifdef CONFIG_OMAP54XX
34 
35 #define DEFAULT_FDT_TI_ARGS \
36 	"findfdt="\
37 		"if test $board_name = omap5_uevm; then " \
38 			"setenv fdtfile omap5-uevm.dtb; fi; " \
39 		"if test $board_name = dra7xx; then " \
40 			"setenv fdtfile dra7-evm.dtb; fi;" \
41 		"if test $board_name = dra72x-revc; then " \
42 			"setenv fdtfile dra72-evm-revc.dtb; fi;" \
43 		"if test $board_name = dra72x; then " \
44 			"setenv fdtfile dra72-evm.dtb; fi;" \
45 		"if test $board_name = dra71x; then " \
46 			"setenv fdtfile dra71-evm.dtb; fi;" \
47 		"if test $board_name = beagle_x15; then " \
48 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
49 		"if test $board_name = beagle_x15_revb1; then " \
50 			"setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
51 		"if test $board_name = am572x_idk; then " \
52 			"setenv fdtfile am572x-idk.dtb; fi;" \
53 		"if test $board_name = am57xx_evm; then " \
54 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
55 		"if test $board_name = am57xx_evm_reva3; then " \
56 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
57 		"if test $board_name = am571x_idk; then " \
58 			"setenv fdtfile am571x-idk.dtb; fi;" \
59 		"if test $fdtfile = undefined; then " \
60 			"echo WARNING: Could not determine device tree to use; fi; \0"
61 
62 #define CONFIG_BOOTCOMMAND \
63 	"if test ${dofastboot} -eq 1; then " \
64 		"echo Boot fastboot requested, resetting dofastboot ...;" \
65 		"setenv dofastboot 0; saveenv;" \
66 		"echo Booting into fastboot ...; " \
67 		"fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
68 	"fi;" \
69 	"if test ${boot_fit} -eq 1; then "	\
70 		"run update_to_fit;"	\
71 	"fi;"	\
72 	"run findfdt; " \
73 	"run envboot; " \
74 	"run mmcboot;" \
75 	"setenv mmcdev 1; " \
76 	"setenv bootpart 1:2; " \
77 	"setenv mmcroot /dev/mmcblk0p2 rw; " \
78 	"run mmcboot;" \
79 	""
80 
81 #endif /* CONFIG_OMAP54XX */
82 
83 #endif /* __TI_BOOT_H */
84