2022-12-12 08:27:11 +00:00
|
|
|
From f58ef6a45f162e2bd1d0c7c0de00f94bccd3b6f5 Mon Sep 17 00:00:00 2001
|
2021-09-18 12:51:36 +00:00
|
|
|
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
Date: Wed, 4 Nov 2020 00:06:26 +0100
|
2022-12-12 08:27:11 +00:00
|
|
|
Subject: [PATCH 02/11] ARM: dts: exynos: Add reboot modes to midas
|
2021-09-18 12:51:36 +00:00
|
|
|
|
|
|
|
The values have been taken from the sec-reboot.c driver in
|
|
|
|
the 3.0.101 smdk4412 kernel used in LineageOS which is based
|
|
|
|
on Samsung source code releases for various devices.
|
|
|
|
|
|
|
|
Only the strict minimum modes have been added: the S-Boot 4.0
|
|
|
|
bootloader is nonfree, so exporting less well known modes could
|
|
|
|
potentially have unwanted consequences.
|
|
|
|
|
|
|
|
TODO:
|
|
|
|
- After reboot to download, heimdall doesn't work while it works
|
|
|
|
with the SMDK4412 kernel.
|
|
|
|
- Fix reboot without arguments (Test: Try "Reboot system now"
|
|
|
|
in a recovery after rebooting to the recovery)
|
|
|
|
|
|
|
|
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
---
|
|
|
|
arch/arm/boot/dts/exynos4412-midas.dtsi | 23 +++++++++++++++++++++++
|
|
|
|
1 file changed, 23 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi
|
2022-12-12 08:27:11 +00:00
|
|
|
index 8e1c19a8ad06..1f9cd7474b16 100644
|
2021-09-18 12:51:36 +00:00
|
|
|
--- a/arch/arm/boot/dts/exynos4412-midas.dtsi
|
|
|
|
+++ b/arch/arm/boot/dts/exynos4412-midas.dtsi
|
2022-10-14 19:02:41 +00:00
|
|
|
@@ -982,6 +982,29 @@ &mshc_0 {
|
2021-09-18 12:51:36 +00:00
|
|
|
&pmu_system_controller {
|
|
|
|
assigned-clocks = <&pmu_system_controller 0>;
|
|
|
|
assigned-clock-parents = <&clock CLK_XUSBXTI>;
|
|
|
|
+
|
|
|
|
+ /* S-Boot 4.0 */
|
|
|
|
+ #define S5P_INFORM2 0xF008
|
|
|
|
+ #define S5P_INFORM3 0x080C
|
|
|
|
+ #define BOOT_MODE_PREFIX 0x12345670
|
|
|
|
+ #define BOOT_NORMAL (BOOT_MODE_PREFIX | 0)
|
|
|
|
+ #define BOOT_DOWNLOAD (BOOT_MODE_PREFIX | 1)
|
|
|
|
+ #define BOOT_RECOVERY (BOOT_MODE_PREFIX | 4)
|
|
|
|
+
|
|
|
|
+ no-lpm-mode {
|
|
|
|
+ compatible = "syscon-reboot";
|
|
|
|
+ offset = <S5P_INFORM2>;
|
|
|
|
+ value = <0x12345678>;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ reboot-mode {
|
|
|
|
+ compatible = "syscon-reboot-mode";
|
|
|
|
+ offset = <S5P_INFORM3>;
|
|
|
|
+ mode-normal = <BOOT_NORMAL>;
|
|
|
|
+ mode-recovery = <BOOT_RECOVERY>;
|
|
|
|
+ mode-bootloader = <BOOT_DOWNLOAD>;
|
|
|
|
+ mode-download = <BOOT_DOWNLOAD>;
|
|
|
|
+ };
|
|
|
|
};
|
|
|
|
|
|
|
|
&pinctrl_0 {
|
|
|
|
--
|
2022-12-12 08:27:11 +00:00
|
|
|
2.38.1
|
2021-09-18 12:51:36 +00:00
|
|
|
|