On 24/11/2025 22:53, David Heidelberg via B4 Relay wrote:
> From: Casey Connolly <[email protected]>
>
> Introduce the fuel gauge node for pmi8998.
>
Signed-off-by: Casey Connolly <[email protected]>>
Signed-off-by: David Heidelberg <[email protected]>
> ---
> 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.
> +
> + status = "disabled";
> + };
> +
> };
>
> pmi8998_lsid1: pmic@3 {
>
--
// Casey (she/her)