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
|
* bq2419x charger devicetree bindings
Required properties:
- compatible : Should be from the list
ti,bq2419x
to be drawn by the charger from the power source.
Required nodes:
- regulators: There must a regulator subnode each for the following purposes:
(1) Setting battery charging current.
(2) Enabling current supply to vbus (To enable otg mode)
Each of these regulator nodes must have atleast one consumer
subnode which in turn must have certain mandatory properties
supplied. To know about these mandatory properties and more about
consumer subnodes, please refer
Documentation/devicetree/bindings/regulator/regulator.txt
Additional properties to be added to charger regulator subnode:
Required properties:
- auto-recharge-time : Time interval in seconds after which the charging
should be restarted after the charging is complete.
Optional properties:
- watchdog-timeout : Watchdog timer expiry timeout value in seconds.
When not specified, watchdog timer functionality
will be disabled.
- rtc-alarm-time : Time setting in seconds for the rtc alarm timer
which wakes the board up for charging after shutdown.
- ti,temp-range: List of temperatures in degC for thermal profiling.
- ti,charge-current-limit: List of fast charging current limit in mA for
thermal profiling.
this property is deprecated. Instead use the property name as
ti,charge-thermal-current-limit.
- ti,charge-thermal-voltage-limit: List of charging voltage limit in mV for
thermal profiling.
The values are provided as
ti,temp-range = <15 60>;
ti,charge-current-limit = <2048 5200>;
ti,charge-thermal-voltage-limit = <4200 4300>;
This will set chargign current limit to
2048 for <= 15 degC and
5200 for 16 to 60 degC
This will result:
< 0 -> Charger disable. (As by HW)
0 to 10 -> 1048mA charging current limit (as by 50% HW)
11 to 15 -> 2048mA
16 to 60 -> 5200 mA
> 60 : Charging will be disabled by HW.
-ti,auto-recharge-time-suspend: time setting in seconds to register
rtc alarm timer to wake the device from LP0.
Subnode properties:
==================
There is two optional subnodes, vbus and charger.
vbus properties:
================
otg-iusb-gpio: The GPIO which is connected to OTG/IUSB pin.
Example
bq2419x: bq2419x@6b {
compatible = "ti,bq2419x";
reg = <0x6b>;
ti,charging-term-current-mA = <100>;
charger {
regulator-name = "batt_regulator";
regulator-max-microamp = <3000>;
ti,watchdog-timeout = <40>;
ti,rtc-alarm-time = <3600>;
ti,auto-recharge-time = <1800>;
consumers {
c1 {
regulator-consumer-supply = "usb_bat_chg";
regulator-consumer-device = "tegra-udc.0";
};
};
};
vbus {
regulator-name = "vbus_regulator";
consumers {
c1 {
regulator-consumer-supply = "usb_vbus";
regulator-consumer-device = "tegra-ehci.0";
};
c2 {
regulator-consumer-supply = "usb_vbus";
regulator-consumer-device = "tegra-otg";
};
};
};
};
|