brintos

brintos / linux-shallow public Read only

0
0
Text · 2.0 KiB · 069422a Raw
91 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/power/supply/ti,lp8727.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: TI/National Semiconductor LP8727 Charger8 9maintainers:10  - Sebastian Reichel <sre@kernel.org>11 12allOf:13  - $ref: power-supply.yaml#14 15properties:16  compatible:17    const: ti,lp872718 19  reg:20    const: 0x2721 22  interrupts:23    maxItems: 124 25  debounce-ms:26    description: interrupt debounce time in ms27 28patternProperties:29  '^(ac|usb)$':30    type: object31    additionalProperties: false32    description: USB/AC charging parameters33    properties:34      charger-type:35        enum:36          - ac37          - usb38 39      eoc-level:40        $ref: /schemas/types.yaml#/definitions/uint841        minimum: 042        maximum: 643        description: |44          End of Charge Percentage with the following mapping:45          0 = 5%, 1 = 10%, 2 = 16%, 3 = 20%, 4 = 25%, 5 = 33%, 6 = 50%46 47      charging-current:48        $ref: /schemas/types.yaml#/definitions/uint849        minimum: 050        maximum: 951        description: |52          Charging current with the following mapping:53          0 = 90mA, 1 = 100mA, 2 = 400mA, 3 = 450mA, 4 = 500mA, 5 = 600mA,54          6 = 700mA, 7 = 800mA, 8 = 900mA, 9 = 1000mA55 56required:57  - compatible58  - reg59 60additionalProperties: false61 62examples:63  - |64    #include <dt-bindings/interrupt-controller/irq.h>65    i2c {66      #address-cells = <1>;67      #size-cells = <0>;68 69      lp8727: charger@27 {70        compatible = "ti,lp8727";71        reg = <0x27>;72        interrupt-parent = <&gpio5>;73        interrupts = <6 IRQ_TYPE_EDGE_FALLING>;74        debounce-ms = <300>;75 76        /* AC charger: 5% EOC and 500mA charging current */77        ac {78          charger-type = "ac";79          eoc-level = /bits/ 8 <0>;80          charging-current = /bits/ 8 <4>;81        };82 83        /* USB charger: 10% EOC and 400mA charging current */84        usb {85          charger-type = "usb";86          eoc-level = /bits/ 8 <1>;87          charging-current = /bits/ 8 <2>;88        };89      };90    };91