From 3e728ec361a8fe26601e533e59ddfd594864aadc Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 9 Nov 2023 10:40:53 -0800 Subject: [PATCH] ARM: dts: qcom: add PMIC device support for sun V8 power grid boards Sun boards that utilize the V8 power grid have a PM8550VE PMIC in place of a PM8550VS one for the "F" PMIC at SPMI SID=5. Several FTSMPS regulators are ganged together differently and some supplies are shuffled around. These are the impacts for RPMh managed regulator resources: V6 Power Grid V8 Power Grid S4J WCN_CX XX S5F XX WCN_CX S6F VDD_MXA XX S8F N/A VDD_MXA Update the device tree configurations for V8-specific overlays so that the correct set of PMIC resources is present. Change-Id: I035b8dfc87703b7681110a757952005bbdbf8a63 Signed-off-by: David Collins --- qcom/sun-cdp-kiwi-v8.dtsi | 8 +++++ qcom/sun-cdp-v8.dtsi | 8 +++++ qcom/sun-mtp-kiwi-v8.dtsi | 8 +++++ qcom/sun-mtp-v8.dtsi | 8 +++++ qcom/sun-pmic-overlay-v8.dtsi | 66 +++++++++++++++++++++++++++++++++++ qcom/sun-qrd-sku1-v8.dtsi | 8 +++++ qcom/sun-qrd-sku2-v8.dtsi | 8 +++++ qcom/sun-regulators.dtsi | 27 ++++++++++---- 8 files changed, 135 insertions(+), 6 deletions(-) create mode 100644 qcom/sun-pmic-overlay-v8.dtsi diff --git a/qcom/sun-cdp-kiwi-v8.dtsi b/qcom/sun-cdp-kiwi-v8.dtsi index 9d222a52..87bdda18 100644 --- a/qcom/sun-cdp-kiwi-v8.dtsi +++ b/qcom/sun-cdp-kiwi-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-cdp-kiwi.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-cdp-v8.dtsi b/qcom/sun-cdp-v8.dtsi index 75eff7ab..a40c1ce0 100644 --- a/qcom/sun-cdp-v8.dtsi +++ b/qcom/sun-cdp-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-cdp.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-mtp-kiwi-v8.dtsi b/qcom/sun-mtp-kiwi-v8.dtsi index 2c2449e7..c740c1b6 100644 --- a/qcom/sun-mtp-kiwi-v8.dtsi +++ b/qcom/sun-mtp-kiwi-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-mtp-kiwi.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-mtp-v8.dtsi b/qcom/sun-mtp-v8.dtsi index ed228e3c..4ca3a57f 100644 --- a/qcom/sun-mtp-v8.dtsi +++ b/qcom/sun-mtp-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-mtp.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-pmic-overlay-v8.dtsi b/qcom/sun-pmic-overlay-v8.dtsi new file mode 100644 index 00000000..1ad01d51 --- /dev/null +++ b/qcom/sun-pmic-overlay-v8.dtsi @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +&VRM_S4J { + status = "disabled"; +}; + +&S4J { + status = "disabled"; +}; + +&VRM_S5F { + status = "ok"; +}; + +&S5F { + status = "ok"; +}; + +&pm8550vs_f { + status = "disabled"; +}; + +&pm8550vs_f_temp_alarm { + status = "disabled"; +}; + +&pm8550ve_f { + status = "ok"; +}; + +&pm8550ve_f_temp_alarm { + status = "ok"; +}; + +&apps_rsc_drv2 { + rpmh-regulator-mxlvl { + S8F_LEVEL: pm_v8f_s8_level: regulator-vdd-mxa-level { + regulator-name = "pm_v8f_s8_level"; + }; + + S8F_LEVEL_AO: pm_v8f_s8_level_ao: regulator-vdd-mxa-level-ao { + regulator-name = "pm_v8f_s8_level_ao"; + }; + }; + + rpmh-regulator-ldof1 { + pm_v8f_l1: regulator-pm-vxf-l1 { + regulator-name = "pm_v8f_l1"; + }; + }; + + rpmh-regulator-ldof2 { + pm_v8f_l2: regulator-pm-vxf-l2 { + regulator-name = "pm_v8f_l2"; + }; + }; + + rpmh-regulator-ldof3 { + pm_v8f_l3: regulator-pm-vxf-l3 { + regulator-name = "pm_v8f_l3"; + }; + }; +}; diff --git a/qcom/sun-qrd-sku1-v8.dtsi b/qcom/sun-qrd-sku1-v8.dtsi index 2aa7c8f1..1b828a36 100644 --- a/qcom/sun-qrd-sku1-v8.dtsi +++ b/qcom/sun-qrd-sku1-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-qrd-sku1.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-qrd-sku2-v8.dtsi b/qcom/sun-qrd-sku2-v8.dtsi index 4e9fbdf6..749e76fd 100644 --- a/qcom/sun-qrd-sku2-v8.dtsi +++ b/qcom/sun-qrd-sku2-v8.dtsi @@ -4,3 +4,11 @@ */ #include "sun-qrd-sku2.dtsi" +#include "sun-pmic-overlay-v8.dtsi" + +®ulator_ocp_notifier { + /delete-property/ periph-9a4-supply; /* S4J */ + periph-5a7-supply = <&S5F>; + /delete-property/ periph-5aa-supply; /* S6F */ + periph-5b0-supply = <&S8F_LEVEL>; +}; diff --git a/qcom/sun-regulators.dtsi b/qcom/sun-regulators.dtsi index 409e297d..6a99c4c9 100644 --- a/qcom/sun-regulators.dtsi +++ b/qcom/sun-regulators.dtsi @@ -65,7 +65,7 @@ proxy-supply = <&VDD_MXA_LEVEL>; VDD_MXA_LEVEL: VDD_MX_LEVEL: S6F_LEVEL: - pm_v6f_s6_level: regulator-pm-v6f-s6-level { + pm_v6f_s6_level: regulator-vdd-mxa-level { regulator-name = "pm_v6f_s6_level"; qcom,set = ; regulator-min-microvolt = @@ -81,7 +81,7 @@ }; VDD_MXA_LEVEL_AO: VDD_MX_LEVEL_AO: S6F_LEVEL_AO: - pm_v6f_s6_level_ao: regulator-pm-v6f-s6-level-ao { + pm_v6f_s6_level_ao: regulator-vdd-mxa-level-ao { regulator-name = "pm_v6f_s6_level_ao"; qcom,set = ; regulator-min-microvolt = @@ -761,6 +761,21 @@ }; }; + VRM_S5F: rpmh-regulator-smpf5 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "smpf5"; + status = "disabled"; + + S5F: pm_v8f_s5: regulator-pm-v8f-s5 { + regulator-name = "pm_v8f_s5"; + qcom,set = ; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1000000>; + qcom,init-voltage = <852000>; + status = "disabled"; + }; + }; + rpmh-regulator-ldof1 { compatible = "qcom,rpmh-vrm-regulator"; qcom,resource-name = "ldof1"; @@ -770,7 +785,7 @@ RPMH_REGULATOR_MODE_HPM>; qcom,mode-threshold-currents = <0 30000>; - L1F: pm_v6f_l1: regulator-pm-v6f-l1 { + L1F: pm_v6f_l1: regulator-pm-vxf-l1 { regulator-name = "pm_v6f_l1"; qcom,set = ; regulator-min-microvolt = <880000>; @@ -789,7 +804,7 @@ RPMH_REGULATOR_MODE_HPM>; qcom,mode-threshold-currents = <0 30000>; - L2F: pm_v6f_l2: regulator-pm-v6f-l2 { + L2F: pm_v6f_l2: regulator-pm-vxf-l2 { regulator-name = "pm_v6f_l2"; qcom,set = ; regulator-min-microvolt = <1200000>; @@ -808,7 +823,7 @@ RPMH_REGULATOR_MODE_HPM>; qcom,mode-threshold-currents = <0 30000>; - L3F: pm_v6f_l3: regulator-pm-v6f-l3 { + L3F: pm_v6f_l3: regulator-pm-vxf-l3 { regulator-name = "pm_v6f_l3"; qcom,set = ; regulator-min-microvolt = <1800000>; @@ -1029,7 +1044,7 @@ }; }; - rpmh-regulator-smpj4 { + VRM_S4J: rpmh-regulator-smpj4 { compatible = "qcom,rpmh-vrm-regulator"; qcom,resource-name = "smpj4";