board: ti: j722s: j722s.env: Set remoteproc firmware names
PATCH 1/1 board: ti: j722s: j722s.env: Set remoteproc firmware names
Include k3_rproc.env to access rproc boot commands and specify rproc firmware names for adding remoteproc support in J722S SoCs.
---
This patch is independent and puts the environment in place to boot remote processors at U-Boot stage.
However, for successfully loading the firmwares into remote cores, rproc DT node definitions are required. These DT changes have been merged into Linux and available with v6.12 tag[0]. Once the DT Sync happens in U-Boot, remote processors can be probed and booted with the help of env commands enabled with this patch.
Sample Boot Test logs after manually adding DT nodes in U-Boot:
https://gist.github.com/3V3RYONE/0b5c7df5b5c88d2a2f273b6a04a3dd46
[0]: https://lore.kernel.org/all/[email protected]/
Thanks,
Beleswar
board/ti/j722s/j722s.env | 6 ++++++ 1 file changed, 6 insertions(+)
board/ti/j722s/j722s.env +6 -0
@@ -1,6 +1,10 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif + name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
@@ -13,3 +17,5 @@ mmcdev=1 bootpart=1:2 bootdir=/boot rd_spec=- + +rproc_fw_binaries= 0 /lib/firmware/j722s-mcu-r5f0_0-fw 2 /lib/firmware/j722s-main-r5f0_0-fw 3 /lib/firmware/j722s-c71_0-fw 4 /lib/firmware/j722s-c71_1-fw
Signature · 1 line
2.34.1
Hi Beleswar!
On January 8, 2025 thus sayeth Beleswar Padhi:
Quoted 41 lines
Include k3_rproc.env to access rproc boot commands and specify rproc firmware names for adding remoteproc support in J722S SoCs.
Signed-off-by Beleswar Padhi <[email protected]>---
This patch is independent and puts the environment in place to boot remote processors at U-Boot stage.However, for successfully loading the firmwares into remote cores, rproc DT node definitions are required. These DT changes have been merged into Linux and available with v6.12 tag[0]. Once the DT Sync happens in U-Boot, remote processors can be probed and booted with the help of env commands enabled with this patch.
Sample Boot Test logs after manually adding DT nodes in U-Boot:
https://gist.github.com/3V3RYONE/0b5c7df5b5c88d2a2f273b6a04a3dd46[0]: https://lore.kernel.org/all/[email protected]/
Thanks,
Beleswarboard/ti/j722s/j722s.env | 6 ++++++ 1 file changed, 6 insertions(+)board/ti/j722s/j722s.env +4
-0@@ -1,6 +1,10 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif + name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
board/ti/j722s/j722s.env mmcdev=1 · line 21
Quoted 5 lines
board/ti/j722s/j722s.env +2
-0@@ -13,3 +17,5 @@ mmcdev=1 bootpart=1:2 bootdir=/boot rd_spec=- + +rproc_fw_binaries= 0 /lib/firmware/j722s-mcu-r5f0_0-fw 2 /lib/firmware/j722s-main-r5f0_0-fw 3 /lib/firmware/j722s-c71_0-fw 4 /lib/firmware/j722s-c71_1-fw
For SE devices do these firmware have that *-sig suffix? My thinking is this seems fairly specific to yocto with other distributions like debian or QNX will have different names or paths. Should this be put in the env that yocto builds?
~Bryan
Hi Bryan!
Quoted 36 lines · Bryan Brattlof
Hi Beleswar!
On January 8, 2025 thus sayeth Beleswar Padhi:
Quoted 33 lines
Include k3_rproc.env to access rproc boot commands and specify rproc firmware names for adding remoteproc support in J722S SoCs.
Signed-off-by Beleswar Padhi <[email protected]>---
This patch is independent and puts the environment in place to boot remote processors at U-Boot stage.However, for successfully loading the firmwares into remote cores, rproc DT node definitions are required. These DT changes have been merged into Linux and available with v6.12 tag[0]. Once the DT Sync happens in U-Boot, remote processors can be probed and booted with the help of env commands enabled with this patch.
Sample Boot Test logs after manually adding DT nodes in U-Boot:
https://gist.github.com/3V3RYONE/0b5c7df5b5c88d2a2f273b6a04a3dd46[0]: https://lore.kernel.org/all/[email protected]/
Thanks,
Beleswarboard/ti/j722s/j722s.env | 6 ++++++ 1 file changed, 6 insertions(+)board/ti/j722s/j722s.env +0
-0@@ -1,6 +1,10 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env>
Quoted 14 lines
board/ti/j722s/j722s.env mmcdev=1 · line 21
Quoted 13 lines
board/ti/j722s/j722s.env +6
-0+#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif + name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000@@ -13,3 +17,5 @@ mmcdev=1 bootpart=1:2 bootdir=/boot rd_spec=- + +rproc_fw_binaries= 0 /lib/firmware/j722s-mcu-r5f0_0-fw 2 /lib/firmware/j722s-main-r5f0_0-fw 3 /lib/firmware/j722s-c71_0-fw 4 /lib/firmware/j722s-c71_1-fwFor SE devices do these firmware have that *-sig suffix?
Yes, for all K3 SE devices, the "*-sec" suffix is appended to the existing firmware paths[0].
Quoted 4 lines
My thinking is
this seems fairly specific to yocto with other distributions like debian or QNX will have different names or paths. Should this be put in the env that yocto builds?
Debian currently uses the same firmware names like Yocto. But yes, thinking about multi-distro, we can leave the default firmware paths as empty, and leave it to the user to override these paths according to their distro. That will have to be done for all K3 devices, as currently all those define Yocto based firmware paths in the U-Boot board environment.
However, if we leave the default rproc_fw_binaries as empty, rproc boot will fail silently without complaining, which could be confusing to the user. Whereas, if we have Yocto (or any other distro's) firmware paths as default, rproc boot will complain "No such file or directory" and fail when using with a different distro. What are your thoughts?
[0]: https://source.denx.de/u-boot/u-boot/-/blob/master/include/env/ti/k3_rproc.env?ref_type=heads#L18
Thanks,
Beleswar
Quoted 2 lines
~Bryan
Bryan Brattlof
Reviewed-byOn January 9, 2025 thus sayeth Beleswar Prasad Padhi:
Quoted 69 lines
Hi Bryan!
Quoted 41 lines · Bryan Brattlof
Hi Beleswar!
On January 8, 2025 thus sayeth Beleswar Padhi:
Quoted 38 lines
Include k3_rproc.env to access rproc boot commands and specify rproc firmware names for adding remoteproc support in J722S SoCs.
Signed-off-by Beleswar Padhi <[email protected]>---
This patch is independent and puts the environment in place to boot remote processors at U-Boot stage.However, for successfully loading the firmwares into remote cores, rproc DT node definitions are required. These DT changes have been merged into Linux and available with v6.12 tag[0]. Once the DT Sync happens in U-Boot, remote processors can be probed and booted with the help of env commands enabled with this patch.
Sample Boot Test logs after manually adding DT nodes in U-Boot:
https://gist.github.com/3V3RYONE/0b5c7df5b5c88d2a2f273b6a04a3dd46[0]: https://lore.kernel.org/all/[email protected]/
Thanks,
Beleswarboard/ti/j722s/j722s.env | 6 ++++++ 1 file changed, 6 insertions(+)board/ti/j722s/j722s.env +4
-0@@ -1,6 +1,10 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif + name_kern=Image console=ttyS2,115200n8Quoted 8 lines
board/ti/j722s/j722s.env mmcdev=1 · line 21
Quoted 7 lines
board/ti/j722s/j722s.env +2
-0args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000@@ -13,3 +17,5 @@ mmcdev=1 bootpart=1:2 bootdir=/boot rd_spec=- + +rproc_fw_binaries= 0 /lib/firmware/j722s-mcu-r5f0_0-fw 2 /lib/firmware/j722s-main-r5f0_0-fw 3 /lib/firmware/j722s-c71_0-fw 4 /lib/firmware/j722s-c71_1-fwFor SE devices do these firmware have that *-sig suffix?
Yes, for all K3 SE devices, the "*-sec" suffix is appended to the existing firmware paths[0].
Quoted 4 lines
My thinking is
this seems fairly specific to yocto with other distributions like debian or QNX will have different names or paths. Should this be put in the env that yocto builds?Debian currently uses the same firmware names like Yocto. But yes, thinking about multi-distro, we can leave the default firmware paths as empty, and leave it to the user to override these paths according to their distro. That will have to be done for all K3 devices, as currently all those define Yocto based firmware paths in the U-Boot board environment.
Quoted 7 lines
However, if we leave the default
rproc_fw_binariesas empty, rproc boot will fail silently without complaining, which could be confusing to the user. Whereas, if we have Yocto (or any other distro's) firmware paths as default, rproc boot will complain "No such file or directory" and fail when using with a different distro. What are your thoughts?[0]: https://source.denx.de/u-boot/u-boot/-/blob/master/include/env/ti/k3_rproc.env?ref_type=heads#L18
Yeah it puts a dependency on U-Boot to keep up any time debian or yocto wishes to change where they put the firmware on their rootfs in future releases as well :/ Ideally all of the scripting should go into the distros using them and let U-Boot stay distro neutral.
Unfortunately I don't see a clean way to do this unless yocto and debian take all of the env scripts so we can rip them out here.
A problem for another day though
Thanks Beleswar!
~Bryan
Quoted 4 lines · Beleswar Padhi
Include k3_rproc.env to access rproc boot commands and specify rproc firmware names for adding remoteproc support in J722S SoCs.
Applied to u-boot/master, thanks!
Signature · 1 line
Tom