Re: [PATCH] arm64: dts: qcom: sdm845-oneplus: fix fuel gauge compatible
From: Krzysztof Kozlowski
Date: Thu Aug 27 2026 - 17:43:25 EST
On 27/08/2026 01:38, Rinat Muhamedgaliev wrote:
> The fuel gauge at I2C address 0x55 on OnePlus 6T (fajita) reports
> DeviceType 0x0541, identifying it as a TI bq27541 rather than bq27411.
>
> Binding it as bq27411 selects the wrong register map and produces
> invalid voltage, state-of-charge, and temperature readings. Use the
> bq27541 compatible and rename the shared label along with its fajita
> and enchilada consumers.
>
> Tested on OnePlus 6T (fajita): queried DeviceType directly over I2C,
> built the DTB, booted it once with fastboot boot, then installed a
> locally built postmarketOS kernel package. Before the change, readings
> included about 65 V, over 10000% SOC, and -273.1 C. Afterward, the
> bq27xxx driver bound as ti,bq27541 and reported 3.835 V, 42% SOC, and
> 33.3 C.
>
> Fixes: 12dfb002ca01 ("arm64: dts: qcom: sdm845-oneplus-*: add fuel gauge")
> Closes: https://gitlab.com/sdm845-mainline/linux/-/issues/36
This is fine.
> Link: https://gitlab.com/sdm845-mainline/linux/-/merge_requests/148
But link seems irrelevant here. We do not reference downstream PRs in
upstream commits, because it should go the other way.
Please drop it.
> Signed-off-by: Rinat Muhamedgaliev <rinat.muhamedgaliev@xxxxxxxxx>
> ---
> arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++--
> arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts | 2 +-
> arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index 948a0dd18..0c6203fa8 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -790,8 +790,8 @@ &i2c10 {
> status = "okay";
> clock-frequency = <100000>;
>
> - bq27441_fg: bq27441-battery@55 {
> - compatible = "ti,bq27411";
> + bq27541_fg: bq27541-battery@55 {
If renaming it, then node name should be fuel-gauge@.
Best regards,
Krzysztof