From 7a007c4dd0dbfa3932ceca3a69727825f912f5c7 Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 26 Feb 2024 18:02:48 -0800 Subject: [PATCH 1/2] ARM: dts: qcom: add active and sleep L1F and L3G regulators for Sun Add active-only and sleep-only regulator subnodes for rpmh-regulator devices L1F and L3G on Sun boards. This allows requests to be issued for them that are tied to the application processor's power collapse state. Change-Id: Ia8fd8c3aef5c5abfec1044ba3287b1a59f1d5824 Signed-off-by: David Collins --- qcom/sun-pmic-overlay-v8.dtsi | 8 ++++++++ qcom/sun-regulators.dtsi | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/qcom/sun-pmic-overlay-v8.dtsi b/qcom/sun-pmic-overlay-v8.dtsi index 34f41b0b..772097a9 100644 --- a/qcom/sun-pmic-overlay-v8.dtsi +++ b/qcom/sun-pmic-overlay-v8.dtsi @@ -47,6 +47,14 @@ regulator-name = "pm_v8f_l1"; }; +&L1F_AO { + regulator-name = "pm_v8f_l1_ao"; +}; + +&L1F_SO { + regulator-name = "pm_v8f_l1_so"; +}; + &L2F { regulator-name = "pm_v8f_l2"; }; diff --git a/qcom/sun-regulators.dtsi b/qcom/sun-regulators.dtsi index 25810005..e40f8506 100644 --- a/qcom/sun-regulators.dtsi +++ b/qcom/sun-regulators.dtsi @@ -801,6 +801,25 @@ qcom,init-voltage = <880000>; qcom,init-mode = ; }; + + L1F_AO: pm_v6f_l1_ao: pm_v8f_l1_ao: regulator-pm-vxf-l1-ao { + regulator-name = "pm_v6f_l1_ao"; + qcom,set = ; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <920000>; + qcom,init-voltage = <880000>; + qcom,init-mode = ; + }; + + L1F_SO: pm_v6f_l1_so: pm_v8f_l1_so: regulator-pm-vxf-l1-so { + regulator-name = "pm_v6f_l1_so"; + qcom,set = ; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <920000>; + qcom,init-voltage = <880000>; + qcom,init-mode = ; + qcom,init-enable = <0>; + }; }; rpmh-regulator-ldof2 { @@ -939,6 +958,25 @@ qcom,init-mode = ; qcom,proxy-consumer-enable; }; + + L3G_AO: pm_v8g_l3_ao: regulator-pm-v8g-l3-ao { + regulator-name = "pm_v8g_l3_ao"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1256000>; + qcom,init-voltage = <1200000>; + qcom,init-mode = ; + }; + + regulator-pm-v8g-l3-so { + regulator-name = "pm_v8g_l3_so"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1256000>; + qcom,init-voltage = <1200000>; + qcom,init-mode = ; + qcom,init-enable = <0>; + }; }; rpmh-regulator-smpi7 { From be218faaea9f83bea4bbea6399533fc287c11674 Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 26 Feb 2024 18:11:58 -0800 Subject: [PATCH 2/2] ARM: dts: qcom: keep L1F and L3G active-only regulators always-on for Sun Configure the L1F and L3G active-only regulator to be always enabled in high power mode (HPM). These regulators power REFGENs and PLLs used by the application processor itself. Unconditional active-only voting is needed since the software running on the application processor won't be capable of removing L1F and L3G votes after the application processor subsystem is power collapsed. Change-Id: I750da467f408f35b6015a2286696609f234abdc4 Signed-off-by: David Collins --- qcom/sun-regulators.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qcom/sun-regulators.dtsi b/qcom/sun-regulators.dtsi index e40f8506..68ed0f8b 100644 --- a/qcom/sun-regulators.dtsi +++ b/qcom/sun-regulators.dtsi @@ -792,6 +792,7 @@ ; qcom,mode-threshold-currents = <0 30000>; + qcom,send-defaults; L1F: pm_v6f_l1: pm_v8f_l1: regulator-pm-vxf-l1 { regulator-name = "pm_v6f_l1"; @@ -808,7 +809,8 @@ regulator-min-microvolt = <880000>; regulator-max-microvolt = <920000>; qcom,init-voltage = <880000>; - qcom,init-mode = ; + qcom,init-mode = ; + regulator-always-on; }; L1F_SO: pm_v6f_l1_so: pm_v8f_l1_so: regulator-pm-vxf-l1-so { @@ -948,6 +950,7 @@ RPMH_REGULATOR_MODE_HPM>; qcom,mode-threshold-currents = <0 30000>; proxy-supply = <&L3G>; + qcom,send-defaults; L3G: pm_v8g_l3: regulator-pm-v8g-l3 { regulator-name = "pm_v8g_l3"; @@ -965,7 +968,8 @@ regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1256000>; qcom,init-voltage = <1200000>; - qcom,init-mode = ; + qcom,init-mode = ; + regulator-always-on; }; regulator-pm-v8g-l3-so {