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