change the first FG(cw2217) r_sense to 5 m ohm from 10 m ohm discrete_charging_hawao.dtsi Change-Id: I5ef816aa6166067882dffc2cf7d11db066d6a415 Reviewed-on: https://gerrit.mot.com/2156023 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: <tinno18@motorola.com> Reviewed-by: Qiong Xie <xieq2@motorola.com> Reviewed-by: Wang Wang <wangwang1@lenovo.com> Submit-Approved: Jira Key
351 lines
10 KiB
Devicetree
351 lines
10 KiB
Devicetree
/* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
#include <dt-bindings/iio/qcom,spmi-vadc.h>
|
|
&pm6125_vadc {
|
|
gpio6_div3{
|
|
reg = <ADC_GPIO3_DIV3>;
|
|
label = "gpio3_div3";
|
|
qcom,pre-scaling = <1 3>;
|
|
};
|
|
};
|
|
|
|
&pm6125_gpios {
|
|
gpio6_adc{
|
|
gpio6_adc_default:gpio6_adc_default{
|
|
pins = "gpio6";
|
|
function = "normal";
|
|
bias-high-impedance;
|
|
};
|
|
};
|
|
|
|
indicator_led {
|
|
indicator_led_default: indicator_led_default {
|
|
pins = "gpio8";
|
|
function = "func1";
|
|
output-low;
|
|
power-source = <1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&soc {
|
|
indicator_led {
|
|
compatible = "qcom,indicator-pwm-led";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&indicator_led_default>;
|
|
indicator_led {
|
|
label = "charging";
|
|
led-sources = <0>;
|
|
pwms = <&pm6125_pwm 0 1000000>;
|
|
linux,default-trigger = "timer";
|
|
};
|
|
};
|
|
};
|
|
|
|
&spmi_bus {
|
|
qcom,pm6125@1 {
|
|
#address-cells = <1>;
|
|
qcom,pwms@b300 {
|
|
status = "ok"
|
|
qcom,lut-patterns = <0 0 0 14 28 42 56 70 84 100
|
|
100 84 70 56 42 28 14 0 0 0>;
|
|
lpg@1 {
|
|
qcom,lpg-chan-id = <1>;
|
|
qcom,ramp-step-ms = <200>;
|
|
qcom,ramp-low-index = <0>;
|
|
qcom,ramp-high-index = <19>;
|
|
qcom,ramp-pattern-repeat;
|
|
qcom,lpg-sdam-base = <0x48>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
&tlmm {
|
|
sgm4154x_gpio_pins: sgm4154x_gpio_pins {
|
|
mux {
|
|
pins = "gpio96";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio96";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
//bq2589x
|
|
&tlmm {
|
|
bq2589x_irq: bq2589x_irq {
|
|
mux {
|
|
pins = "gpio96";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio96";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
&qupv3_se1_i2c {
|
|
status = "okay";
|
|
|
|
sgm4154x: sgm4154x@3B {
|
|
status = "okay";
|
|
compatible = "sgm,sgm41542";
|
|
reg = <0x3B>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sgm4154x_gpio_pins &gpio6_adc_default>;
|
|
|
|
io-channels = <&pm6125_vadc ADC_GPIO3_DIV3>;
|
|
io-channel-names = "gpio3_div3";
|
|
|
|
interrupt-parent = <&tlmm>;
|
|
interrupts = <96 0>; //irq num base on hardware design
|
|
sgm,irq-gpio = <&tlmm 96 0>; //irq num base on hardware design
|
|
sgm,chg-en-gpio = <&tlmm 36 0>; //gpio num base on hardware design 1.MTK parent node name is pio 2.QUALCOMM parent node name is tlmm or other
|
|
|
|
dpdm-supply = <&usb2_phy0>;
|
|
mmi,qc3-support;
|
|
|
|
/* sw jeita parameter customer defined*/
|
|
enable_sw_jeita;
|
|
jeita_temp_above_t4_cv = <0>;
|
|
jeita_temp_t3_to_t4_cv = <4100000>;
|
|
jeita_temp_t2_to_t3_cv = <4350000>;
|
|
jeita_temp_t1_to_t2_cv = <4350000>;
|
|
jeita_temp_t0_to_t1_cv = <0>;
|
|
jeita_temp_below_t0_cv = <0>;
|
|
|
|
jeita_temp_above_t4_cc_current = <0>;
|
|
jeita_temp_t3_to_t4_cc_current = <1000000>;
|
|
jeita_temp_t2_to_t3_cc_current = <1250000>;
|
|
jeita_temp_t1_to_t2_cc_current = <1000000>;
|
|
jeita_temp_below_t0_cc_current = <0>;
|
|
|
|
temp_t4_thres = <50>;
|
|
temp_t4_thres_minus_x_degree = <48>;
|
|
temp_t3_thres = <45>;
|
|
temp_t3_thres_minus_x_degree = <45>;
|
|
temp_t2_thres = <20>;
|
|
temp_t2_thres_plus_x_degree = <15>;
|
|
temp_t1_thres = <0>;
|
|
temp_t1_thres_plus_x_degree = <0>;
|
|
temp_t0_thres = <0>;
|
|
temp_t0_thres_plus_x_degree = <2>;
|
|
temp_neg_10_thres = <0>;
|
|
};
|
|
|
|
bq25890@6A {
|
|
status = "okay";
|
|
compatible = "ti,bq2589x-1";
|
|
reg = <0x6A>;
|
|
|
|
pinctrl-names = "default";
|
|
//pinctrl-0 = <&bq2589x_irq>;
|
|
pinctrl-0 = <&bq2589x_irq &gpio6_adc_default>;
|
|
io-channels = <&pm6125_vadc ADC_GPIO3_DIV3>;
|
|
io-channel-names = "gpio3_div3";
|
|
|
|
interrupt-parent = <&tlmm>;
|
|
interrupts = <96 0>;
|
|
bq2589x_irq-gpio = <&tlmm 96 0>;
|
|
bq2589x_en-gpio = <&tlmm 36 0>;
|
|
dpdm-supply = <&usb2_phy0>;
|
|
|
|
mmi,qc3-support;
|
|
ti,bq2589x,vbus-volt-high-level = <8700>;/* tune adapter to output 9v */
|
|
ti,bq2589x,vbus-volt-low-level = <4400>;/* tune adapter to output 5v */
|
|
ti,bq2589x,vbat-min-volt-to-tuneup = <3000>;
|
|
ti,bq2589x,charge-voltage = <4450>;
|
|
ti,bq2589x,charge-current = <3000>;
|
|
ti,bq2589x,term-current = <210>;
|
|
ti,bq2589x,enable-auto-dpdm;
|
|
ti,bq2589x,enable-termination;
|
|
ti,bq2589x,enable-ico;
|
|
ti,bq2589x,use-absolute-vindpm;
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
&qupv3_se0_i2c {
|
|
status = "okay";
|
|
|
|
cw2217@64 {
|
|
compatible = "cellwise,cw2217";
|
|
reg = <0x64>;
|
|
status = "okay";
|
|
|
|
sense_r_mohm = <5>;
|
|
df-serialnum = "SB18D24973";
|
|
#include "bat_setting/CW_nd50-atl-5000mah.dtsi"
|
|
#include "bat_setting/CW_nd50-jiade-5000mah.dtsi"
|
|
};
|
|
|
|
|
|
sm5602@71 {
|
|
compatible = "sm,sm5602";
|
|
reg = <0x71>;
|
|
status = "okay";
|
|
//interrupt-parent = <&tlmm>;
|
|
//interrupts = <105 2>;
|
|
//qcom,irq-gpio = <&tlmm 105 0x0>;
|
|
|
|
sm,en_temp_ex;
|
|
//sm,en_temp_in;
|
|
sm,en_batt_det;
|
|
//sm,iocv_man_mode;
|
|
sm,misc = <0x0800>;
|
|
sm,aging_ctrl = <0x0125>;
|
|
sm,cycle_cfg = <0x7000>;
|
|
sm,rsns = <0>;
|
|
sm,fg_irq_set = <0x07FF>;
|
|
sm,low_soc1 = <1>;
|
|
sm,low_soc2 = <15>;
|
|
sm,v_l_alarm = <3400>;
|
|
sm,v_h_alarm = <4450>;
|
|
sm,battery_table_num = <0>;
|
|
sm,param_version = <2>;
|
|
sm,t_l_alarm_in = <54>;
|
|
sm,t_h_alarm_in = <1>;
|
|
sm,t_l_alarm_ex = <0xD3D8>;
|
|
sm,t_h_alarm_ex = <0x9245>;
|
|
battery_params {
|
|
//battery,id = <0>;
|
|
//ND50(ATL)
|
|
battery0,param_version = <2>;
|
|
battery0,max_voltage_uv = <4450000>;
|
|
battery0,battery_type = <4450 0x0 0x2633>;
|
|
battery0,battery_table0 = <0x1400 0x1C8A 0x1D03 0x1D72 0x1D7E 0x1D87 0x1D91 0x1DAD 0x1DE0 0x1E0C 0x1E3B 0x1E70 0x1EBE 0x1F18 0x1F48 0x1F98 0x1FF1 0x20BB 0x216C 0x21E8 0x2241 0x22EB 0x2337 0x2733>;
|
|
battery0,battery_table1 = <0x0 0x85 0x191 0x323 0x3A9 0x4B5 0x6CD 0xAFE 0xF2E 0x146A 0x19A7 0x2181 0x2BFA 0x33D4 0x3672 0x3911 0x3E4D 0x48C6 0x50A0 0x55DC 0x5987 0x60DB 0x6400 0x64E6>;
|
|
battery0,battery_table2 = <0x2033 0x181B 0x1516 0x1213 0x1011 0x0F0F 0x0E0F 0x0E0E>;
|
|
battery0,alpha = <0x00CC>;
|
|
battery0,beta = <0x0025>;
|
|
battery0,rs = <0x805F>;
|
|
battery0,rs_value = <0x0050 0x010A 0x3800 0x0048>;
|
|
battery0,vit_period = <0x325A>;
|
|
battery0,volt_cal = <0x8000>;
|
|
battery0,mix_value = <0x0003>;
|
|
battery0,curr_offset = <0x000>;
|
|
battery0,curr_slope = <0x8080>;
|
|
battery0,topoff_soc = <7 400>;
|
|
battery0,temp_std = <25>;
|
|
battery0,temp_offset = <0 11 1 0 8 (-1)>;
|
|
battery0,temp_cal = <0 6 1 11 (-1) 0 6 1 9 1>;
|
|
battery0,ext_temp_cal = <0 2 1 2 1 0 2 3 2 3>;
|
|
battery0,tem_poff = <3450 100>;
|
|
battery0,thermal_table = <0x435B 0x3E57 0x3963 0x3486 0x2FC5 0x2B1B 0x2688 0x2200 0x1DA3 0x1932
|
|
0x1534 0x1148 0x0D46 0x096E 0x05A0 0x01F4 0xF62D 0xF2BC 0xEF68 0xEC08
|
|
0xE8E0 0xE5D2 0xE2DC 0xDFFC 0xDD33 0xDA83 0xD7E5 0xD55E 0xD2EF 0xD092
|
|
0xCE4A 0xCC12 0xC9EF 0xC7E3 0xC5E4 0xC3F8 0xC21D 0xC051 0xBE97 0xBCE9
|
|
0xBB4D 0xB9C2 0xB840 0xB6CF 0xB569 0xB40F 0xB2C2 0xB17F 0xB049 0xAF1E
|
|
0xADFD 0xACE4 0xABD7 0xAAD5 0xA9DD 0xA8EB 0xA805 0xA71E 0xA648 0xA577
|
|
0xA4B0 0xA3ED 0xA32F 0xA27D 0xA1CE 0xA124 0xA082 0x9FE7 0x9F50 0x9EBC
|
|
0x9E2B 0x9DA3 0x9D20 0x9CA1 0x9C27 0x9BAF 0x9B3B 0x9ACC 0x9A62 0x99FA
|
|
0x9996 0x9938 0x98DE 0x9885 0x982E 0x97DA 0x978A 0x973D 0x96F2 0x96AA
|
|
0x9665 0x9621 0x95DF 0x959F 0x9561 0x9525 0x94EB 0x94B3 0x947C 0x9447
|
|
0x9414>; //NTC value(DEC) table -20~80
|
|
//ND50(JIADE)
|
|
battery1,param_version = <2>;
|
|
battery1,max_voltage_uv = <4450000>;
|
|
battery1,battery_type = <4450 0x0 0x25CC>;
|
|
battery1,battery_table0 = <0x1400 0x1C97 0x1D09 0x1D75 0x1D8E 0x1D95 0x1D9C 0x1DB6 0x1DF1 0x1E04 0x1E60 0x1E90 0x1ED3 0x1F34 0x1F72 0x1FB7 0x1FE4 0x20AC 0x2157 0x21D1 0x222A 0x22D4 0x231D 0x2733>;
|
|
battery1,battery_table1 = <0x0 0x86 0x195 0x32C 0x5D1 0x7EF 0xA0C 0xBA3 0x10ED 0x1393 0x1E28 0x2617 0x2E07 0x35F7 0x389C 0x3B42 0x3DE7 0x487C 0x506C 0x55B6 0x596A 0x60D3 0x6400 0x64E6>;
|
|
battery1,battery_table2 = <0x2B41 0x1F23 0x1A1C 0x1517 0x1314 0x1112 0x1011 0x1010>;
|
|
battery1,alpha = <0x00CC>;
|
|
battery1,beta = <0x0025>;
|
|
battery1,rs = <0x805F>;
|
|
battery1,rs_value = <0x0050 0x010A 0x3800 0x0048>;
|
|
battery1,vit_period = <0x325A>;
|
|
battery1,volt_cal = <0x8000>;
|
|
battery1,mix_value = <0x0003>;
|
|
battery1,curr_offset = <0x000>;
|
|
battery1,curr_slope = <0x8080>;
|
|
battery1,topoff_soc = <7 400>;
|
|
battery1,temp_std = <25>;
|
|
battery1,temp_offset = <0 11 1 0 8 (-1)>;
|
|
battery1,temp_cal = <0 6 1 11 (-1) 0 6 1 9 1>;
|
|
battery1,ext_temp_cal = <0 2 1 2 0 0 2 3 2 3>;
|
|
battery1,tem_poff = <3450 100>;
|
|
battery1,thermal_table = <0x435B 0x3E57 0x3963 0x3486 0x2FC5 0x2B1B 0x2688 0x2200 0x1DA3 0x1932
|
|
0x1534 0x1148 0x0D46 0x096E 0x05A0 0x01F4 0xF62D 0xF2BC 0xEF68 0xEC08
|
|
0xE8E0 0xE5D2 0xE2DC 0xDFFC 0xDD33 0xDA83 0xD7E5 0xD55E 0xD2EF 0xD092
|
|
0xCE4A 0xCC12 0xC9EF 0xC7E3 0xC5E4 0xC3F8 0xC21D 0xC051 0xBE97 0xBCE9
|
|
0xBB4D 0xB9C2 0xB840 0xB6CF 0xB569 0xB40F 0xB2C2 0xB17F 0xB049 0xAF1E
|
|
0xADFD 0xACE4 0xABD7 0xAAD5 0xA9DD 0xA8EB 0xA805 0xA71E 0xA648 0xA577
|
|
0xA4B0 0xA3ED 0xA32F 0xA27D 0xA1CE 0xA124 0xA082 0x9FE7 0x9F50 0x9EBC
|
|
0x9E2B 0x9DA3 0x9D20 0x9CA1 0x9C27 0x9BAF 0x9B3B 0x9ACC 0x9A62 0x99FA
|
|
0x9996 0x9938 0x98DE 0x9885 0x982E 0x97DA 0x978A 0x973D 0x96F2 0x96AA
|
|
0x9665 0x9621 0x95DF 0x959F 0x9561 0x9525 0x94EB 0x94B3 0x947C 0x9447
|
|
0x9414>; //NTC value(DEC) table -20~80
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
|
|
&soc {
|
|
mmi_charger: mmi,charger {
|
|
status = "ok"
|
|
compatible = "mmi,mmi-charger";
|
|
mmi,enable-charging-limit;
|
|
mmi,upper-limit-capacity = <65>;
|
|
mmi,lower-limit-capacity = <60>;
|
|
mmi,heartbeat-interval = <100000>;
|
|
mmi,dcp-power-max = <10000>;
|
|
mmi,hvdcp-power-max = <15000>;
|
|
};
|
|
|
|
mmi_discrete_charger: mmi,discrete-charging {
|
|
status = "ok"
|
|
compatible = "mmi,mmi-discrete-charger";
|
|
#io-channel-cells = <1>;
|
|
battery-names = "battery";
|
|
supplied-from = "mmi_battery";
|
|
|
|
mmi,chrg-iterm-ma = <243>;
|
|
mmi,fg-iterm-ma = <500>;
|
|
mmi,max-fv-mv = <4450>;
|
|
mmi,max-fcc-ma = <4000>;
|
|
mmi,demo-fv-mv = <4000>;
|
|
mmi,otg-cl-ua = <1200000>;
|
|
mmi,df-serialnum = "SB18D24973";
|
|
mmi,mmi-temp-zones = <0 4200 1000 0>,
|
|
<10 4250 2500 1000>,
|
|
<15 0 2500 2500>,
|
|
<45 0 4000 4000>,
|
|
<60 4200 4000 0>;
|
|
mmi,thermal-mitigation = <3500000 3000000
|
|
2800000 2500000
|
|
2000000 1500000
|
|
1200000 900000
|
|
600000 300000>;
|
|
};
|
|
};
|
|
|
|
/*
|
|
&usb0 {
|
|
extcon = <&eud>,<&mmi_discrete_charger>;
|
|
};
|
|
*/
|