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