blob: 33dd6cfdfa45add2cac6af6bb2f87df1ee2971d7 [file] [log] [blame]
Lokesh Vutla029f9212018-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 Dannenbergc4fc2cc2018-08-27 15:59:07 +053013#include <environment/ti/mmc.h>
Suman Anna96b3d762019-09-04 16:01:44 +053014#include <environment/ti/k3_rproc.h>
Vignesh Raghavendrafa286012019-12-09 10:37:34 +053015#include <environment/ti/k3_dfu.h>
Lokesh Vutla029f9212018-08-27 15:59:06 +053016
Lokesh Vutla029f9212018-08-27 15:59:06 +053017/* DDR Configuration */
Tom Rinibb4dd962022-11-16 13:10:37 -050018#define CFG_SYS_SDRAM_BASE1 0x880000000
Lokesh Vutla029f9212018-08-27 15:59:06 +053019
Faiz Abbasd044bfc2019-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 Dannenbergc4fc2cc2018-08-27 15:59:07 +053024/* U-Boot general configuration */
25#define EXTRA_ENV_AM65X_BOARD_SETTINGS \
26 "findfdt=" \
Andreas Dannenberg63f5c852019-06-04 18:08:26 -050027 "setenv name_fdt k3-am654-base-board.dtb;" \
Andrew F. Davis685fb742019-08-12 15:59:53 -040028 "setenv fdtfile ${name_fdt}\0" \
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +053029 "name_kern=Image\0" \
30 "console=ttyS2,115200n8\0" \
Vignesh Raghavendra5bd1a7a2019-12-09 10:37:36 +053031 "stdin=serial,usbkbd\0" \
Vignesh Raghavendra53d42172020-02-04 11:09:53 +053032 "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
33 "${mtdparts}\0" \
Faiz Abbasd044bfc2019-06-11 00:43:43 +053034 "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \
Andreas Dannenbergc4fc2cc2018-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 Dannenberge102c4f2019-06-04 18:08:27 -050045 "get_overlay_mmc=" \
46 "fdt address ${fdtaddr};" \
47 "fdt resize 0x100000;" \
Andrew F. Davis685fb742019-08-12 15:59:53 -040048 "for overlay in $name_overlays;" \
Andreas Dannenberge102c4f2019-06-04 18:08:27 -050049 "do;" \
Nishanth Menon360eb462020-10-07 21:48:01 -050050 "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \
51 "fdt apply ${dtboaddr};" \
Andreas Dannenberge102c4f2019-06-04 18:08:27 -050052 "done;\0" \
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +053053 "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
Faiz Abbasd044bfc2019-06-11 00:43:43 +053054 "${bootdir}/${name_kern}\0" \
Andrew F. Davisc21e8192019-08-26 17:51:00 -040055 "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
56 "${bootdir}/${name_fit}\0" \
Faiz Abbasd044bfc2019-06-11 00:43:43 +053057 "partitions=" PARTS_DEFAULT
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +053058
Suman Anna96b3d762019-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 Raghavendra53d42172020-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 Raghavendrafa286012019-12-09 10:37:34 +053074#define EXTRA_ENV_DFUARGS \
Vignesh Raghavendrafa286012019-12-09 10:37:34 +053075 DFU_ALT_INFO_MMC \
Faiz Abbas7a155972020-08-03 11:35:13 +053076 DFU_ALT_INFO_RAM \
Vignesh Raghavendrafa286012019-12-09 10:37:34 +053077 DFU_ALT_INFO_EMMC \
78 DFU_ALT_INFO_OSPI
79
Tom Rini6e410d32021-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 Dannenbergc4fc2cc2018-08-27 15:59:07 +053090/* Incorporate settings into the U-Boot environment */
Tom Rinic9edebe2022-12-04 10:03:50 -050091#define CFG_EXTRA_ENV_SETTINGS \
Nishanth Menon360eb462020-10-07 21:48:01 -050092 DEFAULT_LINUX_BOOT_ENV \
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +053093 DEFAULT_MMC_TI_ARGS \
Andrew F. Davisc21e8192019-08-26 17:51:00 -040094 DEFAULT_FIT_TI_ARGS \
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +053095 EXTRA_ENV_AM65X_BOARD_SETTINGS \
Suman Anna96b3d762019-09-04 16:01:44 +053096 EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
Vignesh Raghavendra53d42172020-02-04 11:09:53 +053097 EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
Vignesh Raghavendrafa286012019-12-09 10:37:34 +053098 EXTRA_ENV_RPROC_SETTINGS \
Tom Rini6e410d32021-07-13 10:11:39 -040099 EXTRA_ENV_DFUARGS \
100 BOOTENV
Andreas Dannenbergc4fc2cc2018-08-27 15:59:07 +0530101
Lokesh Vutla029f9212018-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 */