Skip to contentSkip to conversation

arm64: dts: qcom: sc8280xp-x13s: regulator fixes

PATCH Applied Johan Hovold 2 participants 8 messages Mar 22, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: qcom: sc8280xp-x13s: regulator fixes

This series marks four of the regulators which have consumers not yet (fully) described in the devicetree as always-on to avoid the supply going away while the device is still in use.

The last two patches adds the missing description of the pmic regulator and hid supplies, which is needed to eventually be able to disable the regulators in question.

At least the first four patches should go into 6.3-rc, but it may simplify things to take also the pmic supply patch as a fix.

Note that the pmic patch is adding the missing s1c supply, which is also needed by the pending bluetooth series.

Johan

Johan Hovold (6):
arm64: dts: qcom: sc8280xp-x13s: mark s11b regulator as always-on
arm64: dts: qcom: sc8280xp-x13s: mark s10b regulator as always-on
arm64: dts: qcom: sc8280xp-x13s: mark s12b regulator as always-on
arm64: dts: qcom: sc8280xp-x13s: mark bob regulator as always-on
arm64: dts: qcom: sc8280xp-x13s: add pmic regulator supplies
arm64: dts: qcom: sc8280xp-x13s: add hid 1.8V supplies

 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/6 arm64: dts: qcom: sc8280xp-x13s: mark s11b regulator as always-on

The s11b supply is used by the wlan module (as well as some of the pmics) which are not yet fully described in the devicetree.

Mark the regulator as always-on for now.

