1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
Summit smb1351 battery charger
SMB1351 is a single-cell battery charger. It can charge
the battery and power the system via the USB/AC adapter input.
The smb1351 interface is via I2C bus.
Required Properties:
- compatible Must be "qcom,smb1351-charger".
- reg The device 7-bit I2C address.
Required Properties for standalone charger:
- regulator-name A string used as a descriptive name for OTG regulator.
- pinctrl-names The state name of the pin configuration. Only
support "default".
- pinctrl-0 The phandle of the pin configuration node in
pinctrl for smb_int_pin.
Optional Properties:
- interrupts This indicates the IRQ number of the GPIO
connected to the STAT pin.
- qcom,fastchg-current-max-ma Fast Charging current in mA. Supported range is
from 1000mA to 4500mA.
- 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,charging-disabled This is a bool property which disables charging.
- qcom,using-pmic-therm This property indicates thermal pin connected to pmic or smb.
- qcom,bms-psy-name This is a string and it points to the bms
power supply name.
- qcom,use-external-fg This is a bool property to indicate if the SMB charger
working with an external Fuel Gauge(FG). If yes, the SMB
charger would interact with FG and several software
workarounds will be applied to improve the SoC reporting
accuracy.
- qcom,resume-soc This property specify an integer value to indicate
SOC value to resume charging. This property could be
defined when qcom,use-external-fg is defined. When this
property is defined, recharging behavior will be based
upon the SOC reported by FG and the recharging based on
internal voltage will be disabled.
- qcom,iterm-ma Specifies the termination current to indicate end-of-charge.
Possible values in mA - 70, 100, 200, 300, 400, 500, 600, 700.
- qcom,iterm-disabled Disables the termination current feature. This is a bool
property.
- qcom,float-voltage-mv Float Voltage in mV - the maximum voltage up to which
the battery is charged. Supported range 3500mV to 4500mV
- qcom,recharge-mv Recharge threshold in mV - the offset from the float-volatge
as which the charger restarts charging. Possible
values are 50mV and 100mV.
- qcom,recharge-disabled Boolean value which disables the auto-recharge.
- qcom,bms-controlled-charging This property enables BMS to control EOC and
recharge. BMS and charger communicates with each
other via power_supply framework. This
property should be used with 'qcom,iterm-disabled'
to ensure EOC detection in charger is disabled.
- qcom,force-hvdcp-2p0 Boolean value which allows to force hvdcp working on 2.0 mode.
- qcom,chg-vadc Corresponding VADC device's phandle.
- qcom,chg-adc_tm phandle to the corresponding VADC device to read the ADC channels.
- qcom,batt-cold-decidegc Cold battery temperature in decidegC.
- qcom,batt-hot-decidegc Hot battery temperature in decidegC.
- qcom,batt-missing-decidegc This is a property indicating battery missing temperature, if
higher than it, battery should exist.
- qcom,batt-warm-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,batt-cool-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,batt-warm-ma: Maximum warm battery charge current in milli-amps.
- qcom,batt-cool-ma: Maximum cool battery charge current in milli-amps.
- qcom,batt-warm-mv: Maximum warm battery target voltage in milli-volts.
- qcom,batt-cool-mv: Maximum cool battery target voltage in milli-volts.
- qcom,switch-freq: Switching frequency of charger. Supported values:
0 - 750 kHz, 1 - 1 MHz, 2 - 1.5 MHz, 3 - 3 MHz.
- qcom,parallel-usb-min-current-ma:
Minimum current which has to be drawn from USB when
acting as the primary charger before enabling the
parallel slave.
This property needs to be specified if it's acting as
the primary charger in parallel charger configuration.
- qcom,parallel-usb-9v-min-current-ma:
Minimum current which has to be drawn from USB when
acting as the primary charger before enabling the
parallel slave. This value applies only for 9V charger
adapters.
This property needs to be specified if it's acting as
the primary charger in parallel charger configuration.
- qcom,parallel-usb-12v-min-current-ma:
Minimum current which has to be drawn from USB when
acting as the primary charger before enabling the
parallel slave. This value applies only for 12V charger
adapters.
This property needs to be specified if it's acting as
the primary charger in parallel charger configuration.
- qcom,parallel-allowed-lowering-ma:
The acceptable current drop from the initial limit(ICL)
to keep parallel charging active. If charging current
drops below this threshold, parallel charging is
disabled.
This property needs to be specified if it's acting as
the primary charger in parallel charger configuration.
- qcom,parallel-main-chg-fcc-percent:
Percentage of the fast charge current allotted to the
primary charger when parallel charging is enabled and
operational.
If this property is not defined, the driver defaults
to a 50% : 50% split between the primary charger and the
slave charger.
- qcom,parallel-main-chg-icl-percent:
Percentage of the input current allotted to the primary
charger when parallel charging is enabled and
operational.
If this property is not defined, the driver defaults to
a 50% : 50% split between the primary charger and the
slave charger.
- qcom,parallel-charger: Boolean value to indicate if it's a slave charger in
parallel charger configuration.
- qcom,parallel-en-pin-polarity:
Specify the active polarity of enable pin of the slave
charger in parallel charger configuration:
0 - Active low
1 - Active high.
If not specified the default value is active-low.
Example for standalone charger:
&i2c_4 {
smb1351_otg_supply: smb1351-charger@57 {
compatible = "qcom,smb1351-charger";
reg = <0x57>;
interrupt-parent = <&msm_gpio>;
interrupts = <62 2>;
pinctrl-names = "default";
pinctrl-0 = <&smb_int_default>;
qcom,float-voltage-mv = <4350>;
qcom,iterm-ma = <100>;
qcom,recharge-mv = <100>;
qcom,bms-psy-name = "bms";
regulator-name = "smb1351_otg_vreg";
qcom,using-pmic-therm;
qcom,chg-adc_tm = <&pm8916_adc_tm>;
qcom,chg-vadc = <&pm8916_vadc>;
qcom,batt-hot-decidegc = <550>;
qcom,batt-cold-decidegc = <0>;
qcom,batt-missing-decidegc = <(-200)>;
qcom,batt-warm-decidegc = <500>;
qcom,batt-cool-decidegc = <50>;
qcom,batt-warm-ma = <350>;
qcom,batt-cool-ma = <350>;
qcom,batt-warm-mv = <4200>;
qcom,batt-cool-mv = <4200>;
qcom,parallel-usb-min-current-ma = <1300>;
qcom,parallel-usb-9v-min-current-ma = <900>;
qcom,parallel-usb-12v-min-current-ma = <900>;
qcom,parallel-allowed-lowering-ma = <500>;
qcom,parallel-main-chg-fcc-percent = <50>;
qcom,parallel-main-chg-icl-percent = <50>;
};
};
Example for parallel charger:
&i2c_11 {
smb1351-charger@1d {
compatible = "qcom,smb1351-charger";
reg = <0x1d>;
qcom,parallel-charger;
qcom,float-voltage-mv = <4400>;
qcom,recharge-mv = <100>;
};
};
|