2018-08-27 10:29:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* Configuration header file for K3 AM654 EVM
|
|
|
|
*
|
|
|
|
* Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
|
|
|
|
* Lokesh Vutla <lokeshvutla@ti.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_AM654_EVM_H
|
|
|
|
#define __CONFIG_AM654_EVM_H
|
|
|
|
|
|
|
|
#include <linux/sizes.h>
|
2018-08-27 10:29:07 +00:00
|
|
|
#include <environment/ti/mmc.h>
|
2019-09-04 10:31:44 +00:00
|
|
|
#include <environment/ti/k3_rproc.h>
|
2019-12-09 05:07:34 +00:00
|
|
|
#include <environment/ti/k3_dfu.h>
|
2018-08-27 10:29:06 +00:00
|
|
|
|
|
|
|
/* DDR Configuration */
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE1 0x880000000
|
|
|
|
|
|
|
|
/* SPL Loader Configuration */
|
2019-06-04 22:55:48 +00:00
|
|
|
#ifdef CONFIG_TARGET_AM654_A53_EVM
|
2022-04-19 15:26:02 +00:00
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + SZ_4M)
|
2019-06-04 22:55:48 +00:00
|
|
|
#else
|
|
|
|
/*
|
|
|
|
* Link BSS to be within SPL in a dedicated region located near the top of
|
|
|
|
* the MCU SRAM, this way making it available also before relocation. Note
|
|
|
|
* that we are not using the actual top of the MCU SRAM as there is a memory
|
|
|
|
* location filled in by the boot ROM that we want to read out without any
|
|
|
|
* interference from the C context.
|
|
|
|
*/
|
|
|
|
#define CONFIG_SPL_BSS_START_ADDR (CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX -\
|
|
|
|
CONFIG_SPL_BSS_MAX_SIZE)
|
|
|
|
/* Set the stack right below the SPL BSS section */
|
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SPL_BSS_START_ADDR
|
2019-06-04 22:55:49 +00:00
|
|
|
/* Configure R5 SPL post-relocation malloc pool in DDR */
|
|
|
|
#define CONFIG_SYS_SPL_MALLOC_START 0x84000000
|
|
|
|
#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_16M
|
2019-06-04 22:55:48 +00:00
|
|
|
#endif
|
2018-11-02 14:21:07 +00:00
|
|
|
|
2019-02-01 21:04:57 +00:00
|
|
|
#define CONFIG_SYS_BOOTM_LEN SZ_64M
|
|
|
|
|
2019-06-10 19:13:43 +00:00
|
|
|
#define PARTS_DEFAULT \
|
|
|
|
/* Linux partitions */ \
|
|
|
|
"name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
|
|
|
|
|
2018-08-27 10:29:07 +00:00
|
|
|
/* U-Boot general configuration */
|
|
|
|
#define EXTRA_ENV_AM65X_BOARD_SETTINGS \
|
|
|
|
"findfdt=" \
|
2019-06-04 23:08:26 +00:00
|
|
|
"setenv name_fdt k3-am654-base-board.dtb;" \
|
2019-08-12 19:59:53 +00:00
|
|
|
"setenv fdtfile ${name_fdt}\0" \
|
2018-08-27 10:29:07 +00:00
|
|
|
"name_kern=Image\0" \
|
|
|
|
"console=ttyS2,115200n8\0" \
|
2019-12-09 05:07:36 +00:00
|
|
|
"stdin=serial,usbkbd\0" \
|
2020-02-04 05:39:53 +00:00
|
|
|
"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
|
|
|
|
"${mtdparts}\0" \
|
2019-06-10 19:13:43 +00:00
|
|
|
"run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \
|
2018-08-27 10:29:07 +00:00
|
|
|
|
|
|
|
/* U-Boot MMC-specific configuration */
|
|
|
|
#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
|
|
|
|
"boot=mmc\0" \
|
|
|
|
"mmcdev=1\0" \
|
|
|
|
"bootpart=1:2\0" \
|
|
|
|
"bootdir=/boot\0" \
|
|
|
|
"rd_spec=-\0" \
|
|
|
|
"init_mmc=run args_all args_mmc\0" \
|
|
|
|
"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
|
2019-06-04 23:08:27 +00:00
|
|
|
"get_overlay_mmc=" \
|
|
|
|
"fdt address ${fdtaddr};" \
|
|
|
|
"fdt resize 0x100000;" \
|
2019-08-12 19:59:53 +00:00
|
|
|
"for overlay in $name_overlays;" \
|
2019-06-04 23:08:27 +00:00
|
|
|
"do;" \
|
2020-10-08 02:48:01 +00:00
|
|
|
"load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \
|
|
|
|
"fdt apply ${dtboaddr};" \
|
2019-06-04 23:08:27 +00:00
|
|
|
"done;\0" \
|
2018-08-27 10:29:07 +00:00
|
|
|
"get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
|
2019-06-10 19:13:43 +00:00
|
|
|
"${bootdir}/${name_kern}\0" \
|
2019-08-26 21:51:00 +00:00
|
|
|
"get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
|
|
|
|
"${bootdir}/${name_fit}\0" \
|
2019-06-10 19:13:43 +00:00
|
|
|
"partitions=" PARTS_DEFAULT
|
2018-08-27 10:29:07 +00:00
|
|
|
|
2019-09-04 10:31:44 +00:00
|
|
|
#ifdef DEFAULT_RPROCS
|
|
|
|
#undef DEFAULT_RPROCS
|
|
|
|
#endif
|
|
|
|
#define DEFAULT_RPROCS "" \
|
|
|
|
"0 /lib/firmware/am65x-mcu-r5f0_0-fw " \
|
|
|
|
"1 /lib/firmware/am65x-mcu-r5f0_1-fw "
|
|
|
|
|
2020-02-04 05:39:53 +00:00
|
|
|
#ifdef CONFIG_TARGET_AM654_A53_EVM
|
|
|
|
#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \
|
|
|
|
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
|
|
|
|
"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"
|
|
|
|
#else
|
|
|
|
#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
|
|
|
|
"init_ubi=run args_all args_ubi; sf probe; " \
|
|
|
|
"ubi part ospi.rootfs; ubifsmount ubi:rootfs;\0" \
|
|
|
|
"get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \
|
|
|
|
"get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \
|
|
|
|
"args_ubi=setenv bootargs console=${console} ${optargs} " \
|
|
|
|
"rootfstype=ubifs root=ubi0:rootfs rw ubi.mtd=ospi.rootfs\0"
|
|
|
|
|
2019-12-09 05:07:34 +00:00
|
|
|
#define EXTRA_ENV_DFUARGS \
|
|
|
|
DFU_ALT_INFO_MMC \
|
2020-08-03 06:05:13 +00:00
|
|
|
DFU_ALT_INFO_RAM \
|
2019-12-09 05:07:34 +00:00
|
|
|
DFU_ALT_INFO_EMMC \
|
|
|
|
DFU_ALT_INFO_OSPI
|
|
|
|
|
2021-07-13 14:11:39 +00:00
|
|
|
#ifdef CONFIG_TARGET_AM654_A53_EVM
|
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
|
|
|
func(MMC, mmc, 1) \
|
|
|
|
func(MMC, mmc, 0)
|
|
|
|
|
|
|
|
#include <config_distro_bootcmd.h>
|
|
|
|
#else
|
|
|
|
#define BOOTENV
|
|
|
|
#endif
|
|
|
|
|
2018-08-27 10:29:07 +00:00
|
|
|
/* Incorporate settings into the U-Boot environment */
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
2020-10-08 02:48:01 +00:00
|
|
|
DEFAULT_LINUX_BOOT_ENV \
|
2018-08-27 10:29:07 +00:00
|
|
|
DEFAULT_MMC_TI_ARGS \
|
2019-08-26 21:51:00 +00:00
|
|
|
DEFAULT_FIT_TI_ARGS \
|
2018-08-27 10:29:07 +00:00
|
|
|
EXTRA_ENV_AM65X_BOARD_SETTINGS \
|
2019-09-04 10:31:44 +00:00
|
|
|
EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
|
2020-02-04 05:39:53 +00:00
|
|
|
EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \
|
|
|
|
EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \
|
2019-12-09 05:07:34 +00:00
|
|
|
EXTRA_ENV_RPROC_SETTINGS \
|
2021-07-13 14:11:39 +00:00
|
|
|
EXTRA_ENV_DFUARGS \
|
|
|
|
BOOTENV
|
2018-08-27 10:29:07 +00:00
|
|
|
|
2020-08-03 06:05:14 +00:00
|
|
|
#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1
|
|
|
|
|
2018-08-27 10:29:06 +00:00
|
|
|
/* Now for the remaining common defines */
|
|
|
|
#include <configs/ti_armv7_common.h>
|
|
|
|
|
|
|
|
#endif /* __CONFIG_AM654_EVM_H */
|