Thread (20 messages) 20 messages, 4 authors, 2025-09-05

Re: [PATCH net-next v2 2/8] dt-bindings: remoteproc: k3-r5f: Add rpmsg-eth subnode

From: MD Danish Anwar <danishanwar@ti.com>
Date: 2025-09-03 07:58:51
Also in: linux-devicetree, linux-doc, linux-remoteproc, lkml, netdev


On 03/09/25 12:49 pm, Krzysztof Kozlowski wrote:
On Tue, Sep 02, 2025 at 02:37:40PM +0530, MD Danish Anwar wrote:
quoted
Extend the Texas Instruments K3 R5F remoteproc device tree bindings to
include a 'rpmsg-eth' subnode.

This extension allows the RPMsg Ethernet to be defined as a subnode of
K3 R5F remoteproc nodes, enabling the configuration of shared memory-based
Ethernet communication between the host and remote processors.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
---
 .../devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml     | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
index a492f74a8608..4dbd708ec8ee 100644
--- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
@@ -210,6 +210,12 @@ patternProperties:
           should be defined as per the generic bindings in,
           Documentation/devicetree/bindings/sram/sram.yaml
 
+      rpmsg-eth:
+        $ref: /schemas/net/ti,rpmsg-eth.yaml
No, not a separate device. Please read slides from my DT for beginners
I had synced with Andrew and we came to the conclusion that including
rpmsg-eth this way will follow the DT guidelines and should be okay.

I have another approach to handle this.

Instead of a new binding and node. I can just add a new phandle to the
rproc binding. Phandle name `shared-mem-region` or `rpmsg-eth-region`

Below is the device tree and dt binding diff for the same.

diff --git
a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
index a492f74a8608..c02c99a5a768 100644
--- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
@@ -210,6 +210,16 @@ patternProperties:
           should be defined as per the generic bindings in,
           Documentation/devicetree/bindings/sram/sram.yaml

+      rpmsg-eth-region:
+        $ref: /schemas/types.yaml#/definitions/phandle
+        description: |
+          phandle to the reserved memory nodes to be associated with the
+          remoteproc device for rpmsg eth communication. The reserved
memory
+          nodes should be carveout nodes, and should be defined with a
"no-map"
+          property as per the bindings in
+
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
+        additionalItems: true
+
     required:
       - compatible
       - reg
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index e01866372293..e70dc542c6be 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -61,7 +61,13 @@ main_r5fss0_core0_dma_memory_region:
r5f-dma-memory@a0000000 {

 		main_r5fss0_core0_memory_region: r5f-memory@a0100000 {
 			compatible = "shared-dma-pool";
-			reg = <0x00 0xa0100000 0x00 0xf00000>;
+			reg = <0x00 0xa0100000 0x00 0x300000>;
+			no-map;
+		};
+
+		main_r5fss0_core0_memory_region_shm: r5f-shm-memory@a0400000 {
+			compatible = "shared-dma-pool";
+			reg = <0x00 0xa0400000 0x00 0xc00000>;
 			no-map;
 		};
@@ -768,6 +774,7 @@ &main_r5fss0_core0 {
 	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss0_core0>;
 	memory-region = <&main_r5fss0_core0_dma_memory_region>,
 			<&main_r5fss0_core0_memory_region>;
+	rpmsg-eth-region = <&main_r5fss0_core0_memory_region_shm>;
 };

 &main_r5fss0_core1 {

In this approach I am creating a new phandle to a memory region that
will be used by my device.

Can you please let me know if this approach looks okay to you? Or it you
have any other suggestion on how to handle this?
talk from OSSE25. This is EXACTLY the case I covered there - what not to
do.
Sure I will have a look at that.

-- 
Thanks and Regards,
Danish

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help