From 66cf726647574eab9bffde6315f0b7779dbd5b24 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Thu, 14 May 2020 14:59:54 -0700 Subject: [PATCH 1/3] dt-bindings: qcom,reboot-reason: Add bindings Add bindings for qcom,reboot-reason node. Change-Id: I2cac1570c9db163ae6e794f88504bc503655f956 --- bindings/power/reset/qcom,reboot-reason.yaml | 44 ++++++++++++++++++++ 1 file changed, 44 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..3d20a166 --- /dev/null +++ b/bindings/power/reset/qcom,reboot-reason.yaml @@ -0,0 +1,44 @@ +%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 binding + +maintainers: + - Elliot Berman + +description: | + Qualcomm Technologies, Inc. SoCs support booting to special download + modes after a restart. These modes could be a normal 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 8e0aa5f061b1a256ef0d197c7b90699f35f1831d Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Fri, 6 Dec 2019 13:37:45 -0800 Subject: [PATCH 2/3] dt-bindings: qcom,dload-mode: Add bindings Add bindings for qcom,dload-mode driver. Change-Id: I24d52c22fe974330028bf5492f46205109864087 --- bindings/power/reset/qcom,dload-mode.yaml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bindings/power/reset/qcom,dload-mode.yaml diff --git a/bindings/power/reset/qcom,dload-mode.yaml b/bindings/power/reset/qcom,dload-mode.yaml new file mode 100644 index 00000000..067d6eb2 --- /dev/null +++ b/bindings/power/reset/qcom,dload-mode.yaml @@ -0,0 +1,27 @@ +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,dload-mode.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Technologies, Inc. Download Mode binding + +maintainers: + - Elliot Berman + +description: | + The Download Mode driver is used to manage sending SoC into a dump collection + mode after a reboot. + +properties: + compatible: + items: + - const: qcom,dload-mode + +required: + - compatible + +examples: + - | + qcom,dload-mode { + compatible = "qcom,dload-mode"; + }; From 0af96f6c3f8a1bb24b04373d6011236d6e744259 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 25 Feb 2020 08:14:07 -0800 Subject: [PATCH 3/3] ARM: dts: msm: Enable new download/restart mode drivers for Lahaina Enable download/restart mode drivers for Lahaina. Change-Id: I609d88e3649b2935bb62aac9ba2ea347ebb94822 --- qcom/lahaina-pmic-overlay.dtsi | 9 ++++++--- qcom/lahaina.dtsi | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/qcom/lahaina-pmic-overlay.dtsi b/qcom/lahaina-pmic-overlay.dtsi index 3f9f2434..be0b7919 100644 --- a/qcom/lahaina-pmic-overlay.dtsi +++ b/qcom/lahaina-pmic-overlay.dtsi @@ -545,7 +545,10 @@ }; }; -&restart { - nvmem-cells = <&restart_reason>; - nvmem-cell-names = "restart_reason"; +&soc { + reboot_reason { + compatible = "qcom,reboot-reason"; + nvmem-cells = <&restart_reason>; + nvmem-cell-names = "restart_reason"; + }; }; diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index 53e9448c..3f388db3 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -266,6 +266,7 @@ firmware: firmware { scm { compatible = "qcom,scm"; + qcom,dload-mode = <&tcsr 0x13000>; }; android { @@ -2069,10 +2070,8 @@ }; }; - restart: restart@c264000 { - compatible = "qcom,pshold"; - reg = <0xc264000 0x4>, <0x1fd3000 0x4>; - reg-names = "pshold-base", "tcsr-boot-misc-detect"; + dload_mode { + compatible = "qcom,dload-mode"; }; tlmm: pinctrl@f000000 { @@ -3182,6 +3181,11 @@ #hwlock-cells = <1>; }; + tcsr: syscon@1fc0000 { + compatible = "syscon"; + reg = <0x1fc0000 0x30000>; + }; + smem: qcom,smem { compatible = "qcom,smem"; memory-region = <&smem_mem>;