RPU (Zephyr) Device Tree Requirements - RPU (Zephyr) Device Tree Requirements - 2026.1 English - UG1186

Libmetal and OpenAMP User Guide (UG1186)

Document ID
UG1186
Release Date
2026-06-24
Version
2026.1 English

Use the following device tree reference:

  1. Configure the chosen node:
    chosen {
        stdout-path = "serial1:115200n8";
        bootargs = "earlycon=pl011,mmio32,0xf1930000 console=ttyAMA1,115200";
        /* OpenAMP IPC shared memory region */
        zephyr,ipc_shm = "/reserved-memory/ipc@9860000";
        /* Firmware load region for ELF boot */
        zephyr,sram = "/reserved-memory/ddrboot@9800100";
    };
    
  2. Review the key chosen properties:
    • zephyr,ipc_shm: Points to shared memory for VirtIO vrings and buffers
    • zephyr,sram: DDR region where Linux remoteproc loads the Zephyr ELF
  3. Define reserved memory on the Zephyr side:
    reserved-memory {
        #size-cells = <0x2>;
        #address-cells = <0x2>;
        ranges;
        /* Firmware boot region - must match Linux DT */
        ddrboot@9800100 {
            phandle = <0x269>;
            device_type = "memory";
            no-map;
            reg = <0x0 0x9800100 0x0 0x5ff00>;
        };
        /* IPC shared memory - includes vrings and buffers */
        ipc@9860000 {
            phandle = <0x26b>;
            compatible = "mmio-sram";
            reg = <0x0 0x9860000 0x0 0x48000>;  /* 288 KB total */
        };
    };
    The ipc@9860000 region includes both vrings and the shared buffer pool (0x9860000 to 0x98a8000).
  4. Configure the IPI mailbox on the Zephyr side:
    ipi_nobuf2: mailbox@eb3b1000 {
        compatible = "xlnx,mbox-versal-ipi-mailbox";
        interrupt-parent = <&gic_r52>;
        interrupts = <0x0 0x41 0x4 0xa0>;
        reg = <0x0 0xeb3b1000 0x0 0x1000>;
        xlnx,ipi-id = <0xb>;                    /* RPU IPI ID (no-buffer) */
        #address-cells = <0x2>;
        #size-cells = <0x2>;
        ranges;
        /* RPU to APU IPI channel */
        ipi_2_nobuf_to_ipi_1_nobuf: child@eb3b0000 {
            compatible = "xlnx,mbox-versal-ipi-dest-mailbox";
            #mbox-cells = <0x1>;
            xlnx,ipi-id = <0xa>;                /* Target APU no-buf IPI */
            reg = <0x0 0xeb3b0000 0x0 0x1000>;
            reg-names = "ctrl";
        };
    };
    /* Mailbox consumer binding for Zephyr IPC driver */
    mbox-consumer {
        compatible = "vnd,mbox-consumer";
        mboxes = <&ipi_2_nobuf_to_ipi_1_nobuf 0x0>,  /* TX to APU */
                 <&ipi_2_nobuf_to_ipi_1_nobuf 0x1>;  /* RX from APU */
        mbox-names = "tx", "rx";
    };
  5. Configure the Zephyr firmware:
    1. Use the OpenAMP System Reference - RPMsg Multi Services application.
    2. Project configuration (prj.conf):
      CONFIG_KERNEL_BIN_NAME="rpmsg_multi_services"
      CONFIG_PRINTK=n
      CONFIG_IPM=y
      CONFIG_MAIN_STACK_SIZE=1024
      CONFIG_HEAP_MEM_POOL_SIZE=1024
      CONFIG_OPENAMP=y
      CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF=8
      CONFIG_OPENAMP_RSC_TABLE=y
      CONFIG_OPENAMP_MASTER=n
  6. Review the application structure
    • src/main_remote.c: main application that implements RPMsg endpoints
    • boards/: board-specific overlays; use kv260_r5.overlay as a reference for Zynq
    • prj.conf: Zephyr project configuration
    • CMakeLists.txt: build configuration