ARM: dts: qcom: msm8226: Add IMEM node
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>
Sat, 20 May 2023 12:19:33 +0000 (15:19 +0300)
committerBjorn Andersson <andersson@kernel.org>
Tue, 30 May 2023 14:54:19 +0000 (07:54 -0700)
This enables userspace to signal the bootloader to go into the
bootloader or recovery mode.

The magic values can be found in both the downstream kernel and the LK
kernel (bootloader).

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230520121933.15533-5-matti.lehtimaki@gmail.com
arch/arm/boot/dts/qcom-msm8226.dtsi

index dc706d5..a3a9162 100644 (file)
                                label = "lpass";
                        };
                };
+
+               sram@fe805000 {
+                       compatible = "qcom,msm8226-imem", "syscon", "simple-mfd";
+                       reg = <0xfe805000 0x1000>;
+
+                       reboot-mode {
+                               compatible = "syscon-reboot-mode";
+                               offset = <0x65c>;
+
+                               mode-bootloader = <0x77665500>;
+                               mode-normal     = <0x77665501>;
+                               mode-recovery   = <0x77665502>;
+                       };
+               };
        };
 
        timer {