Fixes 123b30a75623 ("arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller")
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -0
index 26dbba9f51fb..c79559e4b22e 100644
@@ -386,6 +386,7 @@ vreg_s11b: smps11 {
 			regulator-min-microvolt = <1272000>;
 			regulator-max-microvolt = <1272000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
 		};
 
 		vreg_s12b: smps12 {
Signature · 1 line
2.39.2
#2 lore raw

PATCH 2/6 arm64: dts: qcom: sc8280xp-x13s: mark s10b regulator as always-on

In reply to Johan Hovold

The s10b supply is used by several components that are not (yet) described in devicetree (e.g. ram, charger, ec) and must not be disabled.

Mark the regulator as always-on.

Fixes f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support")
Cc Srinivas Kandagatla <[email protected]>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -0
index c79559e4b22e..e52fd09f9cc9 100644
@@ -379,6 +379,7 @@ vreg_s10b: smps10 {
 			regulator-min-microvolt = <1800000>;
 			regulator-max-microvolt = <1800000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
 		};
 
 		vreg_s11b: smps11 {
Signature · 1 line
2.39.2
#3 lore raw

PATCH 3/6 arm64: dts: qcom: sc8280xp-x13s: mark s12b regulator as always-on

In reply to Johan Hovold

The s12b supply is used by several pmic regulators as well as the wlan/bluetooth radio which are not yet fully described in the devicetree.

Mark the regulator as always-on for now.

Fixes f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support")
Cc Srinivas Kandagatla <[email protected]>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -0
index e52fd09f9cc9..cdd2791576e2 100644
@@ -395,6 +395,7 @@ vreg_s12b: smps12 {
 			regulator-min-microvolt = <984000>;
 			regulator-max-microvolt = <984000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
 		};
 
 		vreg_l3b: ldo3 {
Signature · 1 line
2.39.2
#4 lore raw

PATCH 4/6 arm64: dts: qcom: sc8280xp-x13s: mark bob regulator as always-on

In reply to Johan Hovold

The bob supply is used by several pmic regulators and components which are not (yet fully) described in the devicetree.

Mark the regulator as always-on for now.

Fixes f29077d86652 ("arm64: dts: qcom: sc8280xp-x13s: Add soundcard support")
Cc Srinivas Kandagatla <[email protected]>
---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -0
index cdd2791576e2..44cf93ddc1b9 100644
@@ -453,6 +453,7 @@ vreg_bob: bob {
 			regulator-min-microvolt = <3008000>;
 			regulator-max-microvolt = <3960000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+			regulator-always-on;
 		};
 	};
 
Signature · 1 line
2.39.2
#5 lore raw

PATCH 5/6 arm64: dts: qcom: sc8280xp-x13s: add pmic regulator supplies

In reply to Johan Hovold

The s11b, s12b, s1c and bob supplies are used by several pmic regulators. Add the missing description to the devicetree.

Note that there are still some consumers that are not (fully) described in the devicetree so the supplies must remain marked as always-on for now.

---
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +22 -0
index 44cf93ddc1b9..14e8d0a78b60 100644
@@ -372,7 +372,11 @@ regulators-0 {
 		compatible = "qcom,pm8350-rpmh-regulators";
 		qcom,pmic-id = "b";
 
+		vdd-l1-l4-supply = <&vreg_s12b>;
+		vdd-l2-l7-supply = <&vreg_bob>;
 		vdd-l3-l5-supply = <&vreg_s11b>;
+		vdd-l6-l9-l10-supply = <&vreg_s12b>;
+		vdd-l8-supply = <&vreg_s12b>;
 
 		vreg_s10b: smps10 {
 			regulator-name = "vreg_s10b";
@@ -425,7 +429,21 @@ vreg_l6b: ldo6 {
 	regulators-1 {
 		compatible = "qcom,pm8350c-rpmh-regulators";
 		qcom,pmic-id = "c";
+
 		vdd-bob-supply = <&vreg_vph_pwr>;
+		vdd-l1-l12-supply = <&vreg_s1c>;
+		vdd-l2-l8-supply = <&vreg_s1c>;
+		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
+		vdd-l6-l9-l11-supply = <&vreg_bob>;
+		vdd-l10-supply = <&vreg_s11b>;
+
+		vreg_s1c: smps1 {
+			regulator-name = "vreg_s1c";
+			regulator-min-microvolt = <1880000>;
+			regulator-max-microvolt = <1900000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
+		};
 
 		vreg_l1c: ldo1 {
 			regulator-name = "vreg_l1c";
@@ -462,6 +480,10 @@ regulators-2 {
 		qcom,pmic-id = "d";
 
 		vdd-l1-l4-supply = <&vreg_s11b>;
+		vdd-l2-l7-supply = <&vreg_bob>;
+		vdd-l3-l5-supply = <&vreg_s11b>;
+		vdd-l6-l9-l10-supply = <&vreg_s12b>;
+		vdd-l8-supply = <&vreg_s12b>;
 
 		vreg_l3d: ldo3 {
 			regulator-name = "vreg_l3d";
Signature · 1 line
2.39.2
#6 lore raw

PATCH 6/6 arm64: dts: qcom: sc8280xp-x13s: add hid 1.8V supplies

In reply to Johan Hovold

All the input devices use s10b as 1.8V supply.

---
 arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +4 -0
index 14e8d0a78b60..43b7f63b79a2 100644
@@ -622,6 +622,7 @@ touchscreen@10 {
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_s10b>;
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&ts0_default>;
@@ -643,6 +644,7 @@ touchpad@15 {
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_s10b>;
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&tpad_default>;
@@ -659,6 +661,7 @@ touchpad@2c {
 		hid-descr-addr = <0x20>;
 		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_s10b>;
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&tpad_default>;
@@ -673,6 +676,7 @@ keyboard@68 {
 		hid-descr-addr = <0x1>;
 		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
 		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_s10b>;
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&kybd_default>;
Signature · 1 line
2.39.2
maintainer Applied
#7 lore raw

Re: (subset) [PATCH 0/6] arm64: dts: qcom: sc8280xp-x13s: regulator fixes

In reply to Johan Hovold
Quoted 9 lines · Johan Hovold

This series marks four of the regulators which have consumers not yet (fully) described in the devicetree as always-on to avoid the supply going away while the device is still in use.

The last two patches adds the missing description of the pmic regulator and hid supplies, which is needed to eventually be able to disable the regulators in question.

[...]

Applied, thanks!

[5/6] arm64: dts: qcom: sc8280xp-x13s: add pmic regulator supplies

      commit: ed066df385cb1a7286123a246337636f8debd18d
[6/6] arm64: dts: qcom: sc8280xp-x13s: add hid 1.8V supplies
      commit: b01899cb18659c9911cc790cd66784623e5e5a0e

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>