Qualcomm Switch-Mode Battery Charger and Boost
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/qcom,pm8941-charger.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Sebastian Reichel <sre@kernel.org>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "qcom,pm8226-charger", "qcom,pm8941-charger"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Array item rules (items) #
Item 1
charge done
Item 2
charge fast mode
Item 3
charge trickle mode
Item 4
battery temperature ok
Item 5
battery present
Item 6
charger disconnected
Item 7
USB-in valid
Item 8
DC-in valid
interrupt-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"chg-done"
Item 2
Exact value (
const):"chg-fast"
Item 3
Exact value (
const):"chg-trkl"
Item 4
Exact value (
const):"bat-temp-ok"
Item 5
Exact value (
const):"bat-present"
Item 6
Exact value (
const):"chg-gone"
Item 7
Exact value (
const):"usb-valid"
Item 8
Exact value (
const):"dc-valid"
qcom,fast-charge-current-limit — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 100000
Maximum value (maximum): 3000000
Maximum charge current in uA; May be clamped to safety limits; Defaults to 1A
qcom,fast-charge-low-threshold-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 2100000
Maximum value (maximum): 3600000
Battery voltage limit in uV above which fast charging may operate; Defaults to 3.2V Below this value linear or switch-mode auto-trickle-charging will operate.
qcom,fast-charge-high-threshold-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 3240000
Maximum value (maximum): 5000000
Battery voltage limit in uV below which fast charging may operate; Defaults to 4.2V The fast charger will attempt to charge the battery to this voltage. May be clamped to safety limits.
qcom,fast-charge-safe-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 3240000
Maximum value (maximum): 5000000
Maximum safe battery voltage in uV; May be pre-set by bootloader, in which case, setting this will harmlessly fail. The property 'fast-charge-high-watermark' will be clamped by this value. Defaults to 4.2V.
qcom,fast-charge-safe-current — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 100000
Maximum value (maximum): 3000000
Maximum safe battery charge current in uA; May pre-set by bootloader, in which case, setting this will harmlessly fail. The property 'qcom,fast-charge-current-limit' will be clamped by this value. Defaults to 1A.
qcom,auto-recharge-threshold-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 3240000
Maximum value (maximum): 5000000
Battery voltage limit in uV below which auto-recharge functionality will restart charging after end-of-charge; The high cutoff limit for auto-recharge is 5% above this value. Defaults to 4.1V.
qcom,minimum-input-voltage — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 4200000
Maximum value (maximum): 9600000
Input voltage level in uV above which charging may operate. Defaults to 4.3V.
qcom,dc-current-limit — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 100000
Maximum value (maximum): 2500000
Default DC charge current limit in uA. Defaults to 100mA.
qcom,disable-dc — not listed as required here #
Value type (type): "boolean"
Disable DC charger
qcom,jeita-extended-temp-range — not listed as required here #
Value type (type): "boolean"
Enable JEITA extended temperature range; This does *not* adjust the maximum charge voltage or current in the extended temperature range. It only allows charging when the battery is in the extended temperature range. Voltage/current regulation must be done externally to fully comply with the JEITA safety guidelines if this flag is set.
usb-charge-current-limit — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 100000
Maximum value (maximum): 2500000
Default USB charge current limit in uA.
usb-otg-in-supply — not listed as required here #
Reference to the regulator supplying power to the USB_OTG_IN pin.
otg-vbus — not listed as required here #
Shared schema rule ($ref): /schemas/regulator/regulator.yaml#
This node defines a regulator used to control the direction of VBUS voltage. Specifically whether to supply voltage to VBUS for host mode operation of the OTG port, or allow input voltage from external VBUS for charging. In the hardware, the supply for this regulator comes from usb_otg_in-supply.
Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
charger@1000 {
compatible = "qcom,pm8941-charger";
reg = <0x1000>;
interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "chg-done",
"chg-fast",
"chg-trkl",
"bat-temp-ok",
"bat-present",
"chg-gone",
"usb-valid",
"dc-valid";
qcom,fast-charge-current-limit = <1000000>;
qcom,dc-current-limit = <1000000>;
usb-otg-in-supply = <&pm8941_5vs1>;
otg-vbus {};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0