From 5f5e161ac1d4e9cee003df88ea22a792fb02cbe1 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 21 Sep 2023 17:47:27 -0700 Subject: [PATCH 1/3] ARM: dts: qcom: add PMIC PON log device for Sun Add a PMIC PON log parser device which reads the log stored in PMK8550 SDAM5 and SDAM6. Change-Id: I944df2186b27ebb42cf2d4dc8f51dbf7b40cea9b Signed-off-by: David Collins --- qcom/sun-pmic-overlay.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index 93dca73c..7e0f81e1 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -81,3 +81,11 @@ }; }; }; + +&soc { + pmic-pon-log { + compatible = "qcom,pmic-pon-log"; + nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>; + nvmem-names = "pon_log0", "pon_log1"; + }; +}; From d630ebaf69824b469ef4a7902cf6716cb3520ed5 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 21 Sep 2023 17:51:59 -0700 Subject: [PATCH 2/3] ARM: dts: qcom: add DBO3 regulator device for Sun boards Add a fixed regulator device for the DBO3 buck-boost regulator. It is enabled via PM8550 GPIO 9 and outputs 3.6 V. Change-Id: Iff6e0e1cceed6ad369fb67aca3926f5a808cf3e6 Signed-off-by: David Collins --- qcom/sun-pmic-overlay.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index 7e0f81e1..452c1fa1 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -88,4 +88,14 @@ nvmem = <&pmk8550_sdam_5>, <&pmk8550_sdam_6>; nvmem-names = "pon_log0", "pon_log1"; }; + + DBO3: regulator-dbo3 { + compatible = "qti-regulator-fixed"; + regulator-name = "dbo3"; + regulator-min-microvolt = <3600000>; + regulator-max-microvolt = <3600000>; + gpio = <&pm8550_gpios 9 GPIO_ACTIVE_HIGH>; + regulator-enable-ramp-delay = <1500>; + enable-active-high; + }; }; From 731cfb12e936dd06bcf39b2913de8e2abed2842e Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 21 Sep 2023 18:13:36 -0700 Subject: [PATCH 3/3] ARM: dts: qcom: add regulator OCP notifier device for Sun Add a regulator over-current (OCP) notifier device along with supply properties to map from PMIC peripherals to specific regulator devices. This provides a mechanism to notify consumers of a particular regulator when OCP occurs. Change-Id: I17ee6af65492ece062722c41f97f3ea052970a25 Signed-off-by: David Collins --- qcom/sun-cdp.dtsi | 80 ++++++++++++++++++++++++++++++++++++++ qcom/sun-mtp.dtsi | 80 ++++++++++++++++++++++++++++++++++++++ qcom/sun-pmic-overlay.dtsi | 9 +++++ qcom/sun-qrd.dtsi | 80 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 249 insertions(+) diff --git a/qcom/sun-cdp.dtsi b/qcom/sun-cdp.dtsi index 7e07349f..290fbdac 100644 --- a/qcom/sun-cdp.dtsi +++ b/qcom/sun-cdp.dtsi @@ -27,3 +27,83 @@ }; }; }; + +®ulator_ocp_notifier { + periph-1c1-supply = <&L1B>; + periph-1c2-supply = <&L2B>; + periph-1c3-supply = <&L3B>; + periph-1c4-supply = <&L4B>; + periph-1c5-supply = <&L5B>; + periph-1c6-supply = <&L6B>; + periph-1c7-supply = <&L7B>; + periph-1c8-supply = <&L8B>; + periph-1c9-supply = <&L9B>; + periph-1ca-supply = <&L10B>; + periph-1cb-supply = <&L11B>; + periph-1cc-supply = <&L12B>; + periph-1cd-supply = <&L13B>; + periph-1ce-supply = <&L14B>; + periph-1cf-supply = <&L15B>; + periph-1d0-supply = <&L16B>; + periph-1d1-supply = <&L17B>; + periph-1e4-supply = <&BOB1>; + periph-1e6-supply = <&BOB2>; + periph-39b-supply = <&S1D>; + periph-39e-supply = <&S2D_LEVEL>; + periph-3a1-supply = <&S3D>; + periph-3a4-supply = <&S4D>; + periph-3a7-supply = <&S5D_LEVEL>; + periph-3c1-supply = <&L1D>; + periph-3c2-supply = <&L2D>; + periph-3c3-supply = <&L3D>; + periph-5aa-supply = <&S6F_LEVEL>; + periph-5c1-supply = <&L1F>; + periph-5c2-supply = <&L2F>; + periph-5c3-supply = <&L3F>; + periph-69b-supply = <&S1G>; + periph-69e-supply = <&S2G_LEVEL>; + periph-6a1-supply = <&S3G>; + periph-6a4-supply = <&S4G>; + periph-6a7-supply = <&S5G_LEVEL>; + periph-6ad-supply = <&S7G_LEVEL>; + periph-6c1-supply = <&L1G>; + periph-6c2-supply = <&L2G>; + periph-6c3-supply = <&L3G>; + periph-89b-supply = <&S1I_LEVEL>; + periph-8a1-supply = <&S3I_LEVEL>; + periph-8a7-supply = <&S5I_LEVEL>; + periph-8aa-supply = <&S6I_LEVEL>; + periph-8ad-supply = <&S7I>; + periph-8b0-supply = <&S8I>; + periph-8c1-supply = <&L1I>; + periph-8c2-supply = <&L2I>; + periph-8c3-supply = <&L3I>; + periph-99b-supply = <&S1J_LEVEL>; + periph-99e-supply = <&S2J>; + periph-9a1-supply = <&S3J>; + periph-9a4-supply = <&S4J>; + periph-9c1-supply = <&L1J>; + periph-9c2-supply = <&L2J>; + periph-9c3-supply = <&L3J_LEVEL>; + periph-ac1-supply = <&L1K>; + periph-ac2-supply = <&L2K>; + periph-ac3-supply = <&L3K>; + periph-ac4-supply = <&L4K>; + periph-ac5-supply = <&L5K>; + periph-ac6-supply = <&L6K>; + periph-ac7-supply = <&L7K>; + periph-c40-supply = <&L1M>; + periph-c41-supply = <&L2M>; + periph-c42-supply = <&L3M>; + periph-c43-supply = <&L4M>; + periph-c44-supply = <&L5M>; + periph-c45-supply = <&L6M>; + periph-c46-supply = <&L7M>; + periph-d40-supply = <&L1N>; + periph-d41-supply = <&L2N>; + periph-d42-supply = <&L3N>; + periph-d43-supply = <&L4N>; + periph-d44-supply = <&L5N>; + periph-d45-supply = <&L6N>; + periph-d46-supply = <&L7N>; +}; diff --git a/qcom/sun-mtp.dtsi b/qcom/sun-mtp.dtsi index 87b375c1..6738e922 100644 --- a/qcom/sun-mtp.dtsi +++ b/qcom/sun-mtp.dtsi @@ -27,3 +27,83 @@ }; }; }; + +®ulator_ocp_notifier { + periph-1c1-supply = <&L1B>; + periph-1c2-supply = <&L2B>; + periph-1c3-supply = <&L3B>; + periph-1c4-supply = <&L4B>; + periph-1c5-supply = <&L5B>; + periph-1c6-supply = <&L6B>; + periph-1c7-supply = <&L7B>; + periph-1c8-supply = <&L8B>; + periph-1c9-supply = <&L9B>; + periph-1ca-supply = <&L10B>; + periph-1cb-supply = <&L11B>; + periph-1cc-supply = <&L12B>; + periph-1cd-supply = <&L13B>; + periph-1ce-supply = <&L14B>; + periph-1cf-supply = <&L15B>; + periph-1d0-supply = <&L16B>; + periph-1d1-supply = <&L17B>; + periph-1e4-supply = <&BOB1>; + periph-1e6-supply = <&BOB2>; + periph-39b-supply = <&S1D>; + periph-39e-supply = <&S2D_LEVEL>; + periph-3a1-supply = <&S3D>; + periph-3a4-supply = <&S4D>; + periph-3a7-supply = <&S5D_LEVEL>; + periph-3c1-supply = <&L1D>; + periph-3c2-supply = <&L2D>; + periph-3c3-supply = <&L3D>; + periph-5aa-supply = <&S6F_LEVEL>; + periph-5c1-supply = <&L1F>; + periph-5c2-supply = <&L2F>; + periph-5c3-supply = <&L3F>; + periph-69b-supply = <&S1G>; + periph-69e-supply = <&S2G_LEVEL>; + periph-6a1-supply = <&S3G>; + periph-6a4-supply = <&S4G>; + periph-6a7-supply = <&S5G_LEVEL>; + periph-6ad-supply = <&S7G_LEVEL>; + periph-6c1-supply = <&L1G>; + periph-6c2-supply = <&L2G>; + periph-6c3-supply = <&L3G>; + periph-89b-supply = <&S1I_LEVEL>; + periph-8a1-supply = <&S3I_LEVEL>; + periph-8a7-supply = <&S5I_LEVEL>; + periph-8aa-supply = <&S6I_LEVEL>; + periph-8ad-supply = <&S7I>; + periph-8b0-supply = <&S8I>; + periph-8c1-supply = <&L1I>; + periph-8c2-supply = <&L2I>; + periph-8c3-supply = <&L3I>; + periph-99b-supply = <&S1J_LEVEL>; + periph-99e-supply = <&S2J>; + periph-9a1-supply = <&S3J>; + periph-9a4-supply = <&S4J>; + periph-9c1-supply = <&L1J>; + periph-9c2-supply = <&L2J>; + periph-9c3-supply = <&L3J_LEVEL>; + periph-ac1-supply = <&L1K>; + periph-ac2-supply = <&L2K>; + periph-ac3-supply = <&L3K>; + periph-ac4-supply = <&L4K>; + periph-ac5-supply = <&L5K>; + periph-ac6-supply = <&L6K>; + periph-ac7-supply = <&L7K>; + periph-c40-supply = <&L1M>; + periph-c41-supply = <&L2M>; + periph-c42-supply = <&L3M>; + periph-c43-supply = <&L4M>; + periph-c44-supply = <&L5M>; + periph-c45-supply = <&L6M>; + periph-c46-supply = <&L7M>; + periph-d40-supply = <&L1N>; + periph-d41-supply = <&L2N>; + periph-d42-supply = <&L3N>; + periph-d43-supply = <&L4N>; + periph-d44-supply = <&L5N>; + periph-d45-supply = <&L6N>; + periph-d46-supply = <&L7N>; +}; diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index 452c1fa1..114aebe2 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -89,6 +89,15 @@ nvmem-names = "pon_log0", "pon_log1"; }; + regulator_ocp_notifier: regulator-ocp-notifier { + compatible = "qcom,regulator-ocp-notifier"; + interrupt-parent = <&spmi_bus>; + interrupts = <0x0 0x71 0x1 IRQ_TYPE_EDGE_RISING>, + <0x0 0x85 0x1 IRQ_TYPE_EDGE_RISING>; + nvmem-cells = <&ocp_log>, <&alarm_log>; + nvmem-cell-names = "ocp_log", "alarm_log"; + }; + DBO3: regulator-dbo3 { compatible = "qti-regulator-fixed"; regulator-name = "dbo3"; diff --git a/qcom/sun-qrd.dtsi b/qcom/sun-qrd.dtsi index 87b375c1..6738e922 100644 --- a/qcom/sun-qrd.dtsi +++ b/qcom/sun-qrd.dtsi @@ -27,3 +27,83 @@ }; }; }; + +®ulator_ocp_notifier { + periph-1c1-supply = <&L1B>; + periph-1c2-supply = <&L2B>; + periph-1c3-supply = <&L3B>; + periph-1c4-supply = <&L4B>; + periph-1c5-supply = <&L5B>; + periph-1c6-supply = <&L6B>; + periph-1c7-supply = <&L7B>; + periph-1c8-supply = <&L8B>; + periph-1c9-supply = <&L9B>; + periph-1ca-supply = <&L10B>; + periph-1cb-supply = <&L11B>; + periph-1cc-supply = <&L12B>; + periph-1cd-supply = <&L13B>; + periph-1ce-supply = <&L14B>; + periph-1cf-supply = <&L15B>; + periph-1d0-supply = <&L16B>; + periph-1d1-supply = <&L17B>; + periph-1e4-supply = <&BOB1>; + periph-1e6-supply = <&BOB2>; + periph-39b-supply = <&S1D>; + periph-39e-supply = <&S2D_LEVEL>; + periph-3a1-supply = <&S3D>; + periph-3a4-supply = <&S4D>; + periph-3a7-supply = <&S5D_LEVEL>; + periph-3c1-supply = <&L1D>; + periph-3c2-supply = <&L2D>; + periph-3c3-supply = <&L3D>; + periph-5aa-supply = <&S6F_LEVEL>; + periph-5c1-supply = <&L1F>; + periph-5c2-supply = <&L2F>; + periph-5c3-supply = <&L3F>; + periph-69b-supply = <&S1G>; + periph-69e-supply = <&S2G_LEVEL>; + periph-6a1-supply = <&S3G>; + periph-6a4-supply = <&S4G>; + periph-6a7-supply = <&S5G_LEVEL>; + periph-6ad-supply = <&S7G_LEVEL>; + periph-6c1-supply = <&L1G>; + periph-6c2-supply = <&L2G>; + periph-6c3-supply = <&L3G>; + periph-89b-supply = <&S1I_LEVEL>; + periph-8a1-supply = <&S3I_LEVEL>; + periph-8a7-supply = <&S5I_LEVEL>; + periph-8aa-supply = <&S6I_LEVEL>; + periph-8ad-supply = <&S7I>; + periph-8b0-supply = <&S8I>; + periph-8c1-supply = <&L1I>; + periph-8c2-supply = <&L2I>; + periph-8c3-supply = <&L3I>; + periph-99b-supply = <&S1J_LEVEL>; + periph-99e-supply = <&S2J>; + periph-9a1-supply = <&S3J>; + periph-9a4-supply = <&S4J>; + periph-9c1-supply = <&L1J>; + periph-9c2-supply = <&L2J>; + periph-9c3-supply = <&L3J_LEVEL>; + periph-ac1-supply = <&L1K>; + periph-ac2-supply = <&L2K>; + periph-ac3-supply = <&L3K>; + periph-ac4-supply = <&L4K>; + periph-ac5-supply = <&L5K>; + periph-ac6-supply = <&L6K>; + periph-ac7-supply = <&L7K>; + periph-c40-supply = <&L1M>; + periph-c41-supply = <&L2M>; + periph-c42-supply = <&L3M>; + periph-c43-supply = <&L4M>; + periph-c44-supply = <&L5M>; + periph-c45-supply = <&L6M>; + periph-c46-supply = <&L7M>; + periph-d40-supply = <&L1N>; + periph-d41-supply = <&L2N>; + periph-d42-supply = <&L3N>; + periph-d43-supply = <&L4N>; + periph-d44-supply = <&L5N>; + periph-d45-supply = <&L6N>; + periph-d46-supply = <&L7N>; +};