Lokesh Vutla | 0911d95 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 1 | /* 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 Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 13 | #include <environment/ti/mmc.h> |
Suman Anna | b9bb195 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 14 | #include <environment/ti/k3_rproc.h> |
Vignesh Raghavendra | e3128b6 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 15 | #include <environment/ti/k3_dfu.h> |
Lokesh Vutla | 0911d95 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 16 | |
Lokesh Vutla | 0911d95 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 17 | /* DDR Configuration */ |
| 18 | #define CONFIG_SYS_SDRAM_BASE1 0x880000000 |
| 19 | |
Andrew F. Davis | 64176a8 | 2019-02-01 15:04:57 -0600 | [diff] [blame] | 20 | #define CONFIG_SYS_BOOTM_LEN SZ_64M |
| 21 | |
Faiz Abbas | 6c42a75 | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 22 | #define PARTS_DEFAULT \ |
| 23 | /* Linux partitions */ \ |
| 24 | "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" |
| 25 | |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 26 | /* U-Boot general configuration */ |
| 27 | #define EXTRA_ENV_AM65X_BOARD_SETTINGS \ |
| 28 | "findfdt=" \ |
Andreas Dannenberg | 03facc7 | 2019-06-04 18:08:26 -0500 | [diff] [blame] | 29 | "setenv name_fdt k3-am654-base-board.dtb;" \ |
Andrew F. Davis | ee53b59 | 2019-08-12 15:59:53 -0400 | [diff] [blame] | 30 | "setenv fdtfile ${name_fdt}\0" \ |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 31 | "name_kern=Image\0" \ |
| 32 | "console=ttyS2,115200n8\0" \ |
Vignesh Raghavendra | bcfa917 | 2019-12-09 10:37:36 +0530 | [diff] [blame] | 33 | "stdin=serial,usbkbd\0" \ |
Vignesh Raghavendra | 33e741c | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 34 | "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \ |
| 35 | "${mtdparts}\0" \ |
Faiz Abbas | 6c42a75 | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 36 | "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 37 | |
| 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 Dannenberg | 623df9c | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 47 | "get_overlay_mmc=" \ |
| 48 | "fdt address ${fdtaddr};" \ |
| 49 | "fdt resize 0x100000;" \ |
Andrew F. Davis | ee53b59 | 2019-08-12 15:59:53 -0400 | [diff] [blame] | 50 | "for overlay in $name_overlays;" \ |
Andreas Dannenberg | 623df9c | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 51 | "do;" \ |
Nishanth Menon | 87b4521 | 2020-10-07 21:48:01 -0500 | [diff] [blame] | 52 | "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \ |
| 53 | "fdt apply ${dtboaddr};" \ |
Andreas Dannenberg | 623df9c | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 54 | "done;\0" \ |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 55 | "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ |
Faiz Abbas | 6c42a75 | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 56 | "${bootdir}/${name_kern}\0" \ |
Andrew F. Davis | 76470b6 | 2019-08-26 17:51:00 -0400 | [diff] [blame] | 57 | "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \ |
| 58 | "${bootdir}/${name_fit}\0" \ |
Faiz Abbas | 6c42a75 | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 59 | "partitions=" PARTS_DEFAULT |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 60 | |
Suman Anna | b9bb195 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 61 | #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 Raghavendra | 33e741c | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 68 | #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 Raghavendra | e3128b6 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 76 | #define EXTRA_ENV_DFUARGS \ |
Vignesh Raghavendra | e3128b6 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 77 | DFU_ALT_INFO_MMC \ |
Faiz Abbas | b528c72 | 2020-08-03 11:35:13 +0530 | [diff] [blame] | 78 | DFU_ALT_INFO_RAM \ |
Vignesh Raghavendra | e3128b6 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 79 | DFU_ALT_INFO_EMMC \ |
| 80 | DFU_ALT_INFO_OSPI |
| 81 | |
Tom Rini | bde6ac5 | 2021-07-13 10:11:39 -0400 | [diff] [blame] | 82 | #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 Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 92 | /* Incorporate settings into the U-Boot environment */ |
| 93 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Nishanth Menon | 87b4521 | 2020-10-07 21:48:01 -0500 | [diff] [blame] | 94 | DEFAULT_LINUX_BOOT_ENV \ |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 95 | DEFAULT_MMC_TI_ARGS \ |
Andrew F. Davis | 76470b6 | 2019-08-26 17:51:00 -0400 | [diff] [blame] | 96 | DEFAULT_FIT_TI_ARGS \ |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 97 | EXTRA_ENV_AM65X_BOARD_SETTINGS \ |
Suman Anna | b9bb195 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 98 | EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \ |
Vignesh Raghavendra | 33e741c | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 99 | EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \ |
Vignesh Raghavendra | e3128b6 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 100 | EXTRA_ENV_RPROC_SETTINGS \ |
Tom Rini | bde6ac5 | 2021-07-13 10:11:39 -0400 | [diff] [blame] | 101 | EXTRA_ENV_DFUARGS \ |
| 102 | BOOTENV |
Andreas Dannenberg | 1e5b116 | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 103 | |
Lokesh Vutla | 0911d95 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 104 | /* Now for the remaining common defines */ |
| 105 | #include <configs/ti_armv7_common.h> |
| 106 | |
| 107 | #endif /* __CONFIG_AM654_EVM_H */ |