Files
android_kernel_motorola_sm6225/qcom/discrete_charging_hawao.dtsi
T
xieqiong2 2f7ba2f3e9 dtsi:add charging dtsi for hawao.
Add intial charging and fg dtsi
configuration for hawao.

Change-Id: Ic0a08a0f29b3d6a9c85626ccd51352336d5e77d8
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2140521
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-05-31 17:01:04 -03:00

195 lines
4.2 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.
*/
/*
&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";
};
};
};
*/
&tlmm {
sgm4154x_gpio_pins: sgm4154x_gpio_pins {
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>;
//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>;
/* 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>;
};
};
&qupv3_se0_i2c {
status = "okay";
cw2217@64 {
compatible = "cellwise,cw2217";
reg = <0x64>;
status = "okay";
df-serialnum = "SB18D24973";
#include "bat_setting/CW_nd50-atl-5000mah.dtsi"
#include "bat_setting/CW_nd50-jiade-5000mah.dtsi"
};
};
&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 = <4000000 3500000
3000000 2500000
2000000 1500000
1200000 900000
600000 300000>;
};
};
/*
&usb0 {
extcon = <&eud>,<&mmi_discrete_charger>;
};
*/