arm64: dts: qcom: msm8916-samsung-serranove: Add rt5033 battery
authorStephan Gerhold <stephan@gerhold.net>
Mon, 4 Oct 2021 20:19:11 +0000 (22:19 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 24 Oct 2021 03:23:02 +0000 (22:23 -0500)
Like the Samsung Galaxy A3/A5, the S4 Mini VE uses a Richtek RT5033 PMIC
as battery fuel gauge, charger, flash LED and for some regulators.
For now, only add the fuel gauge/battery device to the device tree,
so we can check the remaining battery percentage.

The other RT5033 drivers need some more work first before
they can be used properly.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211004201921.18526-6-stephan@gerhold.net
arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts

index 2280b2e4b09f57e92609ecb050cb5d19e166cb8e..3ef00bdc043ec02768289a00056c81c4a7155bd5 100644 (file)
        };
 };
 
+&blsp_i2c4 {
+       status = "okay";
+
+       battery@35 {
+               compatible = "richtek,rt5033-battery";
+               reg = <0x35>;
+
+               interrupt-parent = <&msmgpio>;
+               interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&fg_alert_default>;
+       };
+};
+
 &blsp_i2c5 {
        status = "okay";
 
 };
 
 &msmgpio {
+       fg_alert_default: fg-alert-default {
+               pins = "gpio121";
+               function = "gpio";
+
+               drive-strength = <2>;
+               bias-disable;
+       };
+
        gpio_keys_default: gpio-keys-default {
                pins = "gpio107", "gpio109";
                function = "gpio";