]> Git Repo - J-u-boot.git/blob - include/configs/am64x_evm.h
Migrate CUSTOM_SYS_INIT_SP_ADDR to Kconfig using system-constants.h
[J-u-boot.git] / include / configs / am64x_evm.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Configuration header file for K3 AM642 SoC family
4  *
5  * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
6  *      Keerthy <[email protected]>
7  */
8
9 #ifndef __CONFIG_AM642_EVM_H
10 #define __CONFIG_AM642_EVM_H
11
12 #include <linux/sizes.h>
13 #include <config_distro_bootcmd.h>
14 #include <environment/ti/mmc.h>
15 #include <asm/arch/am64_hardware.h>
16 #include <environment/ti/k3_dfu.h>
17
18 /* DDR Configuration */
19 #define CONFIG_SYS_SDRAM_BASE1          0x880000000
20
21 #if defined(CONFIG_TARGET_AM642_A53_EVM)
22 #else
23 /*
24  * Link BSS to be within SPL in a dedicated region located near the top of
25  * the MCU SRAM, this way making it available also before relocation. Note
26  * that we are not using the actual top of the MCU SRAM as there is a memory
27  * location filled in by the boot ROM that we want to read out without any
28  * interference from the C context.
29  */
30 #define CONFIG_SPL_BSS_START_ADDR       (TI_SRAM_SCRATCH_BOARD_EEPROM_START -\
31                                          CONFIG_SPL_BSS_MAX_SIZE)
32 /* Set the stack right below the SPL BSS section */
33 /* Configure R5 SPL post-relocation malloc pool in DDR */
34 #define CONFIG_SYS_SPL_MALLOC_START    0x84000000
35 #define CONFIG_SYS_SPL_MALLOC_SIZE     SZ_16M
36 #endif
37
38 #define PARTS_DEFAULT \
39         /* Linux partitions */ \
40         "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
41
42 /* U-Boot general configuration */
43 #define EXTRA_ENV_AM642_BOARD_SETTINGS                                  \
44         "findfdt="                                                      \
45                 "if test $board_name = am64x_gpevm; then " \
46                         "setenv fdtfile k3-am642-evm.dtb; fi; " \
47                 "if test $board_name = am64x_skevm; then " \
48                         "setenv fdtfile k3-am642-sk.dtb; fi;" \
49                 "if test $fdtfile = undefined; then " \
50                         "echo WARNING: Could not determine device tree to use; fi; \0" \
51         "name_kern=Image\0"                                             \
52         "console=ttyS2,115200n8\0"                                      \
53         "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 "  \
54                 "${mtdparts}\0"                                         \
55         "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
56
57 /* U-Boot MMC-specific configuration */
58 #define EXTRA_ENV_AM642_BOARD_SETTINGS_MMC                              \
59         "boot=mmc\0"                                                    \
60         "mmcdev=1\0"                                                    \
61         "bootpart=1:2\0"                                                \
62         "bootdir=/boot\0"                                               \
63         "rd_spec=-\0"                                                   \
64         "init_mmc=run args_all args_mmc\0"                              \
65         "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
66         "get_overlay_mmc="                                              \
67                 "fdt address ${fdtaddr};"                               \
68                 "fdt resize 0x100000;"                                  \
69                 "for overlay in $name_overlays;"                        \
70                 "do;"                                                   \
71                 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && "    \
72                 "fdt apply ${dtboaddr};"                                \
73                 "done;\0"                                               \
74         "get_kern_mmc=load mmc ${bootpart} ${loadaddr} "                \
75                 "${bootdir}/${name_kern}\0"                             \
76         "get_fit_mmc=load mmc ${bootpart} ${addr_fit} "                 \
77                 "${bootdir}/${name_fit}\0"                              \
78         "partitions=" PARTS_DEFAULT
79
80 #define EXTRA_ENV_AM642_BOARD_SETTING_USBMSC                            \
81         "args_usb=run finduuid;setenv bootargs console=${console} "     \
82                 "${optargs} "                                           \
83                 "root=PARTUUID=${uuid} rw "                             \
84                 "rootfstype=${mmcrootfstype}\0"                         \
85         "init_usb=run args_all args_usb\0"                              \
86         "get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
87         "get_overlay_usb="                                              \
88                 "fdt address ${fdtaddr};"                               \
89                 "fdt resize 0x100000;"                                  \
90                 "for overlay in $name_overlays;"                        \
91                 "do;"                                                   \
92                 "load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && "    \
93                 "fdt apply ${dtboaddr};"                                \
94                 "done;\0"                                               \
95         "get_kern_usb=load usb ${bootpart} ${loadaddr} "                \
96                 "${bootdir}/${name_kern}\0"                             \
97         "get_fit_usb=load usb ${bootpart} ${addr_fit} "                 \
98                 "${bootdir}/${name_fit}\0"                              \
99         "usbboot=setenv boot usb;"                                      \
100                 "setenv bootpart 0:2;"                                  \
101                 "usb start;"                                            \
102                 "run findfdt;"                                          \
103                 "run init_usb;"                                         \
104                 "run get_kern_usb;"                                     \
105                 "run get_fdt_usb;"                                      \
106                 "run run_kern\0"
107
108 #define EXTRA_ENV_DFUARGS \
109         DFU_ALT_INFO_MMC \
110         DFU_ALT_INFO_EMMC \
111         DFU_ALT_INFO_RAM \
112         DFU_ALT_INFO_OSPI
113
114 /* Incorporate settings into the U-Boot environment */
115 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
116         DEFAULT_LINUX_BOOT_ENV                                          \
117         DEFAULT_MMC_TI_ARGS                                             \
118         EXTRA_ENV_AM642_BOARD_SETTINGS                                  \
119         EXTRA_ENV_AM642_BOARD_SETTINGS_MMC                              \
120         EXTRA_ENV_DFUARGS                                               \
121         EXTRA_ENV_AM642_BOARD_SETTING_USBMSC
122
123 /* Now for the remaining common defines */
124 #include <configs/ti_armv7_common.h>
125
126 #define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
127
128 #endif /* __CONFIG_AM642_EVM_H */
This page took 0.034192 seconds and 4 git commands to generate.