高通smb358的充电参数说明,主要所dtsi数据写入。
主要就是通过I2C通讯
其他参数充电电流,电压,温度
Summit smb358 battery charger
SMB358 is a single-cell battery charger. It can charge the battery and power the system via the USB/AC adapter input.
The smb358 interface is via I2C bus.
Required Properties:
- compatible
Must be "qcom,smb358-charger".
- reg
The device 7-bit I2C address.
- interrupt-parent
parent of interrupt.
- interrupts
This indicates the IRQ number of the GPIO connected to the STAT pin.
- qcom,irq-gpio
GPIO which receives interrupts from STAT output.
- qcom,bms-psy-name
This is a string and it points to the bms power supply name.
- qcom,float-voltage-mv
Float Voltage in mV - the maximum voltage up to which the battery is charged. Supported range 3500mV to 4500mV
Optional Properties:
- qcom,fastchg-current-max-ma
Fast Charging current in mA. Supported range is from 200mA to 2000mA.
- qcom,chg-valid-gpio
GPIO which indicates the charger presence. This GPIO is connected to the SYSOK pin.
- qcom,chg-autonomous-mode
This is a bool property and it indicates that the charger is configured for autonomous operation and
does not require any software configuration.
- qcom,disable-apsd
This is a bool property which disables automatic power source detection (APSD). If this is set
charger detection is done by DCIN UV irq.
- qcom,charger-disabled
This is a bool property which disables charging.
- qcom,using-pmic-therm
This property indicates thermal pin connected to pmic or smb.
- qcom,vcc-i2c-supply Power source required to power up i2c bus.
- qcom,bms-controlled-charging
This property indicates integrating with VMBMS, charger driver and BMS communicates with each other via power_supply
framework. Property "qcom,iterm-disabled" also needs defined
if using this feature to make sure that the charger doesn't terminate charging on its own.
- qcom,iterm-ma
Specifies the termination current to indicate end-of-charge. Possible values in mA - 30, 40, 60, 80, 100, 125, 150, 200.
- qcom,iterm-disabled
Disables the termination current feature. This is a bool property.
- qcom,recharge-mv
Recharge threshold in mV - the offset from the float-volatge as which the charger restarts charging. Possible
values are 50mV to 300mV.
- qcom,recharge-disabled
Boolean value which disables the auto-recharge.
- qcom,chg-inhibit-disabled
This is a bool property which disables charger inhibit. Charger inhibit option prevents battery charging upon insertion
of the charger when battery voltage is above the programmed inhibit threshold.
- qcom,chg-adc_tm
phandle to the corresponding VADC device to read the ADC channels.
- qcom,cold-bat-decidegc
Cold battery temperature in decidegC.
- qcom,hot-bat-decidegc
Hot battery temperature in decidegC.
- qcom,bat-present-decidegc
This is a property indicating battery present temperature, if higher than it, battery should exist. Default value is negative,
if this property is 200, it stands for -200 decidegC.
- qcom,warm-bat-decidegc:
Warm battery temperature in decidegC. After hitting this threshold, "qcom,warm-bat-ma" defines maximum charging current and
"qcom,warm-bat-mv" defines maximum target voltage.
- qcom,cool-bat-decidegc: Cool battery temperature in decidegC. After hitting this threshold, "qcom,cool-bat-ma" defines maximum charging current and
"qcom,cool-bat-mv" defines maximum target voltage.
- qcom,warm-bat-ma:
Maximum warm battery charge current in milli-amps.
- qcom,cool-bat-ma:
Maximum cool battery charge current in milli-amps.
- qcom,warm-bat-mv:
Maximum warm battery target voltage in milli-volts.
- qcom,cool-bat-mv:
Maximum cool battery target voltage in milli-volts.
- qcom,chg-vadc
Corresponding VADC device's phandle.
- qcom,skip-usb-suspend-for-fake-battery:
A boolean property to skip suspending USB path for fake battery. If this property is not present then 'qcom,batt-id-vref-uv' and 'qcom,batt-id-rpullup-kohm' should be present.
- qcom,batt-id-vref-uv
The reference voltage on the battery-ID line specified in micro-volts.
- qcom,batt-id-rpullup-kohm
The pull-up resistor connected on the battery-ID (vref) line.
- qcom,using-vbat-sns
Bool property to indicate that VBAT sense can be done by PMIC.
Example: i2c@f9967000 { smb358-charger@1b { compatible = "qcom,smb358-charger";
reg = <0x1b>;
interrupt-parent = <&msmgpio>;
interrupts = <17 0x0>;
qcom,irq-gpio = <&msmgpio 17 0x00>;
qcom,vcc-i2c-supply = <&pm8226_lvs1>;
qcom,float-voltage-mv = <4350>;
qcom,disable-apsd;
qcom,chg-inhibit-disabled;
qcom,bms-controlled-charging;
qcom,fastchg-current-max-ma = <1500>;
qcom,bms-psy-name = "bms";
qcom,chg-vadc = <&pm8226_vadc>;
qcom,chg-adc_tm = <&pm8226_adc_tm>;
qcom,hot-bat-decidegc = <500>;
qcom,cold-bat-decidegc = <0>;
qcom,bat-present-decidegc = <200>;
qcom,warm-bat-decidegc = <450>;
qcom,cool-bat-decidegc = <100>;
qcom,warm-bat-ma = <350>;
qcom,cool-bat-ma = <350>;
qcom,warm-bat-mv = <4200>;
qcom,cool-bat-mv = <4200>; }; };