[PATCH v3 09/10] ARM: dts: qcom: apq8064-nexus7: Add SMB345 battery charger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Heidelberg <david@xxxxxxx>

Add SMB345 charger node to Nexus 7 2013 DTS.
Proper charger configuration prevents battery from overcharging.

Original author: Vinay Simha BN <simhavcs@xxxxxxxxx>

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

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..0c126df20417 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";
@@ -56,6 +57,12 @@ volume_down {
 		};
 	};
 
+	battery_cell: battery-cell {
+		compatible = "simple-battery";
+		constant-charge-current-max-microamp = <1800000>;
+		operating-range-celsius = <0 45>;
+	};
+
 	soc {
 		rpm@108000 {
 			regulators {
@@ -296,8 +303,25 @@ eeprom@52 {
 				bq27541@55 {
 					compatible = "ti,bq27541";
 					reg = <0x55>;
+					power-supplies = <&power_supply>;
+					monitored-battery = <&battery_cell>;
 				};
 
+				power_supply: charger@6a {
+					compatible = "summit,smb345";
+					reg = <0x6a>;
+
+					interrupt-parent = <&tlmm_pinmux>;
+					interrupts = <23 IRQ_TYPE_EDGE_BOTH>;
+
+					summit,chip-temperature-threshold-celsius = <110>;
+					summit,usb-current-limit-microamp = <500000>;
+					summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>;
+					summit,enable-usb-charging;
+					summit,enable-otg-charging;
+
+					monitored-battery = <&battery_cell>;
+				};
 			};
 		};
 
-- 
2.27.0




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux