xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/charger-manager.txt (revision d485c77f203fb0f4cdc08dea5ff81631b51d8809)
1charger-manager bindings
2~~~~~~~~~~~~~~~~~~~~~~~~
3
4Required properties :
5 - compatible : "charger-manager"
6 - <>-supply : for regulator consumer
7 - cm-num-chargers : number of chargers
8 - cm-chargers : name of chargers
9 - cm-fuel-gauge : name of battery fuel gauge
10 - subnode <regulator> :
11	- cm-regulator-name : name of charger regulator
12	- subnode <cable> :
13		- cm-cable-name : name of charger cable
14		- cm-cable-extcon : name of extcon dev
15(optional)	- cm-cable-min : minimum current of cable
16(optional)	- cm-cable-max : maximum current of cable
17
18Optional properties :
19 - cm-name : charger manager's name (default : "battery")
20 - cm-poll-mode : polling mode (enum polling_modes)
21 - cm-poll-interval : polling interval
22 - cm-battery-stat : battery status (enum data_source)
23 - cm-fullbatt-* : data for full battery checking
24 - cm-thermal-zone : name of external thermometer's thermal zone
25 - cm-battery-* : threshold battery temperature for charging
26	-cold : critical cold temperature of battery for charging
27	-cold-in-minus : flag that cold temperature is in minus degrees
28	-hot : critical hot temperature of battery for charging
29	-temp-diff : temperature difference to allow recharging
30 - cm-dis/charging-max = limits of charging duration
31
32Example :
33	charger-manager@0 {
34		compatible = "charger-manager";
35		chg-reg-supply = <&charger_regulator>;
36
37		cm-name = "battery";
38		/* Always polling ON : 30s */
39		cm-poll-mode = <1>;
40		cm-poll-interval = <30000>;
41
42		cm-fullbatt-vchkdrop-ms = <30000>;
43		cm-fullbatt-vchkdrop-volt = <150000>;
44		cm-fullbatt-soc = <100>;
45
46		cm-battery-stat = <3>;
47
48		cm-num-chargers = <3>;
49		cm-chargers = "charger0", "charger1", "charger2";
50
51		cm-fuel-gauge = "fuelgauge0";
52
53		cm-thermal-zone = "thermal_zone.1"
54		/* in deci centigrade */
55		cm-battery-cold = <50>;
56		cm-battery-cold-in-minus;
57		cm-battery-hot = <800>;
58		cm-battery-temp-diff = <100>;
59
60		/* Allow charging for 5hr */
61		cm-charging-max = <18000000>;
62		/* Allow discharging for 2hr */
63		cm-discharging-max = <7200000>;
64
65		regulator@0 {
66			cm-regulator-name = "chg-reg";
67			cable@0 {
68				cm-cable-name = "USB";
69				cm-cable-extcon = "extcon-dev.0";
70				cm-cable-min = <475000>;
71				cm-cable-max = <500000>;
72			};
73			cable@1 {
74				cm-cable-name = "TA";
75				cm-cable-extcon = "extcon-dev.0";
76				cm-cable-min = <650000>;
77				cm-cable-max = <675000>;
78			};
79		};
80
81	};
82