1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Configuration header file for K3 AM62Ax SoC family
5 * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
8 #ifndef __CONFIG_AM62AX_EVM_H
9 #define __CONFIG_AM62AX_EVM_H
11 #include <linux/sizes.h>
12 #include <environment/ti/mmc.h>
13 #include <environment/ti/k3_dfu.h>
15 /* DDR Configuration */
16 #define CFG_SYS_SDRAM_BASE1 0x880000000
18 #define PARTS_DEFAULT \
19 /* Linux partitions */ \
20 "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
22 /* U-Boot general configuration */
23 #define EXTRA_ENV_AM62A7_BOARD_SETTINGS \
24 "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
26 "setenv name_fdt ${default_device_tree};" \
27 "setenv fdtfile ${name_fdt}\0" \
29 "console=ttyS2,115200n8\0" \
30 "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
32 "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
34 /* U-Boot MMC-specific configuration */
35 #define EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
41 "init_mmc=run args_all args_mmc\0" \
42 "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
44 "fdt address ${fdtaddr};" \
45 "fdt resize 0x100000;" \
46 "for overlay in $name_overlays;" \
48 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
49 "fdt apply ${dtboaddr};" \
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
57 #define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \
59 EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
61 "run findfdt; run envboot; run init_mmc;" \
62 "if test ${boot_fit} -eq 1; then;" \
63 "run get_fit_mmc; run get_overlaystring;" \
66 "run get_kern_mmc; run get_fdt_mmc;" \
67 "run get_overlay_mmc;" \
71 #define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
74 #if CONFIG_IS_ENABLED(CMD_MMC)
75 #define BOOT_TARGET_MMC(func) \
76 func(TI_MMC, ti_mmc, na)
78 #define BOOT_TARGET_MMC(func)
79 #endif /* CONFIG_IS_ENABLED(CMD_MMC) */
81 #define BOOT_TARGET_DEVICES(func) \
84 #include <config_distro_bootcmd.h>
86 /* Incorporate settings into the U-Boot environment */
87 #define CFG_EXTRA_ENV_SETTINGS \
88 DEFAULT_LINUX_BOOT_ENV \
90 EXTRA_ENV_AM62A7_BOARD_SETTINGS \
93 /* Now for the remaining common defines */
94 #include <configs/ti_armv7_common.h>
96 #endif /* __CONFIG_AM62A7_EVM_H */