All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>, "Anwar, Md Danish" <a0501179@ti.com>
Cc: Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-doc@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Fan Gong <gongfan1@huawei.com>, Xin Guo <guoxin09@huawei.com>,
	Lei Wei <quic_leiwei@quicinc.com>, Rob Herring <robh@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Michael Ellerman <mpe@ellerman.id.au>, Lee Trager <lee@trager.us>,
	Jakub Kicinski <kuba@kernel.org>,
	Mengyuan Lou <mengyuanlou@net-swift.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Roger Quadros <rogerq@kernel.org>,
	Lukas Bulwahn <lukas.bulwahn@redhat.com>,
	linux-arm-kernel@lists.infradead.org, srk@ti.com,
	Paolo Abeni <pabeni@redhat.com>, Tero Kristo <kristo@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	netdev@vger.kernel.org, Bjorn Andersson <andersson@kernel.org>,
	linux-kernel@vger.kernel.org,
	MD Danish Anwar <danishanwar@ti.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Simon Horman <horms@kernel.org>,
	Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next v2 2/8] dt-bindings: remoteproc: k3-r5f: Add rpmsg-eth subnode
Date: Wed, 3 Sep 2025 16:23:44 +0200	[thread overview]
Message-ID: <9c2a863c-0c8a-4563-a58d-d59112ac45a8@kernel.org> (raw)
In-Reply-To: <6e56f36f-70fd-4635-b83f-a221780237ba@lunn.ch>

On 03/09/2025 16:06, Andrew Lunn wrote:
>>>>  	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>;
>>>
>>> You already have here memory-region, so use that one.
>>>
>>
>> There is a problem with using memory-region. If I add
>> `main_r5fss0_core0_memory_region_shm` to memory region, to get this
>> phandle from driver I would have to use
>> 	
>> 	of_parse_phandle(np, "memory-region", 2)
>>
>> Where 2 is the index for this region. But the problem is how would the
>> driver know this index. This index can vary for different vendors and
>> their rproc device.
>>
>> If some other vendor tries to use this driver but their memory-region
>> has 3 existing entries. so this this entry will be the 4th one.
> 
> Just adding to this, there is nothing really TI specific in this
> system. We want the design so that any vendor can use it, just by
> adding the needed nodes to their rpmsg node, indicating there is a
> compatible implementation on the other end, and an indication of where
> the shared memory is.

I don't know your drivers, but I still do not see here a problem with
'memory-region'. You just need to tell this common code which
memory-region phandle by index or name is the one for rpmsg.

> 
> Logically, it is a different shared memory. memory-region above is for
> the rpmsg mechanism itself. A second shared memory is used for the
> Ethernet drivers where it can place Ethernet frames. The Ethernet
> frames themselves are not transported over rpmsg. The rpmsg is just
> used for the control path, not the data path.

It is still "shared-dma-pool", right? Nothing in the bindings says that
all memory-region phandles are equal or the same. Just like phandles for
clocks. Some clocks need to be enabled for entire lifetime of the
device, some are toggled on-off during runtime PM.

Best regards,
Krzysztof


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>, "Anwar, Md Danish" <a0501179@ti.com>
Cc: MD Danish Anwar <danishanwar@ti.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Mengyuan Lou <mengyuanlou@net-swift.com>,
	Xin Guo <guoxin09@huawei.com>, Lei Wei <quic_leiwei@quicinc.com>,
	Lee Trager <lee@trager.us>, Michael Ellerman <mpe@ellerman.id.au>,
	Fan Gong <gongfan1@huawei.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Lukas Bulwahn <lukas.bulwahn@redhat.com>,
	Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>,
	Suman Anna <s-anna@ti.com>, Tero Kristo <kristo@kernel.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	srk@ti.com, Roger Quadros <rogerq@kernel.org>
Subject: Re: [PATCH net-next v2 2/8] dt-bindings: remoteproc: k3-r5f: Add rpmsg-eth subnode
Date: Wed, 3 Sep 2025 16:23:44 +0200	[thread overview]
Message-ID: <9c2a863c-0c8a-4563-a58d-d59112ac45a8@kernel.org> (raw)
In-Reply-To: <6e56f36f-70fd-4635-b83f-a221780237ba@lunn.ch>

