RPMsg in Verdin IVYPLUS

Hi

Carrier Board : Verdin IVY PLUS Board
Board : IMX8MP
Linux : verdin-imx8mp-15290475 5.15.129-rt67-6.5.0-devel+git.6f8fd49366db #1 SMP PREEMPT_RT Fri Dec 22 11:15:52 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Earlier under the Verdin Dev board, i could able to send and receive RPM message code .

When I moved to verdin_ivy plus board, I repeated all the overlay files same as earlier..

I could able to run the CM7 fimware.

When i run my code, it got struck at “rpmsg_lite_wait_for_link_up(my_rpmsg, RL_BLOCK);”

and my linux side code exits at “open rpmsg_ctrl0: No such file or directory"" error .

When I run the “run cm_boot” i see the console in CM7 as follows.

CAN1_Init: 500000 bps, RX_MB=8 ID=0x1A, TX_MB=9 ID=0x1B, EXT
resp1 0x 0  0x 0   0x 0
resp2 0x 0  0x 0   0x 0
resp3 0x 0  0x 0   0x 0
resp4 0x 0  0x 0   0x 0
PS2 Controller Init Failed

Starting GPT timer…

RPMSG init starts @app_task
RPMSG init Passed
Waiting RPMsg link…
Link UP
Linux has initialized RPMSG bus vrings

and in linux : ls /sys/bus/rpmsg/devices is return nothing.

Why it was ok when i run @ the uboot,

why its not working with setenv bootcmd ‘run cm_boot; run distro_bootcmd’ in linux.

Thanks

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Your issue appears to be related to the timing of when the Cortex-M7 firmware is loaded versus when Linux initializes the RPMsg subsystem. Based on your setup with the Verdin iMX8M Plus and Ivy Plus carrier board, there are several factors that could cause this behavior.

Key Differences Between Manual and Automatic Boot

When you manually run run cm_boot in U-Boot, the Cortex-M7 firmware is loaded and starts before Linux boots, which allows proper RPMsg initialization (1). However, when using setenv bootcmd 'run cm_boot; run distro_bootcmd', there may be timing issues or memory conflicts during the boot process.

Troubleshooting Steps

1. Verify Device Tree Overlay Configuration

Ensure you have the correct HMP overlay applied. For Verdin iMX8M Plus, you should be using verdin-imx8mp_hmp_overlay.dtbo (2). Check that this overlay is properly configured in your /boot/overlays.txt file.

2. Check Memory Configuration

The RPMsg communication requires specific memory regions to be reserved. The overlay should configure memory regions like (2):

vdev0vring0: vdev0vring0@b8000000 {
    reg = <0 0xb8000000 0 0x8000>;
    no-map;
};

vdev0vring1: vdev0vring1@b8008000 {
    reg = <0 0xb8008000 0 0x8000>;
    no-map;
};

rsc_table: rsc_table@b80ff000 {
    reg = <0 0xb80ff000 0 0x1000>;
    no-map;
};

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

3. Verify U-Boot Environment Variables

Check your U-Boot configuration. The proper setup should include (1):

setenv load_cmd "ext4load mmc 0:2"
setenv cm_image "/home/root/hello_world.bin"
setenv cm_image_size 20000
setenv load_cm_image "${load_cmd} ${loadaddr} ${cm_image}"
setenv cm_boot "${load_cm_image}; cp.b ${loadaddr} 0x7e0000 ${cm_image_size}; dcache flush; bootaux 0x7e0000"
saveenv

4. Check Linux RPMsg Driver Status

After Linux boots, verify that the RPMsg driver is registered (2):

dmesg | grep -i rpmsg

You should see something like:

[    0.045742] imx rpmsg driver is registered.

5. Alternative Boot Approach

Instead of using bootcmd, try setting up the Cortex-M7 to start automatically by modifying the tdxargs variable to include the necessary parameters for early M7 initialization (3):

setenv tdxargs "your_existing_args m7_early_boot=1"
saveenv

Potential Solutions

  1. Timing Issue: The automatic boot sequence might not provide enough time for proper initialization. Try adding a delay in your boot script.

  2. Memory Conflicts: Ensure that the memory regions used by your firmware don’t conflict with Linux memory allocation.

  3. Device Tree Loading Order: Verify that the HMP overlay is loaded before Linux attempts to initialize RPMsg.

