blob: d8f18d0b9ac9eb37242e8686cb946e17fe7d6dc8 [file] [log] [blame]
Lokesh Vutla0911d952018-08-27 15:59:06 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Configuration header file for K3 AM654 EVM
4 *
5 * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
6 * Lokesh Vutla <lokeshvutla@ti.com>
7 */
8
9#ifndef __CONFIG_AM654_EVM_H
10#define __CONFIG_AM654_EVM_H
11
12#include <linux/sizes.h>
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053013#include <environment/ti/mmc.h>
Suman Annab9bb1952019-09-04 16:01:44 +053014#include <environment/ti/k3_rproc.h>
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053015#include <environment/ti/k3_dfu.h>
Lokesh Vutla0911d952018-08-27 15:59:06 +053016
Lokesh Vutla0911d952018-08-27 15:59:06 +053017/* DDR Configuration */
18#define CONFIG_SYS_SDRAM_BASE1 0x880000000
19
Andrew F. Davis64176a82019-02-01 15:04:57 -060020#define CONFIG_SYS_BOOTM_LEN SZ_64M
21
Faiz Abbas6c42a752019-06-11 00:43:43 +053022#define PARTS_DEFAULT \
23 /* Linux partitions */ \
24 "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
25
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053026/* U-Boot general configuration */
27#define EXTRA_ENV_AM65X_BOARD_SETTINGS \
28 "findfdt=" \
Andreas Dannenberg03facc72019-06-04 18:08:26 -050029 "setenv name_fdt k3-am654-base-board.dtb;" \
Andrew F. Davisee53b592019-08-12 15:59:53 -040030 "setenv fdtfile ${name_fdt}\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053031 "name_kern=Image\0" \
32 "console=ttyS2,115200n8\0" \
Vignesh Raghavendrabcfa9172019-12-09 10:37:36 +053033 "stdin=serial,usbkbd\0" \
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053034 "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
35 "${mtdparts}\0" \
Faiz Abbas6c42a752019-06-11 00:43:43 +053036 "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053037
38/* U-Boot MMC-specific configuration */
39#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
40 "boot=mmc\0" \
41 "mmcdev=1\0" \
42 "bootpart=1:2\0" \
43 "bootdir=/boot\0" \
44 "rd_spec=-\0" \
45 "init_mmc=run args_all args_mmc\0" \
46 "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050047 "get_overlay_mmc=" \
48 "fdt address ${fdtaddr};" \
49 "fdt resize 0x100000;" \
Andrew F. Davisee53b592019-08-12 15:59:53 -040050 "for overlay in $name_overlays;" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050051 "do;" \
Nishanth Menon87b45212020-10-07 21:48:01 -050052 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \
53 "fdt apply ${dtboaddr};" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050054 "done;\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053055 "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
Faiz Abbas6c42a752019-06-11 00:43:43 +053056 "${bootdir}/${name_kern}\0" \
Andrew F. Davis76470b62019-08-26 17:51:00 -040057 "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
58 "${bootdir}/${name_fit}\0" \
Faiz Abbas6c42a752019-06-11 00:43:43 +053059 "partitions=" PARTS_DEFAULT
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053060
Suman Annab9bb1952019-09-04 16:01:44 +053061#ifdef DEFAULT_RPROCS
62#undef DEFAULT_RPROCS
63#endif
64#define DEFAULT_RPROCS "" \
65 "0 /lib/firmware/am65x-mcu-r5f0_0-fw " \
66 "1 /lib/firmware/am65x-mcu-r5f0_1-fw "
67
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053068#define EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
69 "init_ubi=run args_all args_ubi; sf probe; " \
70 "ubi part ospi.rootfs; ubifsmount ubi:rootfs;\0" \
71 "get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \
72 "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \
73 "args_ubi=setenv bootargs console=${console} ${optargs} " \
74 "rootfstype=ubifs root=ubi0:rootfs rw ubi.mtd=ospi.rootfs\0"
75
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053076#define EXTRA_ENV_DFUARGS \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053077 DFU_ALT_INFO_MMC \
Faiz Abbasb528c722020-08-03 11:35:13 +053078 DFU_ALT_INFO_RAM \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053079 DFU_ALT_INFO_EMMC \
80 DFU_ALT_INFO_OSPI
81
Tom Rinibde6ac52021-07-13 10:11:39 -040082#ifdef CONFIG_TARGET_AM654_A53_EVM
83#define BOOT_TARGET_DEVICES(func) \
84 func(MMC, mmc, 1) \
85 func(MMC, mmc, 0)
86
87#include <config_distro_bootcmd.h>
88#else
89#define BOOTENV
90#endif
91
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053092/* Incorporate settings into the U-Boot environment */
93#define CONFIG_EXTRA_ENV_SETTINGS \
Nishanth Menon87b45212020-10-07 21:48:01 -050094 DEFAULT_LINUX_BOOT_ENV \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053095 DEFAULT_MMC_TI_ARGS \
Andrew F. Davis76470b62019-08-26 17:51:00 -040096 DEFAULT_FIT_TI_ARGS \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053097 EXTRA_ENV_AM65X_BOARD_SETTINGS \
Suman Annab9bb1952019-09-04 16:01:44 +053098 EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053099 EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +0530100 EXTRA_ENV_RPROC_SETTINGS \
Tom Rinibde6ac52021-07-13 10:11:39 -0400101 EXTRA_ENV_DFUARGS \
102 BOOTENV
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +0530103
Lokesh Vutla0911d952018-08-27 15:59:06 +0530104/* Now for the remaining common defines */
105#include <configs/ti_armv7_common.h>
106
107#endif /* __CONFIG_AM654_EVM_H */