From 8f33308163dde1e98d29a2df5bfdfc84426a39cc Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 2 Feb 2022 17:53:13 -0800 Subject: [PATCH 1/2] dt-bindings: soc: qcom: pmic-pon-log: define bindings for multiple nvmem On some PMICs, the PON log is split between multiple NVMEM devices to allow for more entries. Define bindings so that multiple NVMEM devices can be specified to support this situation. Change-Id: Iead92ebd51473370fb5205e3fe9fe1a3a50eeb07 --- bindings/soc/qcom/qcom,pmic-pon-log.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bindings/soc/qcom/qcom,pmic-pon-log.txt b/bindings/soc/qcom/qcom,pmic-pon-log.txt index 1a906f39..4bfc320d 100644 --- a/bindings/soc/qcom/qcom,pmic-pon-log.txt +++ b/bindings/soc/qcom/qcom,pmic-pon-log.txt @@ -12,12 +12,14 @@ PON Log device accesses this log and parses it into a human readable format. - nvmem: Usage: required Value type: - Definition: phandle of the PMIC nvmem device containing the PON log + Definition: phandle list of the PMIC nvmem devices containing the PON + log. - nvmem-names: Usage: required Value type: - Definition: must be "pon_log" + Definition: must be "pon_log" if using a single nvmem device or + "pon_log0", "pon_log1", etc if using multiple nvmem devices. - qcom,pmic-fault-panic: Usage: optional @@ -26,10 +28,16 @@ PON Log device accesses this log and parses it into a human readable format. controlled panic shutdown if the preceding restart was caused by a PMIC fault. -Example: +Examples: pmic-pon-log { compatible = "qcom,pmic-pon-log"; nvmem = <&pmk8350_sdam_5>; nvmem-names = "pon_log"; }; + +pmic-pon-log { + compatible = "qcom,pmic-pon-log"; + nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>; + nvmem-names = "pon_log0", "pon_log1"; +}; From f350ec20ab11900f16145f268f78163c17132564 Mon Sep 17 00:00:00 2001 From: David Collins Date: Wed, 2 Feb 2022 18:00:19 -0800 Subject: [PATCH 2/2] ARM: dts: qcom: add PMIC PON log device for Kalama Add a PMIC PON log parser device which reads the log stored in PMK8550 SDAM5 and SDAM6. Change-Id: I880f4abf3a21023f1a36ec5e521b42385199ff43 --- qcom/kalama-pmic-overlay.dtsi | 6 ++++++ qcom/pmk8550.dtsi | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/qcom/kalama-pmic-overlay.dtsi b/qcom/kalama-pmic-overlay.dtsi index 37b7fb8b..c377d026 100644 --- a/qcom/kalama-pmic-overlay.dtsi +++ b/qcom/kalama-pmic-overlay.dtsi @@ -360,4 +360,10 @@ regulator-enable-ramp-delay = <1500>; enable-active-high; }; + + pmic-pon-log { + compatible = "qcom,pmic-pon-log"; + nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>; + nvmem-names = "pon_log0", "pon_log1"; + }; }; diff --git a/qcom/pmk8550.dtsi b/qcom/pmk8550.dtsi index 81d8b0de..d2cf7bc3 100644 --- a/qcom/pmk8550.dtsi +++ b/qcom/pmk8550.dtsi @@ -53,6 +53,11 @@ reg = <0x7400>; }; + pmk8550_sdam_6: sdam@7500 { + compatible = "qcom,spmi-sdam"; + reg = <0x7500>; + }; + pmk8550_sdam_21: sdam@8400 { compatible = "qcom,spmi-sdam"; reg = <0x8400>;