Some use cases require remoteproc firmware to be loaded before Linux
boots. Introduce rprocsemmcboot and rproc_fw_binaries to load the
remoteproc cores from U-Boot, relying on the TI k3_rproc framework
which already handles the secure firmware variants, firmware loading,
and proper initialization.
The firmware binaries are expected to be present in the eMMC rootfs
under /lib/firmware/.
To activate, run rprocsemmcboot or add it to bootcmd:
bootcmd=run rprocsemmcboot; bootflow scan -b
The upstream U-Boot does not yet have the remoteproc DT nodes enabled
for the Aquila AM69, making firmware loading fail. Marking as pending
waiting for remoteproc enabling, which could happen along with the
OF_UPSTREAM migration.
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+#include <env/ti/k3_rproc.env>
+
#define CFG_RAMDISK_ADDR_R 0x90300000
#define CFG_SCRIPTADDR 0x90280000
setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200;
mmc dev 0 1; mmc write ${loadaddr} 0x1400 ${blkcnt};
fi
+
+rprocsemmcboot=
+ env set boot mmc;
+ env set bootpart 0:2;
+ rproc init;
+ run boot_rprocs_mmc;
+ env set bootpart;
+
+rproc_fw_binaries= \
+ 2 /lib/firmware/j784s4-main-r5f0_0-fw \
+ 3 /lib/firmware/j784s4-main-r5f0_1-fw \
+ 4 /lib/firmware/j784s4-main-r5f1_0-fw \
+ 5 /lib/firmware/j784s4-main-r5f1_1-fw \
+ 6 /lib/firmware/j784s4-main-r5f2_0-fw \
+ 7 /lib/firmware/j784s4-main-r5f2_1-fw \
+ 8 /lib/firmware/j784s4-c71_0-fw \
+ 9 /lib/firmware/j784s4-c71_1-fw \
+ 10 /lib/firmware/j784s4-c71_2-fw \
+ 11 /lib/firmware/j784s4-c71_3-fw