devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Arnaud POULIQUEN <arnaud.pouliquen@st.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"kernel@dh-electronics.com" <kernel@dh-electronics.com>
Subject: Re: [Linux-stm32] [PATCH 1/5] ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon
Date: Tue, 30 May 2023 13:50:49 +0200	[thread overview]
Message-ID: <133c8b4a-8680-f613-807a-2d7931d0a186@denx.de> (raw)
In-Reply-To: <PAXPR10MB471850924065C987981634C1F14B9@PAXPR10MB4718.EURPRD10.PROD.OUTLOOK.COM>

On 5/30/23 10:43, Arnaud POULIQUEN wrote:
> Hello Marek,

Hi,

> ST Restricted
> 
>> -----Original Message-----
>> From: Linux-stm32 <linux-stm32-bounces@st-md-mailman.stormreply.com>
>> On Behalf Of Marek Vasut
>> Sent: Thursday, May 18, 2023 3:13 AM
>> To: linux-arm-kernel@lists.infradead.org
>> Cc: Marek Vasut <marex@denx.de>; devicetree@vger.kernel.org; Conor
>> Dooley <conor+dt@kernel.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@linaro.org>; Richard Cochran
>> <richardcochran@gmail.com>; Rob Herring <robh+dt@kernel.org>; Maxime
>> Coquelin <mcoquelin.stm32@gmail.com>; linux-stm32@st-md-
>> mailman.stormreply.com; kernel@dh-electronics.com
>> Subject: [Linux-stm32] [PATCH 1/5] ARM: dts: stm32: Add missing detach
>> mailbox for emtrion emSBC-Argon
>>
>> Add missing "detach" mailbox to this board to permit the CPU to inform the
>> remote processor on a detach. This signal allows the remote processor
>> firmware to stop IPC communication and to reinitialize the resources for a
>> re-attach.
>>
>> Without this mailbox, detach is not possible and kernel log contains the
>> following warning to, so make sure all the STM32MP15xx platform DTs are in
>> sync regarding the mailboxes to fix the detach issue and the warning:
>> "
>> stm32-rproc 10000000.m4: mbox_request_channel_byname() could not
>> locate channel named "detach"
>> "
>>
>> Fixes: 6257dfc1c412 ("ARM: dts: stm32: Add coprocessor detach mbox on
>> stm32mp15x-dkx boards")
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
>> Cc: Conor Dooley <conor+dt@kernel.org>
>> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
>> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
>> Cc: Richard Cochran <richardcochran@gmail.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> Cc: kernel@dh-electronics.com
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-stm32@st-md-mailman.stormreply.com
>> ---
>>   arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
>> b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
>> index b01470a9a3d53..82061c9186338 100644
>> --- a/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
>> +++ b/arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi
>> @@ -366,8 +366,8 @@ &iwdg2 {
>>   &m4_rproc {
>>   	memory-region = <&retram>, <&mcuram>, <&mcuram2>,
>> <&vdev0vring0>,
>>   			<&vdev0vring1>, <&vdev0buffer>;
>> -	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
>> -	mbox-names = "vq0", "vq1", "shutdown";
>> +	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
>> +	mbox-names = "vq0", "vq1", "shutdown", "detach";
> 
> Why do you want to add the detach mailbox?
> It looks to me here that you want to clean the warning message, right?

Yes

> The detach is used in a particular usecase where the main processor
> is  shutdown while the coprocessor is still running.
> I would prefer to not enable it by default as it need a specific
> coprocessor Firmware.

Why is it enabled by default on ST boards and left out on all other boards ?

Surely the ST evaluation boards can load and run both types of firmware, 
ones which do use the detach mailbox and ones which do not use the 
detach mailbox , right ?

I assume that if the firmware does not use the detach mailbox, then the 
detach mailbox is just ignored and unused, so there is no problem with 
having it described in the DT in any case ?

And if that's the case, then I would much rather prefer to have all the 
boards describe the same set of mailboxes, so they don't diverge . What 
do you think ?

> Rather than adding unused optional mailbox, I will more in favor
> of having a mbox_request_channel_byname_optional helper or
> something similar

See above, I think it is better to have the mailbox described in DT 
always and not use it (the user can always remove it), than to not have 
it described on some boards and have it described on other boards 
(inconsistency).

  reply	other threads:[~2023-05-30 11:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  1:12 [PATCH 1/5] ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon Marek Vasut
2023-05-18  1:12 ` [PATCH 2/5] ARM: dts: stm32: Add missing detach mailbox for Odyssey SoM Marek Vasut
2023-05-18  1:12 ` [PATCH 3/5] ARM: dts: stm32: Add missing detach mailbox for DHCOM SoM Marek Vasut
2023-05-18  1:12 ` [PATCH 4/5] ARM: dts: stm32: Add missing detach mailbox for DHCOR SoM Marek Vasut
2023-07-11  2:05   ` Marek Vasut
2023-07-11 13:37     ` Alexandre TORGUE
2023-07-11 13:40       ` Marek Vasut
2023-05-18  1:12 ` [PATCH 5/5] ARM: dts: stm32: Deduplicate rproc mboxes and IRQs Marek Vasut
2023-05-30  8:51   ` [Linux-stm32] " Arnaud POULIQUEN
2023-05-30  8:43 ` [Linux-stm32] [PATCH 1/5] ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon Arnaud POULIQUEN
2023-05-30 11:50   ` Marek Vasut [this message]
2023-06-01 12:56     ` Arnaud POULIQUEN
2023-06-02  2:35       ` Marek Vasut
2023-06-06 16:21         ` Arnaud POULIQUEN
2023-06-06 17:28           ` Marek Vasut
2023-06-07  9:53             ` Arnaud POULIQUEN
2023-06-10 13:46               ` Marek Vasut
2023-06-12  8:26                 ` Arnaud POULIQUEN
2023-06-12  9:13                   ` Marek Vasut
2023-06-12 12:34                     ` Arnaud POULIQUEN
2023-06-17 14:34                       ` Marek Vasut

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=133c8b4a-8680-f613-807a-2d7931d0a186@denx.de \
    --to=marex@denx.de \
    --cc=arnaud.pouliquen@st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@dh-electronics.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).