1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/power/suppl 4 $id: http://devicetree.org/schemas/power/supply/charger-manager.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Charger Manager 7 title: Charger Manager 8 8 9 maintainers: 9 maintainers: 10 - Sebastian Reichel <sre@kernel.org> 10 - Sebastian Reichel <sre@kernel.org> 11 11 12 description: | 12 description: | 13 Binding for the legacy charger manager drive 13 Binding for the legacy charger manager driver. 14 Please do not use for new products. 14 Please do not use for new products. 15 15 16 properties: 16 properties: 17 compatible: 17 compatible: 18 const: charger-manager 18 const: charger-manager 19 19 20 cm-chargers: 20 cm-chargers: 21 description: name of chargers 21 description: name of chargers 22 $ref: /schemas/types.yaml#/definitions/str 22 $ref: /schemas/types.yaml#/definitions/string-array 23 23 24 cm-num-chargers: 24 cm-num-chargers: 25 $ref: /schemas/types.yaml#/definitions/uin 25 $ref: /schemas/types.yaml#/definitions/uint32 26 deprecated: true 26 deprecated: true 27 27 28 cm-fuel-gauge: 28 cm-fuel-gauge: 29 description: name of battery fuel gauge 29 description: name of battery fuel gauge 30 $ref: /schemas/types.yaml#/definitions/str 30 $ref: /schemas/types.yaml#/definitions/string 31 31 32 cm-name: 32 cm-name: 33 description: name of the charger manager 33 description: name of the charger manager 34 default: battery 34 default: battery 35 $ref: /schemas/types.yaml#/definitions/str 35 $ref: /schemas/types.yaml#/definitions/string 36 36 37 cm-poll-mode: 37 cm-poll-mode: 38 description: polling mode 38 description: polling mode 39 $ref: /schemas/types.yaml#/definitions/uin 39 $ref: /schemas/types.yaml#/definitions/uint32 40 default: 0 40 default: 0 41 enum: 41 enum: 42 - 0 # disabled 42 - 0 # disabled 43 - 1 # always 43 - 1 # always 44 - 2 # when external power is connected 44 - 2 # when external power is connected 45 - 3 # when charging 45 - 3 # when charging 46 46 47 cm-poll-interval: 47 cm-poll-interval: 48 description: polling interval (in ms) 48 description: polling interval (in ms) 49 $ref: /schemas/types.yaml#/definitions/uin 49 $ref: /schemas/types.yaml#/definitions/uint32 50 50 51 cm-battery-stat: 51 cm-battery-stat: 52 description: battery status 52 description: battery status 53 $ref: /schemas/types.yaml#/definitions/uin << 54 enum: 53 enum: 55 - 0 # battery always present 54 - 0 # battery always present 56 - 1 # no battery 55 - 1 # no battery 57 - 2 # check presence via fuel gauge 56 - 2 # check presence via fuel gauge 58 - 3 # check presence via charger 57 - 3 # check presence via charger 59 58 60 cm-fullbatt-vchkdrop-volt: 59 cm-fullbatt-vchkdrop-volt: 61 description: voltage drop before restartin 60 description: voltage drop before restarting charging in uV 62 $ref: /schemas/types.yaml#/definitions/uin 61 $ref: /schemas/types.yaml#/definitions/uint32 63 62 64 cm-fullbatt-vchkdrop-ms: 63 cm-fullbatt-vchkdrop-ms: 65 deprecated: true 64 deprecated: true 66 65 67 cm-fullbatt-voltage: 66 cm-fullbatt-voltage: 68 description: voltage of full battery in uV 67 description: voltage of full battery in uV 69 $ref: /schemas/types.yaml#/definitions/uin 68 $ref: /schemas/types.yaml#/definitions/uint32 70 69 71 cm-fullbatt-soc: 70 cm-fullbatt-soc: 72 description: state of charge to consider a 71 description: state of charge to consider as full battery in % 73 $ref: /schemas/types.yaml#/definitions/uin 72 $ref: /schemas/types.yaml#/definitions/uint32 74 73 75 cm-fullbatt-capacity: 74 cm-fullbatt-capacity: 76 description: capcity to consider as full b 75 description: capcity to consider as full battery in uAh 77 $ref: /schemas/types.yaml#/definitions/uin 76 $ref: /schemas/types.yaml#/definitions/uint32 78 77 79 cm-thermal-zone: 78 cm-thermal-zone: 80 description: name of external thermometer' 79 description: name of external thermometer's thermal zone 81 $ref: /schemas/types.yaml#/definitions/str 80 $ref: /schemas/types.yaml#/definitions/string 82 81 83 cm-discharging-max: 82 cm-discharging-max: 84 description: limits of discharging duratio 83 description: limits of discharging duration in ms 85 $ref: /schemas/types.yaml#/definitions/uin 84 $ref: /schemas/types.yaml#/definitions/uint32 86 85 87 cm-charging-max: 86 cm-charging-max: 88 description: limits of charging duration i 87 description: limits of charging duration in ms 89 $ref: /schemas/types.yaml#/definitions/uin 88 $ref: /schemas/types.yaml#/definitions/uint32 90 89 91 cm-battery-cold: 90 cm-battery-cold: 92 description: critical cold temperature of 91 description: critical cold temperature of battery for charging in deci-degree celsius 93 $ref: /schemas/types.yaml#/definitions/uin 92 $ref: /schemas/types.yaml#/definitions/uint32 94 93 95 cm-battery-cold-in-minus: 94 cm-battery-cold-in-minus: 96 description: if set cm-battery-cold temper 95 description: if set cm-battery-cold temperature is in minus degrees 97 type: boolean 96 type: boolean 98 97 99 cm-battery-hot: 98 cm-battery-hot: 100 description: critical hot temperature of b 99 description: critical hot temperature of battery for charging in deci-degree celsius 101 $ref: /schemas/types.yaml#/definitions/uin 100 $ref: /schemas/types.yaml#/definitions/uint32 102 101 103 cm-battery-temp-diff: 102 cm-battery-temp-diff: 104 description: temperature difference to all 103 description: temperature difference to allow recharging in deci-degree celsius 105 $ref: /schemas/types.yaml#/definitions/uin 104 $ref: /schemas/types.yaml#/definitions/uint32 106 105 107 patternProperties: 106 patternProperties: 108 "-supply$": 107 "-supply$": 109 description: regulator consumer, named acc 108 description: regulator consumer, named according to cm-regulator-name 110 $ref: /schemas/types.yaml#/definitions/pha 109 $ref: /schemas/types.yaml#/definitions/phandle 111 110 112 "^regulator[@-][0-9]$": 111 "^regulator[@-][0-9]$": 113 type: object 112 type: object 114 properties: 113 properties: 115 cm-regulator-name: 114 cm-regulator-name: 116 description: name of charger regulator 115 description: name of charger regulator 117 $ref: /schemas/types.yaml#/definitions 116 $ref: /schemas/types.yaml#/definitions/string 118 117 119 required: 118 required: 120 - cm-regulator-name 119 - cm-regulator-name 121 120 122 additionalProperties: false 121 additionalProperties: false 123 122 124 patternProperties: 123 patternProperties: 125 "^cable[@-][0-9]$": 124 "^cable[@-][0-9]$": 126 type: object 125 type: object 127 properties: 126 properties: 128 cm-cable-name: 127 cm-cable-name: 129 description: name of charger cable 128 description: name of charger cable 130 enum: 129 enum: 131 - USB 130 - USB 132 - USB-HOST 131 - USB-HOST 133 - SDP 132 - SDP 134 - DCP 133 - DCP 135 - CDP 134 - CDP 136 - ACA 135 - ACA 137 - FAST-CHARGER 136 - FAST-CHARGER 138 - SLOW-CHARGER 137 - SLOW-CHARGER 139 - WPT 138 - WPT 140 - PD 139 - PD 141 - DOCK 140 - DOCK 142 - JIG 141 - JIG 143 - MECHANICAL 142 - MECHANICAL 144 143 145 cm-cable-extcon: 144 cm-cable-extcon: 146 description: name of extcon dev 145 description: name of extcon dev 147 $ref: /schemas/types.yaml#/definit 146 $ref: /schemas/types.yaml#/definitions/string 148 147 149 cm-cable-min: 148 cm-cable-min: 150 description: minimum current of ca 149 description: minimum current of cable in uA 151 $ref: /schemas/types.yaml#/definit 150 $ref: /schemas/types.yaml#/definitions/uint32 152 151 153 cm-cable-max: 152 cm-cable-max: 154 description: maximum current of ca 153 description: maximum current of cable in uA 155 $ref: /schemas/types.yaml#/definit 154 $ref: /schemas/types.yaml#/definitions/uint32 156 155 157 required: 156 required: 158 - cm-cable-name 157 - cm-cable-name 159 - cm-cable-extcon 158 - cm-cable-extcon 160 159 161 additionalProperties: false 160 additionalProperties: false 162 161 163 required: 162 required: 164 - compatible 163 - compatible 165 - cm-chargers 164 - cm-chargers 166 - cm-fuel-gauge 165 - cm-fuel-gauge 167 166 168 additionalProperties: false 167 additionalProperties: false 169 168 170 examples: 169 examples: 171 - | 170 - | 172 charger-manager { 171 charger-manager { 173 compatible = "charger-manager"; 172 compatible = "charger-manager"; 174 chg-reg-supply = <&charger_regulator>; 173 chg-reg-supply = <&charger_regulator>; 175 174 176 cm-name = "battery"; 175 cm-name = "battery"; 177 /* Always polling ON : 30s */ 176 /* Always polling ON : 30s */ 178 cm-poll-mode = <1>; 177 cm-poll-mode = <1>; 179 cm-poll-interval = <30000>; 178 cm-poll-interval = <30000>; 180 179 181 cm-fullbatt-vchkdrop-volt = <150000>; 180 cm-fullbatt-vchkdrop-volt = <150000>; 182 cm-fullbatt-soc = <100>; 181 cm-fullbatt-soc = <100>; 183 182 184 cm-battery-stat = <3>; 183 cm-battery-stat = <3>; 185 184 186 cm-chargers = "charger0", "charger1", 185 cm-chargers = "charger0", "charger1", "charger2"; 187 186 188 cm-fuel-gauge = "fuelgauge0"; 187 cm-fuel-gauge = "fuelgauge0"; 189 188 190 cm-thermal-zone = "thermal_zone.1"; 189 cm-thermal-zone = "thermal_zone.1"; 191 /* in deci centigrade */ 190 /* in deci centigrade */ 192 cm-battery-cold = <50>; 191 cm-battery-cold = <50>; 193 cm-battery-cold-in-minus; 192 cm-battery-cold-in-minus; 194 cm-battery-hot = <800>; 193 cm-battery-hot = <800>; 195 cm-battery-temp-diff = <100>; 194 cm-battery-temp-diff = <100>; 196 195 197 /* Allow charging for 5hr */ 196 /* Allow charging for 5hr */ 198 cm-charging-max = <18000000>; 197 cm-charging-max = <18000000>; 199 /* Allow discharging for 2hr */ 198 /* Allow discharging for 2hr */ 200 cm-discharging-max = <7200000>; 199 cm-discharging-max = <7200000>; 201 200 202 regulator-0 { 201 regulator-0 { 203 cm-regulator-name = "chg-reg"; 202 cm-regulator-name = "chg-reg"; 204 cable-0 { 203 cable-0 { 205 cm-cable-name = "USB"; 204 cm-cable-name = "USB"; 206 cm-cable-extcon = "extcon-dev. 205 cm-cable-extcon = "extcon-dev.0"; 207 cm-cable-min = <475000>; 206 cm-cable-min = <475000>; 208 cm-cable-max = <500000>; 207 cm-cable-max = <500000>; 209 }; 208 }; 210 cable-1 { 209 cable-1 { 211 cm-cable-name = "SDP"; 210 cm-cable-name = "SDP"; 212 cm-cable-extcon = "extcon-dev. 211 cm-cable-extcon = "extcon-dev.0"; 213 cm-cable-min = <650000>; 212 cm-cable-min = <650000>; 214 cm-cable-max = <675000>; 213 cm-cable-max = <675000>; 215 }; 214 }; 216 }; 215 }; 217 }; 216 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.