linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic
@ 2025-07-16 14:10 Arseniy Velikanov
  2025-07-16 14:10 ` [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561 Arseniy Velikanov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Arseniy Velikanov @ 2025-07-16 14:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, Arseniy Velikanov

PM8009 was erroneously added since this device doesn't actually have it.
It triggers a big critical error at boot, so we're drop it.

Fixes: 264beb3cbd0d ("arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree")
Reviewed-by: Luka Panio <lukapanio@gmail.com>
Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
---
 .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 58 -------------------
 1 file changed, 58 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
index 668078ea4f04..a4c8b778ae46 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
@@ -12,7 +12,6 @@
 #include "pm8150.dtsi"
 #include "pm8150b.dtsi"
 #include "pm8150l.dtsi"
-#include "pm8009.dtsi"
 
 /*
  * Delete following upstream (sm8250.dtsi) reserved
@@ -406,63 +405,6 @@ vreg_l11c_3p0: ldo11 {
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
 		};
 	};
-
-	regulators-2 {
-		compatible = "qcom,pm8009-rpmh-regulators";
-		qcom,pmic-id = "f";
-
-		vdd-s1-supply = <&vph_pwr>;
-		vdd-s2-supply = <&vreg_bob>;
-		vdd-l2-supply = <&vreg_s8c_1p35>;
-		vdd-l5-l6-supply = <&vreg_bob>;
-		vdd-l7-supply = <&vreg_s4a_1p8>;
-
-		vreg_s1f_1p2: smps1 {
-			regulator-name = "vreg_s1f_1p2";
-			regulator-min-microvolt = <1200000>;
-			regulator-max-microvolt = <1300000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-
-		vreg_s2f_0p5: smps2 {
-			regulator-name = "vreg_s2f_0p5";
-			regulator-min-microvolt = <512000>;
-			regulator-max-microvolt = <1100000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-
-		/* L1 is unused. */
-
-		vreg_l2f_1p3: ldo2 {
-			regulator-name = "vreg_l2f_1p3";
-			regulator-min-microvolt = <1056000>;
-			regulator-max-microvolt = <1200000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-
-		/* L3 & L4 are unused. */
-
-		vreg_l5f_2p8: ldo5 {
-			regulator-name = "vreg_l5f_2p85";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <3000000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-
-		vreg_l6f_2p8: ldo6 {
-			regulator-name = "vreg_l6f_2p8";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <3000000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-
-		vreg_l7f_1p8: ldo7 {
-			regulator-name = "vreg_l7f_1p8";
-			regulator-min-microvolt = <1800000>;
-			regulator-max-microvolt = <1800000>;
-			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
-		};
-	};
 };
 
 &cdsp {
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561
  2025-07-16 14:10 [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Arseniy Velikanov
@ 2025-07-16 14:10 ` Arseniy Velikanov
  2025-07-16 14:59   ` Dmitry Baryshkov
  2025-07-16 14:10 ` [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info Arseniy Velikanov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Arseniy Velikanov @ 2025-07-16 14:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, Arseniy Velikanov

It looks like the fuel gauge is not connected to the battery,
it reports nonsense info. Downstream kernel uses pmic fg.

Reviewed-by: Luka Panio <lukapanio@gmail.com>
Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
---
 .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 22 -------------------
 1 file changed, 22 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
index a4c8b778ae46..c2d0f0254776 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
@@ -437,17 +437,6 @@ zap-shader {
 	};
 };
 
-&i2c0 {
-	clock-frequency = <400000>;
-	status = "okay";
-
-	fuel-gauge@55 {
-		compatible = "ti,bq27z561";
-		reg = <0x55>;
-		monitored-battery = <&battery_r>;
-	};
-};
-
 &i2c11 {
 	clock-frequency = <400000>;
 	status = "okay";
@@ -465,17 +454,6 @@ backlight: backlight@11 {
 	};
 };
 
