summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-04-15 07:32:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2024-04-16 12:22:47 +0200
commitc55fc4d1dbea8dc3d389b0d42844dfac8cc7b93e (patch)
treed2b3fa2088bcc70390dabb6bb0f4998f2c4422fe
parent26b637912f3034c657730131bed976083fce511f (diff)
downloadbarebox-c55fc4d1dbea.tar.gz
barebox-c55fc4d1dbea.tar.xz
ARM: dts: rk356x: describe serial reboot mode
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> Link: https://lore.barebox.org/20240415053253.369354-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/dts/rk356x.dtsi15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/dts/rk356x.dtsi b/arch/arm/dts/rk356x.dtsi
index 923e18e7cc..7fd5f72a59 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 @@
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 */
+ };
+};