This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRA829V: rpmsg char driver has no /dev entry

Part Number: DRA829V

Hi,

I have a custom board, using Yocto for BSP customizing. For IPC in A72 linux as mentioned PSK docs there should a /dev/ entry.

I dont see any /dev entry. Is there any configuration required or I need enable any driver for the rpmsg /dev entry.

My end goal is to use user space  rpmsg_char_helper library for IPC between A72(linux) <--> r5f cores (TI rtos).

Below is output log the application

root@gcp-a72:~# ./ipc_echo_test
rproc_device_find_for_name :r5f-main-0-core-0
rproc_device_find_chrdev_by_remote_port: could not find a matching rpmsg_chrdev node
Error: could not find char device by remote port: 13

 Thanks

  • Hi Archana,

    The library interfaces with the rpmsg_chrdev driver. Make sure lsmod shows "rpmsg_char". A rpmsg device when probed with this driver creates the /dev/rpmsg_ctrl<X> devices.

    The library also supports only rpmsg devices with the name rpmsg_chrdev, so please ensure whatever images you are using publish those devices.

    Use 'ls -l /sys/bus/rpmsg/devices' to list the published rpmsg devices.

    regards

    Suman

  • Hi,

    In our case, rpmsg_chardev is built with kernel. Below are the rpmsg char driver config from defconfig :

    #
    # Rpmsg drivers
    #
    CONFIG_RPMSG=y
    CONFIG_RPMSG_CHAR=y
    CONFIG_RPMSG_QCOM_GLINK_NATIVE=y
    CONFIG_RPMSG_QCOM_GLINK_RPM=y
    CONFIG_RPMSG_VIRTIO=y
    CONFIG_RPMSG_PRU=y

    #
    # Rpmsg virtual device drivers
    #
    CONFIG_RPMSG_KDRV=y
    CONFIG_RPMSG_KDRV_DISPLAY=y
    CONFIG_RPMSG_KDRV_ETH_SWITCH=y

    Also I can see that rpmsg device is present-

    root@a72:~# ls -l /sys/bus/rpmsg/devices
    lrwxrwxrwx 1 root root 0 Aug 25 08:48 virtio0.ti.ipc4.ping-pong.-1.13 -> ../../../devices/platform/interconnect@100000/interconnect@100000:interconnect@28380000/interconnect@100000:interconnect@28380000:r5fss@41000000/41000000.r5f/remoteproc/remoteproc3/virtio0/virtio0.ti.ipc4.ping-pong.-1.13
    root@a72:~#

    I tried stopping and starting fw again but still /dev node does not come up


    root@a72:/sys/class/remoteproc# echo stop > remoteproc3/state
    [15252.748572] ipctest virtio0.ti.ipc4.ping-pong.-1.13: rpmsg sample client driver is removed
    [15252.756909] platform 41000000.r5f: R5F core deinitialized in IPC-only mode
    [15252.763817] remoteproc remoteproc3: stopped remote processor 41000000.r5f
    root@a72:/sys/class/remoteproc# echo stop > remoteproc4/state
    [15279.032603] platform 5c00000.r5f: R5F core deinitialized in IPC-only mode
    [15279.039421] remoteproc remoteproc4: stopped remote processor 5c00000.r5f
    root@a72:/sys/class/remoteproc#
    root@a72:/sys/class/remoteproc#
    root@a72:/sys/class/remoteproc# echo start > remoteproc3/state
    [15309.180520] remoteproc remoteproc3: powering up 41000000.r5f
    [15309.187636] remoteproc remoteproc3: Booting fw image j7-mcu-r5f0_0-fw, size 3531816
    [15309.195392] platform 41000000.r5f: R5F core initialized in IPC-only mode
    [15309.202459] virtio_rpmsg_bus virtio0: rpmsg host is online
    [15309.208313] remoteproc remoteproc3: registered virtio0 (type 7)
    [15309.214582] remoteproc remoteproc3: remote processor 41000000.r5f is now up
    root@a72:/sys/class/remoteproc# echo start > remoteproc4/state
    [15333.328512] remoteproc remoteproc4: powering up 5c00000.r5f
    [15333.334427] remoteproc remoteproc4: Booting fw image j7-main-r5f0_0-fw, size 735916
    [15333.342167] platform 5c00000.r5f: R5F core initialized in IPC-only mode
    [15333.349167] virtio_rpmsg_bus virtio1: rpmsg host is online
    [15333.355026] remoteproc remoteproc4: registered virtio1 (type 7)
    [15333.361304] remoteproc remoteproc4: remote processor 5c00000.r5f is now up
    root@a72:/sys/class/remoteproc#

    With sample rpmsg sample client module, ping pong example works fineOnly /dev entry is not present

    insmod /lib/modules/4.19.94-g5a23bc00e0/kernel/samples/rpmsg/rpmsg_client_sample.ko

    Archana

  • Hi Archana,

    OK, your kernel config looks good.

    The rpmsg devices need to be bound with rpmsg-char driver for you to be able to exercise them. And you should see some rpmsg_ctrlX entries under /sys/class/rpmsg.

    It appears that you have the default IPC example firmware images that publish the device name "ti.ipc4.ping-pong". The rpmsg-char-helper library only supports devices that are published with the name "rpmsg_chrdev" (The rpmsg devices would look like virtio<X>.rpmsg_chrdev.-1.<Y>.

    You can get the virtio0.ti.ipc4.ping-pong.-1.13 device to be bound to the rpmsg-char driver, but you will not be able to use the rpmsg-char-library to talk to it.

    Please try rebuilding and using a firmware with the desired rpmsg device name. 

    regards

    Suman