diff mbox series

[U-Boot,v2,19/26] env: ti: am65x_evm: Add env support to boot the MCU R5F rprocs

Message ID 20190904103151.20121-20-lokeshvutla@ti.com
State Accepted
Delegated to: Tom Rini
Headers show
Series remoteproc: Add support for R5F and DSP processors | expand

Commit Message

Lokesh Vutla Sept. 4, 2019, 10:31 a.m. UTC
From: Suman Anna <s-anna@ti.com>

Add support to boot the MCU domain R5F Core0 remoteproc at U-boot prompt
on the AM65x EVM boards by using the 'boot_rprocs' and other env variables
defined in the common environment file k3_rproc.h, and updating the
'DEFAULT_RPROCS' macro.

The default configuration is to use the MCU R5F in Split mode, so both
the R5F Core0 and Core1 are started before loading and booting the Linux
kernel using the following firmware:
   MCU R5FSS0 Core0 (Split) : 0 /lib/firmware/am65x-mcu-r5f0_0-fw
   MCU R5FSS0 Core1 (Split) : 1 /lib/firmware/am65x-mcu-r5f0_1-fw

The MCU R5FSS was initially running the R5 SPL in LockStep mode with ATCM
disabled, and is actually shutdown to enable it to be reconfigured and
booted by either A53 U-Boot or Linux kernel in remoteproc mode and using
ATCM.

The MCU R5FSS would need to be reconfigured for Lockstep mode through
DT if a fault-tolerant/safety application were to be run on the cluster
with the DEFAULT_RPROCS macro updated to remove the Core1 firmware.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 include/configs/am65x_evm.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Tom Rini Oct. 12, 2019, 8:25 p.m. UTC | #1
On Wed, Sep 04, 2019 at 04:01:44PM +0530, Lokesh Vutla wrote:

> From: Suman Anna <s-anna@ti.com>
> 
> Add support to boot the MCU domain R5F Core0 remoteproc at U-boot prompt
> on the AM65x EVM boards by using the 'boot_rprocs' and other env variables
> defined in the common environment file k3_rproc.h, and updating the
> 'DEFAULT_RPROCS' macro.
> 
> The default configuration is to use the MCU R5F in Split mode, so both
> the R5F Core0 and Core1 are started before loading and booting the Linux
> kernel using the following firmware:
>    MCU R5FSS0 Core0 (Split) : 0 /lib/firmware/am65x-mcu-r5f0_0-fw
>    MCU R5FSS0 Core1 (Split) : 1 /lib/firmware/am65x-mcu-r5f0_1-fw
> 
> The MCU R5FSS was initially running the R5 SPL in LockStep mode with ATCM
> disabled, and is actually shutdown to enable it to be reconfigured and
> booted by either A53 U-Boot or Linux kernel in remoteproc mode and using
> ATCM.
> 
> The MCU R5FSS would need to be reconfigured for Lockstep mode through
> DT if a fault-tolerant/safety application were to be run on the cluster
> with the DEFAULT_RPROCS macro updated to remove the Core1 firmware.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 6072e4a48c..5c44b22ead 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -12,6 +12,7 @@ 
 #include <linux/sizes.h>
 #include <config_distro_bootcmd.h>
 #include <environment/ti/mmc.h>
+#include <environment/ti/k3_rproc.h>
 
 #define CONFIG_ENV_SIZE			(128 << 10)
 
@@ -96,11 +97,19 @@ 
 		"${bootdir}/${name_kern}\0"				\
 	"partitions=" PARTS_DEFAULT
 
+#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 "
+
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	DEFAULT_MMC_TI_ARGS						\
 	EXTRA_ENV_AM65X_BOARD_SETTINGS					\
-	EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC
+	EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC				\
+	EXTRA_ENV_RPROC_SETTINGS
 
 /* MMC ENV related defines */
 #ifdef CONFIG_ENV_IS_IN_MMC