arm64: dts: qcom: sdm845-oneplus-*: add fuel gauge
authorCaleb Connolly <caleb@connolly.tech>
Thu, 20 Jan 2022 18:46:28 +0000 (18:46 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 1 Feb 2022 00:30:54 +0000 (18:30 -0600)
The OnePlus 6 and 6T feature a BQ27411 fuel gauge for reading the
battery stats. Enable it and add a simple battery to document the
battery specs of each device.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220120184546.499030-1-caleb@connolly.tech
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dts
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts

index 511ca72f465edcecd9f3af0917652a3de335a8ee..1084d5ce9ac7a9cbd0ec6e7702c2122f0ec2aa5e 100644 (file)
        };
 };
 
+&i2c10 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       bq27441_fg: bq27441-battery@55 {
+               compatible = "ti,bq27411";
+               status = "okay";
+               reg = <0x55>;
+       };
+};
+
 &i2c12 {
        status = "okay";
        clock-frequency = <400000>;
index 5936b47dee5f833d02cf03938ddd7b5a53e0b94e..bf2cf92e89760ac0816c73584081dbd993f48d08 100644 (file)
        chassis-type = "handset";
        qcom,msm-id = <0x141 0x20001>;
        qcom,board-id = <8 0 17819 22>;
+
+       battery: battery {
+               compatible = "simple-battery";
+
+               charge-full-design-microamp-hours = <3300000>;
+               voltage-min-design-microvolt = <3400000>;
+               voltage-max-design-microvolt = <4400000>;
+       };
 };
 
 &display_panel {
@@ -20,3 +28,7 @@
 
        compatible = "samsung,sofef00";
 };
+
+&bq27441_fg {
+       monitored-battery = <&battery>;
+};
index 78a0b99144e6c19d1731128d56be941dfb004f90..1b6b5bf368dfb8fe2066eea94537c1987070f85f 100644 (file)
        chassis-type = "handset";
        qcom,msm-id = <0x141 0x20001>;
        qcom,board-id = <8 0 18801 41>;
+
+       battery: battery {
+               compatible = "simple-battery";
+
+               charge-full-design-microamp-hours = <3700000>;
+               voltage-min-design-microvolt = <3400000>;
+               voltage-max-design-microvolt = <4400000>;
+       };
 };
 
 &display_panel {
        compatible = "samsung,s6e3fc2x01";
 };
 
+&bq27441_fg {
+       monitored-battery = <&battery>;
+};
+
 &rmi4_f12 {
        touchscreen-y-mm = <148>;
 };