[5/7] ARM: dts: qcom: apq8026-samsung-milletwifi: Enable charger

Message ID 20231105204759.37107-6-bryant@mai.rs
State New
Headers
Series Add samsung-milletwifi |

Commit Message

Bryant Mairs Nov. 5, 2023, 8:46 p.m. UTC
  Enable charging support.

Signed-off-by: Bryant Mairs <bryant@mai.rs>
---
 .../qcom/qcom-apq8026-samsung-milletwifi.dts  | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
  

Comments

Krzysztof Kozlowski Nov. 6, 2023, 7:40 a.m. UTC | #1
On 05/11/2023 21:46, Bryant Mairs wrote:
> Enable charging support.
> 
> Signed-off-by: Bryant Mairs <bryant@mai.rs>
> ---
>  .../qcom/qcom-apq8026-samsung-milletwifi.dts  | 28 +++++++++++++++++++
>  1 file changed, 28 insertions(+)

Squash with new board. One logical change is to add new board. Not add
incomplete board and immediately fix it.

Best regards,
Krzysztof
  

Patch

diff --git a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
index 545992091c6b..910e8d2f69b0 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8026-samsung-milletwifi.dts
@@ -7,6 +7,7 @@ 
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/power/summit,smb347-charger.h>
 #include "qcom-msm8226.dtsi"
 #include "qcom-pm8226.dtsi"
 
@@ -258,6 +259,26 @@  accelerometer@1d {
 	};
 };
 
+&blsp1_i2c3 {
+	status = "okay";
+
+	charger@6a {
+		compatible = "summit,smb358";
+		reg = <0x6a>;
+
+		interrupts-extended = <&tlmm 115 IRQ_TYPE_EDGE_FALLING>;
+
+		pinctrl-0 = <&charger_int_default_state>;
+		pinctrl-names = "default";
+
+		summit,enable-usb-charging;
+		summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>;
+		summit,fast-voltage-threshold-microvolt = <3000000>;
+		summit,chip-temperature-threshold-celsius = <130>;
+		summit,usb-current-limit-microamp = <1500000>;
+	};
+};
+
 &blsp1_i2c4 {
 	status = "okay";
 
@@ -495,6 +516,13 @@  backlight_vddio_default_state: backlight-vddio-default-state {
 		bias-disable;
 	};
 
+	charger_int_default_state: charger-int-default-state {
+		pins = "gpio115";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	muic_int_default_state: muic-int-default-state {
 		pins = "gpio67";
 		function = "gpio";