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