devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason
@ 2023-05-03 14:13 Neil Armstrong
  2023-05-03 14:13 ` [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Neil Armstrong @ 2023-05-03 14:13 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: Abel Vesa, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel, Neil Armstrong

Like SA8775P (at [1]), the SM8350, SM8450 & SM8550 platforms uses
the SDAM2 nvmem to pass the reboot reason.

This simply adds the sdam2 and reboot reason nodes
in the pmk8350 and pmk8550 dtsi.

Tested with:

and

triggering the following ABL logs on HDK8450:
  KeyPress:0, BootReason:2
  Fastboot=1, Recovery:0
and
  KeyPress:0, BootReason:1
  Fastboot=0, Recovery:1

[1] https://lore.kernel.org/lkml/20230417145536.414490-1-brgl@bgdev.pl/T/

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Neil Armstrong (2):
      arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem
      arm64: dts: qcom: pmk8550: add reboot-mode node using sdam_2 nvmem

 arch/arm64/boot/dts/qcom/pmk8350.dtsi | 23 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/pmk8550.dtsi | 23 +++++++++++++++++++++++
 2 files changed, 46 insertions(+)
---
base-commit: 92e815cf07ed24ee1c51b122f24ffcf2964b4b13
change-id: 20230503-topic-sm8450-upstream-reboot-reason-e5fc827bac27

Best regards,
-- 
Neil Armstrong <neil.armstrong@linaro.org>


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

* [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem
  2023-05-03 14:13 [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Neil Armstrong
@ 2023-05-03 14:13 ` Neil Armstrong
  2023-05-03 14:19   ` Krzysztof Kozlowski
  2023-05-03 14:13 ` [PATCH 2/2] arm64: dts: qcom: pmk8550: " Neil Armstrong
  2023-05-25  4:54 ` [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Neil Armstrong @ 2023-05-03 14:13 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: Abel Vesa, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel, Neil Armstrong

Introduce sdam_2 node, which is to be used via nvmem for power on
reasons during reboot. Add supported PoN reasons supported via sdam_2
node.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 arch/arm64/boot/dts/qcom/pmk8350.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
index f26fb7d32faf..bc6297e7253e 100644
--- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
@@ -13,6 +13,16 @@
 	#define PMK8350_SID 0
 #endif
 
+/ {
+	reboot-mode {
+		compatible = "nvmem-reboot-mode";
+		nvmem-cells = <&reboot_reason>;
+		nvmem-cell-names = "reboot-mode";
+		mode-recovery = <0x01>;
+		mode-bootloader = <0x02>;
+	};
+};
+	
 &spmi_bus {
 	pmk8350: pmic@PMK8350_SID {
 		compatible = "qcom,pmk8350", "qcom,spmi-pmic";
@@ -66,6 +76,19 @@ pmk8350_rtc: rtc@6100 {
 			status = "disabled";
 		};
 
+		pmk8350_sdam_2: nvram@7100 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0x7100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x7100 0x100>;
+
+			reboot_reason: reboot-reason@48 {
+				reg = <0x48 0x1>;
+				bits = <1 7>;
+			};
+		};
+
 		pmk8350_gpios: gpio@b000 {
 			compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio";
 			reg = <0xb000>;

-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: qcom: pmk8550: add reboot-mode node using sdam_2 nvmem
  2023-05-03 14:13 [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Neil Armstrong
  2023-05-03 14:13 ` [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem Neil Armstrong
@ 2023-05-03 14:13 ` Neil Armstrong
  2023-05-03 14:21   ` Krzysztof Kozlowski
  2023-05-25  4:54 ` [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Neil Armstrong @ 2023-05-03 14:13 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: Abel Vesa, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel, Neil Armstrong

Introduce sdam_2 node, which is to be used via nvmem for power on
reasons during reboot. Add supported PoN reasons supported via sdam_2
node.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 arch/arm64/boot/dts/qcom/pmk8550.dtsi | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmk8550.dtsi b/arch/arm64/boot/dts/qcom/pmk8550.dtsi
index 201efeda7d2d..8c897d4fee29 100644
--- a/arch/arm64/boot/dts/qcom/pmk8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8550.dtsi
@@ -8,6 +8,16 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/ {
+	reboot-mode {
+		compatible = "nvmem-reboot-mode";
+		nvmem-cells = <&reboot_reason>;
+		nvmem-cell-names = "reboot-mode";
+		mode-recovery = <0x01>;
+		mode-bootloader = <0x02>;
+	};
+};
+
 &spmi_bus {
 	pmk8550: pmic@0 {
 		compatible = "qcom,pm8550", "qcom,spmi-pmic";
@@ -42,6 +52,19 @@ pmk8550_rtc: rtc@6100 {
 			status = "disabled";
 		};
 
+		pmk8550_sdam_2: nvram@7100 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0x7100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x7100 0x100>;
+
+			reboot_reason: reboot-reason@48 {
+				reg = <0x48 0x1>;
+				bits = <1 7>;
+			};
+		};
+
 		pmk8550_gpios: gpio@8800 {
 			compatible = "qcom,pmk8550-gpio", "qcom,spmi-gpio";
 			reg = <0xb800>;

-- 
2.34.1


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

* Re: [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem
  2023-05-03 14:13 ` [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem Neil Armstrong
@ 2023-05-03 14:19   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-03 14:19 UTC (permalink / raw)
  To: Neil Armstrong, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: Abel Vesa, linux-arm-msm, devicetree, linux-kernel

On 03/05/2023 16:13, Neil Armstrong wrote:
> Introduce sdam_2 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reasons supported via sdam_2
> node.
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Tested on HDK8450.



Best regards,
Krzysztof


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

* Re: [PATCH 2/2] arm64: dts: qcom: pmk8550: add reboot-mode node using sdam_2 nvmem
  2023-05-03 14:13 ` [PATCH 2/2] arm64: dts: qcom: pmk8550: " Neil Armstrong
@ 2023-05-03 14:21   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-03 14:21 UTC (permalink / raw)
  To: Neil Armstrong, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: Abel Vesa, linux-arm-msm, devicetree, linux-kernel

On 03/05/2023 16:13, Neil Armstrong wrote:
> Introduce sdam_2 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reasons supported via sdam_2
> node.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/pmk8550.dtsi | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Tested on QRD8550

Best regards,
Krzysztof


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

* Re: [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason
  2023-05-03 14:13 [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Neil Armstrong
  2023-05-03 14:13 ` [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem Neil Armstrong
  2023-05-03 14:13 ` [PATCH 2/2] arm64: dts: qcom: pmk8550: " Neil Armstrong
@ 2023-05-25  4:54 ` Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2023-05-25  4:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Konrad Dybcio, Rob Herring, Andy Gross,
	Neil Armstrong
  Cc: linux-kernel, linux-arm-msm, devicetree, Abel Vesa,
	Krzysztof Kozlowski

On Wed, 03 May 2023 16:13:27 +0200, Neil Armstrong wrote:
> Like SA8775P (at [1]), the SM8350, SM8450 & SM8550 platforms uses
> the SDAM2 nvmem to pass the reboot reason.
> 
> This simply adds the sdam2 and reboot reason nodes
> in the pmk8350 and pmk8550 dtsi.
> 
> Tested with:
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem
      commit: 399a3c34b390afda183b7b0bd91afeee3a4cfc0f
[2/2] arm64: dts: qcom: pmk8550: add reboot-mode node using sdam_2 nvmem
      commit: 138c427ade7bad3f4f764b506ce4f1079bfc22ee

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-05-25  4:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 14:13 [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Neil Armstrong
2023-05-03 14:13 ` [PATCH 1/2] arm64: dts: qcom: pmk8350: add reboot-mode node using sdam_2 nvmem Neil Armstrong
2023-05-03 14:19   ` Krzysztof Kozlowski
2023-05-03 14:13 ` [PATCH 2/2] arm64: dts: qcom: pmk8550: " Neil Armstrong
2023-05-03 14:21   ` Krzysztof Kozlowski
2023-05-25  4:54 ` [PATCH 0/2] arm64: dts: qcom: pmk[345]50: enable reboot reason Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).