brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 7e6bf30 Raw
107 lines · yaml
1# SPDX-License-Identifier: GPL-2.02# Copyright (C) 2021 Sebastian Reichel3%YAML 1.24---5$id: http://devicetree.org/schemas/power/supply/cpcap-charger.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Motorola CPCAP PMIC charger9 10maintainers:11  - Tony Lindgren <tony@atomide.com>12  - Sebastian Reichel <sre@kernel.org>13 14description: |15  Motorola CPCAP is a PMIC found in some mobile phones, e.g.16  the Droid 4. This binding describes its battery charger17  sub-function.18 19allOf:20  - $ref: power-supply.yaml#21 22properties:23  compatible:24    const: motorola,mapphone-cpcap-charger25 26  interrupts:27    items:28      - description: charger detection interrupt29      - description: reverse charge interrupt30      - description: SE1 charger detection interrupt31      - description: SE0 charger detection interrupt32      - description: reverse mode interrupt33      - description: charge current 2 interrupt34      - description: charge current 1 interrupt35      - description: VBUS valid interrupt36      - description: battery detect interrupt37 38  interrupt-names:39    items:40      - const: chrg_det41      - const: rvrs_chrg42      - const: chrg_se1b43      - const: se0conn44      - const: rvrs_mode45      - const: chrgcurr246      - const: chrgcurr147      - const: vbusvld48      - const: battdetb49 50  io-channels:51    items:52      - description: battery temperature53      - description: battery voltage54      - description: VBUS voltage55      - description: battery charge current56      - description: battery current57 58  io-channel-names:59    items:60      - const: battdetb61      - const: battp62      - const: vbus63      - const: chg_isense64      - const: batti65 66  mode-gpios:67    description: |68      Optionally CPCAP charger can have a companion wireless69      charge controller that is controlled with two GPIOs70      that are active low.71    minItems: 272    maxItems: 273 74required:75  - compatible76  - interrupts77  - interrupt-names78  - io-channels79  - io-channel-names80 81additionalProperties: false82 83examples:84  - |85    #include <dt-bindings/gpio/gpio.h>86    cpcap {87      charger {88        compatible = "motorola,mapphone-cpcap-charger";89        interrupts-extended =90                <&cpcap 13 0>, <&cpcap 12 0>, <&cpcap 29 0>, <&cpcap 28 0>,91                <&cpcap 22 0>, <&cpcap 21 0>, <&cpcap 20 0>, <&cpcap 19 0>,92                <&cpcap 54 0>;93        interrupt-names =94                "chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",95                "rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",96                "battdetb";97        mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>,98                     <&gpio3 23 GPIO_ACTIVE_LOW>;99        io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>,100                      <&cpcap_adc 2>, <&cpcap_adc 5>,101                      <&cpcap_adc 6>;102        io-channel-names = "battdetb", "battp",103                           "vbus", "chg_isense",104                           "batti";105      };106    };107