1ce49e428SSebastian Reichel# SPDX-License-Identifier: GPL-2.0 2ce49e428SSebastian Reichel# Copyright (C) 2021 Sebastian Reichel 3ce49e428SSebastian Reichel%YAML 1.2 4ce49e428SSebastian Reichel--- 5*1ea78ec5SKrzysztof Kozlowski$id: http://devicetree.org/schemas/power/supply/cpcap-charger.yaml# 6*1ea78ec5SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 7ce49e428SSebastian Reichel 8ce49e428SSebastian Reicheltitle: Motorola CPCAP PMIC charger 9ce49e428SSebastian Reichel 10ce49e428SSebastian Reichelmaintainers: 11ce49e428SSebastian Reichel - Tony Lindgren <tony@atomide.com> 12ce49e428SSebastian Reichel - Sebastian Reichel <sre@kernel.org> 13ce49e428SSebastian Reichel 14ce49e428SSebastian Reicheldescription: | 15ce49e428SSebastian Reichel Motorola CPCAP is a PMIC found in some mobile phones, e.g. 16ce49e428SSebastian Reichel the Droid 4. This binding describes its battery charger 17ce49e428SSebastian Reichel sub-function. 18ce49e428SSebastian Reichel 19ce49e428SSebastian ReichelallOf: 20ce49e428SSebastian Reichel - $ref: power-supply.yaml# 21ce49e428SSebastian Reichel 22ce49e428SSebastian Reichelproperties: 23ce49e428SSebastian Reichel compatible: 24ce49e428SSebastian Reichel const: motorola,mapphone-cpcap-charger 25ce49e428SSebastian Reichel 26ce49e428SSebastian Reichel interrupts: 27ce49e428SSebastian Reichel items: 28ce49e428SSebastian Reichel - description: charger detection interrupt 29ce49e428SSebastian Reichel - description: reverse charge interrupt 30ce49e428SSebastian Reichel - description: SE1 charger detection interrupt 31ce49e428SSebastian Reichel - description: SE0 charger detection interrupt 32ce49e428SSebastian Reichel - description: reverse mode interrupt 33ce49e428SSebastian Reichel - description: charge current 2 interrupt 34ce49e428SSebastian Reichel - description: charge current 1 interrupt 35ce49e428SSebastian Reichel - description: VBUS valid interrupt 36ce49e428SSebastian Reichel - description: battery detect interrupt 37ce49e428SSebastian Reichel 38ce49e428SSebastian Reichel interrupt-names: 39ce49e428SSebastian Reichel items: 40ce49e428SSebastian Reichel - const: chrg_det 41ce49e428SSebastian Reichel - const: rvrs_chrg 42ce49e428SSebastian Reichel - const: chrg_se1b 43ce49e428SSebastian Reichel - const: se0conn 44ce49e428SSebastian Reichel - const: rvrs_mode 45ce49e428SSebastian Reichel - const: chrgcurr2 46ce49e428SSebastian Reichel - const: chrgcurr1 47ce49e428SSebastian Reichel - const: vbusvld 48ce49e428SSebastian Reichel - const: battdetb 49ce49e428SSebastian Reichel 50ce49e428SSebastian Reichel io-channels: 51ce49e428SSebastian Reichel items: 52ce49e428SSebastian Reichel - description: battery temperature 53ce49e428SSebastian Reichel - description: battery voltage 54ce49e428SSebastian Reichel - description: VBUS voltage 55ce49e428SSebastian Reichel - description: battery charge current 56ce49e428SSebastian Reichel - description: battery current 57ce49e428SSebastian Reichel 58ce49e428SSebastian Reichel io-channel-names: 59ce49e428SSebastian Reichel items: 60ce49e428SSebastian Reichel - const: battdetb 61ce49e428SSebastian Reichel - const: battp 62ce49e428SSebastian Reichel - const: vbus 63ce49e428SSebastian Reichel - const: chg_isense 64ce49e428SSebastian Reichel - const: batti 65ce49e428SSebastian Reichel 66ce49e428SSebastian Reichel mode-gpios: 67ce49e428SSebastian Reichel description: | 68ce49e428SSebastian Reichel Optionally CPCAP charger can have a companion wireless 69ce49e428SSebastian Reichel charge controller that is controlled with two GPIOs 70ce49e428SSebastian Reichel that are active low. 71ce49e428SSebastian Reichel minItems: 2 72ce49e428SSebastian Reichel maxItems: 2 73ce49e428SSebastian Reichel 74ce49e428SSebastian Reichelrequired: 75ce49e428SSebastian Reichel - compatible 76ce49e428SSebastian Reichel - interrupts 77ce49e428SSebastian Reichel - interrupt-names 78ce49e428SSebastian Reichel - io-channels 79ce49e428SSebastian Reichel - io-channel-names 80ce49e428SSebastian Reichel 81ce49e428SSebastian ReicheladditionalProperties: false 82ce49e428SSebastian Reichel 83ce49e428SSebastian Reichelexamples: 84ce49e428SSebastian Reichel - | 85ce49e428SSebastian Reichel #include <dt-bindings/gpio/gpio.h> 86ce49e428SSebastian Reichel cpcap { 87ce49e428SSebastian Reichel charger { 88ce49e428SSebastian Reichel compatible = "motorola,mapphone-cpcap-charger"; 89ce49e428SSebastian Reichel interrupts-extended = 90ce49e428SSebastian Reichel <&cpcap 13 0>, <&cpcap 12 0>, <&cpcap 29 0>, <&cpcap 28 0>, 91ce49e428SSebastian Reichel <&cpcap 22 0>, <&cpcap 21 0>, <&cpcap 20 0>, <&cpcap 19 0>, 92ce49e428SSebastian Reichel <&cpcap 54 0>; 93ce49e428SSebastian Reichel interrupt-names = 94ce49e428SSebastian Reichel "chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn", 95ce49e428SSebastian Reichel "rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld", 96ce49e428SSebastian Reichel "battdetb"; 97ce49e428SSebastian Reichel mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>, 98ce49e428SSebastian Reichel <&gpio3 23 GPIO_ACTIVE_LOW>; 99ce49e428SSebastian Reichel io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>, 100ce49e428SSebastian Reichel <&cpcap_adc 2>, <&cpcap_adc 5>, 101ce49e428SSebastian Reichel <&cpcap_adc 6>; 102ce49e428SSebastian Reichel io-channel-names = "battdetb", "battp", 103ce49e428SSebastian Reichel "vbus", "chg_isense", 104ce49e428SSebastian Reichel "batti"; 105ce49e428SSebastian Reichel }; 106ce49e428SSebastian Reichel }; 107