1*dad980f1SSebastian Reichel# SPDX-License-Identifier: GPL-2.0 2*dad980f1SSebastian Reichel%YAML 1.2 3*dad980f1SSebastian Reichel--- 4*dad980f1SSebastian Reichel$id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml# 5*dad980f1SSebastian Reichel$schema: http://devicetree.org/meta-schemas/core.yaml# 6*dad980f1SSebastian Reichel 7*dad980f1SSebastian Reicheltitle: simple battery chargers only communicating through GPIOs 8*dad980f1SSebastian Reichel 9*dad980f1SSebastian Reichelmaintainers: 10*dad980f1SSebastian Reichel - Sebastian Reichel <sre@kernel.org> 11*dad980f1SSebastian Reichel 12*dad980f1SSebastian Reicheldescription: 13*dad980f1SSebastian Reichel This binding is for all chargers, which are working more or less 14*dad980f1SSebastian Reichel autonomously, only providing some status GPIOs and possibly some 15*dad980f1SSebastian Reichel GPIOs for limited control over the charging process. 16*dad980f1SSebastian Reichel 17*dad980f1SSebastian Reichelproperties: 18*dad980f1SSebastian Reichel compatible: 19*dad980f1SSebastian Reichel const: gpio-charger 20*dad980f1SSebastian Reichel 21*dad980f1SSebastian Reichel charger-type: 22*dad980f1SSebastian Reichel enum: 23*dad980f1SSebastian Reichel - unknown 24*dad980f1SSebastian Reichel - battery 25*dad980f1SSebastian Reichel - ups 26*dad980f1SSebastian Reichel - mains 27*dad980f1SSebastian Reichel - usb-sdp # USB standard downstream port 28*dad980f1SSebastian Reichel - usb-dcp # USB dedicated charging port 29*dad980f1SSebastian Reichel - usb-cdp # USB charging downstream port 30*dad980f1SSebastian Reichel - usb-aca # USB accessory charger adapter 31*dad980f1SSebastian Reichel description: 32*dad980f1SSebastian Reichel Type of the charger, e.g. "mains" for a wall charger. 33*dad980f1SSebastian Reichel 34*dad980f1SSebastian Reichel gpios: 35*dad980f1SSebastian Reichel maxItems: 1 36*dad980f1SSebastian Reichel description: GPIO indicating the charger presence 37*dad980f1SSebastian Reichel 38*dad980f1SSebastian Reichel charge-status-gpios: 39*dad980f1SSebastian Reichel maxItems: 1 40*dad980f1SSebastian Reichel description: GPIO indicating the charging status 41*dad980f1SSebastian Reichel 42*dad980f1SSebastian Reichelrequired: 43*dad980f1SSebastian Reichel - compatible 44*dad980f1SSebastian Reichel - gpios 45*dad980f1SSebastian Reichel 46*dad980f1SSebastian ReicheladditionalProperties: false 47*dad980f1SSebastian Reichel 48*dad980f1SSebastian Reichelexamples: 49*dad980f1SSebastian Reichel - | 50*dad980f1SSebastian Reichel #include <dt-bindings/gpio/gpio.h> 51*dad980f1SSebastian Reichel 52*dad980f1SSebastian Reichel charger { 53*dad980f1SSebastian Reichel compatible = "gpio-charger"; 54*dad980f1SSebastian Reichel charger-type = "usb-sdp"; 55*dad980f1SSebastian Reichel 56*dad980f1SSebastian Reichel gpios = <&gpd 28 GPIO_ACTIVE_LOW>; 57*dad980f1SSebastian Reichel charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>; 58*dad980f1SSebastian Reichel }; 59