The fact that it works when manually executed suggests the hardware and firmware are correct, but there’s likely a timing or initialization order issue when using the automatic boot sequence.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi Toradex ,

Thanks for your reply.

I noticed one thign on the Dev board image and IVY plus board image.

DevBoard:



 root@verdin-imx8mp-15290475:~# zcat /proc/config.gz | egrep -i “VIRTIO_RPMSG|RPM
SG_CHAR|RPMSG|REMOTE_PROC|VIRTIO” | sort

CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set

CONFIG_BT_VIRTIO is not set

CONFIG_CROS_EC_RPMSG is not set

CONFIG_CRYPTO_DEV_VIRTIO is not set

CONFIG_DRM_VIRTIO_GPU is not set

CONFIG_GPIO_VIRTIO is not set

CONFIG_HW_RANDOM_VIRTIO is not set

CONFIG_I2C_VIRTIO is not set

CONFIG_REGULATOR_PF1550_RPMSG is not set

CONFIG_SCSI_VIRTIO is not set

CONFIG_SND_VIRTIO is not set

CONFIG_VIRTIO_FS is not set

CONFIG_VIRTIO_INPUT is not set

CONFIG_VIRTIO_IOMMU is not set

CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set

Rpmsg drivers

end of Rpmsg drivers

CONFIG_BLK_MQ_VIRTIO=y
CONFIG_GPIO_IMX_RPMSG=y
CONFIG_HAVE_IMX_RPMSG=y
CONFIG_IMX_RPMSG_PINGPONG=m
CONFIG_IMX_RPMSG_TTY=m
CONFIG_KEYBOARD_RPMSG=y
CONFIG_NET_9P_VIRTIO=y
CONFIG_RPMSG=y
CONFIG_RPMSG_CHAR=m
CONFIG_RPMSG_CTRL=m
CONFIG_RPMSG_IIO_PEDOMETER=m
CONFIG_RPMSG_LIFE_CYCLE=y
CONFIG_RPMSG_NS=y
CONFIG_RPMSG_QCOM_GLINK=y
CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_RPMSG_VIRTIO=y
CONFIG_RTC_DRV_IMX_RPMSG=y
CONFIG_SND_SOC_FSL_RPMSG=m
CONFIG_SND_SOC_IMX_AUDIO_RPMSG=m
CONFIG_SND_SOC_IMX_PCM_RPMSG=m
CONFIG_SND_SOC_IMX_RPMSG=m
CONFIG_SND_SOC_RPMSG_AK4497=m
CONFIG_SND_SOC_RPMSG_WM8960=m
CONFIG_SND_SOC_RPMSG_WM8960_I2C=m
CONFIG_VIRTIO=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_VIRTIO_IVSHMEM=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_MMIO=y          ------------->> note this 
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_PCI_LIB=y


where as in IVY PLUS board

root@verdin-imx8mp-15290727:~# zcat /proc/config.gz | egrep -i “VIRTIO_RPMSG|RPM SG|REMOTE_PROC|VIRTIO” | sort

CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set

CONFIG_BT_VIRTIO is not set

CONFIG_CRYPTO_DEV_VIRTIO is not set

CONFIG_DRM_VIRTIO_GPU is not set

CONFIG_GPIO_IMX_RPMSG is not set

CONFIG_GPIO_VIRTIO is not set

CONFIG_HW_RANDOM_VIRTIO is not set

CONFIG_I2C_VIRTIO is not set

CONFIG_KEYBOARD_RPMSG is not set

CONFIG_PCI_NXP_RPMSG is not set # CONFIG_REGULATOR_PF1550_RPMSG is not set

CONFIG_RPMSG_IIO_PEDOMETER is not set

CONFIG_RPMSG_QCOM_GLINK_RPM is not set

CONFIG_RTC_DRV_IMX_RPMSG is not set

CONFIG_SCSI_VIRTIO is not set

CONFIG_SND_SOC_RPMSG_AK4497 is not set

CONFIG_SND_SOC_RPMSG_WM8960 is not set

CONFIG_SND_SOC_RPMSG_WM8960_I2C is not set

CONFIG_SND_VIRTIO is not set

CONFIG_VIRTIO_BALLOON is not set

