From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] ARM: dts: stm32mp: add bootrom serial (DFU) reboot mode
Date: Tue, 9 Aug 2022 11:54:13 +0200 [thread overview]
Message-ID: <82e482ad-7c4e-edd1-49d1-4c16ee4fbb3a@pengutronix.de> (raw)
In-Reply-To: <20220809094902.GP31528@pengutronix.de>
Hello Sascha,
On 09.08.22 11:49, Sascha Hauer wrote:
> On Tue, Aug 09, 2022 at 08:29:38AM +0200, Ahmad Fatoum wrote:
>> The same register we use for the reboot mode communication between Linux
>> and barebox is also sampled by the bootrom. If the lowest 16 bits of it
>> are 0x00FF, the bootrom will enter DFU mode. Add the appropriate
>> reboot-mode, but with a barebox, prefix, so Linux doesn't automatically
>> provide it to userspace along with the existing loader and recovery
>> modes.
>
> Why do we need to prevent Linux from providing dfu mode to userspace?
> Isn't that a vlid usecase?
It is, but I don't want a barebox update to add this feature by default.
So, communication with BootROM = not exported by default
Communication with Linux = exported by default
and this can be overridden on a per-board basis via device tree.
We do this likewise for the i.MX6 and i.MX8 where we have
barebox,syscon-reboot-mode which isn't processed by Linux, but we
can't use this here because the same register is used for both
modes of communication.
Cheers,
Ahmad
>
> Sascha
>
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> arch/arm/dts/stm32mp151.dtsi | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi
>> index ed7cf6192bea..ac6536a556a9 100644
>> --- a/arch/arm/dts/stm32mp151.dtsi
>> +++ b/arch/arm/dts/stm32mp151.dtsi
>> @@ -41,9 +41,10 @@
>> reboot_mode_tamp: reboot-mode {
>> compatible = "syscon-reboot-mode";
>> offset = <0x150>; /* reg20 */
>> - mask = <0xff>;
>> + mask = <0xffff>;
>> mode-normal = <0>;
>> mode-loader = <0xBB>;
>> mode-recovery = <0xBC>;
>> + barebox,mode-serial = <0xFF>;
>> };
>> };
>> --
>> 2.30.2
>>
>>
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2022-08-09 9:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 6:29 [PATCH 1/4] power: reset: reboot-mode: refactor to allow other mode- prefixes Ahmad Fatoum
2022-08-09 6:29 ` [PATCH 2/4] power: reset: reboot-mode: parse barebox,mode-* properties Ahmad Fatoum
2022-08-09 6:29 ` [PATCH 3/4] ARM: dts: stm32mp: reuse now upstream tamp node Ahmad Fatoum
2022-08-09 6:29 ` [PATCH 4/4] ARM: dts: stm32mp: add bootrom serial (DFU) reboot mode Ahmad Fatoum
2022-08-09 9:49 ` Sascha Hauer
2022-08-09 9:54 ` Ahmad Fatoum [this message]
2022-08-09 11:34 ` [PATCH 1/4] power: reset: reboot-mode: refactor to allow other mode- prefixes Sascha Hauer
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=82e482ad-7c4e-edd1-49d1-4c16ee4fbb3a@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.de \
/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