On 03/09/2025 16:06, Andrew Lunn wrote:
>>>>  	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>;
>>>
>>> You already have here memory-region, so use that one.
>>>
>>
>> There is a problem with using memory-region. If I add
>> `main_r5fss0_core0_memory_region_shm` to memory region, to get this
>> phandle from driver I would have to use
>> 	
>> 	of_parse_phandle(np, "memory-region", 2)
>>
>> Where 2 is the index for this region. But the problem is how would the
>> driver know this index. This index can vary for different vendors and
>> their rproc device.
>>
>> If some other vendor tries to use this driver but their memory-region
>> has 3 existing entries. so this this entry will be the 4th one.
> 
> Just adding to this, there is nothing really TI specific in this
> system. We want the design so that any vendor can use it, just by
> adding the needed nodes to their rpmsg node, indicating there is a
> compatible implementation on the other end, and an indication of where
> the shared memory is.

I don't know your drivers, but I still do not see here a problem with
'memory-region'. You just need to tell this common code which
memory-region phandle by index or name is the one for rpmsg.

> 
> Logically, it is a different shared memory. memory-region above is for
> the rpmsg mechanism itself. A second shared memory is used for the
> Ethernet drivers where it can place Ethernet frames. The Ethernet
> frames themselves are not transported over rpmsg. The rpmsg is just
> used for the control path, not the data path.

It is still "shared-dma-pool", right? Nothing in the bindings says that
all memory-region phandles are equal or the same. Just like phandles for
clocks. Some clocks need to be enabled for entire lifetime of the
device, some are toggled on-off during runtime PM.

Best regards,
Krzysztof

  reply	other threads:[~2025-09-03 19:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02  9:07 [PATCH net-next v2 0/8] Add RPMSG Ethernet Driver MD Danish Anwar
2025-09-02  9:07 ` [PATCH net-next v2 1/8] dt-bindings: net: ti,rpmsg-eth: Add DT binding for RPMSG ETH MD Danish Anwar
2025-09-03  7:18   ` Krzysztof Kozlowski
2025-09-03  7:18     ` Krzysztof Kozlowski
2025-09-03  7:43     ` MD Danish Anwar
2025-09-03  7:43       ` MD Danish Anwar
2025-09-03  7:18   ` Krzysztof Kozlowski
2025-09-03  7:18     ` Krzysztof Kozlowski
2025-09-02  9:07 ` [PATCH net-next v2 2/8] dt-bindings: remoteproc: k3-r5f: Add rpmsg-eth subnode MD Danish Anwar
2025-09-03  7:19   ` Krzysztof Kozlowski
2025-09-03  7:19     ` Krzysztof Kozlowski
2025-09-03  7:57     ` MD Danish Anwar
2025-09-03  7:57       ` MD Danish Anwar
2025-09-03 12:54       ` Krzysztof Kozlowski
2025-09-03 12:54         ` Krzysztof Kozlowski
2025-09-03 13:32         ` Anwar, Md Danish
2025-09-03 13:32           ` Anwar, Md Danish
2025-09-03 14:06           ` Andrew Lunn
2025-09-03 14:06             ` Andrew Lunn
2025-09-03 14:23             ` Krzysztof Kozlowski [this message]
2025-09-03 14:23               ` Krzysztof Kozlowski
2025-09-05  8:56               ` MD Danish Anwar
2025-09-05  8:56                 ` MD Danish Anwar
2025-09-03 14:19           ` Krzysztof Kozlowski
2025-09-03 14:19             ` Krzysztof Kozlowski
2025-09-02  9:07 ` [PATCH net-next v2 3/8] net: rpmsg-eth: Add Documentation for RPMSG-ETH Driver MD Danish Anwar
2025-09-02  9:07 ` [PATCH net-next v2 4/8] net: rpmsg-eth: Add basic rpmsg skeleton MD Danish Anwar
2025-09-03 16:14   ` kernel test robot
2025-09-02  9:07 ` [PATCH net-next v2 5/8] net: rpmsg-eth: Register device as netdev MD Danish Anwar
2025-09-03 12:05   ` kernel test robot
2025-09-02  9:07 ` [PATCH net-next v2 6/8] net: rpmsg-eth: Add netdev ops MD Danish Anwar
2025-09-02  9:07 ` [PATCH net-next v2 7/8] net: rpmsg-eth: Add support for multicast filtering MD Danish Anwar
2025-09-02  9:07 ` [PATCH net-next v2 8/8] arch: arm64: dts: k3-am64*: Add rpmsg-eth node MD Danish Anwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c2a863c-0c8a-4563-a58d-d59112ac45a8@kernel.org \
    --to=krzk@kernel.org \
    --cc=Parthiban.Veerasooran@microchip.com \
    --cc=a0501179@ti.com \
    --cc=andersson@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=gongfan1@huawei.com \
    --cc=guoxin09@huawei.com \
    --cc=horms@kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lee@trager.us \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=lukas.bulwahn@redhat.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mengyuanlou@net-swift.com \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=quic_leiwei@quicinc.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.