* [PATCH] ARM: dts: rk356x: describe serial reboot mode
@ 2024-04-15 5:32 Ahmad Fatoum
2024-04-16 10:22 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-04-15 5:32 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
The PMUGRF (Power Management Unit - General Register File) of the RK3568
has a general purpose register checked by the BootROM on power-on to
decide on whether to drop to recovery mode (rk-usb-loader/rkdeveloptool).
Describe this in the device tree, so it's possible to use, e.g.
global.system.reboot_mode.next=serial reset
to force falling into serial (USB) boot mode.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/dts/rk356x.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/dts/rk356x.dtsi b/arch/arm/dts/rk356x.dtsi
index 923e18e7ccda..7fd5f72a5918 100644
--- a/arch/arm/dts/rk356x.dtsi
+++ b/arch/arm/dts/rk356x.dtsi
@@ -1,6 +1,12 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+#include <dt-bindings/soc/rockchip,boot-mode.h>
+
/ {
+ aliases {
+ pmugrf.reboot_mode = &reboot_mode_pmugrf;
+ };
+
chosen {
barebox,bootsource-mmc0 = &sdhci;
barebox,bootsource-mmc1 = &sdmmc0;
@@ -31,3 +37,12 @@ rng: rng@fe388000 {
resets = <&cru SRST_TRNG_NS>;
};
};
+
+&pmugrf {
+ reboot_mode_pmugrf: reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x200>;
+ mode-normal = <BOOT_NORMAL>;
+ mode-serial = <0xef08a53c>; /* rk-usb-loader */
+ };
+};
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: dts: rk356x: describe serial reboot mode
2024-04-15 5:32 [PATCH] ARM: dts: rk356x: describe serial reboot mode Ahmad Fatoum
@ 2024-04-16 10:22 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-04-16 10:22 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 15 Apr 2024 07:32:53 +0200, Ahmad Fatoum wrote:
> The PMUGRF (Power Management Unit - General Register File) of the RK3568
> has a general purpose register checked by the BootROM on power-on to
> decide on whether to drop to recovery mode (rk-usb-loader/rkdeveloptool).
>
> Describe this in the device tree, so it's possible to use, e.g.
>
> global.system.reboot_mode.next=serial reset
>
> [...]
Applied, thanks!
[1/1] ARM: dts: rk356x: describe serial reboot mode
https://git.pengutronix.de/cgit/barebox/commit/?id=c55fc4d1dbea (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-16 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 5:32 [PATCH] ARM: dts: rk356x: describe serial reboot mode Ahmad Fatoum
2024-04-16 10:22 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox