From: Richard Acayan <mailingradian@gmail.com>
To: Casey Connolly <casey.connolly@linaro.org>
Cc: david@ixit.cz, "Sebastian Reichel" <sre@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Casey Connolly" <casey@connolly.tech>,
"Joel Selvaraj" <foss@joelselvaraj.com>,
"Yassine Oudjana" <y.oudjana@protonmail.com>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Alexander Martinz" <amartinz@shiftphones.com>,
"Barnabás Czémán" <barnabas.czeman@mainlining.org>,
"Alexey Minnekhanov" <alexeymin@postmarketos.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH RFC 3/8] arm64: dts: qcom: pmi8998: Add fuel gauge
Date: Fri, 28 Nov 2025 21:09:03 -0500 [thread overview]
Message-ID: <aSpVv_a6uRhr8opu@rdacayan> (raw)
In-Reply-To: <a9ba3370-ddff-4b69-b2b9-9244f759b6f0@linaro.org>
On Thu, Nov 27, 2025 at 06:53:38PM +0100, Casey Connolly wrote:
> On 24/11/2025 22:53, David Heidelberg via B4 Relay wrote:
> > From: Casey Connolly <casey.connolly@linaro.org>
> >
> > Introduce the fuel gauge node for pmi8998.
> >
>
> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> > ---
> > arch/arm64/boot/dts/qcom/pmi8998.dtsi | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> > index cd3f0790fd420..ab3bc66502657 100644
> > --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> > @@ -44,6 +44,17 @@ pmi8998_rradc: adc@4500 {
> > reg = <0x4500>;
> > #io-channel-cells = <1>;
> > };
> > +
> > + pmi8998_fg: fuel-gauge@4000 {
> > + compatible = "qcom,pmi8998-fg";
> > + reg = <0x4000>;
> > +
> > + interrupts = <0x2 0x40 0x3 IRQ_TYPE_EDGE_RISING>;
> > + interrupt-names = "soc-delta";
>
> I think it makes sense to add all the interrupts here, even if thr
> driver only uses one of them currently.
>
> interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
> <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
> <0x2 0x40 0x2 IRQ_TYPE_EDGE_RISING>,
> <0x2 0x40 0x3 IRQ_TYPE_EDGE_RISING>,
> <0x2 0x40 0x4 IRQ_TYPE_EDGE_BOTH>,
> <0x2 0x40 0x5 IRQ_TYPE_EDGE_RISING>,
> <0x2 0x40 0x6 IRQ_TYPE_EDGE_BOTH>,
> <0x2 0x40 0x7 IRQ_TYPE_EDGE_BOTH>;
> interrupt-names = "soc-update",
> "soc-ready",
> "bsoc-delta",
> "msoc-delta",
> "msoc-low",
> "msoc-empty",
> "msoc-high",
> "msoc-full";
>
> https://github.com/LineageOS/android_kernel_oneplus_sdm845/blob/lineage-22.2/arch/arm64/boot/dts/qcom/pmi8998.dtsi#L292
>
> Not sure what the difference is between bsoc-delta and msoc-delta, maybe
> Richard or Yassine can recall? DT bindings would need updating too.
Well I don't remember, but the downstream kernel seems to reference bsoc
as battery SOC and msoc (used for the battery percentage) as
monotonic SOC. Maybe msoc is based on bsoc and scaled based on battery
health, but that's just from skimming the downstream driver.
next prev parent reply other threads:[~2025-11-29 2:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 21:53 [PATCH RFC 0/8] Qualcomm 3rd gen fuel gauge support David Heidelberg via B4 Relay
2025-11-24 21:53 ` [PATCH RFC 1/8] dt-bindings: power: supply: Add schema for Qualcomm pmi8998 fuel gauge David Heidelberg via B4 Relay
2025-11-27 10:32 ` Konrad Dybcio
2025-11-24 21:53 ` [PATCH RFC 2/8] power: supply: Add driver for Qualcomm PMI8998 " David Heidelberg via B4 Relay
2025-11-25 23:13 ` Dmitry Baryshkov
2025-11-26 16:35 ` Joel Selvaraj
2025-11-29 1:36 ` Dmitry Baryshkov
2025-11-27 15:28 ` Konrad Dybcio
2025-12-12 15:22 ` David Heidelberg
2025-12-18 14:59 ` Konrad Dybcio
2025-11-24 21:53 ` [PATCH RFC 3/8] arm64: dts: qcom: pmi8998: Add " David Heidelberg via B4 Relay
2025-11-25 23:16 ` Dmitry Baryshkov
2025-11-27 17:53 ` Casey Connolly
2025-11-29 2:09 ` Richard Acayan [this message]
2025-11-24 21:53 ` [PATCH RFC 4/8] arm64: dts: qcom: pm660: " David Heidelberg via B4 Relay
2025-11-25 23:17 ` Dmitry Baryshkov
2025-11-24 21:53 ` [PATCH RFC 5/8] arm64: dts: qcom: sdm845-xiaomi-beryllium: Enable " David Heidelberg via B4 Relay
2025-11-25 23:48 ` Dmitry Baryshkov
2025-11-24 21:53 ` [PATCH RFC 6/8] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2025-11-25 23:48 ` Dmitry Baryshkov
2025-11-24 21:53 ` [PATCH RFC 7/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable support for battery David Heidelberg via B4 Relay
2025-11-25 23:50 ` Dmitry Baryshkov
2025-11-24 21:53 ` [PATCH RFC 8/8] arm64: dts: qcom: sdm670-google-sargo: Enable fuel gauge David Heidelberg via B4 Relay
2025-11-25 23:50 ` Dmitry Baryshkov
2025-11-25 18:09 ` [PATCH RFC 0/8] Qualcomm 3rd gen fuel gauge support Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSpVv_a6uRhr8opu@rdacayan \
--to=mailingradian@gmail.com \
--cc=alexeymin@postmarketos.org \
--cc=amartinz@shiftphones.com \
--cc=andersson@kernel.org \
--cc=barnabas.czeman@mainlining.org \
--cc=casey.connolly@linaro.org \
--cc=casey@connolly.tech \
--cc=conor+dt@kernel.org \
--cc=david@ixit.cz \
--cc=devicetree@vger.kernel.org \
--cc=foss@joelselvaraj.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=y.oudjana@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).