global: Migrate CONFIG_STACKBASE to CFG
[platform/kernel/u-boot.git] / include / configs / am62x_evm.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Configuration header file for K3 AM625 SoC family
4  *
5  * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
6  *      Suman Anna <s-anna@ti.com>
7  */
8
9 #ifndef __CONFIG_AM625_EVM_H
10 #define __CONFIG_AM625_EVM_H
11
12 #include <config_distro_bootcmd.h>
13 #include <environment/ti/mmc.h>
14
15 /* DDR Configuration */
16 #define CFG_SYS_SDRAM_BASE1             0x880000000
17
18 #define PARTS_DEFAULT \
19         /* Linux partitions */ \
20         "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
21
22 /* U-Boot general configuration */
23 #define EXTRA_ENV_AM625_BOARD_SETTINGS                                  \
24         "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"      \
25         "findfdt="                                                      \
26                 "setenv name_fdt ${default_device_tree};"               \
27                 "setenv fdtfile ${name_fdt}\0"                          \
28         "name_kern=Image\0"                                             \
29         "console=ttyS2,115200n8\0"                                      \
30         "args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 " \
31                 "${mtdparts}\0"                                         \
32         "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
33
34 /* U-Boot MMC-specific configuration */
35 #define EXTRA_ENV_AM625_BOARD_SETTINGS_MMC                              \
36         "boot=mmc\0"                                                    \
37         "mmcdev=1\0"                                                    \
38         "bootpart=1:2\0"                                                \
39         "bootdir=/boot\0"                                               \
40         "rd_spec=-\0"                                                   \
41         "init_mmc=run args_all args_mmc\0"                              \
42         "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
43         "get_overlay_mmc="                                              \
44                 "fdt address ${fdtaddr};"                               \
45                 "fdt resize 0x100000;"                                  \
46                 "for overlay in $name_overlays;"                        \
47                 "do;"                                                   \
48                 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && "    \
49                 "fdt apply ${dtboaddr};"                                \
50                 "done;\0"                                               \
51         "get_kern_mmc=load mmc ${bootpart} ${loadaddr} "                \
52                 "${bootdir}/${name_kern}\0"                             \
53         "get_fit_mmc=load mmc ${bootpart} ${addr_fit} "                 \
54                 "${bootdir}/${name_fit}\0"                              \
55         "partitions=" PARTS_DEFAULT
56
57 /* Incorporate settings into the U-Boot environment */
58 #define CFG_EXTRA_ENV_SETTINGS                                  \
59         DEFAULT_LINUX_BOOT_ENV                                          \
60         DEFAULT_MMC_TI_ARGS                                             \
61         EXTRA_ENV_AM625_BOARD_SETTINGS                                  \
62         EXTRA_ENV_AM625_BOARD_SETTINGS_MMC
63
64 /* Now for the remaining common defines */
65 #include <configs/ti_armv7_common.h>
66
67 #endif /* __CONFIG_AM625_EVM_H */