<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1668334#M207503</link>
    <description>&lt;P&gt;Ah, you're right about the bindings example. That's where I found it! However, I should clarify that there doesn't seem to be an example DTS where the &lt;U&gt;imx_rpmsg_tty&lt;/U&gt; driver (in conjunction with existing RPMsg Cortex-M example code) works without me manually adding the&amp;nbsp;&lt;U&gt;rpmsg&lt;/U&gt; node that you see in my DTS (it doesn't exist in the&amp;nbsp;&lt;EM&gt;imx8mp-evk-rpmsg.dts&lt;/EM&gt;).&lt;BR /&gt;&lt;BR /&gt;The &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-5.15.71-2.2.0/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts" target="_self"&gt;code&lt;/A&gt;&amp;nbsp;you linked (which is the&amp;nbsp;&lt;EM&gt;imx8mp-evk-rpmsg.dts&lt;/EM&gt;) I mentioned in my original post (but didn't provide a link to). That DTS is what I derived mine from (I stripped out the stuff I don't need and added the rpmsg node which wasn't in the example dts).&lt;/P&gt;&lt;P&gt;I should clarify that what I have works as is. If I remove the RPMsg node, then the&amp;nbsp;&lt;U&gt;imx_rpmsg_tty&lt;/U&gt;&amp;nbsp;driver is unable to connect to the Cortex-M when running the RPMsg example code on the Cortex-M which would be expected.&lt;/P&gt;&lt;P&gt;However, my other questions (1,3 &amp;amp; 4) still remain. I should note that for question 1 that I observed that if I remove the&amp;nbsp;&lt;U&gt;imx8mp-cm7&lt;/U&gt;&amp;nbsp;node, RPMsg with the &lt;U&gt;imx_rpmsg_tty&lt;/U&gt;&amp;nbsp;seems to work as expected (assuming the RPMsg node is there as in my example). Which leads to my question #1.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 10:41:04 GMT</pubDate>
    <dc:creator>daharingwitekio</dc:creator>
    <dc:date>2023-06-13T10:41:04Z</dc:date>
    <item>
      <title>i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1665146#M207268</link>
      <description>&lt;P&gt;Hi, I'm trying to use the RPMsg functionality on the IMX8MP between the Cortex-A53 &amp;amp; M7. More specifically, right now I'm trying to use it with the example `imx_rpmsg_tty` driver to have a simple character device interface between them. I've read through some documents I found and used the example device tree `arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts` as my base. But I've had a hard time finding documentation for the RPMsg node itself and I wanted to ask a list of questions. Also please forgive me because I'm still kind of new to BSP development.&lt;/P&gt;&lt;P&gt;First, here is the device tree I've created (it's a modified/trimmed version of the example DTS with rpmsg node added):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include &amp;lt;dt-bindings/clock/imx8mp-clock.h&amp;gt;
#include &amp;lt;dt-bindings/gpio/gpio.h&amp;gt;

/*
 * ATTENTION: M7 may use IPs/peripherals including:
 * ECSPI0/ECSPI2, FLEXCAN, GPIO1/GPIO5, GPT1, I2C3, I2S3, UARTs,
 * PWM4, SDMA1/SDMA2, and more. Any peripheral used by the cortex M7
 * must be disabled in the device tree and must be added to domain 1
 * in the U-Boot device tree.
 */

/ {
    // This is for RPMsg. Specifically, at least for the imx_rpmsg_tty driver
    rpmsg: rpmsg {
        compatible = "fsl,imx8mq-rpmsg";
        reg = &amp;lt;0x0 0x55000000 0x0 0x80000&amp;gt;;
        memory-region = &amp;lt;&amp;amp;vdevbuffer&amp;gt;;
        vdev-nums = &amp;lt;1&amp;gt;;
        /* up to now, the following channels are used in imx rpmsg
            * - tx1/rx1: messages channel.
            * - general interrupt1: remote proc finish re-init rpmsg stack
            *   when A core is partition reset.
            */
        mbox-names = "tx", "rx", "rxdb";
        mboxes = &amp;lt;&amp;amp;mu 0 1
                  &amp;amp;mu 1 1
                  &amp;amp;mu 3 1&amp;gt;;
        status = "okay";
    };

    reserved-memory {
        #address-cells = &amp;lt;2&amp;gt;;
        #size-cells = &amp;lt;2&amp;gt;;
        ranges;

        // M7 TCM instruction memory
        // Linux/Cortex-A physically can't access this area of memory
        m7_itcm: m7@0x7E0000 {
            no-map;
            reg = &amp;lt;0 0x7E0000 0 0x20000&amp;gt;;
        };

        // M7 TCM data memory
        // Linux/Cortex-A physically can't access this area of memory
        m7_dtcm: m7@0x800000 {
            no-map;
            reg = &amp;lt;0 0x800000 0 0x20000&amp;gt;;
        };

        // M7 RAM
        // This is used if the Cortex-M is booted from RAM
        m7_reserved: m7@0x80000000 {
            no-map;
            reg = &amp;lt;0 0x80000000 0 0x1000000&amp;gt;;
        };

        // IMX Remote Proc; tx buffer 32KiB
        vdev0vring0: vdev0vring0@55000000 {
            compatible = "shared-dma-pool";
            reg = &amp;lt;0 0x55000000 0 0x8000&amp;gt;;
            no-map;
        };

        // IMX Remote Proc; rx buffer 32KiB
        vdev0vring1: vdev0vring1@55008000 {
            compatible = "shared-dma-pool";
            reg = &amp;lt;0 0x55008000 0 0x8000&amp;gt;;
            no-map;
        };

        rsc_table: rsc-table@550ff000 {
            reg = &amp;lt;0 0x550ff000 0 0x1000&amp;gt;;
            no-map;
        };

        /* RPMsg buffer; this is 64KiB which is 32KiB for the
         * TX and RX buffers each. The start address is defined
         * as the `VDEV0_VRING_BASE` define in the Cortex M7 code.
         */
        vdevbuffer: vdevbuffer@55400000 {
            compatible = "shared-dma-pool";
            reg = &amp;lt;0 0x55400000 0 0x100000&amp;gt;;
            no-map;
        };
    };

    // IMX remote proc
    imx8mp-cm7 {
        compatible = "fsl,imx8mp-cm7";
        rsc-da = &amp;lt;0x55000000&amp;gt;;
        clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_M7_DIV&amp;gt;;
        fsl,startup-delay-ms = &amp;lt;500&amp;gt;;

        mbox-names = "tx", "rx", "rxdb";
        mboxes = &amp;lt;&amp;amp;mu 0 1
                  &amp;amp;mu 1 1
                  &amp;amp;mu 3 1&amp;gt;;

        memory-region = &amp;lt;&amp;amp;vdevbuffer&amp;gt;, &amp;lt;&amp;amp;vdev0vring0&amp;gt;, &amp;lt;&amp;amp;vdev0vring1&amp;gt;, &amp;lt;&amp;amp;rsc_table&amp;gt;;
        status = "okay";
    };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh, one more note; I'm booting the Cortex-M7 from TCM and am not using remote proc to start/stop/hotload it. Also, my kernel is v5.15.&lt;/P&gt;&lt;P&gt;So my questions about this are as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is the `imx8mp-cm7` node needed if I'm using the imx_rpmsg_tty driver and am not using remote proc? From what I can tell, it doesn't seem needed&lt;/LI&gt;&lt;LI&gt;Is there a good example provided somewhere for the `rpmsg` node? I found this node somewhere but I can't remember where but I don't think it was an official source (and there's no rpmsg node in the example DTS)&lt;/LI&gt;&lt;LI&gt;Should the `vdevbuffer` reference be there in the `imx8mp-cm7`? From my understanding of how it works the answer is no, but it's like that in the example DTS.&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;If it should stay, is the overlap with `rpmsg` also using `vdevbuffer` an issue? Same question with the reg value `55000000`&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I added memory reservations for the TCM memory but this isn't in the example either. Is it needed/good practice to include it? I know that the Cortex A53 (at least what I read) cannot access the TCM area of memory physically anyway.&lt;/LI&gt;&lt;LI&gt;Is there anything blaringly wrong that you see?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help/comments are appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 12:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1665146#M207268</guid>
      <dc:creator>daharingwitekio</dc:creator>
      <dc:date>2023-06-07T12:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1667748#M207445</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank&amp;nbsp;&lt;SPAN&gt;you for your interest in NXP Semiconductor products.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could refer to the &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-5.15.71-2.2.0/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts" target="_self"&gt;code&lt;/A&gt; in that version, that I understood that you have previously checked on.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or the &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-5.15.71-2.2.0/Documentation/devicetree/bindings/soc/fsl/fsl%2Crpmsg.txt" target="_self"&gt;bindings example&lt;/A&gt;, also for that branch.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think that can help, have you tried the hello world and rpmsg.dts on an EVK?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for the attention,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 22:22:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1667748#M207445</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2023-06-12T22:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1668334#M207503</link>
      <description>&lt;P&gt;Ah, you're right about the bindings example. That's where I found it! However, I should clarify that there doesn't seem to be an example DTS where the &lt;U&gt;imx_rpmsg_tty&lt;/U&gt; driver (in conjunction with existing RPMsg Cortex-M example code) works without me manually adding the&amp;nbsp;&lt;U&gt;rpmsg&lt;/U&gt; node that you see in my DTS (it doesn't exist in the&amp;nbsp;&lt;EM&gt;imx8mp-evk-rpmsg.dts&lt;/EM&gt;).&lt;BR /&gt;&lt;BR /&gt;The &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-5.15.71-2.2.0/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts" target="_self"&gt;code&lt;/A&gt;&amp;nbsp;you linked (which is the&amp;nbsp;&lt;EM&gt;imx8mp-evk-rpmsg.dts&lt;/EM&gt;) I mentioned in my original post (but didn't provide a link to). That DTS is what I derived mine from (I stripped out the stuff I don't need and added the rpmsg node which wasn't in the example dts).&lt;/P&gt;&lt;P&gt;I should clarify that what I have works as is. If I remove the RPMsg node, then the&amp;nbsp;&lt;U&gt;imx_rpmsg_tty&lt;/U&gt;&amp;nbsp;driver is unable to connect to the Cortex-M when running the RPMsg example code on the Cortex-M which would be expected.&lt;/P&gt;&lt;P&gt;However, my other questions (1,3 &amp;amp; 4) still remain. I should note that for question 1 that I observed that if I remove the&amp;nbsp;&lt;U&gt;imx8mp-cm7&lt;/U&gt;&amp;nbsp;node, RPMsg with the &lt;U&gt;imx_rpmsg_tty&lt;/U&gt;&amp;nbsp;seems to work as expected (assuming the RPMsg node is there as in my example). Which leads to my question #1.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 10:41:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1668334#M207503</guid>
      <dc:creator>daharingwitekio</dc:creator>
      <dc:date>2023-06-13T10:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1668834#M207550</link>
      <description>&lt;P&gt;If you don't not need start/stop M core under Linux.&lt;/P&gt;&lt;P&gt;You don't have to use the&amp;nbsp;RPROC framework(remote proc).&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/application-note/AN5317.pdf" target="_blank"&gt;AN5317.pdf (nxp.com.cn)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need&amp;nbsp;remote proc framework, you need everything in the dts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 03:26:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1668834#M207550</guid>
      <dc:creator>jackie2</dc:creator>
      <dc:date>2023-06-14T03:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus RPMsg Device Tree Entries (Cortex-M7/A53) with imx_rpmsg_tty driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1672939#M207885</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have talked with a colleague and this' his advice:&lt;/P&gt;
&lt;P&gt;1. As said before, only if you want to monitor the cortex-M during Linux operation.&lt;/P&gt;
&lt;P&gt;3. vdev should stay as they are the tx and rx buffer, its size depends on your app size.&lt;/P&gt;
&lt;P&gt;4. Varies from your app, also. It's a good practice to either allocate the code in TCM as in the first two child nodes, as is, allocating it in RAM.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 18:01:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-RPMsg-Device-Tree-Entries-Cortex-M7-A53-with-imx/m-p/1672939#M207885</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2023-06-20T18:01:00Z</dc:date>
    </item>
  </channel>
</rss>

