OSDN Git Service

arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node
authorParikshit Pareek <quic_ppareek@quicinc.com>
Mon, 17 Apr 2023 14:55:36 +0000 (16:55 +0200)
committerBjorn Andersson <andersson@kernel.org>
Mon, 15 May 2023 02:27:48 +0000 (19:27 -0700)
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 <quic_ppareek@quicinc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Eric Chanudet <echanude@redhat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230417145536.414490-4-brgl@bgdev.pl
arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi

index 5abdc23..3c3b628 100644 (file)
                        };
                };
        };
+
+       reboot-mode {
+               compatible = "nvmem-reboot-mode";
+               nvmem-cells = <&reboot_reason>;
+               nvmem-cell-names = "reboot-mode";
+               mode-recovery = <0x01>;
+               mode-bootloader = <0x02>;
+       };
 };
 
 &spmi_bus {
                        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 {