1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 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 Charger 8 9maintainers: 10 - Nikita Travkin <nikita@trvn.ru> 11 12description: 13 Linear Battery Charger hardware block, found in some Qualcomm PMICs 14 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-lbc 22 23 reg: 24 items: 25 - description: Charger 26 - description: Battery 27 - description: USB 28 - description: MISC 29 30 reg-names: 31 items: 32 - const: chgr 33 - const: bat_if 34 - const: usb 35 - const: misc 36 37 interrupts: 38 items: 39 - description: Battery detection 40 - description: Fast charging 41 - description: Charging failed 42 - description: Charging done 43 - description: Battery present 44 - description: Battery temperature OK 45 - description: USB coarse detection 46 - description: USB IN valid 47 - description: Charger gone 48 - description: Overtemperature 49 50 interrupt-names: 51 items: 52 - const: vbat_det 53 - const: fast_chg 54 - const: chg_fail 55 - const: chg_done 56 - const: bat_pres 57 - const: temp_ok 58 - const: coarse_det 59 - const: usb_vbus 60 - const: chg_gone 61 - const: overtemp 62 63 qcom,fast-charge-safe-voltage: 64 $ref: /schemas/types.yaml#/definitions/uint32 65 minimum: 4000000 66 maximum: 4775000 67 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/uint32 73 minimum: 90000 74 maximum: 1440000 75 description: 76 Maximum safe battery charge current in uA; May be pre-set by 77 bootloader, in which case setting this will harmlessly fail. 78 79 monitored-battery: true 80 81required: 82 - compatible 83 - reg 84 - interrupts 85 - interrupt-names 86 - qcom,fast-charge-safe-voltage 87 - qcom,fast-charge-safe-current 88 89additionalProperties: false 90 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