From 18f11baa5a9cf124fc4c853a2f65569f87e55b2f Mon Sep 17 00:00:00 2001 From: David Collins Date: Tue, 4 Feb 2020 14:34:10 -0800 Subject: [PATCH 1/2] ARM: dts: qcom: add nvmem cell for PMK8350 SDAM2 restart reason Add an nvmem cell for the restart reason within PMIC PMK8350 SDAM2. This is used by the high-level OS to inform boot loaders of special actions to perform upon rebooting. Change-Id: Ifb0b247a1616ee1484360db28e1bb9900f33696f --- qcom/pmk8350.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcom/pmk8350.dtsi b/qcom/pmk8350.dtsi index 127ff74d5b85..00622806ceee 100644 --- a/qcom/pmk8350.dtsi +++ b/qcom/pmk8350.dtsi @@ -43,6 +43,13 @@ pmk8350_sdam_2: sdam@7100 { compatible = "qcom,spmi-sdam"; reg = <0x7100>; + #address-cells = <1>; + #size-cells = <1>; + + restart_reason: restart@48 { + reg = <0x48 0x1>; + bits = <1 7>; + }; }; pmk8350_gpios: pinctrl@b000 { From d49b24f90394f08eafe55d14a503a2b3f6e4f7b2 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 4 Feb 2020 14:53:34 -0800 Subject: [PATCH 2/2] ARM: dts: qcom: Link restart_reason nvmem cell to qcom,pshold Associate restart_reason nvmem cell with qcom,pshold for Lahaina. Change-Id: Ic9847cb1520d26fca400ed3f2970d372d5a29558 --- qcom/lahaina-pmic-overlay.dtsi | 5 +++++ qcom/lahaina.dtsi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qcom/lahaina-pmic-overlay.dtsi b/qcom/lahaina-pmic-overlay.dtsi index a1a3bdd75643..8bd48c2a458b 100644 --- a/qcom/lahaina-pmic-overlay.dtsi +++ b/qcom/lahaina-pmic-overlay.dtsi @@ -228,3 +228,8 @@ }; }; }; + +&restart { + nvmem-cells = <&restart_reason>; + nvmem-cell-names = "restart_reason"; +}; diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index 130c7e6ccdb9..86997c0b8561 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -641,7 +641,7 @@ }; }; - restart@c264000 { + restart: restart@c264000 { compatible = "qcom,pshold"; reg = <0xc264000 0x4>, <0x1fd3000 0x4>; reg-names = "pshold-base", "tcsr-boot-misc-detect";