[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230105123240.1089375-8-nikita@trvn.ru>
Date: Thu, 5 Jan 2023 17:32:39 +0500
From: Nikita Travkin <nikita@...n.ru>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Siddharth Manthan <siddharth.manthan@...il.com>,
Jasper Korten <jja2000@...il.com>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht,
Nikita Travkin <nikita@...n.ru>
Subject: [PATCH 7/8] arm64: dts: qcom: msm8916-samsung-gt5-common: Add fuelgauge
gt5 devices use additional MAX77849 MFD to handle battery, charging
and usb switching. Fuel-gauge from this MFD has a separate i2c line.
Signed-off-by: Nikita Travkin <nikita@...n.ru>
---
.../dts/qcom/msm8916-samsung-gt5-common.dtsi | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
index 9cdb33247691..9f97a8129278 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi
@@ -63,6 +63,25 @@ hall-sensor-switch {
};
};
+&blsp_i2c4 {
+ status = "okay";
+
+ fuelgauge@36 {
+ compatible = "maxim,max77849-battery";
+ reg = <0x36>;
+
+ maxim,rsns-microohm = <10000>;
+ maxim,over-heat-temp = <600>;
+ maxim,over-volt = <4400>;
+
+ interrupt-parent = <&msmgpio>;
+ interrupts = <121 IRQ_TYPE_EDGE_FALLING>;
+
+ pinctrl-0 = <&fuelgauge_int_default>;
+ pinctrl-names = "default";
+ };
+};
+
&blsp1_uart2 {
status = "okay";
};
@@ -218,6 +237,14 @@ l18 {
};
&msmgpio {
+ fuelgauge_int_default: fuelgauge-int-default-state {
+ pins = "gpio121";
+ function = "gpio";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
gpio_keys_default: gpio-keys-default-state {
pins = "gpio107", "gpio109";
function = "gpio";
--
2.38.1
Powered by blists - more mailing lists