CONFIG_VIRTIO_BLK is not set

CONFIG_VIRTIO_CONSOLE is not set

CONFIG_VIRTIO_FS is not set

CONFIG_VIRTIO_INPUT is not set

CONFIG_VIRTIO_IOMMU is not set

CONFIG_VIRTIO_IVSHMEM is not set

CONFIG_VIRTIO_MMIO is not set   ( note on this)

CONFIG_VIRTIO_NET is not set

CONFIG_VIRTIO_PCI is not set

Rpmsg drivers

end of Rpmsg drivers

CONFIG_BLK_MQ_VIRTIO=y
CONFIG_HAVE_IMX_RPMSG=y
CONFIG_IMX_RPMSG_PINGPONG=m
CONFIG_IMX_RPMSG_TTY=m
CONFIG_RPMSG=y
CONFIG_RPMSG_CHAR=m
CONFIG_RPMSG_CTRL=m
CONFIG_RPMSG_LIFE_CYCLE=y
CONFIG_RPMSG_NS=y
CONFIG_RPMSG_TTY=m
CONFIG_RPMSG_VIRTIO=y
CONFIG_SND_SOC_FSL_RPMSG=m
CONFIG_SND_SOC_IMX_AUDIO_RPMSG=m
CONFIG_SND_SOC_IMX_PCM_RPMSG=m
CONFIG_SND_SOC_IMX_RPMSG=m
CONFIG_VIRTIO=y
CONFIG_VIRTIO_ANCHOR=y
CONFIG_VIRTIO_MENU=y

does the changes in the configuration as any impact on this?

Kernel Configuration Impact on RPMsg

Yes, the kernel configuration differences you’ve identified are critical for RPMsg functionality. The missing CONFIG_VIRTIO_MMIO=y configuration on your Ivy Plus board is likely the root cause of your RPMsg communication issues (1).

Key Configuration Differences

The most significant difference between your working Dev Board and non-working Ivy Plus board configurations is:

Dev Board (Working):

  • CONFIG_VIRTIO_MMIO=y :white_check_mark:

Ivy Plus Board (Not Working):

  • CONFIG_VIRTIO_MMIO is not set :cross_mark:

Why VIRTIO_MMIO is Critical

The CONFIG_VIRTIO_MMIO configuration is essential for RPMsg communication because it enables the VirtIO Memory-Mapped I/O transport mechanism that RPMsg relies on for inter-processor communication (1). Without this configuration, the Linux kernel cannot properly establish the VirtIO communication channels needed for RPMsg to function.

Additional Missing Configurations

Your Ivy Plus board is also missing several other RPMsg-related configurations that are present on the working Dev Board:

  • CONFIG_GPIO_IMX_RPMSG=y vs CONFIG_GPIO_IMX_RPMSG is not set
  • CONFIG_KEYBOARD_RPMSG=y vs CONFIG_KEYBOARD_RPMSG is not set
  • CONFIG_RTC_DRV_IMX_RPMSG=y vs CONFIG_RTC_DRV_IMX_RPMSG is not set

Solution

To resolve this issue, you need to rebuild your kernel with the proper RPMsg and VirtIO configurations enabled. The essential configurations that should be enabled include (1):

CONFIG_VIRTIO_MMIO=y
CONFIG_RPMSG_VIRTIO=y
CONFIG_RPMSG_CHAR=m
CONFIG_HAVE_IMX_RPMSG=y
CONFIG_IMX_RPMSG_TTY=m
CONFIG_RPMSG=y

Verification Steps

After rebuilding with the correct kernel configuration:

  1. Check that the RPMsg driver is registered (1):
dmesg | grep -i rpmsg

You should see:

[    0.045742] imx rpmsg driver is registered.
  1. Load the RPMsg TTY module (1):
sudo modprobe imx_rpmsg_tty
  1. Verify device creation (1):
ls /dev/ | grep -i rpmsg

The kernel configuration differences explain why your RPMsg communication works on the Dev Board but fails on the Ivy Plus board, despite using the same hardware platform and device tree overlays.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi @ramesh.rajagopal , it is usually only the device tree change needed to adapt different carriers. For example, imx8mp-verdin-wifi-ivy.dts is for Ivy, and imx8mp-verdin-wifi-dev.dts is for Dev Board. Kernel configuration is the same. Your logs indicate that a module with SN:15290727 is mounted on Ivy, another module with SN: 15290475 is mounted on Dev Board. They probably have different BSPs installed. Can you please check the BSP versions installed on both modules?

