From 63a048bd8969b0cbfd709e5a41b080829649ebdb Mon Sep 17 00:00:00 2001 From: Melody Olvera Date: Mon, 20 Nov 2023 14:01:20 -0800 Subject: [PATCH 1/3] dt-bindings: power: reset: Add documentation for reboot reason Document the bindings for the reboot reason driver. Change-Id: I30dacc4f2c9ca59ed12dc94eb81b5ef39a27d187 Signed-off-by: Melody Olvera --- bindings/power/reset/qcom,reboot-reason.yaml | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 bindings/power/reset/qcom,reboot-reason.yaml diff --git a/bindings/power/reset/qcom,reboot-reason.yaml b/bindings/power/reset/qcom,reboot-reason.yaml new file mode 100644 index 00000000..1f871355 --- /dev/null +++ b/bindings/power/reset/qcom,reboot-reason.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/reset/qcom-reboot-reason.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Technologies, Inc. Reboot Reason + +maintainers: + - Elliot Berman + +description: | + Qualcomm Technologies, Inc. SoCs support booting to special download + modes after a restart. These modes could be a :wnormal restart, + restarting into a ramdump collection mode (CrashDump), or restarting + into "emergency download mode". + +properties: + compatible: + items: + - const: qcom,reboot-mode + + allOf: + - $ref: /schemas/nvmem/nvmem-consumer.yaml#/properties + - items: + nvmem-cell-names: + items: + - const: restart_reason + +required: + - compatible + - nvmem-cells-names + +dependencies: + allOf: + - $ref: /schemas/nvmem/nvmem-consumer.yaml#/dependencies + + +examples: + - | + reboot-reason { + compatible = "qcom,reboot-reason"; + nvmem-cells = <&restart_reason>; + nvmem-cell-names = "restart_reason"; + }; From 8b87c841958f4a23dd12112dcb1e1ad9b20cf702 Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Fri, 17 Nov 2023 20:37:57 -0800 Subject: [PATCH 2/3] ARM: dts: msm: Add reboot reason node to sun SoC Add reboot reason node to sun SoC. Change-Id: I6be11e9eec88ff3b82485b22a73851ea812fba7a Signed-off-by: Satya Durga Srinivasu Prabhala --- qcom/sun-pmic-overlay.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index b736c4ee..e27955b6 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -88,6 +88,12 @@ }; &soc { + reboot_reason { + compatible = "qcom,reboot-reason"; + nvmem-cells = <&restart_reason>; + nvmem-cell-names = "restart_reason"; + }; + pmic-pon-log { compatible = "qcom,pmic-pon-log"; nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>; From 85ca810a1f2e134933c3754c5f87e95898530fae Mon Sep 17 00:00:00 2001 From: Melody Olvera Date: Tue, 21 Nov 2023 15:26:53 -0800 Subject: [PATCH 3/3] ARM: dts: msm: qcom: Update scm node with dload-mode Update scm node to include dload-mode register needed to set the proper download mode. Change-Id: I2f2075ec43f1ba452fff6077685afcf6dc7912be Signed-off-by: Melody Olvera --- qcom/sun.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/qcom/sun.dtsi b/qcom/sun.dtsi index 4515cdce..ae20cdf7 100644 --- a/qcom/sun.dtsi +++ b/qcom/sun.dtsi @@ -293,6 +293,7 @@ &firmware { qcom-scm { compatible = "qcom,scm"; + qcom,dload-mode = <&tcsr 0x19000>; }; qcom_smcinvoke {