Lokesh Vutla | 029f921 | 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 | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 13 | #include <environment/ti/mmc.h> |
Suman Anna | 96b3d76 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 14 | #include <environment/ti/k3_rproc.h> |
Vignesh Raghavendra | fa28601 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 15 | #include <environment/ti/k3_dfu.h> |
Lokesh Vutla | 029f921 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 16 | |
Lokesh Vutla | 029f921 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 17 | /* DDR Configuration */ |
| 18 | #define CONFIG_SYS_SDRAM_BASE1 0x880000000 |
| 19 | |
Faiz Abbas | d044bfc | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 20 | #define PARTS_DEFAULT \ |
| 21 | /* Linux partitions */ \ |
| 22 | "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" |
| 23 | |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 24 | /* U-Boot general configuration */ |
| 25 | #define EXTRA_ENV_AM65X_BOARD_SETTINGS \ |
| 26 | "findfdt=" \ |
Andreas Dannenberg | 63f5c85 | 2019-06-04 18:08:26 -0500 | [diff] [blame] | 27 | "setenv name_fdt k3-am654-base-board.dtb;" \ |
Andrew F. Davis | 685fb74 | 2019-08-12 15:59:53 -0400 | [diff] [blame] | 28 | "setenv fdtfile ${name_fdt}\0" \ |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 29 | "name_kern=Image\0" \ |
| 30 | "console=ttyS2,115200n8\0" \ |
Vignesh Raghavendra | 5bd1a7a | 2019-12-09 10:37:36 +0530 | [diff] [blame] | 31 | "stdin=serial,usbkbd\0" \ |
Vignesh Raghavendra | 53d4217 | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 32 | "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \ |
| 33 | "${mtdparts}\0" \ |
Faiz Abbas | d044bfc | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 34 | "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 35 | |
| 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 Dannenberg | e102c4f | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 45 | "get_overlay_mmc=" \ |
| 46 | "fdt address ${fdtaddr};" \ |
| 47 | "fdt resize 0x100000;" \ |
Andrew F. Davis | 685fb74 | 2019-08-12 15:59:53 -0400 | [diff] [blame] | 48 | "for overlay in $name_overlays;" \ |
Andreas Dannenberg | e102c4f | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 49 | "do;" \ |
Nishanth Menon | 360eb46 | 2020-10-07 21:48:01 -0500 | [diff] [blame] | 50 | "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};" \ |
| 51 | "fdt apply ${dtboaddr};" \ |
Andreas Dannenberg | e102c4f | 2019-06-04 18:08:27 -0500 | [diff] [blame] | 52 | "done;\0" \ |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 53 | "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ |
Faiz Abbas | d044bfc | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 54 | "${bootdir}/${name_kern}\0" \ |
Andrew F. Davis | c21e819 | 2019-08-26 17:51:00 -0400 | [diff] [blame] | 55 | "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \ |
| 56 | "${bootdir}/${name_fit}\0" \ |
Faiz Abbas | d044bfc | 2019-06-11 00:43:43 +0530 | [diff] [blame] | 57 | "partitions=" PARTS_DEFAULT |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 58 | |
Suman Anna | 96b3d76 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 59 | #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 Raghavendra | 53d4217 | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 66 | #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 Raghavendra | fa28601 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 74 | #define EXTRA_ENV_DFUARGS \ |
Vignesh Raghavendra | fa28601 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 75 | DFU_ALT_INFO_MMC \ |
Faiz Abbas | 7a15597 | 2020-08-03 11:35:13 +0530 | [diff] [blame] | 76 | DFU_ALT_INFO_RAM \ |
Vignesh Raghavendra | fa28601 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 77 | DFU_ALT_INFO_EMMC \ |
| 78 | DFU_ALT_INFO_OSPI |
| 79 | |
Tom Rini | 6e410d3 | 2021-07-13 10:11:39 -0400 | [diff] [blame] | 80 | #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 Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 90 | /* Incorporate settings into the U-Boot environment */ |
| 91 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Nishanth Menon | 360eb46 | 2020-10-07 21:48:01 -0500 | [diff] [blame] | 92 | DEFAULT_LINUX_BOOT_ENV \ |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 93 | DEFAULT_MMC_TI_ARGS \ |
Andrew F. Davis | c21e819 | 2019-08-26 17:51:00 -0400 | [diff] [blame] | 94 | DEFAULT_FIT_TI_ARGS \ |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 95 | EXTRA_ENV_AM65X_BOARD_SETTINGS \ |
Suman Anna | 96b3d76 | 2019-09-04 16:01:44 +0530 | [diff] [blame] | 96 | EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \ |
Vignesh Raghavendra | 53d4217 | 2020-02-04 11:09:53 +0530 | [diff] [blame] | 97 | EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \ |
Vignesh Raghavendra | fa28601 | 2019-12-09 10:37:34 +0530 | [diff] [blame] | 98 | EXTRA_ENV_RPROC_SETTINGS \ |
Tom Rini | 6e410d3 | 2021-07-13 10:11:39 -0400 | [diff] [blame] | 99 | EXTRA_ENV_DFUARGS \ |
| 100 | BOOTENV |
Andreas Dannenberg | c4fc2cc | 2018-08-27 15:59:07 +0530 | [diff] [blame] | 101 | |
Lokesh Vutla | 029f921 | 2018-08-27 15:59:06 +0530 | [diff] [blame] | 102 | /* Now for the remaining common defines */ |
| 103 | #include <configs/ti_armv7_common.h> |
| 104 | |
| 105 | #endif /* __CONFIG_AM654_EVM_H */ |