Hi Benjamin,

Thanks for your reply.

Here is the information on both images.

IVY PLUS :

root@verdin-imx8mp-15290727:~# tdx-info

Software summary

Bootloader:               U-Boot
Kernel version:           6.6.54-rt44-7.1.0-devel-gd344e3ea493b #1 SMP PREEMPT_RT Thu Oct 31 16:17:44 UTC 2024
Kernel command line:      root=PARTUUID=15928c7e-02 ro rootwait console=tty1 console=ttymxc2,115200
Distro name:              NAME=“TDX Wayland with XWayland RT”
Distro version:           VERSION_ID=7.1.0-devel-20241209103856-build.0
Distro variant:           -
Hostname:                 verdin-imx8mp-15290727

Hardware info

HW model:                 Toradex Verdin iMX8M Plus on Ivy
Toradex version:          0063 V1.1B
Serial number:            15290727
Processor arch:           aarch64

root@verdin-imx8mp-15290727:~# cat /etc/os-release
ID=tdx-xwayland-rt
NAME=“TDX Wayland with XWayland RT”
VERSION=“7.1.0-devel-20241209103856+build.0 (scarthgap)”
VERSION_ID=7.1.0-devel-20241209103856-build.0
VERSION_CODENAME=“scarthgap”
PRETTY_NAME=“TDX Wayland with XWayland RT 7.1.0-devel-20241209103856+build.0 (scarthgap)”
CPE_NAME=“cpe:/o:openembedded:tdx-xwayland-rt:7.1.0-devel-20241209103856+build.0”

Dev Board’:

root@verdin-imx8mp-15290475:~# tdx-info

Software summary

Bootloader:               U-Boot
Kernel version:           5.15.129-rt67-6.5.0-devel+git.6f8fd49366db #1 SMP PREEMPT_RT Fri Dec 22 11:15:52 UTC 2023
Kernel command line:      root=PARTUUID=9e9c85a9-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon clk-imx8mp.mcore_booted=1
Distro name:              NAME=“TDX Wayland with XWayland RT”
Distro version:           VERSION_ID=6.5.0-devel-20240402092141-build.0
Distro variant:           -
Hostname:                 verdin-imx8mp-15290475

Hardware info

HW model:                 Toradex Verdin iMX8M Plus on Verdin Development Board
Toradex version:          0063 V1.1B
Serial number:            15290475
Processor arch:           aarch64

root@verdin-imx8mp-15290475:~# cat /etc/os-release
ID=tdx-xwayland-rt
NAME=“TDX Wayland with XWayland RT”
VERSION=“6.5.0-devel-20240402092141+build.0 (kirkstone)”
VERSION_ID=6.5.0-devel-20240402092141-build.0
PRETTY_NAME=“TDX Wayland with XWayland RT 6.5.0-devel-20240402092141+build.0 (kirkstone)”
DISTRO_CODENAME=“kirkstone”
root@verdin-imx8mp-15290475:~#

We suggest upgrading the current BSP 7.1.0 to 7.6.0 on Ivy. HMP can be enabled by verdin-imx8mp_hmp_overlay.dtbo. Adding clk-imx8mp.mcore_booted=1 to the kernel command line by setenv tdxargs $tdxargs clk-imx8mp.mcore_booted=1;saveenv in U-Boot.

Hi Benjamin , they image you send me with the

“Reference-Multimedia-Image-verdin-imx8mp” , i am looking to build with the “Minimal Image RT-verdin-imx8mp” “.

Can I download readily available or do i need to build.

Thanks

Hi @ramesh.rajagopal , you have to build RT image from the Yocto Project. This command will update build files to the latest monthly release.

$ repo init -u git://git.toradex.com/toradex-manifest.git -b refs/tags/7.6.0-devel-202603 -m tdxref/default.xml $ repo sync

Hi Benjamin,

When I build with the atemsys, it had checksum error as follows.

when I excludeed that , i have build successful. build/deploy/verdin-im8mp folder looks with so many files.

am i doing correct things,.pls guide me.

