Hi @buw3,
Can you check if at least the rpmsg-tty channel is created on you side? You should see something like:
[ 230.534715] virtio_rpmsg_bus virtio1: creating channel rpmsg-tty addr 0xd
I just tried on my side and it worked. I installed the latest BSP scarthgap-7.x.y quartely (7.3.0), toradex-reference-minimal-image. The I compiled your overlay:
/*
* Description:
* This overlay confugured the ipc (inter processor communication) between M4F, R5F and Linux.
*/
/dts-v1/;
/plugin/; //Indicates a Device Tree Overlay
/ {
/* Set hardware compatibility */
compatible = "toradex,verdin-am62-nonwifi-dev",
"toradex,verdin-am62-nonwifi",
"toradex,verdin-am62",
"ti,am625";
};
&{/} {
/* memory reservation for ipc mailbox system */
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ramoops@9c700000 {
compatible = "ramoops";
reg = <0x00 0x9c700000 0x00 0x00100000>;
record-size = <0x8000>;
console-size = <0x8000>;
ftrace-size = <0x00>;
pmsg-size = <0x8000>;
};
/* global cma region */
linux,cma {
compatible = "shared-dma-pool";
reusable;
size = <0x00 0x8000000>;
linux,cma-default;
};
rtos_ipc_memory_region: ipc-memories@9c800000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9c800000 0x00 0x00300000>;
no-map;
};
mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9cb00000 0x00 0x100000>;
no-map;
};
mcu_m4fss_memory_region: m4f-memory@9cc00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9cc00000 0x00 0xe00000>;
no-map;
};
wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9da00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9da00000 0x00 0x00100000>;
no-map;
};
wkup_r5fss0_core0_memory_region: r5f-memory@9db00000 {
compatible = "shared-dma-pool";
reg = <0x00 0x9db00000 0x00 0x00c00000>;
no-map;
};
};
};
/* inter-processor communication mailbox system configuration */
&mailbox0_cluster0 {
status = "okay";
mbox_m4_0: mbox-m4-0 {
ti,mbox-rx = <0 0 0>;
ti,mbox-tx = <1 0 0>;
};
mbox_r5_0: mbox-r5-0 {
ti,mbox-rx = <2 0 0>;
ti,mbox-tx = <3 0 0>;
};
};
&mcu_m4fss {
status = "okay";
mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
mbox-names = "tx", "rx";
memory-region = <&mcu_m4fss_dma_memory_region>,
<&mcu_m4fss_memory_region>;
wakeup-source;
};
&wkup_r5fss0_core0 {
mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
<&wkup_r5fss0_core0_memory_region>;
};
&mcu_uart0 {
status = "reserved";
};
(I just added the mcu_uart0 at the end so I could see the messages from the cortex-m4 side).
Next I loaded the overlay and loaded the ipc_rpmsg_echo_linux demo from TI and I can see the channel was created the /dev/ttyRPMSG0 was also created:
root@verdin-am62-15479173:~# cat /sys/class/remoteproc/remoteproc0/firmware
am62-mcu-m4f0_0-fw
root@verdin-am62-15479173:~# cp ipc_rpmsg_echo_linux.release.out /lib/firmware/am62-mcu-m4f0_0-fw
root@verdin-am62-15479173:~# echo start > /sys/class/remoteproc/remoteproc0/state
[ 230.492399] remoteproc remoteproc0: powering up 5000000.m4fss
[ 230.506681] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 490524
[ 230.520520] rproc-virtio rproc-virtio.6.auto: assigned reserved memory node m4f-dma-memory@9cb00000
[ 230.533599] virtio_rpmsg_bus virtio1: rpmsg host is online
[ 230.534715] virtio_rpmsg_bus virtio1: creating channel rpmsg-tty addr 0xd
[ 230.539310] rproc-virtio rproc-virtio.6.auto: registered virtio1 (type 7)
[ 230.546239] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
[ 230.555711] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
root@verdin-am62-15479173:~# ls /dev/ttyRPMSG0
/dev/ttyRPMSG0
> Is my newly modified overlay correct? Would you have written it differently?
I believe it is correct yes, the test on my side shows the m4 is working. If you do not want any IPC with the cortex-R5, you can remove the “wkup” and “r5” nodes. Please notice this core runs the DM firmware, so you can not load a custom firmware there without breaking anything related to the kernel. You should use cortex-M4 for custom firmware for AM62.
In addition, I see you are adding the “linux,cma” and “ramoops” nodes, this is fine but it is not related to the cortex-m4, so make sure you really need those nodes.
Best regards,
Hiago.