From bcc5081761b7b4b4dde8de1ca44bcde99425d384 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 4 Sep 2022 22:49:46 +0200
Subject: [PATCH 363/463] arm64: dts: rk3399: Add reboot mode driver

U-Boot uses value 0xef08a53c to jump back to USB loader maskrom
mode instead of normal boot. Add support for reboot to maskrom
from the kernel.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 0b8624e7a9d0e..4076f6b360d19 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1312,6 +1312,13 @@ pmu_io_domains: io-domains {
 			compatible = "rockchip,rk3399-pmu-io-voltage-domain";
 			status = "disabled";
 		};
+
+		reboot-mode {
+			compatible = "syscon-reboot-mode";
+			offset = <0x300>;
+			mode-normal = <0>;
+			mode-maskrom = <0xef08a53c>;
+		};
 	};
 
 	spi3: spi@ff350000 {
-- 
2.46.0

