Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add psci_sys_reset2 reboot modes for hamoa and purwa boards
@ 2026-09-01  7:55 Xin Liu
  2026-09-01  7:55 ` [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types Xin Liu
  2026-09-01  7:55 ` [PATCH v3 2/2] arm64: dts: qcom: purwa: " Xin Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Xin Liu @ 2026-09-01  7:55 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel, kernel, xin.liu,
	tingwei.zhang, jie.gan

Adding PSCI SYSTEM_RESET2 reboot-modes for hamoa and purwa based boards.

These DT patches depend on PSCI SYSTEM_RESET2 support introduced in:
https://lore.kernel.org/all/20260803-arm-psci-system_reset2-vendor-reboots-v24-0-889281373870@oss.qualcomm.com/

To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
---
Changes in v3:
- Split into two patches: one for hamoa, one for purwa
- Move reboot-mode from shared hamoa.dtsi to board-specific files
- Add psci label in hamoa.dtsi to allow board files to reference the node
- Link to v2: https://lore.kernel.org/all/20260226054113.4156874-1-xin.liu@oss.qualcomm.com/

Changes in v2:
- Fix mode-bootloader and mode-edl reset_type
- Link to v1: https://lore.kernel.org/all/20260209042700.1186392-1-xin.liu@oss.qualcomm.com/

---
Xin Liu (2):
      arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types
      arm64: dts: qcom: purwa: Add PSCI SYSTEM_RESET2 types

 arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 7 +++++++
 arch/arm64/boot/dts/qcom/hamoa.dtsi        | 2 +-
 arch/arm64/boot/dts/qcom/purwa-iot-evk.dts | 7 +++++++
 3 files changed, 15 insertions(+), 1 deletion(-)
---
base-commit: e30626823a406725ce29bc75cb8ec467d3e1e326

Best regards,
--
Xin Liu <xin.liu@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types
  2026-09-01  7:55 [PATCH v3 0/2] Add psci_sys_reset2 reboot modes for hamoa and purwa boards Xin Liu
