[PATCH v2 03/13] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger

Paul Sajna posted 13 patches 4 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 03/13] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
Posted by Paul Sajna 4 months, 3 weeks ago
From: Christopher Brown <crispybrown@gmail.com>

Values based on lineageos kernel

Signed-off-by: Christopher Brown <crispybrown@gmail.com>
---
 arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
index 49225e4fa80e5f45a36964d5d733dc238e4413f8..be488891d0ab01c5bfd3762514fbf1c3bbf6845a 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
@@ -37,6 +37,14 @@ key-thinq {
 			interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
 		};
 	};
+
+	battery: battery {
+		compatible = "simple-battery";
+
+		charge-full-design-microamp-hours = <3000000>;
+		voltage-min-design-microvolt = <3200000>;
+		voltage-max-design-microvolt = <4400000>;
+	};
 };
 
 &adsp_pas {
@@ -57,6 +65,11 @@ &mss_pil {
 	firmware-name = "qcom/sdm845/judyln/mba.mbn", "qcom/sdm845/judyln/modem.mbn";
 };
 
+&pmi8998_charger {
+	status = "okay";
+	monitored-battery = <&battery>;
+};
+
 &tlmm {
 	thinq_key_default: thinq-key-default-state {
 		pins = "gpio89";

-- 
2.51.0
Re: [PATCH v2 03/13] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
Posted by Konrad Dybcio 4 months, 3 weeks ago
On 9/17/25 3:09 AM, Paul Sajna wrote:
> From: Christopher Brown <crispybrown@gmail.com>
> 
> Values based on lineageos kernel

A link for reference would be nice to see

> 
> Signed-off-by: Christopher Brown <crispybrown@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> index 49225e4fa80e5f45a36964d5d733dc238e4413f8..be488891d0ab01c5bfd3762514fbf1c3bbf6845a 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> @@ -37,6 +37,14 @@ key-thinq {
>  			interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
>  		};
>  	};
> +
> +	battery: battery {
> +		compatible = "simple-battery";
> +
> +		charge-full-design-microamp-hours = <3000000>;
> +		voltage-min-design-microvolt = <3200000>;

3.2 is rather low.. are you sure?

Konrad
Re: [PATCH v2 03/13] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
Posted by Pavel Machek 3 months, 2 weeks ago
On Wed 2025-09-17 15:47:47, Konrad Dybcio wrote:
> On 9/17/25 3:09 AM, Paul Sajna wrote:
> > From: Christopher Brown <crispybrown@gmail.com>
> > 
> > Values based on lineageos kernel
> 
> A link for reference would be nice to see
> 
> > 
> > Signed-off-by: Christopher Brown <crispybrown@gmail.com>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > index 49225e4fa80e5f45a36964d5d733dc238e4413f8..be488891d0ab01c5bfd3762514fbf1c3bbf6845a 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > @@ -37,6 +37,14 @@ key-thinq {
> >  			interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
> >  		};
> >  	};
> > +
> > +	battery: battery {
> > +		compatible = "simple-battery";
> > +
> > +		charge-full-design-microamp-hours = <3000000>;
> > +		voltage-min-design-microvolt = <3200000>;
> 
> 3.2 is rather low.. are you sure?

In flashlights (etc), Li-IONs are often pulled down to 3.00V. It does
not have any great advantage because it goes down from 3.3 to 3.0V
pretty quickly, but it is not completely insane.

Actually, under load, it may make sense: internal voltage will be
higher at that point.

Best regards,
								Pavel

-- 
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, Netanyahu and Musk!
Re: [PATCH v2 03/13] arm64: dts: qcom: sdm845-lg-judyln: Add battery and charger
Posted by Chris Brown 4 months, 3 weeks ago
Source https://github.com/EmanuelCN/android_kernel_lge_sdm845/blob/U/arch/arm64/boot/dts/lge/sdm845-battery/LGE_BLT39_LGC_3000mAh.dtsi
Small assumption on my part that "fg-cutoff-voltage" has the same
meaning as "voltage-min-design-microvolt"

On Wed, 17 Sept 2025 at 09:47, Konrad Dybcio
<konrad.dybcio@oss.qualcomm.com> wrote:
>
> On 9/17/25 3:09 AM, Paul Sajna wrote:
> > From: Christopher Brown <crispybrown@gmail.com>
> >
> > Values based on lineageos kernel
>
> A link for reference would be nice to see
>
> >
> > Signed-off-by: Christopher Brown <crispybrown@gmail.com>
> > ---
> >  arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > index 49225e4fa80e5f45a36964d5d733dc238e4413f8..be488891d0ab01c5bfd3762514fbf1c3bbf6845a 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > +++ b/arch/arm64/boot/dts/qcom/sdm845-lg-judyln.dts
> > @@ -37,6 +37,14 @@ key-thinq {
> >                       interrupts = <89 IRQ_TYPE_LEVEL_LOW>;
> >               };
> >       };
> > +
> > +     battery: battery {
> > +             compatible = "simple-battery";
> > +
> > +             charge-full-design-microamp-hours = <3000000>;
> > +             voltage-min-design-microvolt = <3200000>;
>
> 3.2 is rather low.. are you sure?
>
> Konrad