[PATCH 9/9] arm: dts: qcom: apq8064-nexus7: Add smb345 charger node

David Heidelberg
2020-03-29T16:23:16Z

Add smb345 charger node to Nexus 7 2013 DTS.
Proper charger initialization also prevents battery from overcharging.

Original author: Vinay Simha BN <simhavcs@gmail.com>

Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 22 ++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
index a701d4bac320..9f14216a22f1 100644
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
@@ -3,6 +3,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/power/summit,smb347-charger.h>
/ {
model = "Asus Nexus7(flo)";
compatible = "asus,nexus7-flo", "qcom,apq8064";
@@ -293,11 +294,30 @@ eeprom@52 {
pagesize = <32>;
};

- bq27541@55 {
+ bat: battery@55 {
compatible = "ti,bq27541";
reg = <0x55>;
+ power-supplies = <&power_supply>;
};

+ power_supply: charger@6a {
+ compatible = "summit,smb345";
+ reg = <0x6a>;
+
+ interrupt-parent = <&tlmm_pinmux>;
+ interrupts = <23 IRQ_TYPE_EDGE_BOTH>;
+
+ summit,max-chg-curr = <1800000>;
+ summit,usb-curr-limit = <500000>;
+
+ summit,chip-temp-threshold = <110>;
+
+ summit,enable-usb-charging;
+ summit,enable-otg-charging;
+
+ summit,enable-chg-ctrl =
+ <SMB3XX_CHG_ENABLE_SW>;
+ };
};
};

--
2.25.0