Commit 08318317afb365a35f06df788feeed56825dbe61
Committed by
Tom Rini
1 parent
8b2551a4db
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
env: ti: boot: Select dtb name for X15 revC
Select dtb name for am57xx BeagleBoard-X15 revC Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 1 changed file with 2 additions and 0 deletions Inline Diff
include/environment/ti/boot.h
1 | /* | 1 | /* |
2 | * Boot related environment variable definitions on TI boards. | 2 | * Boot related environment variable definitions on TI boards. |
3 | * | 3 | * |
4 | * (C) Copyright 2017 Linaro Ltd. | 4 | * (C) Copyright 2017 Linaro Ltd. |
5 | * Sam Protsenko <semen.protsenko@linaro.org> | 5 | * Sam Protsenko <semen.protsenko@linaro.org> |
6 | * | 6 | * |
7 | * SPDX-License-Identifier: GPL-2.0+ | 7 | * SPDX-License-Identifier: GPL-2.0+ |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __TI_BOOT_H | 10 | #ifndef __TI_BOOT_H |
11 | #define __TI_BOOT_H | 11 | #define __TI_BOOT_H |
12 | 12 | ||
13 | #ifndef CONSOLEDEV | 13 | #ifndef CONSOLEDEV |
14 | #define CONSOLEDEV "ttyO2" | 14 | #define CONSOLEDEV "ttyO2" |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #ifndef PARTS_DEFAULT | 17 | #ifndef PARTS_DEFAULT |
18 | #define PARTS_DEFAULT | 18 | #define PARTS_DEFAULT |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #define DEFAULT_COMMON_BOOT_TI_ARGS \ | 21 | #define DEFAULT_COMMON_BOOT_TI_ARGS \ |
22 | "console=" CONSOLEDEV ",115200n8\0" \ | 22 | "console=" CONSOLEDEV ",115200n8\0" \ |
23 | "fdtfile=undefined\0" \ | 23 | "fdtfile=undefined\0" \ |
24 | "bootpart=0:2\0" \ | 24 | "bootpart=0:2\0" \ |
25 | "bootdir=/boot\0" \ | 25 | "bootdir=/boot\0" \ |
26 | "bootfile=zImage\0" \ | 26 | "bootfile=zImage\0" \ |
27 | "usbtty=cdc_acm\0" \ | 27 | "usbtty=cdc_acm\0" \ |
28 | "vram=16M\0" \ | 28 | "vram=16M\0" \ |
29 | "partitions=" PARTS_DEFAULT "\0" \ | 29 | "partitions=" PARTS_DEFAULT "\0" \ |
30 | "optargs=\0" \ | 30 | "optargs=\0" \ |
31 | "dofastboot=0\0" \ | 31 | "dofastboot=0\0" \ |
32 | "emmc_android_boot=" \ | 32 | "emmc_android_boot=" \ |
33 | "setenv eval_bootargs setenv bootargs $bootargs; " \ | 33 | "setenv eval_bootargs setenv bootargs $bootargs; " \ |
34 | "run eval_bootargs; " \ | 34 | "run eval_bootargs; " \ |
35 | "setenv mmcdev 1; " \ | 35 | "setenv mmcdev 1; " \ |
36 | "setenv fdt_part 3; " \ | 36 | "setenv fdt_part 3; " \ |
37 | "setenv boot_part 9; " \ | 37 | "setenv boot_part 9; " \ |
38 | "setenv machid fe6; " \ | 38 | "setenv machid fe6; " \ |
39 | "mmc dev $mmcdev; " \ | 39 | "mmc dev $mmcdev; " \ |
40 | "mmc rescan; " \ | 40 | "mmc rescan; " \ |
41 | "part start mmc ${mmcdev} ${fdt_part} fdt_start; " \ | 41 | "part start mmc ${mmcdev} ${fdt_part} fdt_start; " \ |
42 | "part size mmc ${mmcdev} ${fdt_part} fdt_size; " \ | 42 | "part size mmc ${mmcdev} ${fdt_part} fdt_size; " \ |
43 | "part start mmc ${mmcdev} ${boot_part} boot_start; " \ | 43 | "part start mmc ${mmcdev} ${boot_part} boot_start; " \ |
44 | "part size mmc ${mmcdev} ${boot_part} boot_size; " \ | 44 | "part size mmc ${mmcdev} ${boot_part} boot_size; " \ |
45 | "mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \ | 45 | "mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \ |
46 | "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \ | 46 | "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \ |
47 | "echo Booting from eMMC ...; " \ | 47 | "echo Booting from eMMC ...; " \ |
48 | "bootm $loadaddr $loadaddr $fdtaddr;\0" | 48 | "bootm $loadaddr $loadaddr $fdtaddr;\0" |
49 | 49 | ||
50 | #ifdef CONFIG_OMAP54XX | 50 | #ifdef CONFIG_OMAP54XX |
51 | 51 | ||
52 | #define DEFAULT_FDT_TI_ARGS \ | 52 | #define DEFAULT_FDT_TI_ARGS \ |
53 | "findfdt="\ | 53 | "findfdt="\ |
54 | "if test $board_name = omap5_uevm; then " \ | 54 | "if test $board_name = omap5_uevm; then " \ |
55 | "setenv fdtfile omap5-uevm.dtb; fi; " \ | 55 | "setenv fdtfile omap5-uevm.dtb; fi; " \ |
56 | "if test $board_name = dra7xx; then " \ | 56 | "if test $board_name = dra7xx; then " \ |
57 | "setenv fdtfile dra7-evm.dtb; fi;" \ | 57 | "setenv fdtfile dra7-evm.dtb; fi;" \ |
58 | "if test $board_name = dra72x-revc; then " \ | 58 | "if test $board_name = dra72x-revc; then " \ |
59 | "setenv fdtfile dra72-evm-revc.dtb; fi;" \ | 59 | "setenv fdtfile dra72-evm-revc.dtb; fi;" \ |
60 | "if test $board_name = dra72x; then " \ | 60 | "if test $board_name = dra72x; then " \ |
61 | "setenv fdtfile dra72-evm.dtb; fi;" \ | 61 | "setenv fdtfile dra72-evm.dtb; fi;" \ |
62 | "if test $board_name = dra71x; then " \ | 62 | "if test $board_name = dra71x; then " \ |
63 | "setenv fdtfile dra71-evm.dtb; fi;" \ | 63 | "setenv fdtfile dra71-evm.dtb; fi;" \ |
64 | "if test $board_name = dra76x; then " \ | 64 | "if test $board_name = dra76x; then " \ |
65 | "setenv fdtfile dra76-evm.dtb; fi;" \ | 65 | "setenv fdtfile dra76-evm.dtb; fi;" \ |
66 | "if test $board_name = beagle_x15; then " \ | 66 | "if test $board_name = beagle_x15; then " \ |
67 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ | 67 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ |
68 | "if test $board_name = beagle_x15_revb1; then " \ | 68 | "if test $board_name = beagle_x15_revb1; then " \ |
69 | "setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \ | 69 | "setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \ |
70 | "if test $board_name = beagle_x15_revc; then " \ | ||
71 | "setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \ | ||
70 | "if test $board_name = am572x_idk; then " \ | 72 | "if test $board_name = am572x_idk; then " \ |
71 | "setenv fdtfile am572x-idk.dtb; fi;" \ | 73 | "setenv fdtfile am572x-idk.dtb; fi;" \ |
72 | "if test $board_name = am57xx_evm; then " \ | 74 | "if test $board_name = am57xx_evm; then " \ |
73 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ | 75 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ |
74 | "if test $board_name = am57xx_evm_reva3; then " \ | 76 | "if test $board_name = am57xx_evm_reva3; then " \ |
75 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ | 77 | "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ |
76 | "if test $board_name = am571x_idk; then " \ | 78 | "if test $board_name = am571x_idk; then " \ |
77 | "setenv fdtfile am571x-idk.dtb; fi;" \ | 79 | "setenv fdtfile am571x-idk.dtb; fi;" \ |
78 | "if test $fdtfile = undefined; then " \ | 80 | "if test $fdtfile = undefined; then " \ |
79 | "echo WARNING: Could not determine device tree to use; fi; \0" | 81 | "echo WARNING: Could not determine device tree to use; fi; \0" |
80 | 82 | ||
81 | #define CONFIG_BOOTCOMMAND \ | 83 | #define CONFIG_BOOTCOMMAND \ |
82 | "if test ${dofastboot} -eq 1; then " \ | 84 | "if test ${dofastboot} -eq 1; then " \ |
83 | "echo Boot fastboot requested, resetting dofastboot ...;" \ | 85 | "echo Boot fastboot requested, resetting dofastboot ...;" \ |
84 | "setenv dofastboot 0; saveenv;" \ | 86 | "setenv dofastboot 0; saveenv;" \ |
85 | "echo Booting into fastboot ...; " \ | 87 | "echo Booting into fastboot ...; " \ |
86 | "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ | 88 | "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ |
87 | "fi;" \ | 89 | "fi;" \ |
88 | "if test ${boot_fit} -eq 1; then " \ | 90 | "if test ${boot_fit} -eq 1; then " \ |
89 | "run update_to_fit;" \ | 91 | "run update_to_fit;" \ |
90 | "fi;" \ | 92 | "fi;" \ |
91 | "run findfdt; " \ | 93 | "run findfdt; " \ |
92 | "run envboot; " \ | 94 | "run envboot; " \ |
93 | "run mmcboot;" \ | 95 | "run mmcboot;" \ |
94 | "setenv mmcdev 1; " \ | 96 | "setenv mmcdev 1; " \ |
95 | "setenv bootpart 1:2; " \ | 97 | "setenv bootpart 1:2; " \ |
96 | "setenv mmcroot /dev/mmcblk0p2 rw; " \ | 98 | "setenv mmcroot /dev/mmcblk0p2 rw; " \ |
97 | "run mmcboot;" \ | 99 | "run mmcboot;" \ |
98 | "run emmc_android_boot; " \ | 100 | "run emmc_android_boot; " \ |
99 | "" | 101 | "" |
100 | 102 | ||
101 | #endif /* CONFIG_OMAP54XX */ | 103 | #endif /* CONFIG_OMAP54XX */ |
102 | 104 | ||
103 | #endif /* __TI_BOOT_H */ | 105 | #endif /* __TI_BOOT_H */ |
104 | 106 |