blob: 0345160787ef33fdb45e9e058c1894d58f9688fe [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
Faiz Abbas6c42a752019-06-11 00:43:43 +053020#define PARTS_DEFAULT \
21 /* Linux partitions */ \
22 "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
23
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053024/* U-Boot general configuration */
25#define EXTRA_ENV_AM65X_BOARD_SETTINGS \
26 "findfdt=" \
Andreas Dannenberg03facc72019-06-04 18:08:26 -050027 "setenv name_fdt k3-am654-base-board.dtb;" \
Andrew F. Davisee53b592019-08-12 15:59:53 -040028 "setenv fdtfile ${name_fdt}\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053029 "name_kern=Image\0" \
30 "console=ttyS2,115200n8\0" \
Vignesh Raghavendrabcfa9172019-12-09 10:37:36 +053031 "stdin=serial,usbkbd\0" \
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053032 "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
33 "${mtdparts}\0" \
Faiz Abbas6c42a752019-06-11 00:43:43 +053034 "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053035
36/* U-Boot MMC-specific configuration */
37#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
38 "boot=mmc\0" \
39 "mmcdev=1\0" \
40 "bootpart=1:2\0" \
41 "bootdir=/boot\0" \
42 "rd_spec=-\0" \
43 "init_mmc=run args_all args_mmc\0" \
44 "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050045 "get_overlay_mmc=" \
46 "fdt address ${fdtaddr};" \
47 "fdt resize 0x100000;" \
Andrew F. Davisee53b592019-08-12 15:59:53 -040048 "for overlay in $name_overlays;" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050049 "do;" \
Nishanth Menon87b45212020-10-07 21:48:01 -050050 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \
51 "fdt apply ${dtboaddr};" \
Andreas Dannenberg623df9c2019-06-04 18:08:27 -050052 "done;\0" \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053053 "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
Faiz Abbas6c42a752019-06-11 00:43:43 +053054 "${bootdir}/${name_kern}\0" \
Andrew F. Davis76470b62019-08-26 17:51:00 -040055 "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
56 "${bootdir}/${name_fit}\0" \
Faiz Abbas6c42a752019-06-11 00:43:43 +053057 "partitions=" PARTS_DEFAULT
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053058
Suman Annab9bb1952019-09-04 16:01:44 +053059#ifdef DEFAULT_RPROCS
60#undef DEFAULT_RPROCS
61#endif
62#define DEFAULT_RPROCS "" \
63 "0 /lib/firmware/am65x-mcu-r5f0_0-fw " \
64 "1 /lib/firmware/am65x-mcu-r5f0_1-fw "
65
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053066#define EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
67 "init_ubi=run args_all args_ubi; sf probe; " \
68 "ubi part ospi.rootfs; ubifsmount ubi:rootfs;\0" \
69 "get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \
70 "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \
71 "args_ubi=setenv bootargs console=${console} ${optargs} " \
72 "rootfstype=ubifs root=ubi0:rootfs rw ubi.mtd=ospi.rootfs\0"
73
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053074#define EXTRA_ENV_DFUARGS \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053075 DFU_ALT_INFO_MMC \
Faiz Abbasb528c722020-08-03 11:35:13 +053076 DFU_ALT_INFO_RAM \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053077 DFU_ALT_INFO_EMMC \
78 DFU_ALT_INFO_OSPI
79
Tom Rinibde6ac52021-07-13 10:11:39 -040080#ifdef CONFIG_TARGET_AM654_A53_EVM
81#define BOOT_TARGET_DEVICES(func) \
82 func(MMC, mmc, 1) \
83 func(MMC, mmc, 0)
84
85#include <config_distro_bootcmd.h>
86#else
87#define BOOTENV
88#endif
89
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053090/* Incorporate settings into the U-Boot environment */
91#define CONFIG_EXTRA_ENV_SETTINGS \
Nishanth Menon87b45212020-10-07 21:48:01 -050092 DEFAULT_LINUX_BOOT_ENV \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053093 DEFAULT_MMC_TI_ARGS \
Andrew F. Davis76470b62019-08-26 17:51:00 -040094 DEFAULT_FIT_TI_ARGS \
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +053095 EXTRA_ENV_AM65X_BOARD_SETTINGS \
Suman Annab9bb1952019-09-04 16:01:44 +053096 EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
Vignesh Raghavendra33e741c2020-02-04 11:09:53 +053097 EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
Vignesh Raghavendrae3128b62019-12-09 10:37:34 +053098 EXTRA_ENV_RPROC_SETTINGS \
Tom Rinibde6ac52021-07-13 10:11:39 -040099 EXTRA_ENV_DFUARGS \
100 BOOTENV
Andreas Dannenberg1e5b1162018-08-27 15:59:07 +0530101
Lokesh Vutla0911d952018-08-27 15:59:06 +0530102/* Now for the remaining common defines */
103#include <configs/ti_armv7_common.h>
104
105#endif /* __CONFIG_AM654_EVM_H */