arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
PATCH 1/1 arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
From: Joe Mason <[email protected]>
Like the Samsung Galaxy A3/A5, the Grand Prime/Core Prime 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.
--- .../qcom/msm8916-samsung-fortuna-common.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi +21 -0
@@ -80,6 +80,20 @@ muic: extcon@25 { }; }; +&blsp_i2c4 { + status = "okay"; + + fuel-gauge@35 { + compatible = "richtek,rt5033-battery"; + reg = <0x35>; + + interrupts-extended = <&tlmm 121 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-0 = <&fg_alert_default>; + pinctrl-names = "default"; + }; +}; + &blsp_uart2 { status = "okay"; };
@@ -152,6 +166,13 @@ &wcnss_mem { }; &tlmm { + fg_alert_default: fg-alert-default-state { + pins = "gpio121"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio109"; function = "gpio";
Signature · 1 line
2.39.2
Quoted 8 lines · Raymond Hackley
From: Joe Mason <[email protected]>
Like the Samsung Galaxy A3/A5, the Grand Prime/Core Prime 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.
Quoted 7 lines
The other RT5033 drivers need some more work first before they can be used properly.
Signed-off-by Joe Mason <[email protected]>[Raymond: Move to fortuna-common. Use interrupts-extended]Signed-off-by Raymond Hackley <[email protected]>---
Konrad
Quoted 10 lines · Raymond Hackley
Like the Samsung Galaxy A3/A5, the Grand Prime/Core Prime 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.
[...]
Applied, thanks!
[1/1] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
commit: b61fbc595e2f44311b4e01c24ac425b79d29d2af
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>