Motorola CPCAP PMIC charger

Schema identifier ($id): "http://devicetree.org/schemas/power/supply/cpcap-charger.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Tony Lindgren <tony@atomide.com>", "Sebastian Reichel <sre@kernel.org>"

Motorola CPCAP is a PMIC found in some mobile phones, e.g. the Droid 4. This binding describes its battery charger sub-function.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): power-supply.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "motorola,mapphone-cpcap-charger"

interrupts — required here #

Array item rules (items) #

Item 1

charger detection interrupt

Item 2

reverse charge interrupt

Item 3

SE1 charger detection interrupt

Item 4

SE0 charger detection interrupt

Item 5

reverse mode interrupt

Item 6

charge current 2 interrupt

Item 7

charge current 1 interrupt

Item 8

VBUS valid interrupt

Item 9

battery detect interrupt

interrupt-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "chrg_det"

Item 2

Exact value (const): "rvrs_chrg"

Item 3

Exact value (const): "chrg_se1b"

Item 4

Exact value (const): "se0conn"

Item 5

Exact value (const): "rvrs_mode"

Item 6

Exact value (const): "chrgcurr2"

Item 7

Exact value (const): "chrgcurr1"

Item 8

Exact value (const): "vbusvld"

Item 9

Exact value (const): "battdetb"

io-channels — required here #

Array item rules (items) #

Item 1

battery temperature

Item 2

battery voltage

Item 3

VBUS voltage

Item 4

battery charge current

Item 5

battery current

io-channel-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "battdetb"

Item 2

Exact value (const): "battp"

Item 3

Exact value (const): "vbus"

Item 4

Exact value (const): "chg_isense"

Item 5

Exact value (const): "batti"

mode-gpios — not listed as required here #

Optionally CPCAP charger can have a companion wireless charge controller that is controlled with two GPIOs that are active low.

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Required in this object (required): "compatible", "interrupts", "interrupt-names", "io-channels", "io-channel-names"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
cpcap {
  charger {
    compatible = "motorola,mapphone-cpcap-charger";
    interrupts-extended =
            <&cpcap 13 0>, <&cpcap 12 0>, <&cpcap 29 0>, <&cpcap 28 0>,
            <&cpcap 22 0>, <&cpcap 21 0>, <&cpcap 20 0>, <&cpcap 19 0>,
            <&cpcap 54 0>;
    interrupt-names =
            "chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
            "rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",
            "battdetb";
    mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>,
                 <&gpio3 23 GPIO_ACTIVE_LOW>;
    io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>,
                  <&cpcap_adc 2>, <&cpcap_adc 5>,
                  <&cpcap_adc 6>;
    io-channel-names = "battdetb", "battp",
                       "vbus", "chg_isense",
                       "batti";
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 2: Copyright (C) 2021 Sebastian Reichel

Edit this page