RPMSG not working on kernel 5.4.x

Hi i am using the latest kernel defconfig and am currently unable to get even the example rpmsg programs to run.

i have updated the device tree to disable the uart to allow the m4 core to use uart but that is the only change i have made.

are there steps i am missing?

i have found that the virtio_rpmsg_bus probe is failing:

I can also confirm that when i load the 3.0b2 tezi onto the SOM it will not throw these errors.

Since it is failing with error -12 then i would assume that this something to do with ENOMEM. However i find this hard to understand - i have attached an image of the memory usage below.

Hi @BadTalent,

Please provide detailed information apart from only Kernel/Defconfig, like:

  • Which Toradex BSP are you using?
  • Are you compiling your own image through Yocto, or using and modifying an existing Reference Image from Toradex?
  • Have you done any modifications to the device-tree?

Best regards,
André Curvello

@andrecurvello.tx
Using BSP 5.0
Other than updating the device tree i have not modified any of the kernel code.
I have applied the following updates:

&rpmsg0 {
	status = "okay";
};

&rpmsg1 {
	status = "okay";
};

and removed the uart 1 from the io mux to allow m4control over tightly coupled uart

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_cam1_gpios>, <&pinctrl_dap1_gpios>,
		    <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>,
		    <&pinctrl_gpio3>, <&pinctrl_gpio4>,
		    <&pinctrl_gpio_usbh_oc_n>,
		    <&pinctrl_lvds0_i2c0_gpio>, <&pinctrl_lvds1_i2c0_gpios>,
		    <&pinctrl_mipi_dsi_0_1_en>, <&pinctrl_mipi_dsi1_gpios>,
		    <&pinctrl_mlb_gpios>, <&pinctrl_qspi1a_gpios>,
		    <&pinctrl_sata1_act>, <&pinctrl_sim0_gpios>,
		    <&pinctrl_usdhc1_gpios>;

I have been able to get rpmsg working. turns out that the memory-region is preventing it from being configured.

to fix it i have done the following:

&rpmsg0{
	/*
	 * 64K for one rpmsg instance:
	 */
	vdev-nums = <2>;
	reg = <0x0 0x90000000 0x0 0x20000>;
       //memory-region = <&vdevbuffer>;
};

&rpmsg1{
	/*
	 * 64K for one rpmsg instance:
	 */
	vdev-nums = <2>;
	reg = <0x0 0x90000000 0x0 0x20000>;
       //memory-region = <&vdevbuffer>;
};

Any comments on this, @gustavo.tx ?

I haven’t tested this on the Apalis iMX8QM with the latest image. Will do and update documentation and/or notify the BSP team accordingly.