129 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/power/supply/qcom,pm8916-lbc.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Qualcomm Linear Battery Charger8 9maintainers:10 - Nikita Travkin <nikita@trvn.ru>11 12description:13 Linear Battery Charger hardware block, found in some Qualcomm PMICs14 such as pm8916. Implements a simple, autonomous CC/CV charger.15 16allOf:17 - $ref: power-supply.yaml#18 19properties:20 compatible:21 const: qcom,pm8916-lbc22 23 reg:24 items:25 - description: Charger26 - description: Battery27 - description: USB28 - description: MISC29 30 reg-names:31 items:32 - const: chgr33 - const: bat_if34 - const: usb35 - const: misc36 37 interrupts:38 items:39 - description: Battery detection40 - description: Fast charging41 - description: Charging failed42 - description: Charging done43 - description: Battery present44 - description: Battery temperature OK45 - description: USB coarse detection46 - description: USB IN valid47 - description: Charger gone48 - description: Overtemperature49 50 interrupt-names:51 items:52 - const: vbat_det53 - const: fast_chg54 - const: chg_fail55 - const: chg_done56 - const: bat_pres57 - const: temp_ok58 - const: coarse_det59 - const: usb_vbus60 - const: chg_gone61 - const: overtemp62 63 qcom,fast-charge-safe-voltage:64 $ref: /schemas/types.yaml#/definitions/uint3265 minimum: 400000066 maximum: 477500067 description:68 Maximum safe battery voltage in uV; May be pre-set by bootloader,69 in which case, setting this will harmlessly fail.70 71 qcom,fast-charge-safe-current:72 $ref: /schemas/types.yaml#/definitions/uint3273 minimum: 9000074 maximum: 144000075 description:76 Maximum safe battery charge current in uA; May be pre-set by77 bootloader, in which case setting this will harmlessly fail.78 79 monitored-battery: true80 81required:82 - compatible83 - reg84 - interrupts85 - interrupt-names86 - qcom,fast-charge-safe-voltage87 - qcom,fast-charge-safe-current88 89additionalProperties: false90 91examples:92 - |93 #include <dt-bindings/interrupt-controller/irq.h>94 pmic {95 #address-cells = <1>;96 #size-cells = <0>;97 98 charger@1000 {99 compatible = "qcom,pm8916-lbc";100 reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>;101 reg-names = "chgr", "bat_if", "usb", "misc";102 103 interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>,104 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,105 <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>,106 <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,107 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,108 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,109 <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>,110 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,111 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,112 <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>;113 interrupt-names = "vbat_det",114 "fast_chg",115 "chg_fail",116 "chg_done",117 "bat_pres",118 "temp_ok",119 "coarse_det",120 "usb_vbus",121 "chg_gone",122 "overtemp";123 monitored-battery = <&battery>;124 125 qcom,fast-charge-safe-current = <900000>;126 qcom,fast-charge-safe-voltage = <4300000>;127 };128 };129