Qualcomm Linear Battery Charger
Schema identifier ($id): "http://devicetree.org/schemas/power/supply/qcom,pm8916-lbc.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Nikita Travkin <nikita@trvn.ru>"
Linear Battery Charger hardware block, found in some Qualcomm PMICs such as pm8916. Implements a simple, autonomous CC/CV charger.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):power-supply.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "qcom,pm8916-lbc"
reg — required here #
Array item rules (items) #
Item 1
Charger
Item 2
Battery
Item 3
USB
Item 4
MISC
reg-names — not listed as required here #
Array item rules (items) #
Item 1
Exact value (
const):"chgr"
Item 2
Exact value (
const):"bat_if"
Item 3
Exact value (
const):"usb"
Item 4
Exact value (
const):"misc"
interrupts — required here #
Array item rules (items) #
Item 1
Battery detection
Item 2
Fast charging
Item 3
Charging failed
Item 4
Charging done
Item 5
Battery present
Item 6
Battery temperature OK
Item 7
USB coarse detection
Item 8
USB IN valid
Item 9
Charger gone
Item 10
Overtemperature
interrupt-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"vbat_det"
Item 2
Exact value (
const):"fast_chg"
Item 3
Exact value (
const):"chg_fail"
Item 4
Exact value (
const):"chg_done"
Item 5
Exact value (
const):"bat_pres"
Item 6
Exact value (
const):"temp_ok"
Item 7
Exact value (
const):"coarse_det"
Item 8
Exact value (
const):"usb_vbus"
Item 9
Exact value (
const):"chg_gone"
Item 10
Exact value (
const):"overtemp"
qcom,fast-charge-safe-voltage — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 4000000
Maximum value (maximum): 4775000
Maximum safe battery voltage in uV; May be pre-set by bootloader, in which case, setting this will harmlessly fail.
qcom,fast-charge-safe-current — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 90000
Maximum value (maximum): 1440000
Maximum safe battery charge current in uA; May be pre-set by bootloader, in which case setting this will harmlessly fail.
monitored-battery — not listed as required here #
true — No constraints added by this property rule.
Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "qcom,fast-charge-safe-voltage", "qcom,fast-charge-safe-current"
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,pm8916-lbc";
reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>;
reg-names = "chgr", "bat_if", "usb", "misc";
interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "vbat_det",
"fast_chg",
"chg_fail",
"chg_done",
"bat_pres",
"temp_ok",
"coarse_det",
"usb_vbus",
"chg_gone",
"overtemp";
monitored-battery = <&battery>;
qcom,fast-charge-safe-current = <900000>;
qcom,fast-charge-safe-voltage = <4300000>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)