From: Stephan Gerhold <stephan@gerhold.net>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Michael Srba <Michael.Srba@seznam.cz>,
Stephan Gerhold <stephan@gerhold.net>
Subject: [PATCH 4/5] arm64: dts: qcom: msm8916-samsung-a2015: Add rt5033 battery
Date: Fri, 4 Jun 2021 19:27:41 +0200 [thread overview]
Message-ID: <20210604172742.10593-4-stephan@gerhold.net> (raw)
In-Reply-To: <20210604172742.10593-1-stephan@gerhold.net>
The Samsung Galaxy A3/A5 use 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>
---
.../qcom/msm8916-samsung-a2015-common.dtsi | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index 3c77e7ef9eda..9a6988ded29d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -151,6 +151,20 @@ magnetometer@12 {
};
};
+&blsp_i2c4 {
+ status = "okay";
+
+ battery@35 {
+ compatible = "richtek,rt5033-battery";
+ reg = <0x35>;
+ interrupt-parent = <&msmgpio>;
+ interrupts = <121 IRQ_TYPE_EDGE_BOTH>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&fg_alert_default>;
+ };
+};
+
&blsp1_uart2 {
status = "okay";
};
@@ -313,6 +327,14 @@ accel_int_default: accel-int-default {
bias-disable;
};
+ 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";
--
2.31.1
next prev parent reply other threads:[~2021-06-04 17:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 17:27 [PATCH 1/5] arm64: dts: qcom: msm8916-samsung-a2015: Add touch key Stephan Gerhold
2021-06-04 17:27 ` [PATCH 2/5] arm64: dts: qcom: msm8916-samsung-a3u: Add touch key regulators Stephan Gerhold
2021-06-04 17:27 ` [PATCH 3/5] arm64: dts: qcom: msm8916-samsung-a5u: Add touch key regulator Stephan Gerhold
2021-06-04 17:27 ` Stephan Gerhold [this message]
2021-06-04 17:27 ` [PATCH 5/5] arm64: dts: qcom: msm8916-samsung-a2015: Add NFC Stephan Gerhold
2021-06-07 8:23 ` Krzysztof Kozlowski
2021-06-10 14:50 ` [PATCH 1/5] arm64: dts: qcom: msm8916-samsung-a2015: Add touch key patchwork-bot+linux-arm-msm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210604172742.10593-4-stephan@gerhold.net \
--to=stephan@gerhold.net \
--cc=Michael.Srba@seznam.cz \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).