[PATCH 5/5] ARM: dts: qcom: apq8026-samsung-matisse-wifi: Add reboot-mode node

Matti Lehtimäki posted 5 patches 2 years, 8 months ago
There is a newer version of this series
[PATCH 5/5] ARM: dts: qcom: apq8026-samsung-matisse-wifi: Add reboot-mode node
Posted by Matti Lehtimäki 2 years, 8 months ago
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>
---
 .../arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
index 91b860e24681..a05c41191efd 100644
--- a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
+++ b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
@@ -279,6 +279,16 @@ touchscreen@4a {
 	};
 };
 
+&imem {
+	status = "okay";
+
+	reboot-mode {
+		mode-bootloader = <0x77665500>;
+		mode-normal     = <0x77665501>;
+		mode-recovery   = <0x77665502>;
+	};
+};
+
 &rpm_requests {
 	regulators {
 		compatible = "qcom,rpm-pm8226-regulators";
-- 
2.34.1

Re: [PATCH 5/5] ARM: dts: qcom: apq8026-samsung-matisse-wifi: Add reboot-mode node
Posted by Konrad Dybcio 2 years, 8 months ago

On 19.05.2023 23:09, Matti Lehtimäki wrote:
> 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>
> ---
>  .../arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
> index 91b860e24681..a05c41191efd 100644
> --- a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
> +++ b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts
> @@ -279,6 +279,16 @@ touchscreen@4a {
>  	};
>  };
>  
> +&imem {
> +	status = "okay";
Drop, undisable in dtsi

> +
> +	reboot-mode {
You can add a label like imem_reboot_mode and refer to just this
thing from the device dt. Though I'm fairly sure the modes should
be common.

Konrad
> +		mode-bootloader = <0x77665500>;
> +		mode-normal     = <0x77665501>;
> +		mode-recovery   = <0x77665502>;
> +	};
> +};
> +
>  &rpm_requests {
>  	regulators {
>  		compatible = "qcom,rpm-pm8226-regulators";