RPMSG Lite multiple channels/endpoints

Hi @hfranco.tx ,
Thanks for your answer!
A few questions:

  • The rpmsg git repo you linked is on a branch toradex_5.4-2.3.x-imx. I am building with 5.6 and as I just saw there is a 5.7 now available, but I guess the rpmsg is completely the same?

  • To customize the kernel module, I should basically copy the rpmsg folder into my tcbworkdir, change the .c file and add the source-dir: to the yaml file?

  • The device tree overlay for RPMSG on Verdin you already sent me in this topic has this additional reserved memory part that probably needs some changes too for two endpoints. I’ve changed &rpmsg1 according to @Edward 's suggestion but I’m not sure what to do with the reserved-memory part:

&{/} {

    reserved-memory {

		#address-cells = <2>;
		#size-cells = <2>;
		ranges;
        
        vdev0vring0: vdev0vring0@B8000000 {
			compatible = "shared-dma-pool";
			reg = <0 0xB8000000 0 0x8000>;
			no-map;
		};

		vdev0vring1: vdev0vring1@B8008000 {
			compatible = "shared-dma-pool";
			reg = <0 0xB8008000 0 0x8000>;
			no-map;
		};

		vdevbuffer: vdevbuffer@b8400000 {
			compatible = "shared-dma-pool";
			reg = <0 0xb8400000 0 0x100000>;
			no-map;
		};
        
        rsc_table: rsc_table@B80FF000 {
			reg = <0 0xb80ff000 0 0x1000>;
			no-map;
		};
    };
};

&rpmsg {
	/*
	 * 64K for one rpmsg instance:
	 * --0xb8000000~0xb800ffff: pingpong
	 */
	vdev-nums = <2>;
	reg = <0x0 0xb8000000 0x0 0x20000>;
	memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>;
    status = "okay";
};

Thanks in advance for any insights!

EDIT: I guess we need two more vrings for the tx and rx of the second endpoint, and one more buffer, but I’m not sure