1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2*f126890aSEmmanuel Vadot%YAML 1.2 3*f126890aSEmmanuel Vadot--- 4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/qcom,pmi8998-charger.yaml# 5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadottitle: Qualcomm PMI8998/PM660 Switch-Mode Battery Charger "2" 8*f126890aSEmmanuel Vadot 9*f126890aSEmmanuel Vadotmaintainers: 10*f126890aSEmmanuel Vadot - Caleb Connolly <caleb.connolly@linaro.org> 11*f126890aSEmmanuel Vadot 12*f126890aSEmmanuel Vadotproperties: 13*f126890aSEmmanuel Vadot compatible: 14*f126890aSEmmanuel Vadot enum: 15*f126890aSEmmanuel Vadot - qcom,pmi8998-charger 16*f126890aSEmmanuel Vadot - qcom,pm660-charger 17*f126890aSEmmanuel Vadot 18*f126890aSEmmanuel Vadot reg: 19*f126890aSEmmanuel Vadot maxItems: 1 20*f126890aSEmmanuel Vadot 21*f126890aSEmmanuel Vadot interrupts: 22*f126890aSEmmanuel Vadot maxItems: 4 23*f126890aSEmmanuel Vadot 24*f126890aSEmmanuel Vadot interrupt-names: 25*f126890aSEmmanuel Vadot items: 26*f126890aSEmmanuel Vadot - const: usb-plugin 27*f126890aSEmmanuel Vadot - const: bat-ov 28*f126890aSEmmanuel Vadot - const: wdog-bark 29*f126890aSEmmanuel Vadot - const: usbin-icl-change 30*f126890aSEmmanuel Vadot 31*f126890aSEmmanuel Vadot io-channels: 32*f126890aSEmmanuel Vadot items: 33*f126890aSEmmanuel Vadot - description: USB in current in uA 34*f126890aSEmmanuel Vadot - description: USB in voltage in uV 35*f126890aSEmmanuel Vadot 36*f126890aSEmmanuel Vadot io-channel-names: 37*f126890aSEmmanuel Vadot items: 38*f126890aSEmmanuel Vadot - const: usbin_i 39*f126890aSEmmanuel Vadot - const: usbin_v 40*f126890aSEmmanuel Vadot 41*f126890aSEmmanuel Vadot monitored-battery: 42*f126890aSEmmanuel Vadot description: phandle to the simple-battery node 43*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 44*f126890aSEmmanuel Vadot 45*f126890aSEmmanuel Vadotrequired: 46*f126890aSEmmanuel Vadot - compatible 47*f126890aSEmmanuel Vadot - reg 48*f126890aSEmmanuel Vadot - interrupts 49*f126890aSEmmanuel Vadot - interrupt-names 50*f126890aSEmmanuel Vadot - io-channels 51*f126890aSEmmanuel Vadot - io-channel-names 52*f126890aSEmmanuel Vadot - monitored-battery 53*f126890aSEmmanuel Vadot 54*f126890aSEmmanuel VadotadditionalProperties: false 55*f126890aSEmmanuel Vadot 56*f126890aSEmmanuel Vadotexamples: 57*f126890aSEmmanuel Vadot - | 58*f126890aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 59*f126890aSEmmanuel Vadot 60*f126890aSEmmanuel Vadot pmic { 61*f126890aSEmmanuel Vadot #address-cells = <1>; 62*f126890aSEmmanuel Vadot #size-cells = <0>; 63*f126890aSEmmanuel Vadot #interrupt-cells = <4>; 64*f126890aSEmmanuel Vadot 65*f126890aSEmmanuel Vadot charger@1000 { 66*f126890aSEmmanuel Vadot compatible = "qcom,pmi8998-charger"; 67*f126890aSEmmanuel Vadot reg = <0x1000>; 68*f126890aSEmmanuel Vadot 69*f126890aSEmmanuel Vadot interrupts = <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>, 70*f126890aSEmmanuel Vadot <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>, 71*f126890aSEmmanuel Vadot <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>, 72*f126890aSEmmanuel Vadot <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>; 73*f126890aSEmmanuel Vadot interrupt-names = "usb-plugin", "bat-ov", "wdog-bark", "usbin-icl-change"; 74*f126890aSEmmanuel Vadot 75*f126890aSEmmanuel Vadot io-channels = <&pmi8998_rradc 3>, 76*f126890aSEmmanuel Vadot <&pmi8998_rradc 4>; 77*f126890aSEmmanuel Vadot io-channel-names = "usbin_i", 78*f126890aSEmmanuel Vadot "usbin_v"; 79*f126890aSEmmanuel Vadot 80*f126890aSEmmanuel Vadot monitored-battery = <&battery>; 81*f126890aSEmmanuel Vadot }; 82*f126890aSEmmanuel Vadot }; 83