From 7d66b2218769f3d3df153538771df714f121b521 Mon Sep 17 00:00:00 2001 From: Rakesh Kota Date: Wed, 25 May 2022 17:42:14 +0530 Subject: [PATCH] ARM: dts: msm: Add support for BQ27421 fuel-gauge node Add BQ27421 fuel-gauge and battery specs for neo. Change-Id: I940183e151df1311ccf5cc54873a63ae3116c12e --- qcom/neo-pinctrl.dtsi | 15 +++++++++++++++ qcom/neo-pmic-overlay.dtsi | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/qcom/neo-pinctrl.dtsi b/qcom/neo-pinctrl.dtsi index 44242461..74efbdd2 100644 --- a/qcom/neo-pinctrl.dtsi +++ b/qcom/neo-pinctrl.dtsi @@ -641,6 +641,21 @@ }; }; + bq27421_intr: bq27421_intr { + bq27421_intr_default: bq27421_intr_default { + mux { + pins = "gpio7"; + function = "gpio"; + }; + + config { + pins = "gpio7"; + bias-pull-up; + input-enabled; + }; + }; + }; + qupv3_se11_2uart_pins: qupv3_se11_2uart_pins { qupv3_se11_2uart_active: qupv3_se11_2uart_active { mux { diff --git a/qcom/neo-pmic-overlay.dtsi b/qcom/neo-pmic-overlay.dtsi index 1df5bf14..f246af0b 100644 --- a/qcom/neo-pmic-overlay.dtsi +++ b/qcom/neo-pmic-overlay.dtsi @@ -154,6 +154,27 @@ #size-cells = <0>; status = "ok"; + battery: battery { + compatible = "simple-battery"; + charge-term-current-microamp = <12800>; + constant-charge-current-max-microamp = <500000>; + constant-charge-voltage-max-microvolt = <4480000>; + voltage-min-design-microvolt = <3200000>; + voltage-max-design-microvolt = <4480000>; + precharge-current-microamp = <128000>; + charge-full-design-microamp-hours = <645000>; + factory-internal-resistance-micro-ohms = <120000>; + ocv-capacity-celsius = <(-10) 0 15 45>; + /* table for -10 degree Celsius */ + ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>; + /* table for 0 degree Celsius */ + ocv-capacity-table-1 = <4480000 100>, <4383000 95>, <4313000 90>; + /* table for 15 degree Celsius */ + ocv-capacity-table-2 = <4480000 100>, <4383000 95>, <4313000 90>; + /* table for 45 degree Celsius */ + ocv-capacity-table-3 = <4200000 100>, <4190000 95>, <4185000 90>; + }; + charger: charger@6b { compatible = "ti,bq25600"; reg = <0x6b>; @@ -161,12 +182,25 @@ interrupt-parent = <&tlmm>; interrupts = <6 IRQ_TYPE_EDGE_FALLING>; debugboard-detect-gpio = <&tlmm 54 GPIO_ACTIVE_HIGH>; - ti,watchdog-timeout-ms = <40000>; + ti,watchdog-timeout-ms = <0>; pinctrl-names = "default"; pinctrl-0 = <&bq256xx_intr_default>; - input-voltage-limit-microvolt = <4500000>; + input-voltage-limit-microvolt = <4480000>; input-current-limit-microamp = <500000>; + monitored-battery = <&battery>; + status = "ok"; + }; + + bq27421: fuel-gauge@55 { + compatible = "ti,bq27421"; + reg = <0x55>; + + interrupt-parent = <&tlmm>; + interrupts = <7 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&bq27421_intr_default>; + monitored-battery = <&battery>; status = "ok"; }; };