1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/power/suppl 4 $id: http://devicetree.org/schemas/power/supply/qcom,pm8916-lbc.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Qualcomm Linear Battery Charger 7 title: Qualcomm Linear Battery Charger 8 8 9 maintainers: 9 maintainers: 10 - Nikita Travkin <nikita@trvn.ru> 10 - Nikita Travkin <nikita@trvn.ru> 11 11 12 description: 12 description: 13 Linear Battery Charger hardware block, found 13 Linear Battery Charger hardware block, found in some Qualcomm PMICs 14 such as pm8916. Implements a simple, autonom 14 such as pm8916. Implements a simple, autonomous CC/CV charger. 15 15 16 allOf: 16 allOf: 17 - $ref: power-supply.yaml# 17 - $ref: power-supply.yaml# 18 18 19 properties: 19 properties: 20 compatible: 20 compatible: 21 const: qcom,pm8916-lbc 21 const: qcom,pm8916-lbc 22 22 23 reg: 23 reg: 24 items: 24 items: 25 - description: Charger 25 - description: Charger 26 - description: Battery 26 - description: Battery 27 - description: USB 27 - description: USB 28 - description: MISC 28 - description: MISC 29 29 30 reg-names: 30 reg-names: 31 items: 31 items: 32 - const: chgr 32 - const: chgr 33 - const: bat_if 33 - const: bat_if 34 - const: usb 34 - const: usb 35 - const: misc 35 - const: misc 36 36 37 interrupts: 37 interrupts: 38 items: 38 items: 39 - description: Battery detection 39 - description: Battery detection 40 - description: Fast charging 40 - description: Fast charging 41 - description: Charging failed 41 - description: Charging failed 42 - description: Charging done 42 - description: Charging done 43 - description: Battery present 43 - description: Battery present 44 - description: Battery temperature OK 44 - description: Battery temperature OK 45 - description: USB coarse detection 45 - description: USB coarse detection 46 - description: USB IN valid 46 - description: USB IN valid 47 - description: Charger gone 47 - description: Charger gone 48 - description: Overtemperature 48 - description: Overtemperature 49 49 50 interrupt-names: 50 interrupt-names: 51 items: 51 items: 52 - const: vbat_det 52 - const: vbat_det 53 - const: fast_chg 53 - const: fast_chg 54 - const: chg_fail 54 - const: chg_fail 55 - const: chg_done 55 - const: chg_done 56 - const: bat_pres 56 - const: bat_pres 57 - const: temp_ok 57 - const: temp_ok 58 - const: coarse_det 58 - const: coarse_det 59 - const: usb_vbus 59 - const: usb_vbus 60 - const: chg_gone 60 - const: chg_gone 61 - const: overtemp 61 - const: overtemp 62 62 63 qcom,fast-charge-safe-voltage: 63 qcom,fast-charge-safe-voltage: 64 $ref: /schemas/types.yaml#/definitions/uin 64 $ref: /schemas/types.yaml#/definitions/uint32 65 minimum: 4000000 65 minimum: 4000000 66 maximum: 4775000 66 maximum: 4775000 67 description: 67 description: 68 Maximum safe battery voltage in uV; May 68 Maximum safe battery voltage in uV; May be pre-set by bootloader, 69 in which case, setting this will harmles 69 in which case, setting this will harmlessly fail. 70 70 71 qcom,fast-charge-safe-current: 71 qcom,fast-charge-safe-current: 72 $ref: /schemas/types.yaml#/definitions/uin 72 $ref: /schemas/types.yaml#/definitions/uint32 73 minimum: 90000 73 minimum: 90000 74 maximum: 1440000 74 maximum: 1440000 75 description: 75 description: 76 Maximum safe battery charge current in u 76 Maximum safe battery charge current in uA; May be pre-set by 77 bootloader, in which case setting this w 77 bootloader, in which case setting this will harmlessly fail. 78 78 79 monitored-battery: true 79 monitored-battery: true 80 80 81 required: 81 required: 82 - compatible 82 - compatible 83 - reg 83 - reg 84 - interrupts 84 - interrupts 85 - interrupt-names 85 - interrupt-names 86 - qcom,fast-charge-safe-voltage 86 - qcom,fast-charge-safe-voltage 87 - qcom,fast-charge-safe-current 87 - qcom,fast-charge-safe-current 88 88 89 additionalProperties: false 89 additionalProperties: false 90 90 91 examples: 91 examples: 92 - | 92 - | 93 #include <dt-bindings/interrupt-controller 93 #include <dt-bindings/interrupt-controller/irq.h> 94 pmic { 94 pmic { 95 #address-cells = <1>; 95 #address-cells = <1>; 96 #size-cells = <0>; 96 #size-cells = <0>; 97 97 98 charger@1000 { 98 charger@1000 { 99 compatible = "qcom,pm8916-lbc"; 99 compatible = "qcom,pm8916-lbc"; 100 reg = <0x1000>, <0x1200>, <0x1300>, <0 100 reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>; 101 reg-names = "chgr", "bat_if", "usb", " 101 reg-names = "chgr", "bat_if", "usb", "misc"; 102 102 103 interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE 103 interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>, 104 <0x0 0x10 5 IRQ_TYPE_EDGE 104 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, 105 <0x0 0x10 6 IRQ_TYPE_EDGE 105 <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>, 106 <0x0 0x10 7 IRQ_TYPE_EDGE 106 <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, 107 <0x0 0x12 0 IRQ_TYPE_EDGE 107 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, 108 <0x0 0x12 1 IRQ_TYPE_EDGE 108 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, 109 <0x0 0x13 0 IRQ_TYPE_EDGE 109 <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>, 110 <0x0 0x13 1 IRQ_TYPE_EDGE 110 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, 111 <0x0 0x13 2 IRQ_TYPE_EDGE 111 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, 112 <0x0 0x13 4 IRQ_TYPE_EDGE 112 <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>; 113 interrupt-names = "vbat_det", 113 interrupt-names = "vbat_det", 114 "fast_chg", 114 "fast_chg", 115 "chg_fail", 115 "chg_fail", 116 "chg_done", 116 "chg_done", 117 "bat_pres", 117 "bat_pres", 118 "temp_ok", 118 "temp_ok", 119 "coarse_det", 119 "coarse_det", 120 "usb_vbus", 120 "usb_vbus", 121 "chg_gone", 121 "chg_gone", 122 "overtemp"; 122 "overtemp"; 123 monitored-battery = <&battery>; 123 monitored-battery = <&battery>; 124 124 125 qcom,fast-charge-safe-current = <90000 125 qcom,fast-charge-safe-current = <900000>; 126 qcom,fast-charge-safe-voltage = <43000 126 qcom,fast-charge-safe-voltage = <4300000>; 127 }; 127 }; 128 }; 128 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.