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/qcom,pm8941-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Qualcomm Switch-Mode Battery Charger an 7 title: Qualcomm Switch-Mode Battery Charger and Boost 8 8 9 maintainers: 9 maintainers: 10 - Sebastian Reichel <sre@kernel.org> 10 - Sebastian Reichel <sre@kernel.org> 11 11 12 properties: 12 properties: 13 compatible: 13 compatible: 14 enum: 14 enum: 15 - qcom,pm8226-charger 15 - qcom,pm8226-charger 16 - qcom,pm8941-charger 16 - qcom,pm8941-charger 17 17 18 reg: 18 reg: 19 maxItems: 1 19 maxItems: 1 20 20 21 interrupts: 21 interrupts: 22 items: 22 items: 23 - description: charge done 23 - description: charge done 24 - description: charge fast mode 24 - description: charge fast mode 25 - description: charge trickle mode 25 - description: charge trickle mode 26 - description: battery temperature ok 26 - description: battery temperature ok 27 - description: battery present 27 - description: battery present 28 - description: charger disconnected 28 - description: charger disconnected 29 - description: USB-in valid 29 - description: USB-in valid 30 - description: DC-in valid 30 - description: DC-in valid 31 31 32 interrupt-names: 32 interrupt-names: 33 items: 33 items: 34 - const: chg-done 34 - const: chg-done 35 - const: chg-fast 35 - const: chg-fast 36 - const: chg-trkl 36 - const: chg-trkl 37 - const: bat-temp-ok 37 - const: bat-temp-ok 38 - const: bat-present 38 - const: bat-present 39 - const: chg-gone 39 - const: chg-gone 40 - const: usb-valid 40 - const: usb-valid 41 - const: dc-valid 41 - const: dc-valid 42 42 43 qcom,fast-charge-current-limit: 43 qcom,fast-charge-current-limit: 44 $ref: /schemas/types.yaml#/definitions/uin 44 $ref: /schemas/types.yaml#/definitions/uint32 45 minimum: 100000 45 minimum: 100000 46 maximum: 3000000 46 maximum: 3000000 47 description: Maximum charge current in uA; 47 description: Maximum charge current in uA; May be clamped to safety limits; Defaults to 1A 48 48 49 qcom,fast-charge-low-threshold-voltage: 49 qcom,fast-charge-low-threshold-voltage: 50 $ref: /schemas/types.yaml#/definitions/uin 50 $ref: /schemas/types.yaml#/definitions/uint32 51 minimum: 2100000 51 minimum: 2100000 52 maximum: 3600000 52 maximum: 3600000 53 description: | 53 description: | 54 Battery voltage limit in uV above which 54 Battery voltage limit in uV above which fast charging may operate; Defaults to 3.2V 55 Below this value linear or switch-mode a 55 Below this value linear or switch-mode auto-trickle-charging will operate. 56 56 57 qcom,fast-charge-high-threshold-voltage: 57 qcom,fast-charge-high-threshold-voltage: 58 $ref: /schemas/types.yaml#/definitions/uin 58 $ref: /schemas/types.yaml#/definitions/uint32 59 minimum: 3240000 59 minimum: 3240000 60 maximum: 5000000 60 maximum: 5000000 61 description: | 61 description: | 62 Battery voltage limit in uV below which 62 Battery voltage limit in uV below which fast charging may operate; Defaults to 4.2V 63 The fast charger will attempt to charge 63 The fast charger will attempt to charge the battery to this voltage. 64 May be clamped to safety limits. 64 May be clamped to safety limits. 65 65 66 qcom,fast-charge-safe-voltage: 66 qcom,fast-charge-safe-voltage: 67 $ref: /schemas/types.yaml#/definitions/uin 67 $ref: /schemas/types.yaml#/definitions/uint32 68 minimum: 3240000 68 minimum: 3240000 69 maximum: 5000000 69 maximum: 5000000 70 description: | 70 description: | 71 Maximum safe battery voltage in uV; May 71 Maximum safe battery voltage in uV; May be pre-set by bootloader, in which case, 72 setting this will harmlessly fail. The p 72 setting this will harmlessly fail. The property 'fast-charge-high-watermark' will 73 be clamped by this value. Defaults to 4. 73 be clamped by this value. Defaults to 4.2V. 74 74 75 qcom,fast-charge-safe-current: 75 qcom,fast-charge-safe-current: 76 $ref: /schemas/types.yaml#/definitions/uin 76 $ref: /schemas/types.yaml#/definitions/uint32 77 minimum: 100000 77 minimum: 100000 78 maximum: 3000000 78 maximum: 3000000 79 description: | 79 description: | 80 Maximum safe battery charge current in u 80 Maximum safe battery charge current in uA; May pre-set by bootloader, in which case, 81 setting this will harmlessly fail. The p 81 setting this will harmlessly fail. The property 'qcom,fast-charge-current-limit' 82 will be clamped by this value. Defaults 82 will be clamped by this value. Defaults to 1A. 83 83 84 qcom,auto-recharge-threshold-voltage: 84 qcom,auto-recharge-threshold-voltage: 85 $ref: /schemas/types.yaml#/definitions/uin 85 $ref: /schemas/types.yaml#/definitions/uint32 86 minimum: 3240000 86 minimum: 3240000 87 maximum: 5000000 87 maximum: 5000000 88 description: | 88 description: | 89 Battery voltage limit in uV below which 89 Battery voltage limit in uV below which auto-recharge functionality will restart charging 90 after end-of-charge; The high cutoff lim 90 after end-of-charge; The high cutoff limit for auto-recharge is 5% above this value. 91 Defaults to 4.1V. 91 Defaults to 4.1V. 92 92 93 qcom,minimum-input-voltage: 93 qcom,minimum-input-voltage: 94 $ref: /schemas/types.yaml#/definitions/uin 94 $ref: /schemas/types.yaml#/definitions/uint32 95 minimum: 4200000 95 minimum: 4200000 96 maximum: 9600000 96 maximum: 9600000 97 description: | 97 description: | 98 Input voltage level in uV above which ch 98 Input voltage level in uV above which charging may operate. Defaults to 4.3V. 99 99 100 qcom,dc-current-limit: 100 qcom,dc-current-limit: 101 $ref: /schemas/types.yaml#/definitions/uin 101 $ref: /schemas/types.yaml#/definitions/uint32 102 minimum: 100000 102 minimum: 100000 103 maximum: 2500000 103 maximum: 2500000 104 description: | 104 description: | 105 Default DC charge current limit in uA. D 105 Default DC charge current limit in uA. Defaults to 100mA. 106 106 107 qcom,disable-dc: 107 qcom,disable-dc: 108 type: boolean 108 type: boolean 109 description: Disable DC charger 109 description: Disable DC charger 110 110 111 qcom,jeita-extended-temp-range: 111 qcom,jeita-extended-temp-range: 112 type: boolean 112 type: boolean 113 description: | 113 description: | 114 Enable JEITA extended temperature range; 114 Enable JEITA extended temperature range; This does *not* adjust the maximum charge 115 voltage or current in the extended tempe 115 voltage or current in the extended temperature range. It only allows charging when 116 the battery is in the extended temperatu 116 the battery is in the extended temperature range. Voltage/current regulation must 117 be done externally to fully comply with 117 be done externally to fully comply with the JEITA safety guidelines if this flag 118 is set. 118 is set. 119 119 120 usb-charge-current-limit: 120 usb-charge-current-limit: 121 $ref: /schemas/types.yaml#/definitions/uin 121 $ref: /schemas/types.yaml#/definitions/uint32 122 minimum: 100000 122 minimum: 100000 123 maximum: 2500000 123 maximum: 2500000 124 description: | 124 description: | 125 Default USB charge current limit in uA. 125 Default USB charge current limit in uA. 126 126 127 usb-otg-in-supply: 127 usb-otg-in-supply: 128 description: Reference to the regulator su 128 description: Reference to the regulator supplying power to the USB_OTG_IN pin. 129 129 130 otg-vbus: 130 otg-vbus: 131 $ref: /schemas/regulator/regulator.yaml# 131 $ref: /schemas/regulator/regulator.yaml# 132 description: | 132 description: | 133 This node defines a regulator used to co 133 This node defines a regulator used to control the direction of VBUS voltage. 134 Specifically whether to supply voltage t 134 Specifically whether to supply voltage to VBUS for host mode operation of the OTG port, 135 or allow input voltage from external VBU 135 or allow input voltage from external VBUS for charging. In the hardware, the supply for 136 this regulator comes from usb_otg_in-sup 136 this regulator comes from usb_otg_in-supply. 137 137 138 required: 138 required: 139 - compatible 139 - compatible 140 - reg 140 - reg 141 - interrupts 141 - interrupts 142 - interrupt-names 142 - interrupt-names 143 143 144 additionalProperties: false 144 additionalProperties: false 145 145 146 examples: 146 examples: 147 - | 147 - | 148 #include <dt-bindings/interrupt-controller 148 #include <dt-bindings/interrupt-controller/irq.h> 149 pmic { 149 pmic { 150 #address-cells = <1>; 150 #address-cells = <1>; 151 #size-cells = <0>; 151 #size-cells = <0>; 152 152 153 charger@1000 { 153 charger@1000 { 154 compatible = "qcom,pm8941-charger"; 154 compatible = "qcom,pm8941-charger"; 155 reg = <0x1000>; 155 reg = <0x1000>; 156 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE 156 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, 157 <0x0 0x10 5 IRQ_TYPE_EDGE 157 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, 158 <0x0 0x10 4 IRQ_TYPE_EDGE 158 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, 159 <0x0 0x12 1 IRQ_TYPE_EDGE 159 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, 160 <0x0 0x12 0 IRQ_TYPE_EDGE 160 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, 161 <0x0 0x13 2 IRQ_TYPE_EDGE 161 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, 162 <0x0 0x13 1 IRQ_TYPE_EDGE 162 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, 163 <0x0 0x14 1 IRQ_TYPE_EDGE 163 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; 164 interrupt-names = "chg-done", 164 interrupt-names = "chg-done", 165 "chg-fast", 165 "chg-fast", 166 "chg-trkl", 166 "chg-trkl", 167 "bat-temp-ok", 167 "bat-temp-ok", 168 "bat-present", 168 "bat-present", 169 "chg-gone", 169 "chg-gone", 170 "usb-valid", 170 "usb-valid", 171 "dc-valid"; 171 "dc-valid"; 172 qcom,fast-charge-current-limit = <1000 172 qcom,fast-charge-current-limit = <1000000>; 173 qcom,dc-current-limit = <1000000>; 173 qcom,dc-current-limit = <1000000>; 174 usb-otg-in-supply = <&pm8941_5vs1>; 174 usb-otg-in-supply = <&pm8941_5vs1>; 175 175 176 otg-vbus {}; 176 otg-vbus {}; 177 }; 177 }; 178 }; 178 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.