2023-04-17 14:58:24

by Bartosz Golaszewski

[permalink] [raw]
Subject: [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node

From: Parikshit Pareek <[email protected]>

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

Signed-off-by: Parikshit Pareek <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
---
arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 5abdc239d3a6..3c3b6287cd27 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -88,6 +88,14 @@ trip1 {
};
};
};
+
+ reboot-mode {
+ compatible = "nvmem-reboot-mode";
+ nvmem-cells = <&reboot_reason>;
+ nvmem-cell-names = "reboot-mode";
+ mode-recovery = <0x01>;
+ mode-bootloader = <0x02>;
+ };
};

&spmi_bus {
@@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
interrupt-controller;
#interrupt-cells = <2>;
};
+
+ pmm8654au_0_sdam_0: 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>;
+ };
+ };
};

pmm8654au_1: pmic@2 {
--
2.37.2


2023-04-17 18:06:04

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node



On 17.04.2023 16:55, Bartosz Golaszewski wrote:
> From: Parikshit Pareek <[email protected]>
>
> Introduce sdam_0 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reaons supported via sdam_0
> node.
>
> Signed-off-by: Parikshit Pareek <[email protected]>
> Signed-off-by: Bartosz Golaszewski <[email protected]>
> ---
Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> index 5abdc239d3a6..3c3b6287cd27 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> @@ -88,6 +88,14 @@ trip1 {
> };
> };
> };
> +
> + reboot-mode {
> + compatible = "nvmem-reboot-mode";
> + nvmem-cells = <&reboot_reason>;
> + nvmem-cell-names = "reboot-mode";
> + mode-recovery = <0x01>;
> + mode-bootloader = <0x02>;
> + };
> };
>
> &spmi_bus {
> @@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
> interrupt-controller;
> #interrupt-cells = <2>;
> };
> +
> + pmm8654au_0_sdam_0: 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>;
> + };
> + };
> };
>
> pmm8654au_1: pmic@2 {

2023-04-18 18:19:12

by Eric Chanudet

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node

On Mon, Apr 17, 2023 at 04:55:36PM +0200, Bartosz Golaszewski wrote:
> From: Parikshit Pareek <[email protected]>
>
> Introduce sdam_0 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reaons supported via sdam_0
> node.
>
> Signed-off-by: Parikshit Pareek <[email protected]>
> Signed-off-by: Bartosz Golaszewski <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)

Tested-by: Eric Chanudet <[email protected]>

>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> index 5abdc239d3a6..3c3b6287cd27 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> @@ -88,6 +88,14 @@ trip1 {
> };
> };
> };
> +
> + reboot-mode {
> + compatible = "nvmem-reboot-mode";
> + nvmem-cells = <&reboot_reason>;
> + nvmem-cell-names = "reboot-mode";
> + mode-recovery = <0x01>;
> + mode-bootloader = <0x02>;
> + };
> };
>
> &spmi_bus {
> @@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
> interrupt-controller;
> #interrupt-cells = <2>;
> };
> +
> + pmm8654au_0_sdam_0: 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>;
> + };
> + };
> };
>
> pmm8654au_1: pmic@2 {
> --
> 2.37.2
>

--
Eric Chanudet