[PATCH v20 08/10] arm64: dts: qcom: lemans: Add psci reboot-modes

Shivendra Pratap posted 10 patches 1 month ago
[PATCH v20 08/10] arm64: dts: qcom: lemans: Add psci reboot-modes
Posted by Shivendra Pratap 1 month ago
Add PSCI SYSTEM_RESET2 reboot-modes for lemans based boards, for use by
the psci_reboot_mode driver.

The following modes are defined:
- bootloader: reboot into fastboot mode for fastboot flashing.
- edl: reboot into emergency download mode for image loading via
  the Firehose protocol.

Support for these modes is firmware dependent.

Signed-off-by: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/lemans.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 808827b83553dd70904d771cc1da784c85fdc1a5..b5234a1b31761a6565299733a30cf3808c439976 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -635,6 +635,11 @@ system_pd: power-domain-system {
 			#power-domain-cells = <0>;
 			domain-idle-states = <&cluster_sleep_apss_rsc_pc>;
 		};
+
+		reboot-mode {
+			mode-bootloader = <0x80010001 0x2>;
+			mode-edl = <0x80000000 0x1>;
+		};
 	};
 
 	reserved-memory {

-- 
2.34.1
Re: [PATCH v20 08/10] arm64: dts: qcom: lemans: Add psci reboot-modes
Posted by Konrad Dybcio 1 month ago
On 3/4/26 7:03 PM, Shivendra Pratap wrote:
> Add PSCI SYSTEM_RESET2 reboot-modes for lemans based boards, for use by
> the psci_reboot_mode driver.
> 
> The following modes are defined:
> - bootloader: reboot into fastboot mode for fastboot flashing.
> - edl: reboot into emergency download mode for image loading via
>   the Firehose protocol.
> 
> Support for these modes is firmware dependent.

The previous patch only enabled it on a subset of kodiak boards,
the remaining ones do it globally, even though you claim it's fw
dependent.. this changed in in v17 apparently

My fear is that those may conflict with other methods providing
identical identification names, i.e.:

psci {
	reboot-mode {
		mode-bootloader = <0x80010001 0x2>;
		mode-edl = <0x80000000 0x1>;
	};
};

imem@f000 {
	reboot-mode {
		compatible = "syscon-reboot-mode";
		offset = <0x65c>;

		mode-normal = <0x77665501>;
		mode-bootloader = <0x77665500>; // conflict
		mode-recovery = <0x77665502>;
	};
};

will the syscon write apply and the (unsupported) PSCI_RESET2 gracefully
fall through?

Konrad
Re: [PATCH v20 08/10] arm64: dts: qcom: lemans: Add psci reboot-modes
Posted by Shivendra Pratap 1 month ago

On 05-03-2026 17:03, Konrad Dybcio wrote:
> On 3/4/26 7:03 PM, Shivendra Pratap wrote:
>> Add PSCI SYSTEM_RESET2 reboot-modes for lemans based boards, for use by
>> the psci_reboot_mode driver.
>>
>> The following modes are defined:
>> - bootloader: reboot into fastboot mode for fastboot flashing.
>> - edl: reboot into emergency download mode for image loading via
>>    the Firehose protocol.
>>
>> Support for these modes is firmware dependent.
> 
> The previous patch only enabled it on a subset of kodiak boards,
> the remaining ones do it globally, even though you claim it's fw
> dependent.. this changed in in v17 apparently
> 

Thanks. Let me review this and make it board specific wherever required.
Will update this in next patch.

> My fear is that those may conflict with other methods providing
> identical identification names, i.e.:
> 
> psci {
> 	reboot-mode {
> 		mode-bootloader = <0x80010001 0x2>;
> 		mode-edl = <0x80000000 0x1>;
> 	};
> };
> 
> imem@f000 {
> 	reboot-mode {
> 		compatible = "syscon-reboot-mode";
> 		offset = <0x65c>;
> 
> 		mode-normal = <0x77665501>;
> 		mode-bootloader = <0x77665500>; // conflict
> 		mode-recovery = <0x77665502>;
> 	};
> };
> 
> will the syscon write apply and the (unsupported) PSCI_RESET2 gracefully
> fall through?
If a SOC/board wants to use "syscon-reboot-mode" / "nvmem-reboot-mode" / 
psci->reboot-mode, has to be taken care in the DT as per support. Will 
make it board specific wherever required after re-review of the DTs.

thanks,
Shivendra