1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Configuration header file for K3 AM642 SoC family
5 * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
6 * Keerthy <j-keerthy@ti.com>
9 #ifndef __CONFIG_AM642_EVM_H
10 #define __CONFIG_AM642_EVM_H
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>
18 /* DDR Configuration */
19 #define CONFIG_SYS_SDRAM_BASE1 0x880000000
21 #define PARTS_DEFAULT \
22 /* Linux partitions */ \
23 "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
25 /* U-Boot general configuration */
26 #define EXTRA_ENV_AM642_BOARD_SETTINGS \
28 "if test $board_name = am64x_gpevm; then " \
29 "setenv fdtfile k3-am642-evm.dtb; fi; " \
30 "if test $board_name = am64x_skevm; then " \
31 "setenv fdtfile k3-am642-sk.dtb; fi;" \
32 "if test $fdtfile = undefined; then " \
33 "echo WARNING: Could not determine device tree to use; fi; \0" \
35 "console=ttyS2,115200n8\0" \
36 "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
38 "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
40 /* U-Boot MMC-specific configuration */
41 #define EXTRA_ENV_AM642_BOARD_SETTINGS_MMC \
47 "init_mmc=run args_all args_mmc\0" \
48 "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
50 "fdt address ${fdtaddr};" \
51 "fdt resize 0x100000;" \
52 "for overlay in $name_overlays;" \
54 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
55 "fdt apply ${dtboaddr};" \
57 "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
58 "${bootdir}/${name_kern}\0" \
59 "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
60 "${bootdir}/${name_fit}\0" \
61 "partitions=" PARTS_DEFAULT
63 #define EXTRA_ENV_AM642_BOARD_SETTING_USBMSC \
64 "args_usb=run finduuid;setenv bootargs console=${console} " \
66 "root=PARTUUID=${uuid} rw " \
67 "rootfstype=${mmcrootfstype}\0" \
68 "init_usb=run args_all args_usb\0" \
69 "get_fdt_usb=load usb ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
71 "fdt address ${fdtaddr};" \
72 "fdt resize 0x100000;" \
73 "for overlay in $name_overlays;" \
75 "load usb ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
76 "fdt apply ${dtboaddr};" \
78 "get_kern_usb=load usb ${bootpart} ${loadaddr} " \
79 "${bootdir}/${name_kern}\0" \
80 "get_fit_usb=load usb ${bootpart} ${addr_fit} " \
81 "${bootdir}/${name_fit}\0" \
82 "usbboot=setenv boot usb;" \
83 "setenv bootpart 0:2;" \
91 #define EXTRA_ENV_DFUARGS \
97 /* Incorporate settings into the U-Boot environment */
98 #define CONFIG_EXTRA_ENV_SETTINGS \
99 DEFAULT_LINUX_BOOT_ENV \
100 DEFAULT_MMC_TI_ARGS \
101 EXTRA_ENV_AM642_BOARD_SETTINGS \
102 EXTRA_ENV_AM642_BOARD_SETTINGS_MMC \
104 EXTRA_ENV_AM642_BOARD_SETTING_USBMSC
106 /* Now for the remaining common defines */
107 #include <configs/ti_armv7_common.h>
109 #endif /* __CONFIG_AM642_EVM_H */