-&i2c13 {
-	clock-frequency = <400000>;
-	status = "okay";
-
-	fuel-gauge@55 {
-		compatible = "ti,bq27z561";
-		reg = <0x55>;
-		monitored-battery = <&battery_l>;
-	};
-};
-
 &pcie0 {
 	status = "okay";
 };
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info
  2025-07-16 14:10 [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Arseniy Velikanov
  2025-07-16 14:10 ` [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561 Arseniy Velikanov
@ 2025-07-16 14:10 ` Arseniy Velikanov
  2025-07-16 15:00   ` Dmitry Baryshkov
  2025-07-16 14:58 ` [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Dmitry Baryshkov
  2025-08-11 23:27 ` (subset) " Bjorn Andersson
  3 siblings, 1 reply; 8+ messages in thread
From: Arseniy Velikanov @ 2025-07-16 14:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, Arseniy Velikanov

Added max design microvolt. Merged battery info into one node,
since pmic fuel-gauge uses mixed info about dual-cell battery.

Reviewed-by: Luka Panio <lukapanio@gmail.com>
Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
---
 arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
index c2d0f0254776..4ad24974c09f 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts
@@ -49,18 +49,12 @@ framebuffer: framebuffer@9c000000 {
 		};
 	};
 
-	battery_l: battery-l {
+	battery: battery {
 		compatible = "simple-battery";
-		voltage-min-design-microvolt = <3870000>;
-		energy-full-design-microwatt-hours = <16700000>;
-		charge-full-design-microamp-hours = <4420000>;
-	};
-
-	battery_r: battery-r {
-		compatible = "simple-battery";
-		voltage-min-design-microvolt = <3870000>;
-		energy-full-design-microwatt-hours = <16700000>;
-		charge-full-design-microamp-hours = <4420000>;
+		charge-full-design-microamp-hours = <8840000>;
+		energy-full-design-microwatt-hours = <34300000>;
+		voltage-min-design-microvolt = <3400000>;
+		voltage-max-design-microvolt = <4370000>;
 	};
 
 	bl_vddpos_5p5: bl-vddpos-regulator {
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic
  2025-07-16 14:10 [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Arseniy Velikanov
  2025-07-16 14:10 ` [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561 Arseniy Velikanov
  2025-07-16 14:10 ` [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info Arseniy Velikanov
@ 2025-07-16 14:58 ` Dmitry Baryshkov
  2025-08-11 23:27 ` (subset) " Bjorn Andersson
  3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-07-16 14:58 UTC (permalink / raw)
  To: Arseniy Velikanov
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio,
	linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming

On Wed, Jul 16, 2025 at 06:10:39PM +0400, Arseniy Velikanov wrote:
> PM8009 was erroneously added since this device doesn't actually have it.
> It triggers a big critical error at boot, so we're drop it.
> 
> Fixes: 264beb3cbd0d ("arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree")
> Reviewed-by: Luka Panio <lukapanio@gmail.com>
> Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
> ---
>  .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 58 -------------------
>  1 file changed, 58 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561
  2025-07-16 14:10 ` [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561 Arseniy Velikanov
@ 2025-07-16 14:59   ` Dmitry Baryshkov
  2025-07-16 16:00     ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-07-16 14:59 UTC (permalink / raw)
  To: Arseniy Velikanov
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio,
	linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming

On Wed, Jul 16, 2025 at 06:10:40PM +0400, Arseniy Velikanov wrote:
> It looks like the fuel gauge is not connected to the battery,
> it reports nonsense info. Downstream kernel uses pmic fg.

If you have to repost the patches for any reason, please sched more
light on the 'nosense' you are observing.

> 
> Reviewed-by: Luka Panio <lukapanio@gmail.com>
> Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
> ---
>  .../boot/dts/qcom/sm8250-xiaomi-pipa.dts      | 22 -------------------
>  1 file changed, 22 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info
  2025-07-16 14:10 ` [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info Arseniy Velikanov
@ 2025-07-16 15:00   ` Dmitry Baryshkov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-07-16 15:00 UTC (permalink / raw)
  To: Arseniy Velikanov
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio,
	linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming

On Wed, Jul 16, 2025 at 06:10:41PM +0400, Arseniy Velikanov wrote:
> Added max design microvolt. Merged battery info into one node,
> since pmic fuel-gauge uses mixed info about dual-cell battery.
> 
> Reviewed-by: Luka Panio <lukapanio@gmail.com>
> Signed-off-by: Arseniy Velikanov <me@adomerle.pw>
> ---
>  arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts | 16 +++++-----------
>  1 file changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-pipa.dts

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561
  2025-07-16 14:59   ` Dmitry Baryshkov
@ 2025-07-16 16:00     ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2025-07-16 16:00 UTC (permalink / raw)
  To: Dmitry Baryshkov, Arseniy Velikanov
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio,
	linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming

On 7/16/25 4:59 PM, Dmitry Baryshkov wrote:
> On Wed, Jul 16, 2025 at 06:10:40PM +0400, Arseniy Velikanov wrote:
>> It looks like the fuel gauge is not connected to the battery,
>> it reports nonsense info. Downstream kernel uses pmic fg.
> 
> If you have to repost the patches for any reason, please sched more
> light on the 'nosense' you are observing.

Since it's actually onboard, it would be fair to assume it's there
for a reason.. Does it also report nonsense when running a
downstream build?

Konrad

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic
  2025-07-16 14:10 [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Arseniy Velikanov
                   ` (2 preceding siblings ...)
  2025-07-16 14:58 ` [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Dmitry Baryshkov
@ 2025-08-11 23:27 ` Bjorn Andersson
  3 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2025-08-11 23:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Luka Panio,
	Arseniy Velikanov
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming


On Wed, 16 Jul 2025 18:10:39 +0400, Arseniy Velikanov wrote:
> PM8009 was erroneously added since this device doesn't actually have it.
> It triggers a big critical error at boot, so we're drop it.
> 
> 

Applied, thanks!

[1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic
      commit: 92d05aceadbd799b416ad08bf2f741a096bf3e56
[2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561
      commit: 56197c8737b88d300cda97cd71b64b8a93cf6f70
[3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info
      commit: e2ec684f82536d62e0d60663ed3689455a9b0b9f

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-11 23:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 14:10 [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Arseniy Velikanov
2025-07-16 14:10 ` [PATCH v2 2/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop unused bq27z561 Arseniy Velikanov
2025-07-16 14:59   ` Dmitry Baryshkov
2025-07-16 16:00     ` Konrad Dybcio
2025-07-16 14:10 ` [PATCH v2 3/3] arm64: dts: sm8250-xiaomi-pipa: Update battery info Arseniy Velikanov
2025-07-16 15:00   ` Dmitry Baryshkov
2025-07-16 14:58 ` [PATCH v2 1/3] arm64: dts: qcom: sm8250-xiaomi-pipa: Drop nonexistent pm8009 pmic Dmitry Baryshkov
2025-08-11 23:27 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).