* [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
@ 2024-02-16 12:46 Raymond Hackley
2024-02-16 13:08 ` Konrad Dybcio
2024-02-16 23:10 ` Bjorn Andersson
0 siblings, 2 replies; 3+ messages in thread
From: Raymond Hackley @ 2024-02-16 12:46 UTC (permalink / raw)
To: linux-kernel
Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Stephan Gerhold, Nikita Travkin, linux-arm-msm,
devicetree, ~postmarketos/upstreaming, Joe Mason
From: Joe Mason <buddyjojo06@outlook.com>
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.
Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
[Raymond: Move to fortuna-common. Use interrupts-extended]
Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
---
.../qcom/msm8916-samsung-fortuna-common.dtsi | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
index 052024073f54..c2800ad2dd5b 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-fortuna-common.dtsi
@@ -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";
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
2024-02-16 12:46 [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge Raymond Hackley
@ 2024-02-16 13:08 ` Konrad Dybcio
2024-02-16 23:10 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2024-02-16 13:08 UTC (permalink / raw)
To: Raymond Hackley, linux-kernel
Cc: Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Nikita Travkin, linux-arm-msm, devicetree,
~postmarketos/upstreaming, Joe Mason
On 16.02.2024 13:46, Raymond Hackley wrote:
> From: Joe Mason <buddyjojo06@outlook.com>
>
> 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.
>
> Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
> [Raymond: Move to fortuna-common. Use interrupts-extended]
> Signed-off-by: Raymond Hackley <raymondhackley@protonmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge
2024-02-16 12:46 [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge Raymond Hackley
2024-02-16 13:08 ` Konrad Dybcio
@ 2024-02-16 23:10 ` Bjorn Andersson
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-02-16 23:10 UTC (permalink / raw)
To: linux-kernel, Raymond Hackley
Cc: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Stephan Gerhold, Nikita Travkin, linux-arm-msm, devicetree,
~postmarketos/upstreaming, Joe Mason
On Fri, 16 Feb 2024 12:46:50 +0000, Raymond Hackley wrote:
> 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,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-16 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 12:46 [PATCH] arm64: dts: qcom: msm8916-samsung-fortuna/rossa: Add fuel gauge Raymond Hackley
2024-02-16 13:08 ` Konrad Dybcio
2024-02-16 23:10 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®