public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Beleswar Prasad Padhi <b-padhi@ti.com>
To: Nishanth Menon <nm@ti.com>
Cc: <vigneshr@ti.com>, <kristo@kernel.org>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>, <afd@ti.com>,
	<u-kumar1@ti.com>, <hnagalla@ti.com>, <jm@ti.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 0/2] TI: K3: Switch MCU R5F cluster into Split mode
Date: Fri, 23 May 2025 14:27:44 +0530	[thread overview]
Message-ID: <5cfaed26-28ec-42dc-b9f6-836869ad3fa3@ti.com> (raw)
In-Reply-To: <20250522155338.gpbcubkvygtju3qc@bagpipe>

Hi Nishanth,

On 5/22/2025 9:23 PM, Nishanth Menon wrote:
> On 13:04-20250522, Beleswar Padhi wrote:
>> Several TI K3 SoCs like J7200, J721E, J721S2, J784S4 and J742S2 have a
>> R5F cluster in the MCU domain which is configured for LockStep mode at
>> the moment. Switch this R5F cluster to Split mode by default in all
>> corresponding board level DTs to maximize the number of R5F cores.
> Why? I can read the patch to understand what you are trying to do, but
> the rationale needs to be explained.


Sure, rationale is lot of users of our SoCs want to control the R5 core 
in the MCU domain as a general purpose remote processor to increase 
performance. That means able to load applications from 
bootloader/kernel/userspace, poweroff/poweron core at runtime etc. The 
challenge with this is the MCU R5F cluster is reserved to run the 
central Device Manager (DM) Firmware.

However, since the MCU R5F cluster is lockstep enabled, it supports both 
lockstep mode and split mode of booting. So here we decide to boot the 
cluster in split mode by which we can reserve the primary core to run DM 
and use the secondary core as a general purpose remote processor.

Now why didn't we do this split mode booting since the inception? Well 
because MCU R5F Cluster is booted by ROM code, and when ROM boots it in 
split mode, it powers on the secondary core and puts it in WFI (as there 
is nothing to do for it yet). But the standard remoteproc drivers in 
Linux and other bootloaders can only load firmware on a core if it is 
powered off/held in reset. So there was some plumbing needed to be done 
at the bootloader stage to actually poweroff the secondary core in split 
mode; so that remoteproc drivers can then load & control the core as 
expected. Now that the plumbing[0] is posted for U-Boot, we can switch 
to split mode booting here in DT.

[0]: https://lore.kernel.org/all/20250522071828.285462-1-b-padhi@ti.com/

>
>> Corresponding support to shutdown MCU R5F core 1 on SoC power on have
>> been posted in U-Boot:
>> https://lore.kernel.org/all/20250522071828.285462-1-b-padhi@ti.com/
>>
>> While at it, correct the firmware-name property for MCU R5F cores of
>> J742S2 SoC in [PATCH 1/2].
>>
>> Testing Done:
>> 1. Tested that each patch does not generate any new warnings/errors.
>> 2. Build test on all existing TI K3 platforms.
>> 3. Tested U-Boot and Linux load of MCU R5F core in split mode on all
>> applicable boards (AM68-SK, AM69-SK, J7200-EVM, J721E-EVM, J721S2-EVM,
>> J784S4-evm, J742S2-EVM)
>>
>> Test logs:
>> https://gist.github.com/3V3RYONE/ee8e3cb9aa5f4c5c00b059b9c14bfa98
>>
>> Thanks,
>> Beleswar
>>
>> Beleswar Padhi (2):
>>    arm64: dts: ti: k3-j742s2-mcu-wakeup: Override firmware-name for MCU
>>      R5F cores
>>    arm64: dts: ti: k3: Switch MCU R5F cluster to Split-mode
> NAK! We are once again churning downstream users again and for what
> reason - coverletter and the patch is vague on that!
>
> I would prefer the entire remote proc dts stuff cleaned up once for all
> in a comprehensive series.
>
> Let me be clear (once again): We DO NOT break backward compatibility.
> We do not break downstream users without a clear cut rationale. We do
> not break all other ecosystems depending on device tree without a very
> very solid reason.


I don't understand how this is breaking any backward compatibility. We 
are not removing the lockstep boot support entirely here. We are just 
switching to Split boot by default because of the usecases. If not 
today, someday we have to go with split mode booting by default.

That's exactly what we did for the MAIN domain R5F clusters: 1. First we 
did the plumbing to have power synchronization between the cores of a 
cluster: 
https://lore.kernel.org/all/20240430105307.1190615-1-b-padhi@ti.com/ 2. 
Then we switched the Cluster to boot in split mode by default: 
https://lore.kernel.org/all/20240826093024.1183540-1-b-padhi@ti.com/

Now, for users who prefer to use the fault-tolerant lockstep mode, they 
can still do that by setting `ti,cluster-mode` property to 1. However, I 
agree that we should not be doing 'hardware configuration' (split vs 
lockstep) in Device Tree which is supposed to be 'hardware description'. 
We have started to explore solutions where we can dictate this lockstep 
vs split core configuration from the firmware itself during runtime. 
Once that is done (long way to go thinking of upstream), we can get rid 
of this configuration from the DT entirely.

Thanks, Beleswar


  reply	other threads:[~2025-05-23  8:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22  7:34 [PATCH 0/2] TI: K3: Switch MCU R5F cluster into Split mode Beleswar Padhi
2025-05-22  7:34 ` [PATCH 1/2] arm64: dts: ti: k3-j742s2-mcu-wakeup: Override firmware-name for MCU R5F cores Beleswar Padhi
2025-05-22  7:34 ` [PATCH 2/2] arm64: dts: ti: k3: Switch MCU R5F cluster to Split-mode Beleswar Padhi
2025-05-22 15:53 ` [PATCH 0/2] TI: K3: Switch MCU R5F cluster into Split mode Nishanth Menon
2025-05-23  8:57   ` Beleswar Prasad Padhi [this message]
2025-05-23 11:48     ` Nishanth Menon
2025-05-23 13:16       ` Andrew Davis
2025-05-27 18:14         ` Kumar, Udit
2025-05-27  6:09       ` Beleswar Prasad Padhi

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=5cfaed26-28ec-42dc-b9f6-836869ad3fa3@ti.com \
    --to=b-padhi@ti.com \
    --cc=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hnagalla@ti.com \
    --cc=jm@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=u-kumar1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox