xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/supply/qcom_smbb.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunQualcomm Switch-Mode Battery Charger and Boost
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunPROPERTIES
4*4882a593Smuzhiyun- compatible:
5*4882a593Smuzhiyun  Usage: required
6*4882a593Smuzhiyun  Value type: <stringlist>
7*4882a593Smuzhiyun  Description: Must be one of:
8*4882a593Smuzhiyun               - "qcom,pm8941-charger"
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun- reg:
11*4882a593Smuzhiyun  Usage: required
12*4882a593Smuzhiyun  Value type: <prop-encoded-array>
13*4882a593Smuzhiyun  Description: Base address of registers for SMBB block
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- interrupts:
16*4882a593Smuzhiyun  Usage: required
17*4882a593Smuzhiyun  Value type: <prop-encoded-array>
18*4882a593Smuzhiyun  Description: The format of the specifier is defined by the binding document
19*4882a593Smuzhiyun               describing the node's interrupt parent.  Must contain one
20*4882a593Smuzhiyun               specifier for each of the following interrupts, in order:
21*4882a593Smuzhiyun               - charge done
22*4882a593Smuzhiyun               - charge fast mode
23*4882a593Smuzhiyun               - charge trickle mode
24*4882a593Smuzhiyun               - battery temperature ok
25*4882a593Smuzhiyun               - battery present
26*4882a593Smuzhiyun               - charger disconnected
27*4882a593Smuzhiyun               - USB-in valid
28*4882a593Smuzhiyun               - DC-in valid
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun- interrupt-names:
31*4882a593Smuzhiyun  Usage: required
32*4882a593Smuzhiyun  Value type: <stringlist>
33*4882a593Smuzhiyun  Description: Must contain the following list, strictly ordered:
34*4882a593Smuzhiyun               "chg-done",
35*4882a593Smuzhiyun               "chg-fast",
36*4882a593Smuzhiyun               "chg-trkl",
37*4882a593Smuzhiyun               "bat-temp-ok",
38*4882a593Smuzhiyun               "bat-present",
39*4882a593Smuzhiyun               "chg-gone",
40*4882a593Smuzhiyun               "usb-valid",
41*4882a593Smuzhiyun               "dc-valid"
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun- qcom,fast-charge-current-limit:
44*4882a593Smuzhiyun  Usage: optional (default: 1A, or pre-configured value)
45*4882a593Smuzhiyun  Value type: <u32>; uA; range [100mA : 3A]
46*4882a593Smuzhiyun  Description: Maximum charge current; May be clamped to safety limits.
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun- qcom,fast-charge-low-threshold-voltage:
49*4882a593Smuzhiyun  Usage: optional (default: 3.2V, or pre-configured value)
50*4882a593Smuzhiyun  Value type: <u32>; uV; range [2.1V : 3.6V]
51*4882a593Smuzhiyun  Description: Battery voltage limit above which fast charging may operate;
52*4882a593Smuzhiyun               Below this value linear or switch-mode auto-trickle-charging
53*4882a593Smuzhiyun               will operate.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun- qcom,fast-charge-high-threshold-voltage:
56*4882a593Smuzhiyun  Usage: optional (default: 4.2V, or pre-configured value)
57*4882a593Smuzhiyun  Value type: <u32>; uV; range [3.24V : 5V]
58*4882a593Smuzhiyun  Description: Battery voltage limit below which fast charging may operate;
59*4882a593Smuzhiyun               The fast charger will attempt to charge the battery to this
60*4882a593Smuzhiyun               voltage.  May be clamped to safety limits.
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun- qcom,fast-charge-safe-voltage:
63*4882a593Smuzhiyun  Usage: optional (default: 4.2V, or pre-configured value)
64*4882a593Smuzhiyun  Value type: <u32>; uV; range [3.24V : 5V]
65*4882a593Smuzhiyun  Description: Maximum safe battery voltage; May be pre-set by bootloader, in
66*4882a593Smuzhiyun               which case, setting this will harmlessly fail. The property
67*4882a593Smuzhiyun               'fast-charge-high-watermark' will be clamped by this value.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun- qcom,fast-charge-safe-current:
70*4882a593Smuzhiyun  Usage: optional (default: 1A, or pre-configured value)
71*4882a593Smuzhiyun  Value type: <u32>; uA; range [100mA : 3A]
72*4882a593Smuzhiyun  Description: Maximum safe battery charge current; May pre-set by bootloader,
73*4882a593Smuzhiyun               in which case, setting this will harmlessly fail. The property
74*4882a593Smuzhiyun               'qcom,fast-charge-current-limit' will be clamped by this value.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun- qcom,auto-recharge-threshold-voltage:
77*4882a593Smuzhiyun  Usage: optional (default: 4.1V, or pre-configured value)
78*4882a593Smuzhiyun  Value type: <u32>; uV; range [3.24V : 5V]
79*4882a593Smuzhiyun  Description: Battery voltage limit below which auto-recharge functionality
80*4882a593Smuzhiyun               will restart charging after end-of-charge;  The high cutoff
81*4882a593Smuzhiyun               limit for auto-recharge is 5% above this value.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun- qcom,minimum-input-voltage:
84*4882a593Smuzhiyun  Usage: optional (default: 4.3V, or pre-configured value)
85*4882a593Smuzhiyun  Value type: <u32>; uV; range [4.2V : 9.6V]
86*4882a593Smuzhiyun  Description: Input voltage level above which charging may operate
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun- qcom,dc-current-limit:
89*4882a593Smuzhiyun  Usage: optional (default: 100mA, or pre-configured value)
90*4882a593Smuzhiyun  Value type: <u32>; uA; range [100mA : 2.5A]
91*4882a593Smuzhiyun  Description: Default DC charge current limit
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun- qcom,disable-dc:
94*4882a593Smuzhiyun  Usage: optional (default: false)
95*4882a593Smuzhiyun  Value type: boolean: <u32> or <empty>
96*4882a593Smuzhiyun  Description: Disable DC charger
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun- qcom,jeita-extended-temp-range:
99*4882a593Smuzhiyun  Usage: optional (default: false)
100*4882a593Smuzhiyun  Value type: boolean: <u32> or <empty>
101*4882a593Smuzhiyun  Description: Enable JEITA extended temperature range;  This does *not*
102*4882a593Smuzhiyun               adjust the maximum charge voltage or current in the extended
103*4882a593Smuzhiyun               temperature range.  It only allows charging when the battery
104*4882a593Smuzhiyun               is in the extended temperature range.  Voltage/current
105*4882a593Smuzhiyun               regulation must be done externally to fully comply with
106*4882a593Smuzhiyun               the JEITA safety guidelines if this flag is set.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun- usb_otg_in-supply:
109*4882a593Smuzhiyun  Usage: optional
110*4882a593Smuzhiyun  Value type: <phandle>
111*4882a593Smuzhiyun  Description: Reference to the regulator supplying power to the USB_OTG_IN
112*4882a593Smuzhiyun               pin.
113*4882a593Smuzhiyun
114*4882a593Smuzhiyunchild nodes:
115*4882a593Smuzhiyun- otg-vbus:
116*4882a593Smuzhiyun  Usage: optional
117*4882a593Smuzhiyun  Description: This node defines a regulator used to control the direction
118*4882a593Smuzhiyun               of VBUS voltage - specifically: whether to supply voltage
119*4882a593Smuzhiyun               to VBUS for host mode operation of the OTG port, or allow
120*4882a593Smuzhiyun               input voltage from external VBUS for charging.  In the
121*4882a593Smuzhiyun               hardware, the supply for this regulator comes from
122*4882a593Smuzhiyun               usb_otg_in-supply.
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunEXAMPLE
125*4882a593Smuzhiyuncharger@1000 {
126*4882a593Smuzhiyun       compatible = "qcom,pm8941-charger";
127*4882a593Smuzhiyun       reg = <0x1000 0x700>;
128*4882a593Smuzhiyun       interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
129*4882a593Smuzhiyun                       <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
130*4882a593Smuzhiyun                       <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
131*4882a593Smuzhiyun                       <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
132*4882a593Smuzhiyun                       <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
133*4882a593Smuzhiyun                       <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
134*4882a593Smuzhiyun                       <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
135*4882a593Smuzhiyun                       <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
136*4882a593Smuzhiyun       interrupt-names = "chg-done",
137*4882a593Smuzhiyun                       "chg-fast",
138*4882a593Smuzhiyun                       "chg-trkl",
139*4882a593Smuzhiyun                       "bat-temp-ok",
140*4882a593Smuzhiyun                       "bat-present",
141*4882a593Smuzhiyun                       "chg-gone",
142*4882a593Smuzhiyun                       "usb-valid",
143*4882a593Smuzhiyun                       "dc-valid";
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun       qcom,fast-charge-current-limit = <1000000>;
146*4882a593Smuzhiyun       qcom,dc-charge-current-limit = <1000000>;
147*4882a593Smuzhiyun       usb_otg_in-supply = <&pm8941_5vs1>;
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun       otg-vbus {};
150*4882a593Smuzhiyun};
151