@ 2026-09-01  7:55 ` Xin Liu
  2026-09-01  8:04   ` sashiko-bot
  2026-09-01  7:55 ` [PATCH v3 2/2] arm64: dts: qcom: purwa: " Xin Liu
  1 sibling, 1 reply; 5+ messages in thread
From: Xin Liu @ 2026-09-01  7:55 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel, kernel, xin.liu,
	tingwei.zhang, jie.gan

Add support for SYSTEM_RESET2 vendor-specific resets as
reboot-modes in the psci node.  Describe the resets: "bootloader"
will cause device to reboot and stop in the bootloader's fastboot
mode.  "edl" will cause device to reboot into "emergency download
mode", which permits loading images via the Firehose protocol.

Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 7 +++++++
 arch/arm64/boot/dts/qcom/hamoa.dtsi        | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 9fa86bb6438e..5db2f19dc86c 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -1192,6 +1192,13 @@ &pmk8550_pwm {
 	status = "okay";
 };

+&psci {
+	reboot-mode {
+		mode-bootloader = <0x80010001 0x2>;
+		mode-edl = <0x80000000 0x1>;
+	};
+};
+
 &sdhc_2 {
 	cd-gpios = <&tlmm 71 GPIO_ACTIVE_LOW>;

diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
index 8a96ea1bdb9c..a416114ff5fa 100644
--- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
+++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
@@ -374,7 +374,7 @@ pmu {
 		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
 	};

-	psci {
+	psci: psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";

--
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] arm64: dts: qcom: purwa: Add PSCI SYSTEM_RESET2 types
  2026-09-01  7:55 [PATCH v3 0/2] Add psci_sys_reset2 reboot modes for hamoa and purwa boards Xin Liu
  2026-09-01  7:55 ` [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types Xin Liu
@ 2026-09-01  7:55 ` Xin Liu
  2026-09-01  8:10   ` sashiko-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Xin Liu @ 2026-09-01  7:55 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel, kernel, xin.liu,
	tingwei.zhang, jie.gan

Add support for SYSTEM_RESET2 vendor-specific resets as
reboot-modes in the psci node.  Describe the resets: "bootloader"
will cause device to reboot and stop in the bootloader's fastboot
mode.  "edl" will cause device to reboot into "emergency download
mode", which permits loading images via the Firehose protocol.

Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/purwa-iot-evk.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
index ad503beec1d3..a6a1145f11dd 100644
--- a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
@@ -1180,6 +1180,13 @@ &pmk8550_pwm {
 	status = "okay";
 };

+&psci {
+	reboot-mode {
+		mode-bootloader = <0x80010001 0x2>;
+		mode-edl = <0x80000000 0x1>;
+	};
+};
+
 &sdhc_2 {
 	cd-gpios = <&tlmm 71 GPIO_ACTIVE_LOW>;

--
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types
  2026-09-01  7:55 ` [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types Xin Liu
@ 2026-09-01  8:04   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-01  8:04 UTC (permalink / raw)
  To: Xin Liu; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The addition of the `reboot-mode` subnode to the `psci` node violates the PSCI device tree binding schema, causing `make dtbs_check` to fail.
--

commit 0761e0e4725677d66ad02781f96c6323f5504b5a
Author: Xin Liu <xin.liu@oss.qualcomm.com>

arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types

This commit adds support for SYSTEM_RESET2 vendor-specific resets as
reboot-modes in the psci node. It defines "bootloader" and "edl" reset
modes for the hamoa-iot-evk device.

> diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> index 9fa86bb6438ec..5db2f19dc86c3 100644
> --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
> @@ -1192,6 +1192,13 @@ &pmk8550_pwm {
>  	status = "okay";
>  };
>  
> +&psci {
> +	reboot-mode {
> +		mode-bootloader = <0x80010001 0x2>;
> +		mode-edl = <0x80000000 0x1>;
> +	};
> +};

[Severity: Low]
Does adding the reboot-mode subnode to the psci node violate the PSCI device
tree binding schema?

The psci schema in Documentation/devicetree/bindings/arm/psci.yaml specifies
additionalProperties: false and does not define or reference a reboot-mode
property.

Will adding this undocumented subnode cause a dtbs_check validation failure
during the build?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260901075552.3558150-1-xin.liu@oss.qualcomm.com?part=1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/2] arm64: dts: qcom: purwa: Add PSCI SYSTEM_RESET2 types
  2026-09-01  7:55 ` [PATCH v3 2/2] arm64: dts: qcom: purwa: " Xin Liu
@ 2026-09-01  8:10   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-01  8:10 UTC (permalink / raw)
  To: Xin Liu; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `reboot-mode` child node in the `psci` node violates the DT binding schema and is completely unhandled by the kernel, resulting in validation failures and a non-functional feature.
--

commit 6aadf5c7e368cd8a19850d3a52be3816bc1f1974
Author: Xin Liu <xin.liu@oss.qualcomm.com>

arm64: dts: qcom: purwa: Add PSCI SYSTEM_RESET2 types

This commit adds vendor-specific reset types to the psci device tree node
as reboot-modes for the purwa-iot-evk. The new modes are intended to allow
the device to reboot into fastboot or emergency download mode.

> diff --git a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
> --- a/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
> +++ b/arch/arm64/boot/dts/qcom/purwa-iot-evk.dts
[ ... ]
> @@ -1180,6 +1180,13 @@ &pmk8550_pwm {
>  	status = "okay";
>  };
>  
> +&psci {
> +	reboot-mode {
> +		mode-bootloader = <0x80010001 0x2>;
> +		mode-edl = <0x80000000 0x1>;
> +	};
> +};

[Severity: Medium]
Will this reboot-mode node cause a dtbs_check validation error?

The psci device tree binding schema in 
Documentation/devicetree/bindings/arm/psci.yaml specifies
"additionalProperties: false" and does not define a reboot-mode child node.
Furthermore, this node lacks a compatible string, which means standard
reboot-mode drivers will not bind to it.

Additionally, are these vendor-specific reset modes actually supported by the
psci driver?

Looking at psci_sys_reset() in drivers/firmware/psci/psci.c, the kernel
hardcodes the arguments for SYSTEM_RESET2 to 0 instead of parsing them
from the device tree:

psci_sys_reset() {
		/*
		 * reset_type[31] = 0 (architectural)
		 * reset_type[30:0] = 0 (SYSTEM_WARM_RESET)
		 * cookie = 0 (ignored by the implementation)
		 */
		invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), 0, 0, 0);
}

This means that executing a command like "reboot edl" might just perform
a standard warm reset rather than the requested vendor reset, leaving the
feature non-functional.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260901075552.3558150-1-xin.liu@oss.qualcomm.com?part=2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-01  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01  7:55 [PATCH v3 0/2] Add psci_sys_reset2 reboot modes for hamoa and purwa boards Xin Liu
2026-09-01  7:55 ` [PATCH v3 1/2] arm64: dts: qcom: hamoa: Add PSCI SYSTEM_RESET2 types Xin Liu
2026-09-01  8:04   ` sashiko-bot
2026-09-01  7:55 ` [PATCH v3 2/2] arm64: dts: qcom: purwa: " Xin Liu
2026-09-01  8:10   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox