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