Hi @ramesh.rajagopal , atemsys binary is provided by Acontis. They may have updated it, but forgot the recipe. By the way, the latest atmesys is 1.4.36. We suggest checking with Acontis about the version changes.

Hi ,

I build the new kernel

          \-root@verdin-imx8mp-15290727:\~# tdx-info
          
          ## Software summary
          
          ## Bootloader:               U-Boot
          Kernel version:           6.6.119-rt67-7.6.0-devel #1 SMP PREEMPT_RT Fri Feb 27
          14:36:24 UTC 2026
          Kernel command line:      root=PARTUUID=9194b61a-02 ro rootwait console=tty1 con
          sole=ttymxc2,115200 clk-imx8mp.mcore_booted=1
          Distro name:              NAME=“TDX Wayland with XWayland RT”
          Distro version:           VERSION_ID=7.6.0-devel-20260311103750-build.0
          Distro variant:           -
          Hostname:                 verdin-imx8mp-15290727
          
          ## Hardware info
          
          ## HW model:                 Toradex Verdin iMX8M Plus on Ivy
          Toradex version:          0063 V1.1B
          Serial number:            15290727
          Processor arch:           aarch64

Check on CONFIG_VIRTIO_MMIO

  root@verdin-imx8mp-15290727:~# zcat /proc/config.gz | grep MMIO
  CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y
  CONFIG_REGMAP_MMIO=y 
  # CONFIG_MDIO_BUS_MUX_MMIOREG is not set
  # CONFIG_GPIO_74XX_MMIO is not set 
  # CONFIG_THERMAL_MMIO is not set 
  # CONFIG_VIRTIO_MMIO is not set 
  # CONFIG_COMMON_CLK_FIXED_MMIO is not set
  CONFIG_CLKSRC_MMIO=y 
  CONFIG_MUX_MMIO=y

"CONFIG_VIRTIO_MMIO is not set" is not set again.

root@verdin-imx8mp-15290727:/home/RRTest# zcat /proc/config.gz | grep RPMSG
# CONFIG_PCI_NXP_RPMSG is not set
# CONFIG_KEYBOARD_RPMSG is not set
CONFIG_RPMSG_TTY=m
# CONFIG_GPIO_IMX_RPMSG is not set
# CONFIG_REGULATOR_PF1550_RPMSG is not set
CONFIG_SND_SOC_FSL_RPMSG=m
CONFIG_SND_SOC_IMX_AUDIO_RPMSG=m
CONFIG_SND_SOC_IMX_PCM_RPMSG=m
CONFIG_SND_SOC_IMX_RPMSG=m
# CONFIG_SND_SOC_RPMSG_WM8960 is not set
# CONFIG_SND_SOC_RPMSG_WM8960_I2C is not set
# CONFIG_SND_SOC_RPMSG_AK4497 is not set
# CONFIG_RTC_DRV_IMX_RPMSG is not set
CONFIG_RPMSG=y
CONFIG_RPMSG_CHAR=m
CONFIG_RPMSG_CTRL=m
CONFIG_RPMSG_NS=y
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
CONFIG_RPMSG_VIRTIO=y
CONFIG_HAVE_IMX_RPMSG=y
CONFIG_IMX_RPMSG_PINGPONG=m
CONFIG_IMX_RPMSG_TTY=m
CONFIG_RPMSG_LIFE_CYCLE=y
# CONFIG_RPMSG_IIO_PEDOMETER is not set

can you pls guide me where need to config this"CONFIG_VIRTIO_MMIO" before the build the kernel.

and I confirmed the
printenv.TXT (4.9 KB)

Thanks
Ramesh.

Also I confirm included the hmp overlay accordingly.

fdt_overlays=verdin-imx8mp_hdmi_overlay.dtbo verdin-imx8mp_dsi-to-hdmi_overlay.dtbo verdin-imx8mp_spidev_overlay.dtbo atemsys_fec.dtbo verdin-imx8mp_uart4_cm7-overlay.dtbo verdin-imx8mp_hmp_overlay.dtbo disable_uart1.dtbo disable_can1.dtbo

Thanks
Ramesh.

Hi @ramesh.rajagopal , before building the image, this command will change the kernel config,

bitbake -c menuconfig virtual/kernel

Appreciate your help,