1charger-manager bindings 2~~~~~~~~~~~~~~~~~~~~~~~~ 3 4Required properties : 5 - compatible : "charger-manager" 6 - <>-supply : for regulator consumer, named according to cm-regulator-name 7 - cm-chargers : name of chargers 8 - cm-fuel-gauge : name of battery fuel gauge 9 - subnode <regulator> : 10 - cm-regulator-name : name of charger regulator 11 - subnode <cable> : 12 - cm-cable-name : name of charger cable - one of USB, USB-HOST, 13 SDP, DCP, CDP, ACA, FAST-CHARGER, SLOW-CHARGER, WPT, 14 PD, DOCK, JIG, or MECHANICAL 15 - cm-cable-extcon : name of extcon dev 16(optional) - cm-cable-min : minimum current of cable 17(optional) - cm-cable-max : maximum current of cable 18 19Optional properties : 20 - cm-name : charger manager's name (default : "battery") 21 - cm-poll-mode : polling mode - 0 for disabled, 1 for always, 2 for when 22 external power is connected, or 3 for when charging. If not present, 23 then polling is disabled 24 - cm-poll-interval : polling interval (in ms) 25 - cm-battery-stat : battery status - 0 for battery always present, 1 for no 26 battery, 2 to check presence via fuel gauge, or 3 to check presence 27 via charger 28 - cm-fullbatt-vchkdrop-volt : voltage drop (in uV) before restarting charging 29 - cm-fullbatt-voltage : voltage (in uV) of full battery 30 - cm-fullbatt-soc : state of charge to consider as full battery 31 - cm-fullbatt-capacity : capcity (in uAh) to consider as full battery 32 - cm-thermal-zone : name of external thermometer's thermal zone 33 - cm-battery-* : threshold battery temperature for charging 34 -cold : critical cold temperature of battery for charging 35 -cold-in-minus : flag that cold temperature is in minus degrees 36 -hot : critical hot temperature of battery for charging 37 -temp-diff : temperature difference to allow recharging 38 - cm-dis/charging-max = limits of charging duration 39 40Deprecated properties: 41 - cm-num-chargers 42 - cm-fullbatt-vchkdrop-ms 43 44Example : 45 charger-manager@0 { 46 compatible = "charger-manager"; 47 chg-reg-supply = <&charger_regulator>; 48 49 cm-name = "battery"; 50 /* Always polling ON : 30s */ 51 cm-poll-mode = <1>; 52 cm-poll-interval = <30000>; 53 54 cm-fullbatt-vchkdrop-volt = <150000>; 55 cm-fullbatt-soc = <100>; 56 57 cm-battery-stat = <3>; 58 59 cm-chargers = "charger0", "charger1", "charger2"; 60 61 cm-fuel-gauge = "fuelgauge0"; 62 63 cm-thermal-zone = "thermal_zone.1" 64 /* in deci centigrade */ 65 cm-battery-cold = <50>; 66 cm-battery-cold-in-minus; 67 cm-battery-hot = <800>; 68 cm-battery-temp-diff = <100>; 69 70 /* Allow charging for 5hr */ 71 cm-charging-max = <18000000>; 72 /* Allow discharging for 2hr */ 73 cm-discharging-max = <7200000>; 74 75 regulator@0 { 76 cm-regulator-name = "chg-reg"; 77 cable@0 { 78 cm-cable-name = "USB"; 79 cm-cable-extcon = "extcon-dev.0"; 80 cm-cable-min = <475000>; 81 cm-cable-max = <500000>; 82 }; 83 cable@1 { 84 cm-cable-name = "SDP"; 85 cm-cable-extcon = "extcon-dev.0"; 86 cm-cable-min = <650000>; 87 cm-cable-max = <675000>; 88 }; 89 }; 90 91 }; 92