charger bring up change dtsi for charger bring up Change-Id: If62350beb67b7b42a0d4a3639511b4c2d4cface0 Signed-off-by: longc102 <longc102@motorola.com> Reviewed-on: https://gerrit.mot.com/2208806 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Submit-Approved: Jira Key Tested-by: Jira Key Reviewed-by: Qiong Xie <xieq2@motorola.com> Reviewed-on: https://gerrit.mot.com/2221192 Reviewed-by: Jianguo Liu <liujg6@motorola.com> Reviewed-by: Wang Wang <wangwang1@lenovo.com>
488 lines
12 KiB
Devicetree
488 lines
12 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/qti_power_supply_iio.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;
|
|
};
|
|
};
|
|
*/
|
|
|
|
gpio_7_dig_out {
|
|
gpio7_dig_out_default: gpio7_dig_out_default {
|
|
pins = "gpio7";
|
|
function = "normal";
|
|
power-source = <1>;
|
|
output-low;
|
|
input-disable;
|
|
};
|
|
};
|
|
};
|
|
|
|
/*
|
|
&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";
|
|
};
|
|
};
|
|
};*/
|
|
|
|
&qupv3_se1_i2c {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
status = "okay";
|
|
//pinctrl-0 = <&qupv3_se0_i2c_act>;
|
|
//pinctrl-1 = <&qupv3_se0_i2c_sle>;
|
|
wt6670: wt6670f@35 {
|
|
status = "okay";
|
|
compatible = "mediatek,wt6670f_qc3p";
|
|
reg = <0x35>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&wt6670_gpio_pins &gpio7_dig_out_default>;
|
|
#io-channel-cells = <1>;
|
|
wt6670f-reset-gpio = <&pm6125_gpios 7 0x0>;
|
|
wt6670f-int-gpio = <&tlmm 93 0x0>;
|
|
};
|
|
};
|
|
|
|
&qupv3_se2_i2c {
|
|
status = "okay";
|
|
|
|
cw2217@64 {
|
|
compatible = "cellwise,cw2217";
|
|
reg = <0x64>;
|
|
status = "okay";
|
|
|
|
sense_r_mohm = <5>;
|
|
factory_mode_ntc_exist = <0>;
|
|
df-serialnum = "SB18D38323";
|
|
#include "bat_setting/CW_ng50-ATL-5000mah-rhode.dtsi"
|
|
#include "bat_setting/CW_ng50-SWD-5000mah-rhode.dtsi"
|
|
#include "bat_setting/CW_ng50-BA-ATL-5000mah-rhode.dtsi"
|
|
#include "bat_setting/CW_ng50-IN-ATL-5000mah-rhode.dtsi"
|
|
};
|
|
|
|
sm5602@71 {
|
|
compatible = "sm,sm5602";
|
|
reg = <0x71>;
|
|
//interrupt-parent = <&tlmm>;
|
|
//interrupts = <38 2>;
|
|
//qcom,irq-gpio = <&tlmm 38 0x0>;
|
|
|
|
sm,en_temp_ex;
|
|
//sm,en_temp_in;
|
|
sm,en_batt_det;
|
|
//sm,iocv_man_mode;
|
|
sm,misc = <0x0800>;
|
|
sm,aging_ctrl = <0x0121>;
|
|
sm,cycle_cfg = <0x7000>;
|
|
sm,rsns = <0>;
|
|
factory_mode_ntc_exist = <0>;
|
|
sm,fg_irq_set = <0x07FF>;
|
|
sm,low_soc1 = <1>;
|
|
sm,low_soc2 = <15>;
|
|
sm,v_l_alarm = <3450>;
|
|
sm,v_h_alarm = <4450>;
|
|
sm,battery_table_num = <0>;
|
|
sm,param_version = <1>;
|
|
sm,t_l_alarm_in = <54>;
|
|
sm,t_h_alarm_in = <1>;
|
|
sm,t_l_alarm_ex = <0xD3D8>;
|
|
sm,t_h_alarm_ex = <0x9245>;
|
|
df-serialnum = "SB18D38324";
|
|
#include "bat_setting/SM5602_NE50_ATL_Rhode.dtsi"
|
|
#include "bat_setting/SM5602_NE50_SWD_Rhode.dtsi"
|
|
};
|
|
};
|
|
|
|
&qupv3_se1_i2c {
|
|
status = "okay";
|
|
|
|
sgm4154x: sgm4154x@1A {
|
|
status = "okay";
|
|
compatible = "sgm,sgm41513";
|
|
reg = <0x1A>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sgm4154x_gpio_pins>;
|
|
#io-channel-cells = <1>;
|
|
io-channels = <&pm6125_vadc ADC_GPIO3_DIV3>,
|
|
<&wt6670 PSY_IIO_QC3P_REAL_TYPE>,
|
|
<&wt6670 PSY_IIO_QC3P_POWER>,
|
|
<&wt6670 PSY_IIO_START_DETECTION>,
|
|
<&wt6670 PSY_IIO_DETECTION_READY>,
|
|
<&mmi_chrg PSY_IIO_QC3P_START_POLICY>;
|
|
|
|
io-channel-names = "gpio3_div3",
|
|
"wt6670_usb_real_type",
|
|
"wt6670_usb_qc3p_power",
|
|
"wt6670_start_detection",
|
|
"wt6670_detection_ready",
|
|
"qc3p_start_policy";
|
|
|
|
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 = <&pio 0 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 = <4450000>;
|
|
jeita_temp_t2_to_t3_cv = <4450000>;
|
|
jeita_temp_t1_to_t2_cv = <4450000>;
|
|
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>;
|
|
};
|
|
|
|
bq2597x: bq2597x-charger@66 {
|
|
compatible = "ti,bq25970-charger";
|
|
reg = <0x66>;
|
|
#io-channel-cells = <1>;
|
|
//ti,bq2597x,interrupt_gpios = <&pio 30 0>;
|
|
//interrupt-parent = <&pio>;
|
|
//interrupts = <2 IRQ_TYPE_EDGE_FALLING 2 0>;
|
|
//interrupt-names = "bq2597x_irq";
|
|
|
|
//pinctrl-names = "default_slave";
|
|
//pinctrl-0 = <&bq2597x_int_default_slave>;
|
|
interrupt-parent = <&tlmm>;
|
|
interrupts = <97 0>; //irq num base on hardware design
|
|
bq2597x,irq-gpio = <&tlmm 97 0>; //irq num base on hardware design
|
|
|
|
ti,bq2597x,bat-ovp-disable = <0>;
|
|
ti,bq2597x,bat-ocp_disable = <0>;
|
|
ti,bq2597x,bat-ovp-alarm-disable = <0>;
|
|
ti,bq2597x,bus-ocp-disable = <0>;
|
|
ti,bq2597x,bus-ovp-alarm-disable = <0>;
|
|
ti,bq2597x,bus-ocp-alarm-disable = <0>;
|
|
ti,bq2597x,bat-ucp-alarm-disable = <0>;
|
|
ti,bq2597x,bat-therm-disable = <0>;
|
|
ti,bq2597x,bus-therm-disable = <0>;
|
|
|
|
ti,bq2597x,bat-ovp-threshold = <4500>;
|
|
ti,bq2597x,bat-ovp-alarm-threshold = <4450>;
|
|
ti,bq2597x,bat-ocp-threshold = <8000>;
|
|
ti,bq2597x,bat-ocp-alarm-threshold = <7500>;
|
|
|
|
ti,bq2597x,bus-ovp-threshold = <12000>;
|
|
ti,bq2597x,bus-ovp-alarm-threshold = <11000>;
|
|
ti,bq2597x,bus-ocp-threshold = <3750>;
|
|
ti,bq2597x,bus-ocp-alarm-threshold = <3500>;
|
|
|
|
ti,bq2597x,bat-ucp-alarm-threshold = <2000>;
|
|
|
|
ti,bq2597x,bat-therm-threshold = <0x15>;
|
|
ti,bq2597x,bus-therm-threshold = <0x15>;
|
|
ti,bq2597x,die-therm-threshold = <125>;
|
|
|
|
ti,bq2597x,ac-ovp-threshold = <17>;
|
|
ti,bq2597x,sense-resistor-mohm = <5>;
|
|
};
|
|
};
|
|
|
|
&tlmm{
|
|
/*
|
|
qupv3_se0_i2c_pins: qupv3_se0_i2c_pins {
|
|
qupv3_se0_i2c_act: qupv3_se0_i2c_active {
|
|
mux {
|
|
pins = "gpio0", "gpio1";
|
|
function = "qup0";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio0", "gpio1";
|
|
drive-strength = <2>;
|
|
bias-disable;
|
|
};
|
|
};
|
|
|
|
qupv3_se0_i2c_sle: qupv3_se0_i2c_sleep {
|
|
mux {
|
|
pins = "gpio0", "gpio1";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio0", "gpio1";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
*/
|
|
|
|
wt6670_gpio_pins: wt6670_gpio_pins {
|
|
mux {
|
|
pins = "gpio93";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio93";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
&tlmm {
|
|
/*
|
|
wt6670_pins_default: wt6670_default_mode {
|
|
};
|
|
wt6670_pins_scl_low: wt6670_scl_low {
|
|
mux {
|
|
pins = "gpio1";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio1";
|
|
drive-strength = <2>;
|
|
bias-pull-down;
|
|
};
|
|
};
|
|
wt6670_pins_scl_high: wt6670_scl_high {
|
|
mux {
|
|
pins = "gpio1";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio1";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
output-high;
|
|
};
|
|
};
|
|
wt6670_pins_sda_low: wt6670_sda_low {
|
|
mux {
|
|
pins = "gpio0";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio0";
|
|
drive-strength = <2>;
|
|
bias-pull-down;
|
|
};
|
|
};
|
|
wt6670_pins_sda_high: wt6670_sda_high {
|
|
mux {
|
|
pins = "gpio0";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio0";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
output-high;
|
|
};
|
|
};
|
|
*/
|
|
/*
|
|
wt6670_pins_i2c: wt6670_i2c_mode {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO90__FUNC_SDA6>,
|
|
<PINMUX_GPIO89__FUNC_SCL6>;
|
|
};
|
|
};
|
|
*/
|
|
};
|
|
|
|
&tlmm {
|
|
sgm4154x_gpio_pins: sgm4154x_gpio_pins {
|
|
mux {
|
|
pins = "gpio96";
|
|
function = "gpio";
|
|
};
|
|
|
|
config {
|
|
pins = "gpio96";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
&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 = <5000>;
|
|
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 = "SB18D33989";
|
|
mmi,mmi-temp-zones = <0 4450 2500 0>,
|
|
<10 4450 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>;
|
|
};
|
|
};
|
|
|
|
&soc {
|
|
mmi_chrg: mmi_chrg_manager {
|
|
compatible = "mmi,chrg-manager";
|
|
#io-channel-cells = <1>;
|
|
io-channels = <&mmi_discrete_charger PSY_IIO_HW_CURRENT_MAX>,
|
|
<&mmi_discrete_charger PSY_IIO_USB_CHARGING_ENABLED>,
|
|
<&mmi_discrete_charger PSY_IIO_TYPEC_MODE>,
|
|
<&mmi_discrete_charger PSY_IIO_INPUT_CURRENT_SETTLED>,
|
|
<&mmi_discrete_charger PSY_IIO_PD_ACTIVE>,
|
|
<&mmi_discrete_charger PSY_IIO_USB_TERMINATION_ENABLED>,
|
|
<&wt6670 PSY_IIO_QC3P_REAL_TYPE>,
|
|
<&wt6670 PSY_IIO_QC3P_POWER>,
|
|
<&wt6670 PSY_IIO_BATTERY_DP_DM>,
|
|
<&wt6670 PSY_IIO_START_DETECTION>,
|
|
<&bq2597x PSY_IIO_CP_ENABLE>,
|
|
<&bq2597x PSY_IIO_MMI_CP_INPUT_CURRENT_NOW>,
|
|
<&bq2597x PSY_IIO_MMI_CP_INPUT_VOLTAGE_NOW>,
|
|
<&bq2597x PSY_IIO_CP_STATUS1>,
|
|
<&bq2597x PSY_IIO_CP_CLEAR_ERROR>;
|
|
|
|
io-channel-names = "hw_current_max",
|
|
"charging_enabled",
|
|
"typec_mode",
|
|
"input_current_settled",
|
|
"pd_active",
|
|
"termination_enabled",
|
|
"wt6670_usb_real_type",
|
|
"wt6670_usb_qc3p_power",
|
|
"wt6670_battery_dp_dm",
|
|
"wt6670_start_detection",
|
|
"bq2597x_cp_enabled",
|
|
"bq2597x_input_current_now",
|
|
"bq2597x_input_voltage_settled",
|
|
"bq2597x_cp_status1",
|
|
"bq2597x_cp_clear_error";
|
|
|
|
// qcom,usbpd-phandle = <&pm7250b_pdphy>;
|
|
mmi,pps-volt-steps = <20000>;
|
|
mmi,pps-curr-steps = <100000>;
|
|
mmi,pd-volt-max = <10000000>;
|
|
mmi,pd-curr-max = <3000000>;
|
|
mmi,batt-curr-boost = <300000>;
|
|
mmi,batt-ovp-lmt = <4550000>;
|
|
mmi,pl-chrg-vbatt-min = <3000000>;
|
|
mmi,typec-middle-current = <2000000>;
|
|
mmi,pd-allow-min-current = <1000000>;
|
|
mmi,step-first-current-comp = <0>;
|
|
mmi,dont-rerun-aicl;
|
|
mmi,qc3p-max-ibus-ma = <3000>;
|
|
mmi,qc3p-volt-steps = <20000>;
|
|
mmi,qc3p-volt-max = <10000000>;
|
|
mmi,chrg-temp-zones-num = <5>;
|
|
mmi,mmi-chrg-temp-zones =
|
|
<0 4450 1000 0 0>,
|
|
<10 4450 3000 4450 1000>,
|
|
<15 4450 3000 0 0>,
|
|
<45 4350 6000 4480 4000>,
|
|
<60 4200 4000 0 0>;
|
|
mmi,thermal-mitigation =
|
|
<5800000>,
|
|
<5000000>,
|
|
<4000000>,
|
|
<3500000>,
|
|
<3000000>,
|
|
<2000000>,
|
|
<1000000>;
|
|
charger_device_0 {
|
|
chrg-name = "pmic-sw";
|
|
psy-name = "battery";
|
|
charging-curr-limited = <500000>;
|
|
};
|
|
charger_device_1 {
|
|
chrg-name = "cp-master";
|
|
psy-name = "cp-standalone";
|
|
charging-curr-min = <1500000>;
|
|
};
|
|
};
|
|
};
|