179 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/power/supply/qcom,pm8941-charger.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Qualcomm Switch-Mode Battery Charger and Boost8 9maintainers:10 - Sebastian Reichel <sre@kernel.org>11 12properties:13 compatible:14 enum:15 - qcom,pm8226-charger16 - qcom,pm8941-charger17 18 reg:19 maxItems: 120 21 interrupts:22 items:23 - description: charge done24 - description: charge fast mode25 - description: charge trickle mode26 - description: battery temperature ok27 - description: battery present28 - description: charger disconnected29 - description: USB-in valid30 - description: DC-in valid31 32 interrupt-names:33 items:34 - const: chg-done35 - const: chg-fast36 - const: chg-trkl37 - const: bat-temp-ok38 - const: bat-present39 - const: chg-gone40 - const: usb-valid41 - const: dc-valid42 43 qcom,fast-charge-current-limit:44 $ref: /schemas/types.yaml#/definitions/uint3245 minimum: 10000046 maximum: 300000047 description: Maximum charge current in uA; May be clamped to safety limits; Defaults to 1A48 49 qcom,fast-charge-low-threshold-voltage:50 $ref: /schemas/types.yaml#/definitions/uint3251 minimum: 210000052 maximum: 360000053 description: |54 Battery voltage limit in uV above which fast charging may operate; Defaults to 3.2V55 Below this value linear or switch-mode auto-trickle-charging will operate.56 57 qcom,fast-charge-high-threshold-voltage:58 $ref: /schemas/types.yaml#/definitions/uint3259 minimum: 324000060 maximum: 500000061 description: |62 Battery voltage limit in uV below which fast charging may operate; Defaults to 4.2V63 The fast charger will attempt to charge the battery to this voltage.64 May be clamped to safety limits.65 66 qcom,fast-charge-safe-voltage:67 $ref: /schemas/types.yaml#/definitions/uint3268 minimum: 324000069 maximum: 500000070 description: |71 Maximum safe battery voltage in uV; May be pre-set by bootloader, in which case,72 setting this will harmlessly fail. The property 'fast-charge-high-watermark' will73 be clamped by this value. Defaults to 4.2V.74 75 qcom,fast-charge-safe-current:76 $ref: /schemas/types.yaml#/definitions/uint3277 minimum: 10000078 maximum: 300000079 description: |80 Maximum safe battery charge current in uA; May pre-set by bootloader, in which case,81 setting this will harmlessly fail. The property 'qcom,fast-charge-current-limit'82 will be clamped by this value. Defaults to 1A.83 84 qcom,auto-recharge-threshold-voltage:85 $ref: /schemas/types.yaml#/definitions/uint3286 minimum: 324000087 maximum: 500000088 description: |89 Battery voltage limit in uV below which auto-recharge functionality will restart charging90 after end-of-charge; The high cutoff limit for auto-recharge is 5% above this value.91 Defaults to 4.1V.92 93 qcom,minimum-input-voltage:94 $ref: /schemas/types.yaml#/definitions/uint3295 minimum: 420000096 maximum: 960000097 description: |98 Input voltage level in uV above which charging may operate. Defaults to 4.3V.99 100 qcom,dc-current-limit:101 $ref: /schemas/types.yaml#/definitions/uint32102 minimum: 100000103 maximum: 2500000104 description: |105 Default DC charge current limit in uA. Defaults to 100mA.106 107 qcom,disable-dc:108 type: boolean109 description: Disable DC charger110 111 qcom,jeita-extended-temp-range:112 type: boolean113 description: |114 Enable JEITA extended temperature range; This does *not* adjust the maximum charge115 voltage or current in the extended temperature range. It only allows charging when116 the battery is in the extended temperature range. Voltage/current regulation must117 be done externally to fully comply with the JEITA safety guidelines if this flag118 is set.119 120 usb-charge-current-limit:121 $ref: /schemas/types.yaml#/definitions/uint32122 minimum: 100000123 maximum: 2500000124 description: |125 Default USB charge current limit in uA.126 127 usb-otg-in-supply:128 description: Reference to the regulator supplying power to the USB_OTG_IN pin.129 130 otg-vbus:131 $ref: /schemas/regulator/regulator.yaml#132 description: |133 This node defines a regulator used to control the direction of VBUS voltage.134 Specifically whether to supply voltage to VBUS for host mode operation of the OTG port,135 or allow input voltage from external VBUS for charging. In the hardware, the supply for136 this regulator comes from usb_otg_in-supply.137 138required:139 - compatible140 - reg141 - interrupts142 - interrupt-names143 144additionalProperties: false145 146examples:147 - |148 #include <dt-bindings/interrupt-controller/irq.h>149 pmic {150 #address-cells = <1>;151 #size-cells = <0>;152 153 charger@1000 {154 compatible = "qcom,pm8941-charger";155 reg = <0x1000>;156 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,157 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,158 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,159 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,160 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,161 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,162 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,163 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;164 interrupt-names = "chg-done",165 "chg-fast",166 "chg-trkl",167 "bat-temp-ok",168 "bat-present",169 "chg-gone",170 "usb-valid",171 "dc-valid";172 qcom,fast-charge-current-limit = <1000000>;173 qcom,dc-current-limit = <1000000>;174 usb-otg-in-supply = <&pm8941_5vs1>;175 176 otg-vbus {};177 };178 };179